From f665030cb1aebfa0dbd7e2df8c8545d5830ad801 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 11 Jan 2023 09:46:57 +0000 Subject: [PATCH 01/12] * Finish task #82697. --- module/zahost/js/browse.js | 8 ++++---- module/zanode/js/browse.js | 8 ++++---- module/zanode/view/createimage.html.php | 10 +++++++--- module/zanode/view/getvnc.html.php | 2 +- module/zanode/view/view.html.php | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/module/zahost/js/browse.js b/module/zahost/js/browse.js index 31399f3d9f..5ce8f99b34 100644 --- a/module/zahost/js/browse.js +++ b/module/zahost/js/browse.js @@ -6,12 +6,12 @@ $('#hostList tr[data-status="wait"]').hover(function(){ 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/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/view/createimage.html.php b/module/zanode/view/createimage.html.php index d9d18dcf6b..934514162f 100644 --- a/module/zanode/view/createimage.html.php +++ b/module/zanode/view/createimage.html.php @@ -31,8 +31,12 @@
- -
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;?>
@@ -99,5 +103,5 @@ function updateStatus(data) }, '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';?>
- ";?> + ";?>
From a82e54a830352978694e829c3caf32dbd8909ff7 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 12 Jan 2023 11:01:38 +0800 Subject: [PATCH 04/12] * Fix bug #31522. --- module/testcase/view/browse.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 662ef81bce..41de154757 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -83,7 +83,7 @@ js::set('cancelURL', $this->createLink('testtask', 'batchRun', "productID=$ if($useDatatable) include '../../common/view/datatable.html.php'; else include '../../common/view/tablesorter.html.php'; - if($config->testcase->needReview or !empty($config->testcase->forceReview)) $config->testcase->datatable->fieldList['actions']['width'] = '180'; + if($config->testcase->needReview or !empty($config->testcase->forceReview)) $config->testcase->datatable->fieldList['actions']['width'] = '190'; $setting = $this->datatable->getSetting('testcase'); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; From bf95108952eb571ef4f8b10d0d00404ffabd3e4f Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 12 Jan 2023 03:20:06 +0000 Subject: [PATCH 05/12] * Fix bug #31432. --- module/zahost/view/view.html.php | 5 ++--- module/zanode/view/createimage.html.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 5670c7b3ca..279bdd4a83 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -135,8 +135,7 @@
zahost->browseNode;?>
- createLink('zanode', 'browse', "id=$zahost->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' style='width: 100%; height: 100%; left: 0px;'>";?> - +
diff --git a/module/zanode/view/createimage.html.php b/module/zanode/view/createimage.html.php index d718562fdc..d23f5072ce 100644 --- a/module/zanode/view/createimage.html.php +++ b/module/zanode/view/createimage.html.php @@ -53,7 +53,7 @@ - zanode->createImageNotice}\")==false) return false;'");?> + status, array('shutdown', 'shutoff')) ? html::submitButton('', "") : html::submitButton('', "onclick='if(confirm(\"{$lang->zanode->createImageNotice}\")==false) return false;'");?> From 55ad3049c71019f547d8618aeb6df344c3b3cb5c Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 12 Jan 2023 05:00:31 +0000 Subject: [PATCH 06/12] * Fix bug #31421. --- module/zahost/css/view.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zahost/css/view.css b/module/zahost/css/view.css index 4aabb20003..a01465a8bb 100644 --- a/module/zahost/css/view.css +++ b/module/zahost/css/view.css @@ -6,8 +6,9 @@ .c-os {width: 200px;} .c-memory, .c-diskSize, .c-status, .c-software, .c-instanceNum {width: 90px;} .c-datetime {width: 150px;} -.status-wait {color: #f00;} .c-actions {overflow: visible!important;} +.c-number {width: 120px;} +.status-wait {color: #f00;} .zanode-mt-8{margin-top: 8px;} .zahost-init{padding:15px;background: #f4f5f7;margin:10px 0;} .fail{color:red;} @@ -19,4 +20,3 @@ .btn-info {background-color: unset;} .icon-refresh {font-size: 15px;} .load-indicator:after {top: 33%;} -.c-number {width: 120px;} From 4b1bb583838e52b2d2b7776912eb557fea4eb586 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 12 Jan 2023 05:00:46 +0000 Subject: [PATCH 07/12] * Fix bug #31421. --- module/zahost/js/view.js | 15 +++++++++ module/zahost/view/view.html.php | 7 ++-- module/zanode/control.php | 23 +++++++++++++ module/zanode/css/list.css | 8 +++++ module/zanode/view/list.html.php | 56 ++++++++++++++++++++++++++++++++ 5 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 module/zanode/css/list.css create mode 100644 module/zanode/view/list.html.php diff --git a/module/zahost/js/view.js b/module/zahost/js/view.js index c452fffd48..4df1246224 100644 --- a/module/zahost/js/view.js +++ b/module/zahost/js/view.js @@ -65,3 +65,18 @@ $('.btn-init-copy').live('click', function() $(that).tooltip('hide') }, 2000) }) + + +function setIframeHeight(iframe) +{ + if (iframe) + { + var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow; + if (iframeWin.document.body) + { + var height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight + iframe.height = height+10; + console.log(1111, iframe.height) + } + } +} \ No newline at end of file diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 279bdd4a83..ab54e22f53 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -134,8 +134,9 @@
zahost->browseNode;?>
-
- +
+ 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/control.php b/module/zanode/control.php index 4038bcc4b7..124ce8df7f 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. * 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/view/list.html.php b/module/zanode/view/list.html.php new file mode 100644 index 0000000000..b065f6a17a --- /dev/null +++ b/module/zanode/view/list.html.php @@ -0,0 +1,56 @@ + + * @package zanode + * @version $Id$ + * @link http://www.zentao.net + */ +?> +getModuleRoot() . 'common/view/header.html.php'; ?> +
+ + +
+

+ zanode->empty; ?> + ' . $lang->zanode->create, '', 'class="btn btn-info"'); ?> +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
zahost->name);?>zanode->cpuCores);?>zanode->memory);?>zanode->diskSize);?>zanode->osName);?>zanode->status);?>
inlink('view', "id=$node->id"), $node->name, '', ""); ?>zanode->os->cpuCores, $node->cpuCores); ?>memory . $this->lang->zahost->unitList['GB']; ?>diskSize . $this->lang->zahost->unitList['GB']; ?>osName; ?>zanode->statusList, $node->status); ?>
+ + +
+ +getModuleRoot() . 'common/view/footer.html.php'; ?> + \ No newline at end of file From c26848670d8c88c68923941155f6ba8a6f05a144 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 12 Jan 2023 13:06:36 +0800 Subject: [PATCH 08/12] * Fix bug #31487. --- module/zahost/config.php | 2 +- module/zanode/config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zahost/config.php b/module/zahost/config.php index c7eacc5875..bd15e339b9 100644 --- a/module/zahost/config.php +++ b/module/zahost/config.php @@ -50,7 +50,7 @@ $config->zahost->search['params']['editedDate'] = array('operator' => '=', $config->zahost->editor = new stdclass(); $config->zahost->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); $config->zahost->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->zahost->editor->view = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->zahost->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools'); $config->zahost->automation = new stdclass(); $config->zahost->automation->zenAgentURL = 'https://github.com/easysoft/zenagent/blob/main/guide/deploy/index.md'; 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'); From a9d3a9dcc74003a2c8f9a61813b14f74812301d7 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 12 Jan 2023 13:16:30 +0800 Subject: [PATCH 09/12] * Fix bug #31410. --- module/zahost/css/browseimage.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zahost/css/browseimage.css b/module/zahost/css/browseimage.css index 18731fc5c2..ef7500cb63 100644 --- a/module/zahost/css/browseimage.css +++ b/module/zahost/css/browseimage.css @@ -1,2 +1,4 @@ .c-name,.c-status,.c-progress,.c-osName{width: 130px;} .main-header-image{border:none;margin-left: 0!important;padding-left:0;} +.body-modal #mainContent{padding-top: 85px; padding-bottom: 50px;} +.dropdown-menu>li>a {margin: 1px 0;} From f499e9e4afe1a22fe4694b0c76a7a2b5236890be Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 12 Jan 2023 13:22:03 +0800 Subject: [PATCH 10/12] * Remove init operation for zahost and zanode. --- module/common/view/successmodal.html.php | 33 ------------ module/zahost/control.php | 23 -------- module/zahost/css/init.css | 6 --- module/zahost/js/init.js | 47 ---------------- module/zahost/view/init.html.php | 44 --------------- module/zanode/control.php | 22 -------- module/zanode/css/init.css | 7 --- module/zanode/js/init.js | 68 ------------------------ module/zanode/view/init.html.php | 45 ---------------- 9 files changed, 295 deletions(-) delete mode 100644 module/common/view/successmodal.html.php delete mode 100644 module/zahost/css/init.css delete mode 100644 module/zahost/js/init.js delete mode 100644 module/zahost/view/init.html.php delete mode 100644 module/zanode/css/init.css delete mode 100644 module/zanode/js/init.js delete mode 100644 module/zanode/view/init.html.php 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'); ?> -
-
-
-
- - From 52014f1f411450d7c001c98c59bbc1e23d4b6202 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 12 Jan 2023 13:40:02 +0800 Subject: [PATCH 11/12] * Fix bug #31489. --- module/testcase/view/buildscriptform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/view/buildscriptform.php b/module/testcase/view/buildscriptform.php index 0319c1c943..0d10412215 100644 --- a/module/testcase/view/buildscriptform.php +++ b/module/testcase/view/buildscriptform.php @@ -3,7 +3,7 @@ $this->loadModel('file'); $filesName = 'scriptFile'; $labelsName = 'scriptName'; $maxUploadSize = strtoupper(ini_get('upload_max_filesize')); -$dangerFiles = 'zip'; +$dangerFiles = 'php,py,js,go,sh,bat,lua,rb,tcl,pl'; js::set('scriptDangerExtensions', ',' . $dangerFiles . ','); js::set('maxUploadSize', $maxUploadSize); @@ -74,7 +74,7 @@ function checkDangerExtensions(file) if(index >= 0) { extension = fileName.substr(index + 1); - if(scriptDangerExtensions.lastIndexOf(',' + extension + ',') >= 0) + if(scriptDangerExtensions.lastIndexOf(',' + extension + ',') < 0) { alert(lang->file->dangerFile);?>); $(file).val(''); From f00c7584f52b34549ca895d01eacf295844f91db Mon Sep 17 00:00:00 2001 From: zhaoke Date: Thu, 12 Jan 2023 07:16:45 +0000 Subject: [PATCH 12/12] * Hide status title when export finish. --- module/zanode/view/createimage.html.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/zanode/view/createimage.html.php b/module/zanode/view/createimage.html.php index d23f5072ce..f5fbccb92a 100644 --- a/module/zanode/view/createimage.html.php +++ b/module/zanode/view/createimage.html.php @@ -108,8 +108,15 @@ function updateStatus(data) $.post(url, postData, function(result) { - if(data.status == 'completed') $('.success').removeClass('hide'); - else $('.status-title').text(zanodeLang.createImageFail) + if(data.status == 'completed') + { + $('.success').removeClass('hide'); + $('.status-title').text('') + } + else + { + $('.status-title').text(zanodeLang.createImageFail) + } }, 'json'); }