page.list.docker.environment.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. global $myUser;
  3. User::check_access('docker','read');
  4. require_once(__DIR__.SLASH.'DockerEnvironment.class.php');
  5. $states = array();
  6. foreach (Dockerenvironment::states() as $key => $state) {
  7. $states[$key] = $state['label'];
  8. }
  9. ?>
  10. <div class="row">
  11. <div class="col-md-8">
  12. <select id="filters" data-type="filter" data-label="Recherche" data-function="docker_environment_search">
  13. <option value="label" data-filter-type="text">Libellé</option>
  14. <option value="machine" data-filter-type="number">Machine hôte</option>
  15. <option value="client" data-filter-type="client">Client</option>
  16. <option value="domain" data-filter-type="text">Nom de domaine</option>
  17. <option value="port" data-filter-type="number">Port docker</option>
  18. <option value="git" data-filter-type="text">Dépot git</option>
  19. <option value="memory" data-filter-type="number">Mémoire max.</option>
  20. <option value="cpu" data-filter-type="number">Cpu max.</option>
  21. <option value="ssl" data-filter-type="boolean">SSL</option>
  22. <option value="state" data-filter-type="list" data-filter-source='<?php echo json_encode($states); ?>' >Etat</option>
  23. </select>
  24. </div>
  25. <div class="col-md-4">
  26. <?php if($myUser->can('docker', 'edit')) : ?>
  27. <a href="index.php?module=docker&page=list.docker.machine" class="btn btn-dark right ml-2"><i class="fas fa-eye"></i> Machines</a>
  28. <a href="index.php?module=docker&page=sheet.docker.environment" class="btn btn-success right"><i class="fas fa-plus"></i> Environnement</a>
  29. <?php endif; ?>
  30. </div>
  31. </div>
  32. <br/>
  33. <h4 class="results-count"><span></span> Résultat(s) <div class="btn btn-dark btn-small" onclick="docker_environment_search(null,true)"><i class="far fa-file-excel"></i> Exporter</div></h4>
  34. <div class="row">
  35. <!-- search results -->
  36. <div class="col-xl-12">
  37. <table id="docker-environments" class="table table-striped " data-entity-search="docker_environment_search">
  38. <thead>
  39. <tr>
  40. <th data-sortable="domain">Domaine</th>
  41. <th data-sortable="client">Client</th>
  42. <th data-sortable="state">Etat</th>
  43. <th data-sortable="cpu">Cpu</th>
  44. <th data-sortable="memory">Ram</th>
  45. <th data-sortable="git">Git</th>
  46. <th data-sortable="port">Port interne</th>
  47. <th></th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <tr data-id="{{id}}" class="hidden">
  52. <td>{{domain}}</td>
  53. <td><a href="index.php?module=client&page=sheet.client&id={{client.id}}">{{client.label}}</a></td>
  54. <td>{{state.label}}</td>
  55. <td>{{cpu}}</td>
  56. <td>{{memory}} Mo</td>
  57. <td>{{git}}</td>
  58. <td>{{port}}</td>
  59. <td>
  60. <div class="btn-group btn-group-sm right" role="group">
  61. <a class="btn btn-info" href="index.php?module=docker&page=sheet.docker.environment&id={{id}}"><i class="fas fa-pencil-alt"></i></a>
  62. <div class="btn btn-danger " onclick="docker_environment_delete(this);"><i class="far fa-trash-alt"></i></div>
  63. </div>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. <!-- Pagination (data-range définit le nombre de pages max affichées avant et après la page courante) -->
  69. <ul class="pagination justify-content-center" data-range="5">
  70. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');docker_environment_search();">
  71. <span class="page-link">{{label}}</span>
  72. </li>
  73. </ul>
  74. </div>
  75. </div>