From 375465b56c06981bde172b0e141ba7e42ef2fe74 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 15 Feb 2023 14:35:59 +0800 Subject: [PATCH] * Finish task 84707. --- module/zanode/view/browse.html.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/module/zanode/view/browse.html.php b/module/zanode/view/browse.html.php index 12e85471ea..773bd58fe8 100644 --- a/module/zanode/view/browse.html.php +++ b/module/zanode/view/browse.html.php @@ -78,17 +78,25 @@ zanode->suspend}' target='hiddenwin'"; - $suspendAttr .= $node->status != 'running' && $node->status != 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; + $suspendAttr .= $node->status != 'running' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'"; $resumeAttr = "title='{$lang->zanode->resume}' target='hiddenwin'"; $resumeAttr .= $node->status == 'running' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'"; $rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'"; - $rebootAttr .= $node->status == 'shutoff' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + $rebootAttr .= $node->status == 'shutoff' || $node->status == 'wait' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; + + $closeAttr = "title='{$lang->zanode->shutdown}'"; + $closeAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; + + $startAttr = "title='{$lang->zanode->boot}'"; + $startAttr .= $zanode->status == 'wait' ? ' class="btn disabled"' : ' class="btn iframe"'; $snapshotAttr = "title='{$lang->zanode->createSnapshot}'"; $snapshotAttr .= $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"'; + $imageAttr = $node->status != 'running' ? ' class="btn btn-action iframe createImage disabled"' : ' class="btn btn-action iframe createImage"'; + common::printLink('zanode', 'getVNC', "id={$node->id}", " ", (in_array($node->status ,array('running', 'launch', 'wait')) ? '_blank' : ''), "title='{$lang->zanode->getVNC}' class='btn desktop " . (in_array($node->status ,array('running', 'launch', 'wait')) ? '':'disabled') . "'", ''); if($node->status == "suspend") { @@ -117,7 +125,7 @@ echo ""; echo ""; echo "";