mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-03-09 15:40:18 +00:00
Add/commit page vmactions
This commit is contained in:
parent
07a1ef3190
commit
045274ca6d
1 changed files with 50 additions and 0 deletions
50
code/web/www/pages/actionvm.php
Normal file
50
code/web/www/pages/actionvm.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
include(dirname(__DIR__).'/pages/includes/header.php');
|
||||
|
||||
$instanceinfo = json_decode($q->GET_byid("instances", $_GET['id']), true)['value'];
|
||||
$instanceinfo = (object) $instanceinfo;
|
||||
|
||||
$status = json_decode($q->GET_status('current', $_GET['id']), true)['value']['data'];
|
||||
$status = (object) $status;
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header"> VM - Informations & actions </h1>
|
||||
</div>
|
||||
<!-- /.col-lg-12 -->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body" >
|
||||
<ul>
|
||||
<li> Cluster: <?php echo $instanceinfo->cluster; ?> </li>
|
||||
<li> Node: <?php echo $instanceinfo->node; ?> </li>
|
||||
<li> VM: <?php echo $instanceinfo->name; ?> </li>
|
||||
<li> ID: <?php echo $instanceinfo->vmid; ?> </li>
|
||||
</ul>
|
||||
|
||||
<select id="action" class="selectaction" data-width="auto" >
|
||||
<option value="">Choice </option>
|
||||
<option value="current">Status</option>
|
||||
<option value="start">Start</option>
|
||||
<option value="stop">Stop</option>
|
||||
<option value="shutdown">Shutdown</option>
|
||||
<option value="reset">Reset</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<button id="bbaction" value="<?php echo $instanceinfo->_id["\$oid"]; ?>">Click me</button>
|
||||
</div>
|
||||
<div class="result"></div>
|
||||
</div>
|
||||
|
||||
<?php echo json_encode($status, JSON_PRETTY_PRINT); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include(dirname(__DIR__).'/pages/includes/footer.php');
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue