0.2.2: actions as plain POST forms (no fetch/JSON), job page auto-refresh

This commit is contained in:
Claw committed 2026-11-17 19:34:48 +01:00
1 parent 364ab42ffe
commit 18859ac3cc
7 files changed
+58 -12

No files matched your search

+7 -6
View File
@@ -53,13 +53,14 @@ vmm_css();
<td class="celldata">
<span class="vmm-actions">
<?php if ($isRunning): ?>
<input type="button" class="formbtn" value="<?=gettext('Stop');?>" onclick='vmmConfirmRun("stop", <?=$jsName;?>, "Stop <?=vmm_h($name);?>?")'/>
<input type="button" class="formbtn" value="<?=gettext('Restart');?>" onclick='vmmConfirmRun("restart", <?=$jsName;?>, "Restart <?=vmm_h($name);?>?")'/>
<input type="button" class="formbtn" value="<?=gettext('Power off');?>" onclick='vmmConfirmRun("poweroff", <?=$jsName;?>, "Force power off <?=vmm_h($name);?>? Unsaved data in the guest may be lost.")'/>
<input type="button" class="formbtn" value="<?=gettext('Reset');?>" onclick='vmmConfirmRun("reset", <?=$jsName;?>, "Hard reset <?=vmm_h($name);?>?")'/>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="stop:<?=vmm_h($name);?>" onclick="return confirm('Stop <?=vmm_h($name);?>?')"><?=gettext('Stop');?></button>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="restart:<?=vmm_h($name);?>" onclick="return confirm('Restart <?=vmm_h($name);?>?')"><?=gettext('Restart');?></button>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="poweroff:<?=vmm_h($name);?>" onclick="return confirm('Force power off <?=vmm_h($name);?>? Unsaved guest data may be lost.')"><?=gettext('Power off');?></button>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="reset:<?=vmm_h($name);?>" onclick="return confirm('Hard reset <?=vmm_h($name);?>?')"><?=gettext('Reset');?></button>
<?php else: ?>
<input type="button" class="formbtn" value="<?=gettext('Start');?>" onclick='vmmRun("start", <?=$jsName;?>)'/>
<input type="button" class="formbtn" value="<?=gettext('Destroy');?>" onclick='vmmDestroy(<?=$jsName;?>)'/>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="start:<?=vmm_h($name);?>"><?=gettext('Start');?></button>
<input type="text" name="confirm" value="" placeholder="<?=gettext('type name to destroy');?>" style="width:150px"/>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="destroy:<?=vmm_h($name);?>" onclick="return confirm('Destroy <?=vmm_h($name);?>? All disks and snapshots are deleted.')"><?=gettext('Destroy');?></button>
<?php endif; ?>
<a class="formbtn" href="vmmngr.php"><?=gettext('Back');?></a>
</span>