Skip to content
Snippets Groups Projects
Commit 90660697 authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3065536 by Xiaohua Guan, yas: Fix a name field in snapshot listing page

parent ad03cde2
No related branches found
No related tags found
No related merge requests found
...@@ -104,11 +104,10 @@ class SnapshotCreateForm extends AwsCloudContentForm { ...@@ -104,11 +104,10 @@ class SnapshotCreateForm extends AwsCloudContentForm {
&& ($entity->setEncrypted($result['Encrypted'])) && ($entity->setEncrypted($result['Encrypted']))
&& ($entity->save())) { && ($entity->save())) {
$this->setUidInAws( $this->setTagsInAws($entity->getSnapshotId(), [
$this->entity->getSnapshotId(), 'snapshot_created_by_uid' => $entity->getOwner()->id(),
'snapshot_created_by_uid', 'Name' => $entity->getName(),
$entity->getOwner()->id() ]);
);
$message = $this->t('The @label "%label (@snapshot_id)" has been created.', [ $message = $this->t('The @label "%label (@snapshot_id)" has been created.', [
'@label' => $entity->getEntityType()->getLabel(), '@label' => $entity->getEntityType()->getLabel(),
......
...@@ -106,12 +106,10 @@ class SnapshotEditForm extends AwsCloudContentForm { ...@@ -106,12 +106,10 @@ class SnapshotEditForm extends AwsCloudContentForm {
public function save(array $form, FormStateInterface $form_state) { public function save(array $form, FormStateInterface $form_state) {
parent::save($form, $form_state); parent::save($form, $form_state);
$this->setUidInAws( $this->setTagsInAws($this->entity->getSnapshotId(), [
$this->entity->getSnapshotId(), 'snapshot_created_by_uid' => $this->entity->getOwner()->id(),
'snapshot_created_by_uid', 'Name' => $this->entity->getName(),
$this->entity->getOwner()->id() ]);
);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment