diff --git a/module/common/model.php b/module/common/model.php index cd339bc545..504f4c49a8 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3204,7 +3204,7 @@ EOD; * @access public * @return string */ - public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST') + public static function http($url, $data = null, $options = array(), $headers = array(), $dataType = 'data', $method = 'POST', $timeout = 30) { global $lang, $app; if(!extension_loaded('curl')) @@ -3226,8 +3226,8 @@ EOD; $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_setopt($curl, CURLOPT_USERAGENT, 'Sae T OAuth2 v0.1'); - curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); - curl_setopt($curl, CURLOPT_TIMEOUT, 30); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout); + curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($curl, CURLOPT_ENCODING, ""); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 2811489b2c..164f8b876e 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -149,7 +149,7 @@ - createLink('zanode', 'view', "id=$node->id"), $node->name, '', "");?> + createLink('zanode', 'view', "id=$node->id"), $node->name, '_target', "");?> zanode->os->cpuCores, $node->cpuCores);?> memory . $this->lang->zahost->unitList['GB'];?> diskSize . $this->lang->zahost->unitList['GB'];?> diff --git a/module/zanode/js/view.js b/module/zanode/js/view.js index 4811670c3e..b4083afe00 100644 --- a/module/zanode/js/view.js +++ b/module/zanode/js/view.js @@ -24,7 +24,7 @@ $('#checkServiceStatus').click(function(){ if(resultData.data[key] == 'ready' || resultData.data[key] == 'not_available') { $('.ztf-status').text(zanodeLang.init[resultData.data[key]]) - $('.ztf-install').text(zanodeLang.reinstall); + $('.ztf-install').text(''); } else { diff --git a/module/zanode/model.php b/module/zanode/model.php index 7e03759651..896945b79c 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -695,7 +695,7 @@ class zanodemodel extends model */ public function getServiceStatus($node) { - $result = json_decode(commonModel::http("http://{$node->ip}:{$node->zap}/api/v1/service/check", json_encode(array("services" => "all")), array(), array("Authorization:$node->tokenSN"))); + $result = json_decode(commonModel::http("http://{$node->ip}:{$node->zap}/api/v1/service/check", json_encode(array("services" => "all")), array(), array("Authorization:$node->tokenSN"), 'data', 'POST', 2)); if(empty($result->data->ztfStatus) || $result->code != 'success') { $result = new stdclass; diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index 0f89e69f12..ae40cb4f34 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -137,7 +137,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
- zanode->init->initSuccessNoticeTitle, "{$lang->zanode->manual}", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?> + zanode->init->initSuccessNoticeTitle, "{$lang->zanode->manual}", html::a(helper::createLink('testcase', 'automation', "", '', true), $lang->zanode->automation, '', "class='iframe' title='{$lang->zanode->automation}' data-width='50%'", '')); ?> zanode->init->initFailNoticeTitle . '
' . $lang->zanode->init->initFailNoticeDesc;?>