* [story#60132,done,4h,0h] variable naming adjustment.
This commit is contained in:
+15
-15
@@ -272,14 +272,14 @@ class instanceModel extends model
|
||||
$settings->settings_map->resources = new stdclass;
|
||||
$settings->settings_map->resources->memory = $size;
|
||||
|
||||
$oldVal = helper::formatKB($instance->oldVal);
|
||||
$newVal = helper::formatKB(intval($size));
|
||||
unset($instance->oldVal);
|
||||
$oldValue = helper::formatKB($instance->oldVal);
|
||||
$newValue = helper::formatKB(intval($size));
|
||||
unset($instance->oldValue);
|
||||
$success = $this->cne->updateConfig($instance, $settings);
|
||||
if($success)
|
||||
{
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustMemory', $newVal);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustmemory', 'old' => $oldVal, 'new' => $newVal, 'diff' => '']]);
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustMemory', $newValue);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustmemory', 'old' => $oldValue, 'new' => $newValue, 'diff' => '']]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -303,14 +303,14 @@ class instanceModel extends model
|
||||
$settings->settings_map->resources = new stdclass;
|
||||
$settings->settings_map->resources->cpu = $size;
|
||||
|
||||
$oldVal = $instance->oldVal;
|
||||
$newVal = (string)$size;
|
||||
unset($instance->oldVal);
|
||||
$oldValue = $instance->oldValue;
|
||||
$newValue = (string)$size;
|
||||
unset($instance->oldValue);
|
||||
$success = $this->cne->updateConfig($instance, $settings);
|
||||
if($success)
|
||||
{
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustCPU', $newVal);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustcpu', 'old' => $oldVal, 'new' => $newVal, 'diff' => '']]);
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustCPU', $newValue);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustcpu', 'old' => $oldValue, 'new' => $newValue, 'diff' => '']]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -345,14 +345,14 @@ class instanceModel extends model
|
||||
$settings->settings = array();
|
||||
$settings->settings[] = $setting;
|
||||
|
||||
$oldVal = $instance->oldVal;
|
||||
$newVal = str_replace('Gi', '', $size);
|
||||
unset($instance->oldVal);
|
||||
$oldValue = $instance->oldValue;
|
||||
$newValue = str_replace('Gi', '', $size);
|
||||
unset($instance->oldValue);
|
||||
$success = $this->cne->updateConfig($instance, $settings);
|
||||
if($success)
|
||||
{
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustVol', $newVal);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustvol', 'old' => $oldVal, 'new' => $newVal, 'diff' => '']]);
|
||||
$actionID = $this->action->create('instance', $instance->id, 'adjustVol', $newValue);
|
||||
$this->action->logHistory($actionID, [['field' => 'adjustvol', 'old' => $oldValue, 'new' => $newValue, 'diff' => '']]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user