page.sheet.docker.machine.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. User::check_access('docker','read');
  3. require_once(__DIR__.SLASH.'DockerMachine.class.php');
  4. $machine = DockerMachine::provide();
  5. if($machine->id==0){
  6. $machine->ip = '10.172.20.';
  7. $machine->port = 22;
  8. }
  9. ?>
  10. <div class="plugin-docker">
  11. <div id="machine-form" class="row justify-content-md-center machine-form" data-action="docker_machine_save" data-id="<?php echo $machine->id; ?>">
  12. <div class="col-md-6 shadow-sm bg-white p-3">
  13. <h3>Machine
  14. <div onclick="docker_machine_save();" class="btn btn-small btn-success right"><i class="fas fa-check"></i> Enregistrer</div>
  15. <a href="index.php?module=docker&page=list.docker.machine" class="btn btn-small btn-dark right mr-2">Retour</a></h3>
  16. <label for="label">Libellé</label>
  17. <input value="<?php echo $machine->label; ?>" class="form-control" type="text" id="label" >
  18. <label for="ip">Ip SSH</label>
  19. <input class="form-control" type="text" value="<?php echo $machine->ip; ?>" id="ip">
  20. <label for="port">Port SSH</label>
  21. <input value="<?php echo $machine->port; ?>" class="form-control" type="number" id="port" >
  22. <label for="domain">Nom de domaine</label>
  23. <input type="text" class="form-control" type="text" id="domain" value="<?php echo $machine->domain; ?>">
  24. <label for="sophosReference">Référence sophos</label>
  25. <input value="<?php echo $machine->sophosReference; ?>" class="form-control" type="text" id="sophosReference" >
  26. <label for="description">Description</label>
  27. <textarea class="" type="text" data-type="wysiwyg" id="description"><?php echo $machine->description; ?></textarea>
  28. <label for="private_key">Clé privée</label>
  29. <small class="text-muted">Nom id_rsa uniquement</small>
  30. <input value="" class="component-file-default bg-light shadow-sm rounded-sm" type="text" data-type="file" data-extension="ppk,id_rsa" data-action="docker_machine_private_key" data-id="private_key" data-data='{"id":"<?php echo $machine->id; ?>"}' id="private_key" >
  31. <label for="public_key">Clé publique</label>
  32. <small class="text-muted">Extension .pub uniquement</small>
  33. <input value="" class="component-file-default bg-light shadow-sm rounded-sm" type="text" data-type="file" data-extension="ppk,pub,id_rsa" data-action="docker_machine_public_key" data-id="public_key" data-data='{"id":"<?php echo $machine->id; ?>"}' id="public_key" >
  34. <br/>
  35. </div>
  36. </div>
  37. </div>