diff --git a/module/zanode/control.php b/module/zanode/control.php index 4ceb30d849..7d3b5288cc 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -84,6 +84,7 @@ class zanode extends control $this->view->nodeList = $this->zanode->getListByHost($hostID, $orderBy); $this->view->orderBy = $orderBy; $this->view->hostID = $hostID; + $this->view->sortLink = $this->createLink('zanode', 'nodeList', "hostID={$hostID}&orderBy={orderBy}"); $this->display(); } diff --git a/module/zanode/css/nodelist.ui.css b/module/zanode/css/nodelist.ui.css new file mode 100644 index 0000000000..ab74a06efa --- /dev/null +++ b/module/zanode/css/nodelist.ui.css @@ -0,0 +1 @@ +#main {background-color: white;} diff --git a/module/zanode/js/view.ui.js b/module/zanode/js/view.ui.js index 7ec010d27f..c1d523e5f5 100644 --- a/module/zanode/js/view.ui.js +++ b/module/zanode/js/view.ui.js @@ -165,6 +165,28 @@ function pwdShow() $('#pwd-text').text(pwd) $('.btn-pwd-show').html("") } + +} + +function onCopy() +{ + $('#initBash').removeClass('hidden'); + document.getElementById('initBash').select(); + document.execCommand("Copy"); + $('#initBash').addClass('hidden'); + $('.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) } $(function() diff --git a/module/zanode/ui/nodelist.html.php b/module/zanode/ui/nodelist.html.php new file mode 100644 index 0000000000..3dbbbdd345 --- /dev/null +++ b/module/zanode/ui/nodelist.html.php @@ -0,0 +1,37 @@ + + * @package zanode + * @link https://www.zentao.net + */ +namespace zin; + +$fieldList = $config->zanode->dtable->fieldList; +unset($fieldList['actions']); +unset($fieldList['id']); +unset($fieldList['type']); +unset($fieldList['extranet']); +unset($fieldList['hostName']); +$fieldList['name']['sort'] = true; +$fieldList['cpuCores']['sort'] = true; +$fieldList['memory']['sort'] = true; +$fieldList['diskSize']['sort'] = true; +$fieldList['osName']['sort'] = true; +$fieldList['status']['sort'] = true; + +$nodeList = initTableData($nodeList, $fieldList); + +to::header(''); + +dtable +( + set::cols($fieldList), + set::data($nodeList), +); + +render(); +