* Fix bug for yask #77683.

This commit is contained in:
tanghucheng
2022-12-05 17:17:52 +08:00
parent 74d5326b36
commit b135baf56c
3 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
#modalLink{color: #2e7fff;text-decoration: underline;}
.modal-dialog .modal-content{border: 2px solid #75e5c4; background-color: #f1fcf9; border-radius: 4px;}
.icon-check-circle{color: #17ce97; margin-right: 10px; font-size: 20px;}
.modal-dialog{width: 384px;}
.modal-dialog{width: fit-content;}
.modal-dialog{border-radius: 4px;}
.modal-header{padding:9px 18px 0px; margin:0px; border-bottom:0;}
.modal-dialog .modal-body{padding: 5px 5px 20px 15px;}
.modal-header{padding:9px 15px 0px; margin:0px; border-bottom:0;}
.modal-dialog .modal-body{padding: 5px 15px 20px 15px;}
+8 -8
View File
@@ -90,7 +90,7 @@ class zahostModel extends model
{
return false;
}
$this->dao->update(TABLE_ZAHOST)->data($hostInfo, 'name')->autoCheck()
->batchCheck('cpuCores,diskSize', 'gt', 0)
->batchCheck('diskSize,memory', 'float')
@@ -107,20 +107,20 @@ class zahostModel extends model
*/
public function ping($address)
{
if (strcasecmp(PHP_OS, 'WINNT') === 0)
if (strcasecmp(PHP_OS, 'WINNT') === 0)
{
exec("ping -n 1 {$address}", $outcome, $status);
}
elseif (strcasecmp(PHP_OS, 'Linux') === 0)
}
elseif (strcasecmp(PHP_OS, 'Linux') === 0)
{
exec("ping -c 1 {$address}", $outcome, $status);
}
if (0 == $status)
if (0 == $status)
{
$status = true;
}
else
}
else
{
$status = false;
}
@@ -135,7 +135,7 @@ class zahostModel extends model
* @access public
* @return bool
*/
public function checkAddress($address)
public function checkAddress($address)
{
$address = str_replace(array('https://', 'http://'), '', $address);
+1 -1
View File
@@ -125,7 +125,7 @@ class zanodemodel extends model
$image = $this->getImageByID($node->image);
$newImage = new stdClass();
$newImage->host = $node->id;
$newImage->host = $node->parent;
$newImage->name = $data->name;
$newImage->status = 'created';
$newImage->osName = $node->osName;