diff --git a/module/common/view/successmodal.html.php b/module/common/view/successmodal.html.php deleted file mode 100644 index 4933fc4dfa..0000000000 --- a/module/common/view/successmodal.html.php +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/module/zahost/control.php b/module/zahost/control.php index 78cb1ee6ca..e201c83b2d 100644 --- a/module/zahost/control.php +++ b/module/zahost/control.php @@ -333,29 +333,6 @@ class zahost extends control return $this->send(array('result' => 'fail', 'message' => array('imageName' => array($this->lang->zahost->notice->noImage)))); } - /* - * Init host. - * - * @param int $hostID - * @return void - */ - public function init($hostID) - { - $imageList = $this->zahost->getImagePairs($hostID); - - $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->initBash = sprintf($this->config->zahost->initBash, $this->view->host->secret, getWebRoot(true)); - $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(); - } - /** * Introduction. * diff --git a/module/zahost/css/init.css b/module/zahost/css/init.css deleted file mode 100644 index 0e1d888e3c..0000000000 --- a/module/zahost/css/init.css +++ /dev/null @@ -1,6 +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;} \ No newline at end of file diff --git a/module/zahost/js/init.js b/module/zahost/js/init.js deleted file mode 100644 index f82503d64d..0000000000 --- a/module/zahost/js/init.js +++ /dev/null @@ -1,47 +0,0 @@ -$('#checkServiceStatus').click(function(){ - $.get(createLink('zahost', 'ajaxGetServiceStatus', 'hostID=' + hostID), function(response) - { - var resultData = JSON.parse(response); - let html = "

" + zahostLang.init.statusTitle + "

"; - let isSuccess = true - - for (let key in resultData.data) { - if(resultData.data[key] == 'ready'){ - html += "
" + key + ' ' + zahostLang.init[resultData.data[key]] + "
" - }else{ - isSuccess = false - html += "
" + key + ' ' + zahostLang.init[resultData.data[key]] + "
" - } - }; - - if(!isSuccess){ - html += '

' + zahostLang.init.initFailNoticeTitle + '

'; - html += '
' + zahostLang.init.initFailNoticeDesc + 'https://github.com/easysoft/zenagent/
' - } - $('#statusContainer').html(html) - if(isSuccess) showModal(); - }); - return -}) - -$('.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: zahostLang.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/zahost/view/init.html.php b/module/zahost/view/init.html.php deleted file mode 100644 index 0da41a9072..0000000000 --- a/module/zahost/view/init.html.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @package automation - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -zahost); ?> -
-
-
-
-

zahost->init->title; ?>

-
- -
-

zahost->init->descTitle; ?>

-
- - - - zahost->init->initDesc, $initBash, ""); ?> - -
-
-
-
- -
- -
-
-
-
-getModuleRoot() . 'common/view/successmodal.html.php';?> - diff --git a/module/zanode/control.php b/module/zanode/control.php index 124ce8df7f..e2866dbdc4 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -161,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/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 += '
' + zanodeLang.init.initFailNoticeDesc + 'https://github.com/easysoft/zenagent/
' - } - $('#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/view/init.html.php b/module/zanode/view/init.html.php deleted file mode 100644 index 3455e89394..0000000000 --- a/module/zanode/view/init.html.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @package automation - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -zanode); ?> -
-
-
-
-

zanode->init->title; ?>

-
- -
-

zanode->init->descTitle; ?>

-
- - - - zanode->init->initDesc, $initBash, ""); ?> - -
-
-
-
- -
- - goback, "data-app='{$app->tab}'", 'btn'); ?> -
-
-
-
- -