Commit f94c990f authored by Changgang Liu's avatar Changgang Liu Committed by Yas Naoi
Browse files

Issue #3165425 by liuchanggang, yas: Fix the status message when creating an image

parent bba8c798
Loading
Loading
Loading
Loading
+11 −5
Changes for modules/cloud_service_providers/aws_cloud/src/Form/Ec2/InstanceCreateImageForm.php: 11 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@ class InstanceCreateImageForm extends AwsDeleteForm {
  public function getQuestion() {
    $entity = $this->entity;

    return $this->t('Create an image for instance %instance_id: %name?', [
      '%instance_id' => $entity->getInstanceId(),
    return $this->t('Create an image for instance %name (@instance_id)', [
      '%name' => $entity->label(),
      '@instance_id' => $entity->getInstanceId(),
    ]);
  }

@@ -40,14 +40,20 @@ class InstanceCreateImageForm extends AwsDeleteForm {
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form = parent::buildForm($form, $form_state);
    $form['image_name'] = [

    $form['image'] = [
      '#type' => 'details',
      '#title' => $this->t('Image'),
      '#open' => TRUE,
    ];
    $form['image']['image_name'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Image Name'),
      '#description' => $this->t('A name for the new image.'),
      '#required' => TRUE,
      '#default_value' => $this->entity->label(),
      '#default_value' => $this->entity->label() . '-' . date('Ymd'),
    ];
    $form['no_reboot'] = [
    $form['image']['no_reboot'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('No Reboot'),
      '#description' => $this->t("By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed."),