* Fix issue.
This commit is contained in:
@@ -23,8 +23,7 @@ class zanodeHeartbeatEntry extends baseEntry
|
||||
/* Check authorize. */
|
||||
$header = getallheaders();
|
||||
$token = isset($header['Authorization']) ? substr($header['Authorization'], 7) : '';
|
||||
$secret = isset($this->requestBody->secret) ? $this->requestBody->secret : '';
|
||||
if(!$secret and !$token) return $this->sendError(401, 'Unauthorized');
|
||||
if(!$token) return $this->sendError(401, 'Unauthorized');
|
||||
|
||||
/* Check param. */
|
||||
$status = isset($this->requestBody->status) ? $this->requestBody->status : '';
|
||||
@@ -34,8 +33,7 @@ class zanodeHeartbeatEntry extends baseEntry
|
||||
|
||||
$this->dao = $this->loadModel('common')->dao;
|
||||
$host = $this->dao->select('id,extranet')->from(TABLE_ZAHOST)
|
||||
->beginIF($secret)->where('secret')->eq($secret)->fi()
|
||||
->beginIF(!$secret)->where('tokenSN')->eq($token)
|
||||
->where('tokenSN')->eq($token)
|
||||
->andWhere('tokenTime')->gt($now)->fi()
|
||||
->fetch();
|
||||
if(empty($host)) return $this->sendError(400, 'Secret error.');
|
||||
@@ -49,31 +47,8 @@ class zanodeHeartbeatEntry extends baseEntry
|
||||
$node->zap = $this->requestBody->agentPortOnHost;
|
||||
$node->status = $this->requestBody->status;
|
||||
|
||||
if($secret)
|
||||
{
|
||||
$node->tokenSN = md5($secret . $now);
|
||||
$node->tokenTime = date('Y-m-d H:i:s', time() + 7200);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_ZAHOST)->data($node)->where('id')->eq($node->id)->exec();
|
||||
|
||||
if($secret)
|
||||
{
|
||||
//install services
|
||||
$node->ip = $host->extranet;
|
||||
$nodeStatus = $this->loadModel('zanode')->getServiceStatus($node);
|
||||
if($nodeStatus['ZTF'] != "ready")
|
||||
{
|
||||
$node->secret = $secret;
|
||||
$node->extranet = $host->extranet;
|
||||
$this->loadModel('zanode')->installService($node, "ZTF");
|
||||
}
|
||||
}
|
||||
|
||||
if(!$secret) return $this->sendSuccess(200, 'success');
|
||||
|
||||
$node->tokenTimeUnix = strtotime($node->tokenTime);
|
||||
|
||||
unset($node->status);
|
||||
unset($node->tokenTime);
|
||||
return $this->send(200, $node);
|
||||
|
||||
@@ -227,10 +227,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the ZenAgent Node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
|
||||
@@ -227,10 +227,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the ZenAgent Node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
|
||||
@@ -227,10 +227,10 @@ $lang->action->desc->reopen = '$date, reopened by <strong>$actor</
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->ganttmove = '$date, sort by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the ZenAgent Node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
|
||||
@@ -186,10 +186,10 @@ $lang->action->desc->syncexecution = '$date, starting the task sets the execut
|
||||
$lang->action->desc->reopen = '$date, reopened by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->merged = '$date, merged by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->submitreview = '$date, submitted for review by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the execution node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the execution node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the execution node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the execution node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->suspend = '$date, the ZenAgent Node is suspended by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
|
||||
+17
-3
@@ -197,17 +197,28 @@ class zahostModel extends model
|
||||
->page($pager)
|
||||
->fetchAll('name');
|
||||
|
||||
$refreshPageData = false;
|
||||
foreach($imageList as &$image)
|
||||
{
|
||||
$downloadedImage = zget($downloadedImageList, $image->name, '');
|
||||
if(empty($downloadedImage))
|
||||
{
|
||||
$refreshPageData = true;
|
||||
$image->id = 0;
|
||||
$image->status = 'notDownloaded';
|
||||
$image->from = 'zentao';
|
||||
$image->osName = $image->os;
|
||||
$image->host = $hostID;
|
||||
$image->status = 'notDownloaded';
|
||||
|
||||
unset($image->os);
|
||||
$this->dao->insert(TABLE_IMAGE)->data($image, 'desc')->autoCheck()->exec();
|
||||
|
||||
$image->cancelMisc = sprintf("title='%s' class='btn image-cancel image-cancel-%d %s'", $this->lang->zahost->cancel, $image->id, "disabled");
|
||||
$image->downloadMisc = sprintf("title='%s' class='btn image-download image-download-%d %s'", $this->lang->zahost->image->downloadImage, $image->id, "");
|
||||
if(dao::isError()) continue;
|
||||
|
||||
$image->id = $this->dao->lastInsertID();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -223,10 +234,13 @@ class zahostModel extends model
|
||||
$image->host = $hostID;
|
||||
}
|
||||
|
||||
$orderBy = explode('_', $orderBy);
|
||||
if(count($orderBy) == 2)
|
||||
if($refreshPageData)
|
||||
{
|
||||
array_multisort(array_column($imageList, $orderBy[0]), $orderBy[1] == 'asc' ? SORT_ASC : SORT_DESC, $imageList);
|
||||
$downloadedImageList = $this->dao->select('*')->from(TABLE_IMAGE)
|
||||
->where('host')->eq($hostID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('name');
|
||||
}
|
||||
return $imageList;
|
||||
}
|
||||
|
||||
@@ -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