* Adjust code

This commit is contained in:
zenggang
2023-02-02 02:10:04 +00:00
parent 08e10410f1
commit e745eaf3de
6 changed files with 36 additions and 8 deletions
+8
View File
@@ -79,6 +79,14 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->snapshotName = 'Snapshot Name';
$lang->zanode->browseSnapshot = 'Snapshot List';
$lang->zanode->createSnapshot = 'Create Snapshot';
$lang->zanode->editSnapshot = 'Edit Snapshot';
$lang->zanode->restoreSnapshot = 'Revert Snapshot';
$lang->zanode->deleteSnapshot = 'Delete Snapshot';
$lang->zanode->snapshotEmpty = 'No snapshots';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
+8
View File
@@ -79,6 +79,14 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->snapshotName = 'Snapshot Name';
$lang->zanode->browseSnapshot = 'Snapshot List';
$lang->zanode->createSnapshot = 'Create Snapshot';
$lang->zanode->editSnapshot = 'Edit Snapshot';
$lang->zanode->restoreSnapshot = 'Revert Snapshot';
$lang->zanode->deleteSnapshot = 'Delete Snapshot';
$lang->zanode->snapshotEmpty = 'No snapshots';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
+8
View File
@@ -79,6 +79,14 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create
$lang->zanode->createImageFail = 'Failed to create';
$lang->zanode->createImageButton = 'Create image';
$lang->zanode->snapshotName = 'Snapshot Name';
$lang->zanode->browseSnapshot = 'Snapshot List';
$lang->zanode->createSnapshot = 'Create Snapshot';
$lang->zanode->editSnapshot = 'Edit Snapshot';
$lang->zanode->restoreSnapshot = 'Revert Snapshot';
$lang->zanode->deleteSnapshot = 'Delete Snapshot';
$lang->zanode->snapshotEmpty = 'No snapshots';
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
$lang->zanode->runTimeout = 'Network connection timeout, please check the host and execution node status.';
+6 -6
View File
@@ -79,13 +79,13 @@ $lang->zanode->createImageSuccess = '镜像导出成功,您可以使用此镜
$lang->zanode->createImageFail = '镜像导出失败';
$lang->zanode->createImageButton = '去创建';
$lang->zanode->snapshotName = '快照名称';
$lang->zanode->browseSnapshot = '快照列表';
$lang->zanode->createSnapshot = '创建快照';
$lang->zanode->editSnapshot = '编辑快照';
$lang->zanode->snapshotName = '快照名称';
$lang->zanode->browseSnapshot = '快照列表';
$lang->zanode->createSnapshot = '创建快照';
$lang->zanode->editSnapshot = '编辑快照';
$lang->zanode->restoreSnapshot = '还原快照';
$lang->zanode->deleteSnapshot = '删除快照';
$lang->zanode->snapshotEmpty = '无快照';
$lang->zanode->deleteSnapshot = '删除快照';
$lang->zanode->snapshotEmpty = '无快照';
$lang->zanode->imageNameEmpty = '名称不能为空';
+1 -1
View File
@@ -219,7 +219,7 @@ class zanodemodel extends model
if(!empty($result) and $result->code == 'success')
{
$this->loadModel('action')->create('zanodesnapshot', $id, 'created');
$this->loadModel('action')->create('zanode', $id, 'createdSnapshot', '', $data->name);
return $newID;
}
+5 -1
View File
@@ -85,6 +85,9 @@
$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;'";
$snapshotAttr = "title='{$lang->zanode->createSnapshot}'";
$snapshotAttr .= $node->status != 'running' ? ' class="btn disabled"' : ' class="btn iframe"';
common::printLink('zanode', 'getVNC', "id={$node->id}", "<i class='icon icon-remote'></i> ", (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")
{
@@ -105,13 +108,14 @@
}
common::printLink('zanode', 'reboot', "zanodeID={$node->id}", "<i class='icon icon-restart'></i> ", '', $rebootAttr);
common::printIcon('zanode', 'edit', "id={$node->id}", $node, 'list');
common::printLink('zanode', 'createSnapshot', "zanodeID={$node->id}", "<i class='icon icon-plus'></i> ", '', $snapshotAttr, true, true);
if(common::hasPriv('zanode', 'createImage') or common::hasPriv('zanode', 'destroy'))
{
echo "<div class='btn-group'>";
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('zanode', 'edit', "id={$node->id}", $node, 'list', '', '', 'btn-action');
common::printLink('zanode', 'createImage', "zanodeID={$node->id}", "<i class='icon icon-export'></i> ", '', "class='btn btn-action iframe createImage' title='{$lang->zanode->createImage}' data-width='55%'", '', true);
common::printLink('zanode', 'destroy', "zanodeID={$node->id}", "<i class='icon icon-trash'></i> ", '', "title='{$lang->zanode->destroy}' class='btn btn-action' target='hiddenwin'");
echo "</ul>";