* Adjust zanode action content.

This commit is contained in:
caoyanyi
2024-03-05 10:22:39 +08:00
parent 36ae7ad0e2
commit c1a1e52413
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -201,6 +201,7 @@ class actionModel extends model
if(in_array($actionName, array('linkstory', 'unlinkstory', 'createchildrenstory', 'linkur', 'unlinkur'))) $this->actionTao->processLinkStoryAndBugActionExtra($action, 'story', 'view');
if(in_array($actionName, array('linkbug', 'unlinkbug'))) $this->actionTao->processLinkStoryAndBugActionExtra($action, 'bug', 'view');
if($actionName == 'repocreated') $action->extra = str_replace("class='iframe'", 'data-app="devops"', $action->extra);
if($actionName == 'createdsnapshot' && in_array($action->objectType, array('vm', 'zanode')) && $action->extra == 'defaultSnap') $action->actor = $this->lang->action->system;
$action->history = zget($histories, $actionID, array());
foreach($action->history as $history)
@@ -575,7 +576,7 @@ class actionModel extends model
}
else
{
if($actionType == 'restoredsnapshot' && in_array($action->objectType, array('vm', 'zanode')) && $value == 'defaultSnap') $value = $this->lang->{$objectType}->snapshot->defaultSnapName;
if(in_array($actionType, array('restoredsnapshot', 'createdsnapshot')) && in_array($action->objectType, array('vm', 'zanode')) && $value == 'defaultSnap') $value = $this->lang->{$objectType}->snapshot->defaultSnapName;
$desc = str_replace('$' . $key, (string)$value, $desc);
}
-1
View File
@@ -140,7 +140,6 @@ class zanodemodel extends model
if(!empty($result) && $result->code == 'success')
{
if($snapshot->name == 'defaultSnap') $snapshot->name = $this->lang->zanode->snapshot->defaultSnapName;
$this->loadModel('action')->create('zanode', $node->id, 'createdSnapshot', '', $snapshot->name);
$this->dao->update(TABLE_ZAHOST)->set('status')->eq(static::STATUS_CREATING_SNAP)->where('id')->eq($node->id)->exec();