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 -3
View File
@@ -29,6 +29,10 @@ vmm_css();
<form action="vmmngr.php" method="post" name="iform" id="iform"><table id="area_data"><tbody><tr><td id="area_data_frame">
<?php if (!empty($_SESSION['vmmngr_error'])): ?>
<?php print_info_box(vmm_h((string)$_SESSION['vmmngr_error'])); unset($_SESSION['vmmngr_error']); ?>
<?php endif; ?>
<?php if (!$vmprov['available']): ?>
<?php print_info_box(sprintf(gettext('vm-bhyve was not found. Neither %s nor the bundled copy exists.'), '/usr/local/sbin/vm')); ?>
<?php endif; ?>
@@ -106,10 +110,10 @@ vmm_css();
<td class="lcebl">
<span class="vmm-actions">
<?php if ($isRunning): ?>
<input type="button" class="formbtn" value="<?=gettext('Stop');?>" onclick='vmmConfirmRun("stop", <?=$jsName;?>, "Stop <?=vmm_h($n);?>?")'/>
<input type="button" class="formbtn" value="<?=gettext('Restart');?>" onclick='vmmConfirmRun("restart", <?=$jsName;?>, "Restart <?=vmm_h($n);?>?")'/>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="stop:<?=vmm_h($n);?>" onclick="return confirm('Stop <?=vmm_h($n);?>?')"><?=gettext('Stop');?></button>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="restart:<?=vmm_h($n);?>" onclick="return confirm('Restart <?=vmm_h($n);?>?')"><?=gettext('Restart');?></button>
<?php else: ?>
<input type="button" class="formbtn" value="<?=gettext('Start');?>" onclick='vmmRun("start", <?=$jsName;?>)'/>
<button type="submit" class="formbtn" formaction="vmmngr_do.php" formmethod="post" name="act" value="start:<?=vmm_h($n);?>"><?=gettext('Start');?></button>
<?php endif; ?>
<a class="formbtn" href="vmmngr_vm.php?name=<?=urlencode($n);?>"><?=gettext('Details');?></a>
</span>