@@ -27,6 +28,7 @@
testcase->precondition;?>
case->precondition);?>
+
testcase->stepID;?>
testcase->stepDesc;?>
@@ -34,7 +36,9 @@
testcase->result;?>
testcase->real;?>
+
+
case->steps))
{
@@ -81,6 +85,7 @@
+
view->title = $this->lang->zahost->create;
$this->view->notice = $this->lang->zahost->initNotice;
- $this->view->buttonName = $this->lang->zahost->initTitle;
+ $this->view->buttonName = $this->lang->zahost->init->title;
+ $this->view->closeLink = $this->createLink('zahost', 'browse');
$this->display();
}
@@ -117,7 +118,7 @@ class zahost extends control
if($_POST)
{
$changes = $this->zahost->update($hostID);
- if(dao::isError())
+ if(dao::isError())
{
return $this->send(array('result' => 'fail', 'message' => dao::getError()));
}
@@ -329,13 +330,14 @@ class zahost extends control
{
$imageList = $this->zahost->getImagePairs($hostID);
- $this->view->title = $this->lang->zahost->initTitle;
+ $this->view->title = $this->lang->zahost->init->title;
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
$this->view->hostID = $hostID;
$this->view->host = $this->zahost->getById($hostID);
$this->view->notice = $imageList ? $this->lang->zahost->createZanodeNotice : $this->lang->zahost->downloadImageNotice;
$this->view->buttonName = $imageList ? $this->lang->zahost->createZanode : $this->lang->zahost->image->downloadImage;
$this->view->modalLink = $imageList ? $this->createLink('zanode', 'create', "hostID=$hostID") : $this->createLink('zahost', 'browseImage', "hostID=$hostID");
+ $this->view->closeLink = $this->createLink('zahost', 'browse');
$this->display();
}
diff --git a/module/zahost/css/common.css b/module/zahost/css/common.css
deleted file mode 100644
index 6f18896c39..0000000000
--- a/module/zahost/css/common.css
+++ /dev/null
@@ -1,7 +0,0 @@
-#modalLink{color: #2e7fff;text-decoration: underline;}
-.modal-dialog .modal-content{border: 2px solid #75e5c4; background-color: #f1fcf9; border-radius: 4px;}
-.icon-check-circle{color: #17ce97; margin-right: 10px; font-size: 20px;}
-.modal-dialog{width: fit-content;}
-.modal-dialog{border-radius: 4px;}
-.modal-header{padding:9px 15px 0px; margin:0px; border-bottom:0;}
-.modal-dialog .modal-body{padding: 5px 15px 20px 15px;}
diff --git a/module/zahost/js/common.js b/module/zahost/js/common.js
index 58462cdc7d..65357a2674 100755
--- a/module/zahost/js/common.js
+++ b/module/zahost/js/common.js
@@ -32,9 +32,3 @@ $(function()
$('#osCategory').change();
})
-
-function showModal(url = '')
-{
- if(url) $("#modalLink").attr('href', url);
- $('#successModal').modal('show', 'center');
-}
diff --git a/module/zahost/lang/zh-cn.php b/module/zahost/lang/zh-cn.php
index efa5a6e82b..e4361fef79 100644
--- a/module/zahost/lang/zh-cn.php
+++ b/module/zahost/lang/zh-cn.php
@@ -37,11 +37,7 @@ $lang->zahost->os = '操作系统';
$lang->zahost->imageName = '镜像文件';
$lang->zahost->createZanode = '创建执行节点';
-<<<<<<< HEAD
-$lang->zahost->initNotice = '保存成功,请您初始化宿主机或返回列表。';
-=======
$lang->zahost->initNotice = '保存成功,请您初始化宿主机或返回列表。';
->>>>>>> zenops_46_zhaoke_77683
$lang->zahost->createZanodeNotice = '初始化成功,您现在可以创建执行节点了。';
$lang->zahost->downloadImageNotice = '初始化成功,请下载镜像用于创建执行节点。';
$lang->zahost->undeletedNotice = "宿主机下存在执行节点无法删除。";
diff --git a/module/zahost/view/create.html.php b/module/zahost/view/create.html.php
index 0cede66734..cf1e531811 100644
--- a/module/zahost/view/create.html.php
+++ b/module/zahost/view/create.html.php
@@ -78,5 +78,5 @@
-
+getModuleRoot() . 'common/view/successmodal.html.php';?>
getModuleRoot() . 'common/view/footer.html.php';?>
diff --git a/module/zahost/view/init.html.php b/module/zahost/view/init.html.php
index 5cb9f1ddeb..7d2118afff 100644
--- a/module/zahost/view/init.html.php
+++ b/module/zahost/view/init.html.php
@@ -39,5 +39,5 @@
-
+getModuleRoot() . 'common/view/successmodal.html.php';?>
diff --git a/module/zahost/view/successmodal.html.php b/module/zahost/view/successmodal.html.php
deleted file mode 100644
index e1ccea7c5a..0000000000
--- a/module/zahost/view/successmodal.html.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php
index d3b3e8fc6b..7fcaf6008d 100644
--- a/module/zanode/lang/de.php
+++ b/module/zanode/lang/de.php
@@ -47,14 +47,15 @@ $lang->zanode->shell = "Shell";
$lang->zanode->automation = "Automation";
$lang->automation = new stdClass();
-$lang->automation->path = $lang->zanode->scriptPath;
-$lang->automation->node = $lang->zanode->common;
+$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->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->notFoundAgent = 'No Agent service is found';
+$lang->zanode->createVmFail = 'Failed to create a execution 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->runCaseConfirm = 'The system detects the presence of an automation script. Whether to execute?';
$lang->zanode->empty = 'No Execution Node';
$lang->zanode->createImaging = 'Creating';
diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php
index 89adacf72b..de8de68d2a 100644
--- a/module/zanode/lang/en.php
+++ b/module/zanode/lang/en.php
@@ -47,14 +47,15 @@ $lang->zanode->shell = "Shell";
$lang->zanode->automation = "Automation";
$lang->automation = new stdClass();
-$lang->automation->path = $lang->zanode->scriptPath;
-$lang->automation->node = $lang->zanode->common;
+$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->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->notFoundAgent = 'No Agent service is found';
+$lang->zanode->createVmFail = 'Failed to create a execution 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 ZenAgent Node';
$lang->zanode->createImaging = 'Creating';
diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php
index 1083c77fc8..c06676d639 100644
--- a/module/zanode/lang/fr.php
+++ b/module/zanode/lang/fr.php
@@ -47,14 +47,15 @@ $lang->zanode->shell = "Shell";
$lang->zanode->automation = "Automation";
$lang->automation = new stdClass();
-$lang->automation->path = $lang->zanode->scriptPath;
-$lang->automation->node = $lang->zanode->common;
+$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->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->notFoundAgent = 'No Agent service is found';
+$lang->zanode->createVmFail = 'Failed to create a execution 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->createImaging = 'Creating';
diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php
index 785bfa633e..6654c5be94 100644
--- a/module/zanode/lang/zh-cn.php
+++ b/module/zanode/lang/zh-cn.php
@@ -47,14 +47,15 @@ $lang->zanode->shell = "shell命令";
$lang->zanode->automation = "自动化测试";
$lang->automation = new stdClass();
-$lang->automation->path = $lang->zanode->scriptPath;
-$lang->automation->node = $lang->zanode->common;
+$lang->automation->scriptPath = $lang->zanode->scriptPath;
+$lang->automation->node = $lang->zanode->common;
-$lang->zanode->notFoundAgent = '没有发现Agent服务';
-$lang->zanode->createVmFail = '创建执行节点失败';
-$lang->zanode->noVncPort = '无法获取执行节点端口';
-$lang->zanode->nameValid = "名称只能是字母、数字,'-','_','.',且不能以符号开头";
-$lang->zanode->empty = '暂时没有执行节点';
+$lang->zanode->notFoundAgent = '没有发现Agent服务';
+$lang->zanode->createVmFail = '创建执行节点失败';
+$lang->zanode->noVncPort = '无法获取执行节点端口';
+$lang->zanode->nameValid = "名称只能是字母、数字,'-','_','.',且不能以符号开头";
+$lang->zanode->empty = '暂时没有执行节点';
+$lang->zanode->runCaseConfirm = '系统检测到选择的用例存在自动化测试脚本,是否自动执行用例?';
$lang->zanode->createImage = '创建镜像';
$lang->zanode->createImaging = '正在创建镜像';
diff --git a/module/zanode/model.php b/module/zanode/model.php
index 397fe509fd..e2a3cdc0f3 100644
--- a/module/zanode/model.php
+++ b/module/zanode/model.php
@@ -650,6 +650,20 @@ class zanodemodel extends model
);
}
+ /**
+ * Get automation by product id.
+ *
+ * @param int $productID
+ * @access public
+ * @return void
+ */
+ public function getAutomationByProduct($productID = 0)
+ {
+ return $this->dao->select('*')->from(TABLE_AUTOMATION)
+ ->where('product')->eq($productID)
+ ->fetch();
+ }
+
/**
* Set automation setting.
*
diff --git a/module/zanode/view/createimage.html.php b/module/zanode/view/createimage.html.php
index ed25e3d99b..2d564b0621 100644
--- a/module/zanode/view/createimage.html.php
+++ b/module/zanode/view/createimage.html.php
@@ -76,7 +76,7 @@ function getTaskProgress()
if(rate == 1 || status == 'completed') rate = 1;
- $('.rate').css('width', rate*100 + '%');
+ $('.rate').css('width', rate + '%');
if(rate == 1 || (status != 'inprogress' && status != 'created'))
{
updateStatus(data);
case->precondition);?>