-
+ createLink('zanode', 'list', "hostID=$zahost->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?>
+
diff --git a/module/zanode/config.php b/module/zanode/config.php
index 75dd808f6b..1096e4e057 100644
--- a/module/zanode/config.php
+++ b/module/zanode/config.php
@@ -49,4 +49,4 @@ $config->zanode->editor = new stdclass();
$config->zanode->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->zanode->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->zanode->editor->createimage = array('id' => 'desc', 'tools' => 'simpleTools');
-$config->zanode->editor->view = array('id' => 'comment', 'tools' => 'simpleTools');
+$config->zanode->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools');
diff --git a/module/zanode/control.php b/module/zanode/control.php
index 4038bcc4b7..e2866dbdc4 100644
--- a/module/zanode/control.php
+++ b/module/zanode/control.php
@@ -59,6 +59,29 @@ class zanode extends control
$this->display();
}
+ /**
+ * Browse ZenAgent Node list in zahost view.
+ *
+ * @param string $browseType
+ * @param string $param
+ * @param string $orderBy
+ * @param int $recTotal
+ * @param int $recPerPage
+ * @param int $pageID
+ * @access public
+ * @return void
+ */
+ public function list($hostID, $orderBy = 'id_desc')
+ {
+
+ $this->view->title = $this->lang->zanode->common;
+ $this->view->nodeList = $this->loadModel("zanode")->getListByHost($hostID, $orderBy);
+ $this->view->orderBy = $orderBy;
+ $this->view->hostID = $hostID;
+
+ $this->display();
+ }
+
/**
* Create node.
*
@@ -138,28 +161,6 @@ class zanode extends control
$this->display();
}
- /*
- * Init node.
- *
- * @param int $hostID
- * @return void
- */
- public function init($nodeID)
- {
- $this->view->title = $this->lang->zanode->initTitle;
- $this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
- $this->view->nodeID = $nodeID;
- $this->view->node = $this->zanode->getNodeById($nodeID);
- $this->view->initBash = sprintf($this->config->zanode->initBash, getWebRoot(true));
- $this->view->notice = $this->lang->zanode->init->initSuccessNoticeTitle;
- $this->view->buttonName = $this->lang->zanode->init->button;
- $this->view->modalLink = $this->createLink('testcase', 'automation', 0, '', true);
- $this->view->modalClass = 'iframe';
- $this->view->closeLink = $this->createLink('zanode', 'browse');
-
- $this->display();
- }
-
/**
* start Node.
*
diff --git a/module/zanode/css/init.css b/module/zanode/css/init.css
deleted file mode 100644
index f8b50a8d7d..0000000000
--- a/module/zanode/css/init.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.dot-symbol{margin-right: 10px;}
-#statusContainer h5{line-height: 20px;}
-.host-desc-container{margin-top: 20px;}
-.host-action{margin-top: 60px;}
-.host-action .btn{margin-left: 20px;min-width: 100px;}
-.zahost-init-desc{display: inline-block;}
-.node-init-install{margin-left: 10px;color: #2463c7}
\ No newline at end of file
diff --git a/module/zanode/css/list.css b/module/zanode/css/list.css
new file mode 100644
index 0000000000..afab8ded96
--- /dev/null
+++ b/module/zanode/css/list.css
@@ -0,0 +1,8 @@
+.c-cpu,.c-memory,.c-diskSize,.c-status {width: 90px;}
+.c-os {width: 150px;}
+.c-number {width: 120px;}
+.desktop, .createImage{margin-right: 4px;}
+#helpTab .icon-help {line-height: unset;}
+#bysearchTab {margin-right: 0px;}
+#main{min-width: 0!important;padding:0!important;}
+body{background-color: #fff!important;}
diff --git a/module/zanode/js/browse.js b/module/zanode/js/browse.js
index ea3d670380..882c7a4cc0 100644
--- a/module/zanode/js/browse.js
+++ b/module/zanode/js/browse.js
@@ -1,11 +1,11 @@
if(showFeature)
{
- /* Show features dialog. */
- new $.zui.ModalTrigger({url: $.createLink('zahost', 'introduction'), type: 'iframe', width: 900, className: 'showFeatures', showHeader: false, backdrop: 'static'}).show();
+ $.apps.close('help');
+ $.apps.open('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao', 'help');
}
$('#helpTab').click(function()
{
- /* Show features dialog. */
- new $.zui.ModalTrigger({url: $.createLink('zahost', 'introduction'), type: 'iframe', width: 900, className: 'showFeatures', showHeader: false, backdrop: 'static'}).show();
+ $.apps.close('help');
+ $.apps.open('https://www.zentao.net/book/zentaopms/978.html?fullScreen=zentao', 'help');
})
diff --git a/module/zanode/js/init.js b/module/zanode/js/init.js
deleted file mode 100644
index 4a841198a0..0000000000
--- a/module/zanode/js/init.js
+++ /dev/null
@@ -1,68 +0,0 @@
-$('#checkServiceStatus').click(function(){
- $.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response)
- {
- var resultData = JSON.parse(response);
- var html = "" + zanodeLang.init.statusTitle + "
";
- var isSuccess = true
-
- for (var key in resultData.data)
- {
- var installHtml = "";
- if(key == "ZTF")
- {
- installHtml = ""+zanodeLang.install+"";
- }
- if(resultData.data[key] == 'ready')
- {
- html += "●" + key + ' ' + zanodeLang.init[resultData.data[key]] + ""+installHtml+"
"
- }
- else
- {
- isSuccess = false
- html += "●" + key + ' ' + zanodeLang.init[resultData.data[key]] + ""+installHtml+"
"
- }
- };
-
- if(!isSuccess)
- {
- html += '' + zanodeLang.init.initFailNoticeTitle + '
';
- html += ''
- }
- $('#statusContainer').html(html)
- if(isSuccess) showModal();
- });
- return
-})
-
-$('#statusContainer').on('click', '.node-init-install', function(){
- $(this).addClass('load-indicator loading');
- var link = $(this).data('href')
- $.get(link, function(response)
- {
- $(this).removeClass('load-indicator');
- $(this).removeClass('loading');
- $('#checkServiceStatus').trigger("click")
- })
-})
-
-$('.btn-init-copy').live('click', function()
-{
- var copyText = $('#initBash');
- copyText.show();
- copyText .select();
- document.execCommand("Copy");
- copyText.hide();
- $('.btn-init-copy').tooltip({
- trigger: 'click',
- placement: 'bottom',
- title: zanodeLang.copied,
- tipClass: 'tooltip-success'
- });
-
- $(this).tooltip('show');
- var that = this;
- setTimeout(function()
- {
- $(that).tooltip('hide')
- }, 2000)
-})
\ No newline at end of file
diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php
index 703d1fe112..f32d767fbc 100644
--- a/module/zanode/lang/de.php
+++ b/module/zanode/lang/de.php
@@ -73,6 +73,7 @@ $lang->zanode->runCaseConfirm = 'The system detects the presence of an automatio
$lang->zanode->createImage = 'Create Image';
$lang->zanode->createImaging = 'Creating';
+$lang->zanode->pending = 'Waiting for create';
$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';
diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php
index 703d1fe112..f32d767fbc 100644
--- a/module/zanode/lang/en.php
+++ b/module/zanode/lang/en.php
@@ -73,6 +73,7 @@ $lang->zanode->runCaseConfirm = 'The system detects the presence of an automatio
$lang->zanode->createImage = 'Create Image';
$lang->zanode->createImaging = 'Creating';
+$lang->zanode->pending = 'Waiting for create';
$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';
diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php
index 703d1fe112..f32d767fbc 100644
--- a/module/zanode/lang/fr.php
+++ b/module/zanode/lang/fr.php
@@ -73,6 +73,7 @@ $lang->zanode->runCaseConfirm = 'The system detects the presence of an automatio
$lang->zanode->createImage = 'Create Image';
$lang->zanode->createImaging = 'Creating';
+$lang->zanode->pending = 'Waiting for create';
$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';
diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php
index dacdf4b979..30bb81be88 100644
--- a/module/zanode/lang/zh-cn.php
+++ b/module/zanode/lang/zh-cn.php
@@ -73,6 +73,7 @@ $lang->zanode->runCaseConfirm = '系统检测到选择的用例存在自动化
$lang->zanode->createImage = '导出镜像';
$lang->zanode->createImaging = '正在导出镜像';
+$lang->zanode->pending = '等待导出镜像';
$lang->zanode->createImageNotice = '系统将基于当前执行节点导出镜像,该过程需要关闭该执行节点,确定要继续么?';
$lang->zanode->createImageSuccess = '镜像导出成功,您可以使用此镜像创建执行节点。';
$lang->zanode->createImageFail = '镜像导出失败';
diff --git a/module/zanode/model.php b/module/zanode/model.php
index 217a586c2e..591d14fed0 100644
--- a/module/zanode/model.php
+++ b/module/zanode/model.php
@@ -675,6 +675,7 @@ class zanodemodel extends model
foreach($tasks as $task)
{
+ if(!empty($tasks['inprogress']) && $task->task != $tasks['inprogress'][0]->task && $task->status == 'created') $task->status = 'pending';
if($type == $task->type and $taskID == $task->task) return $task;
}
}
diff --git a/module/zanode/view/createimage.html.php b/module/zanode/view/createimage.html.php
index d9d18dcf6b..f5fbccb92a 100644
--- a/module/zanode/view/createimage.html.php
+++ b/module/zanode/view/createimage.html.php
@@ -15,6 +15,7 @@
task);?>
id);?>
+zanode); ?>
@@ -26,13 +27,17 @@
- zanode->createImaging;?>
+ zanode->pending;?>
-
- zanode->createImageSuccess . html::a(inLink('create'), $lang->zanode->createImageButton, "_parent");?>
+ parent}");
+ $link = str_replace('onlybody=yes', '', $link);
+ $link = trim($link, '?');
+ ?>
+ zanode->createImageSuccess . html::a($link, $lang->zanode->createImageButton, "_parent", "style='color:#2e7fff;'");?>
zanode->createImageFail;?>
@@ -78,8 +83,17 @@ function getTaskProgress()
if(rate == 1 || status == 'completed') rate = 1;
if(status == 'inprogress' && rate >= 1) rate = 0.97;
+ if(status == 'pending')
+ {
+ $('.status-title').text(zanodeLang.pending)
+ }
+ else
+ {
+ $('.status-title').text(zanodeLang.createImaging)
+ }
+
$('.rate').css('width', rate*100 + '%');
- if(rate == 1 || (status != 'inprogress' && status != 'created'))
+ if(rate == 1 || (status != 'inprogress' && status != 'created' && status != 'pending'))
{
updateStatus(data);
clearInterval(setProgress);
@@ -94,10 +108,17 @@ function updateStatus(data)
$.post(url, postData, function(result)
{
- if(data.status == 'completed') $('.success').removeClass('hide');
- else $('.fail').removeClass('hide');
+ if(data.status == 'completed')
+ {
+ $('.success').removeClass('hide');
+ $('.status-title').text('')
+ }
+ else
+ {
+ $('.status-title').text(zanodeLang.createImageFail)
+ }
}, 'json');
}
-
+
diff --git a/module/zanode/view/getvnc.html.php b/module/zanode/view/getvnc.html.php
index b439daa0f4..4eb04c8fbd 100644
--- a/module/zanode/view/getvnc.html.php
+++ b/module/zanode/view/getvnc.html.php
@@ -12,7 +12,7 @@
?>
getModuleRoot() . 'common/view/header.lite.html.php';?>
- ";?>
+ ";?>
\ No newline at end of file
diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php
index b1a066fc59..b5a2a99303 100644
--- a/module/zanode/view/view.html.php
+++ b/module/zanode/view/view.html.php
@@ -137,7 +137,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou