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