* Fix bug for yask #77683.
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user