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 {
&& ($entity->setEncrypted($result['Encrypted']))
&& ($entity->save())) {
$this->setUidInAws(
$this->entity->getSnapshotId(),
'snapshot_created_by_uid',
$entity->getOwner()->id()
);
$this->setTagsInAws($entity->getSnapshotId(), [
'snapshot_created_by_uid' => $entity->getOwner()->id(),
'Name' => $entity->getName(),
]);
$message = $this->t('The @label "%label (@snapshot_id)" has been created.', [
'@label' => $entity->getEntityType()->getLabel(),
......
......@@ -106,12 +106,10 @@ class SnapshotEditForm extends AwsCloudContentForm {
public function save(array $form, FormStateInterface $form_state) {
parent::save($form, $form_state);
$this->setUidInAws(
$this->entity->getSnapshotId(),
'snapshot_created_by_uid',
$this->entity->getOwner()->id()
);
$this->setTagsInAws($this->entity->getSnapshotId(), [
'snapshot_created_by_uid' => $this->entity->getOwner()->id(),
'Name' => $this->entity->getName(),
]);
}
}
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