* Fix issue.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of execution node of ZenTaoPMS.
|
||||
* The control file of ZenAgent Node of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
@@ -13,7 +13,7 @@ class zanode extends control
|
||||
{
|
||||
|
||||
/**
|
||||
* Browse execution node page.
|
||||
* Browse ZenAgent Node page.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param string $param
|
||||
|
||||
+22
-23
@@ -1,17 +1,16 @@
|
||||
<?php
|
||||
$lang->zanode->common = 'Execution Node';
|
||||
$lang->zanode->browse = 'Execution Node List';
|
||||
$lang->zanode->create = 'Create Execution Node';
|
||||
$lang->zanode->editAction = 'Edit Execution Node';
|
||||
$lang->zanode->view = 'View Execution Node';
|
||||
$lang->zanode->common = 'ZenAgent Node';
|
||||
$lang->zanode->browse = 'ZenAgent Node List';
|
||||
$lang->zanode->create = 'Create ZenAgent Node';
|
||||
$lang->zanode->editAction = 'Edit ZenAgent Node';
|
||||
$lang->zanode->view = 'View ZenAgent Node';
|
||||
$lang->zanode->initTitle = 'Init ZenAgent Node';
|
||||
$lang->zanode->suspend = 'Suspend Execution Node';
|
||||
$lang->zanode->destroy = 'Destroy Execution Node';
|
||||
$lang->zanode->handleVM = 'Restart Execution Node';
|
||||
$lang->zanode->boot = 'Start Execution Node';
|
||||
$lang->zanode->reboot = 'Restart Execution Node';
|
||||
$lang->zanode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->zanode->resume = 'Resume Execution Node';
|
||||
$lang->zanode->suspend = 'Suspend ZenAgent Node';
|
||||
$lang->zanode->destroy = 'Destroy ZenAgent Node';
|
||||
$lang->zanode->boot = 'Start ZenAgent Node';
|
||||
$lang->zanode->reboot = 'Restart ZenAgent Node';
|
||||
$lang->zanode->shutdown = 'Shutdown ZenAgent Node';
|
||||
$lang->zanode->resume = 'Resume ZenAgent Node';
|
||||
$lang->zanode->getVNC = 'Remote management';
|
||||
$lang->zanode->all = 'All';
|
||||
$lang->zanode->byQuery = 'Search';
|
||||
@@ -34,12 +33,12 @@ $lang->zanode->vnc = 'VNC Port';
|
||||
$lang->zanode->destroyAt = 'Destroy Time';
|
||||
$lang->zanode->creater = 'Creator';
|
||||
$lang->zanode->createdDate = 'Create Date';
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the ZenAgent Node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the ZenAgent Node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?";
|
||||
$lang->zanode->actionSuccess = 'Success';
|
||||
$lang->zanode->deleted = "Deleted";
|
||||
$lang->zanode->scriptPath = "Script path";
|
||||
@@ -51,22 +50,22 @@ $lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
$lang->automation->node = $lang->zanode->common;
|
||||
|
||||
$lang->zanode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->zanode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->zanode->createVmFail = 'Failed to create a ZenAgent Node';
|
||||
$lang->zanode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->zanode->nameValid = "Name must be letters, numbers,'-','_','.', And cannot begin with a symbol";
|
||||
$lang->zanode->empty = 'Execution node not found.';
|
||||
$lang->zanode->empty = 'ZenAgent Node not found.';
|
||||
$lang->zanode->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?';
|
||||
|
||||
$lang->zanode->empty = 'No Execution Node';
|
||||
$lang->zanode->empty = 'No ZenAgent Node';
|
||||
$lang->zanode->createImaging = 'Creating';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the ZenAgent Node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
|
||||
$lang->zanode->createImageFail = 'Failed to create';
|
||||
$lang->zanode->createImageButton = 'Create image';
|
||||
|
||||
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'Execution node not found.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
+20
-21
@@ -1,17 +1,16 @@
|
||||
<?php
|
||||
$lang->zanode->common = 'Execution Node';
|
||||
$lang->zanode->browse = 'Execution Node List';
|
||||
$lang->zanode->create = 'Create Execution Node';
|
||||
$lang->zanode->editAction = 'Edit Execution Node';
|
||||
$lang->zanode->view = 'View Execution Node';
|
||||
$lang->zanode->common = 'ZenAgent Node';
|
||||
$lang->zanode->browse = 'ZenAgent Node List';
|
||||
$lang->zanode->create = 'Create ZenAgent Node';
|
||||
$lang->zanode->editAction = 'Edit ZenAgent Node';
|
||||
$lang->zanode->view = 'View ZenAgent Node';
|
||||
$lang->zanode->initTitle = 'Init ZenAgent Node';
|
||||
$lang->zanode->suspend = 'Suspend Execution Node';
|
||||
$lang->zanode->destroy = 'Destroy Execution Node';
|
||||
$lang->zanode->handleVM = 'Restart Execution Node';
|
||||
$lang->zanode->boot = 'Start Execution Node';
|
||||
$lang->zanode->reboot = 'Restart Execution Node';
|
||||
$lang->zanode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->zanode->resume = 'Resume Execution Node';
|
||||
$lang->zanode->suspend = 'Suspend ZenAgent Node';
|
||||
$lang->zanode->destroy = 'Destroy ZenAgent Node';
|
||||
$lang->zanode->boot = 'Start ZenAgent Node';
|
||||
$lang->zanode->reboot = 'Restart ZenAgent Node';
|
||||
$lang->zanode->shutdown = 'Shutdown ZenAgent Node';
|
||||
$lang->zanode->resume = 'Resume ZenAgent Node';
|
||||
$lang->zanode->getVNC = 'Remote management';
|
||||
$lang->zanode->all = 'All';
|
||||
$lang->zanode->byQuery = 'Search';
|
||||
@@ -34,12 +33,12 @@ $lang->zanode->vnc = 'VNC Port';
|
||||
$lang->zanode->destroyAt = 'Destroy Time';
|
||||
$lang->zanode->creater = 'Creator';
|
||||
$lang->zanode->createdDate = 'Create Date';
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the ZenAgent Node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the ZenAgent Node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?";
|
||||
$lang->zanode->actionSuccess = 'Success';
|
||||
$lang->zanode->deleted = "Deleted";
|
||||
$lang->zanode->scriptPath = "Script path";
|
||||
@@ -51,7 +50,7 @@ $lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
$lang->automation->node = $lang->zanode->common;
|
||||
|
||||
$lang->zanode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->zanode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->zanode->createVmFail = 'Failed to create a ZenAgent Node';
|
||||
$lang->zanode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->zanode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol";
|
||||
$lang->zanode->empty = 'No zanode is found';
|
||||
@@ -59,14 +58,14 @@ $lang->zanode->runCaseConfirm = 'The system detects the presence of an automatio
|
||||
|
||||
$lang->zanode->empty = 'No ZenAgent Node';
|
||||
$lang->zanode->createImaging = 'Creating';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the ZenAgent Node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
|
||||
$lang->zanode->createImageFail = 'Failed to create';
|
||||
$lang->zanode->createImageButton = 'Create image';
|
||||
|
||||
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'Execution node not found.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
+21
-22
@@ -1,17 +1,16 @@
|
||||
<?php
|
||||
$lang->zanode->common = 'Execution Node';
|
||||
$lang->zanode->browse = 'Execution Node List';
|
||||
$lang->zanode->create = 'Create Execution Node';
|
||||
$lang->zanode->editAction = 'Edit Execution Node';
|
||||
$lang->zanode->view = 'View Execution Node';
|
||||
$lang->zanode->common = 'ZenAgent Node';
|
||||
$lang->zanode->browse = 'ZenAgent Node List';
|
||||
$lang->zanode->create = 'Create ZenAgent Node';
|
||||
$lang->zanode->editAction = 'Edit ZenAgent Node';
|
||||
$lang->zanode->view = 'View ZenAgent Node';
|
||||
$lang->zanode->initTitle = 'Init ZenAgent Node';
|
||||
$lang->zanode->suspend = 'Suspend Execution Node';
|
||||
$lang->zanode->destroy = 'Destroy Execution Node';
|
||||
$lang->zanode->handleVM = 'Restart Execution Node';
|
||||
$lang->zanode->boot = 'Start Execution Node';
|
||||
$lang->zanode->reboot = 'Restart Execution Node';
|
||||
$lang->zanode->shutdown = 'Shutdown Execution Node';
|
||||
$lang->zanode->resume = 'Resume Execution Node';
|
||||
$lang->zanode->suspend = 'Suspend ZenAgent Node';
|
||||
$lang->zanode->destroy = 'Destroy ZenAgent Node';
|
||||
$lang->zanode->boot = 'Start ZenAgent Node';
|
||||
$lang->zanode->reboot = 'Restart ZenAgent Node';
|
||||
$lang->zanode->shutdown = 'Shutdown ZenAgent Node';
|
||||
$lang->zanode->resume = 'Resume ZenAgent Node';
|
||||
$lang->zanode->getVNC = 'Remote management';
|
||||
$lang->zanode->all = 'All';
|
||||
$lang->zanode->byQuery = 'Search';
|
||||
@@ -34,12 +33,12 @@ $lang->zanode->vnc = 'VNC Port';
|
||||
$lang->zanode->destroyAt = 'Destroy Time';
|
||||
$lang->zanode->creater = 'Creator';
|
||||
$lang->zanode->createdDate = 'Create Date';
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the execution node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the execution node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the execution node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the execution node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the execution node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the execution node?";
|
||||
$lang->zanode->confirmDelete = "Are you sure about destroying the ZenAgent Node?";
|
||||
$lang->zanode->confirmBoot = "Are you sure to start the ZenAgent Node?";
|
||||
$lang->zanode->confirmReboot = "Are you sure to restart the ZenAgent Node?";
|
||||
$lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?";
|
||||
$lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?";
|
||||
$lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?";
|
||||
$lang->zanode->actionSuccess = 'Success';
|
||||
$lang->zanode->deleted = "Deleted";
|
||||
$lang->zanode->scriptPath = "Script path";
|
||||
@@ -51,22 +50,22 @@ $lang->automation->scriptPath = $lang->zanode->scriptPath;
|
||||
$lang->automation->node = $lang->zanode->common;
|
||||
|
||||
$lang->zanode->notFoundAgent = 'No Agent service is found';
|
||||
$lang->zanode->createVmFail = 'Failed to create a execution node';
|
||||
$lang->zanode->createVmFail = 'Failed to create a ZenAgent Node';
|
||||
$lang->zanode->noVncPort = 'Failed to get vnc port';
|
||||
$lang->zanode->nameValid = "The name can only be letters, numbers, '-', '_', '.', and cannot start with a symbol";
|
||||
$lang->zanode->empty = 'No zanode is found';
|
||||
$lang->zanode->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?';
|
||||
|
||||
$lang->zanode->empty = 'No Execution Node';
|
||||
$lang->zanode->empty = 'No ZenAgent Node';
|
||||
$lang->zanode->createImaging = 'Creating';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the execution node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageNotice = 'The system will be created based on the current node,This process requires the ZenAgent Node to be shut down. Do you want to continue?';
|
||||
$lang->zanode->createImageSuccess = 'Successed, You can use this image to create node.';
|
||||
$lang->zanode->createImageFail = 'Failed to create';
|
||||
$lang->zanode->createImageButton = 'Create image';
|
||||
|
||||
$lang->zanode->imageNameEmpty = 'Name can not be empty.';
|
||||
|
||||
$lang->zanode->apiError['-10100'] = 'Execution node not found.';
|
||||
$lang->zanode->apiError['-10100'] = 'ZenAgent Node not found.';
|
||||
|
||||
$lang->zanode->publicList[0] = 'Private';
|
||||
$lang->zanode->publicList[1] = 'Public';
|
||||
|
||||
@@ -5,13 +5,12 @@ $lang->zanode->create = '创建执行节点';
|
||||
$lang->zanode->editAction = '编辑执行节点';
|
||||
$lang->zanode->view = '执行节点详情';
|
||||
$lang->zanode->initTitle = '初始化执行节点';
|
||||
$lang->zanode->suspend = '暂停执行节点';
|
||||
$lang->zanode->suspend = '休眠执行节点';
|
||||
$lang->zanode->destroy = '销毁执行节点';
|
||||
$lang->zanode->handleVM = '重启执行节点';
|
||||
$lang->zanode->boot = '启动执行节点';
|
||||
$lang->zanode->reboot = '重启执行节点';
|
||||
$lang->zanode->shutdown = '关闭执行节点';
|
||||
$lang->zanode->resume = '恢复执行节点';
|
||||
$lang->zanode->resume = '启动执行节点';
|
||||
$lang->zanode->getVNC = '远程管理';
|
||||
$lang->zanode->all = '全部';
|
||||
$lang->zanode->byQuery = '搜索';
|
||||
|
||||
@@ -84,7 +84,7 @@ class zanodemodel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Prepare create execution node data. */
|
||||
/* Prepare create ZenAgent Node data. */
|
||||
$data->image = $data->image;
|
||||
$data->parent = $host->id;
|
||||
$data->mac = $result->data->mac;
|
||||
@@ -93,7 +93,7 @@ class zanodemodel extends model
|
||||
$data->createdDate = helper::now();
|
||||
$data->vnc = (int)$result->data->vnc;
|
||||
|
||||
/* Save execution node. */
|
||||
/* Save ZenAgent Node. */
|
||||
$this->dao->insert(TABLE_ZAHOST)->data($data)->autoCheck()->exec();
|
||||
if(dao::isError()) return false;
|
||||
|
||||
@@ -209,7 +209,7 @@ class zanodemodel extends model
|
||||
if($data['code'] != 'success') return zget($this->lang->zanode->apiError, $data['code'], $data['msg']);
|
||||
}
|
||||
|
||||
/* delete execution node. */
|
||||
/* delete ZenAgent Node. */
|
||||
$this->dao->update(TABLE_ZAHOST)
|
||||
->set('deleted')->eq(1)
|
||||
->where('id')->eq($id)
|
||||
@@ -219,7 +219,7 @@ class zanodemodel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution node created action record by node ID.
|
||||
* Get ZenAgent Node created action record by node ID.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
|
||||
@@ -110,13 +110,13 @@
|
||||
if (empty($zanode->deleted))
|
||||
{
|
||||
if($zanode->status == "running"){
|
||||
common::printLink('zanode', 'suspend', "id={$zanode->id}", "<i class='icon icon-restart'></i> " . $lang->zanode->suspend, '', "title='{$lang->zanode->suspend}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'");
|
||||
common::printLink('zanode', 'suspend', "id={$zanode->id}", "<i class='icon icon-pause'></i> " . $lang->zanode->suspend, '', "title='{$lang->zanode->suspend}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmSuspend}\")==false) return false;'");
|
||||
}
|
||||
elseif($zanode->status == "suspend")
|
||||
{
|
||||
common::printLink('zanode', 'resume', "id={$zanode->id}", "<i class='icon icon-pause'></i> " . $lang->zanode->resume, '', "title='{$lang->zanode->resume}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'");
|
||||
common::printLink('zanode', 'resume', "id={$zanode->id}", "<i class='icon icon-restart'></i> " . $lang->zanode->resume, '', "title='{$lang->zanode->resume}' class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmResume}\")==false) return false;'");
|
||||
}
|
||||
common::printLink('zanode', 'getVNC', "id={$zanode->id}", "<i class='icon icon-desktop'></i> " . $lang->zanode->getVNC, '', "title='{$lang->zanode->getVNC}' class='btn iframe " . (common::hasPriv('zahost', 'getVNC') && $zanode->status == 'running' ? '':'disabled') . "'", '', true);
|
||||
common::printLink('zanode', 'getVNC', "id={$zanode->id}", "<i class='icon icon-desktop'></i> " . $lang->zanode->getVNC, '', "title='{$lang->zanode->getVNC}' class='btn iframe " . (common::hasPriv('zanode', 'getVNC') && $zanode->status == 'running' ? '':'disabled') . "'", '', true);
|
||||
}
|
||||
?>
|
||||
<div class='divider'></div>
|
||||
|
||||
Reference in New Issue
Block a user