page.list.docker.machine.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. global $myUser;
  3. User::check_access('docker','read');
  4. require_once(__DIR__.SLASH.'DockerMachine.class.php');
  5. ?>
  6. <div class="plugin-docker">
  7. <div class="row">
  8. <div class="col-md-12">
  9. <div class="d-flex my-2 w-100">
  10. <h4 class="d-inline-block my-auto mx-0 text-uppercase">Liste des machines</h4>
  11. <div class="text-left ml-3 d-inline-block noPrint">
  12. <div onclick="window.print();" class="btn btn-info rounded-0 btn-squarred" title="Imprimer la page"><i class="fas fa-print"></i></div>
  13. <div onclick="docker_machine_search(null,true);" id="export-dockers-btn" class="btn btn-info rounded-0 btn-squarred ml-1" title="Exporter les résultats"><i class="fas fa-file-export"></i></div>
  14. </div>
  15. <div class="my-auto ml-auto mr-0 noPrint">
  16. <?php if($myUser->can('docker', 'edit')) : ?>
  17. <a href="index.php?module=docker&page=sheet.docker.machine" class="btn btn-success right"><i class="fas fa-plus"></i> Ajouter</a>
  18. <?php endif; ?>
  19. </div>
  20. </div>
  21. <div class="clear noPrint"></div>
  22. </div>
  23. <div class="col-md-12">
  24. <select id="filters" data-type="filter" data-label="Recherche" data-function="docker_machine_search">
  25. <option value="label" data-filter-type="text">Libellé</option>
  26. <option value="ip" data-filter-type="text">Ip SSH</option>
  27. <option value="port" data-filter-type="number">Port SSH</option>
  28. <option value="domain" data-filter-type="text">Nom de domaine</option>
  29. <option value="sophosReference" data-filter-type="text">Référence sophos</option>
  30. <option value="description" data-filter-type="text">Description</option>
  31. </select>
  32. </div>
  33. </div>
  34. <h5 class="results-count"><span></span> Résultat(s)</h5>
  35. <div class="row">
  36. <!-- search results -->
  37. <div class="col-xl-12">
  38. <table id="machines" class="table table-striped " data-entity-search="docker_machine_search">
  39. <thead>
  40. <tr>
  41. <!--<th>#</th>-->
  42. <th data-sortable="label">Libellé</th>
  43. <th data-sortable="ip">Ip SSH</th>
  44. <th data-sortable="public_key">Clé publique</th>
  45. <th data-sortable="domain">Nom de domaine</th>
  46. <th data-sortable="sophosReference">Référence sophos</th>
  47. <th></th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <tr data-id="{{id}}" class="hidden item-line">
  52. <!--<td class="align-middle">{{id}}</td>-->
  53. <td class="align-middle">{{label}} <small class="text-muted">{{{description}}}</small></td>
  54. <td class="align-middle">{{ip}} (Port {{port}})</td>
  55. <td class="align-middle">
  56. <textarea class="machine-public-key" onclick="$(this).select()">{{public_key}}</textarea>
  57. </td>
  58. <td class="align-middle">{{domain}}</td>
  59. <td class="align-middle">{{sophosReference}}</td>
  60. <td class="align-middle text-right">
  61. <div class="btn-group btn-group-sm" role="group">
  62. <a class="btn text-info" title="Éditer machine" href="index.php?module=docker&page=sheet.docker.machine&id={{id}}"><i class="fas fa-pencil-alt"></i></a>
  63. <div class="btn text-danger" title="Supprimer machine" onclick="docker_machine_delete(this);"><i class="far fa-trash-alt"></i></div>
  64. </div>
  65. </td>
  66. </tr>
  67. </tbody>
  68. </table><br>
  69. <!-- Pagination (data-range définit le nombre de pages max affichées avant et après la page courante) -->
  70. <ul class="pagination justify-content-center" data-range="5">
  71. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');docker_machine_search();">
  72. <span class="page-link">{{label}}</span>
  73. </li>
  74. </ul>
  75. </div>
  76. </div>
  77. </div>