page.list.machine.application.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. global $myUser;
  3. User::check_access('host','read');
  4. require_once(__DIR__.SLASH.'MachineApplication.class.php');
  5. ?>
  6. <div class="plugin-host">
  7. <div class="row">
  8. <?php
  9. //var_dump($machine->id);
  10. $defaultFilters = array();
  11. if($machine->id != 0){
  12. $defaultFilters = filters_default(array(
  13. "",
  14. array('main.machine' => $machine->id)
  15. ));
  16. }
  17. ?>
  18. <div class="col-md-12">
  19. <select id="host_machine_application-filters" data-urlsearch <?php echo $machine->id!=0 ? 'data-hide-filters' : ''; ?> data-default='<?php echo json_encode($defaultFilters); ?>' data-type="filter" data-label="Recherche" data-function="host_machine_application_search">
  20. <option value="main.label" data-filter-type="text">Libellé</option>
  21. <option value="main.version" data-filter-type="integer">Version</option>
  22. <option value="main.url" data-filter-type="text">Url</option>
  23. <option value="main.monitored" data-filter-type="boolean">A surveiller</option>
  24. <option value="main.machine" data-filter-type="integer">Machine liée</option>
  25. </select>
  26. </div>
  27. </div>
  28. <h5 class="results-count my-2"><span></span> Application(s)
  29. <?php if($myUser->can('host', 'edit')) : ?>
  30. <a onclick="host_machine_application_edit();" class="btn btn-mini btn-success right noReadOnly text-light"><i class="fas fa-plus"></i></a>
  31. <?php endif; ?>
  32. <div class="clear noPrint"></div>
  33. </h5>
  34. <div class="row">
  35. <!-- search results -->
  36. <div class="col-xl-12">
  37. <!-- présentation liste -->
  38. <ul id="machine-applications" class="list-group mb-3" data-entity-search="host_machine_application_search">
  39. <li data-id="{{id}}" class="hidden item-line p-2 list-group-item pointer" onclick="host_machine_application_edit(this);">
  40. <div class="align-middle">
  41. <div class="d-inline-block mt-1"><span class="font-weight-bold">{{label}}</span> - {{#version}}<span class="text-muted">(v{{version}})</span>{{/version}} <a href="{{url}}">{{url}}</a></div>
  42. <div class="btn-group btn-group-sm right" role="group">
  43. <div class="p-1">{{#monitored}} <i class="far fa-eye text-success" data-tooltip title="Application surveillée"></i>{{/monitored}}{{^monitored}}<i class="far fa-eye-slash text-muted" data-tooltip title="Application non surveillée"></i>{{/monitored}}</div>
  44. <div class="btn btn-mini" data-scope="host_application" data-uid="{{id}}" data-show-important="true" data-type="history" data-tooltip title="Ouvrir l'historique de l'application"> <i class="far fa-comment-dots"></i></div>
  45. <div class="btn text-dark" title="Voir les accès" data-tooltip onclick="host_application_access_page_search(this,event);"><i class="fas fa-user-lock"></i></div>
  46. <div class="btn text-danger noReadOnly" title="Supprimer" onclick="host_machine_application_delete(this,event);"><i class="far fa-trash-alt"></i></div>
  47. </div>
  48. </div>
  49. <?php if($machine->id == 0): ?>
  50. <div class="align-middle">{{machine.label}}</div>
  51. <?php endif; ?>
  52. </li>
  53. </ul>
  54. </div>
  55. </div>
  56. </div>