<commit_before>{{#accordion-list showExpandAll=false as | al expandFn |}}
  <div class="over-hr"><span>{{driverOptionsTitle}}</span></div>

  {{#accordion-list-item
    title=(t 'nodeDriver.amazonec2.access.title')
    detail=(t 'nodeDriver.amazonec2.access.detail')
    expandAll=expandAll
    expand=(action expandFn)
    expandOnInit=true
  }}
    <div class="row">
      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.region.label'}}</label>
        {{#if (eq step 1)}}
          <select class="form-control" onchange={{action (mut config.region) value="target.value"}}>
            {{#each regionChoices as |choice|}}
              <option value={{choice}} selected={{eq config.region choice}}>{{choice}}</option>
            {{/each}}
          </select>
        {{else}}
          <div>{{config.region}}</div>
        {{/if}}
      </div>

      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.accessKey.label'}}</label>
        {{#if (eq step 1)}}
          {{input type="text" name="username" classNames="form-control" placeholder=(t 'nodeDriver.amazonec2.accessKey.placeholder') value=config.accessKey}}
        {{else}}
          <div>{{config.accessKey}}</div>
        {{/if}}
      </div>

      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.secretKey.label'}}</label>
        {{#if (eq step 1)}}
          {{input type="password" name="password" classNames="form-control" placeholder=(t 'nodeDriver.amazonec2.secretKey.placeholder') value=config.secretKey}}
        {{else}}
          <div class="text-muted text-italic">{{t 'nodeDriver.amazonec2.secretKey.provided'}}</div>
        {{/if}}
      </div>
    </div>

    {{#if (eq step 1)}}
      <div class="row">
        <div class="span-8 offset-4">
          <p class="text-info text-small m-0">{{t 'nodeDriver.amazonec2.access.help'}}</p>
        </div>
      </div>
    {{/if}}
  {{/accordion-list-item}}

  {{#if (eq step 1)}}
    {{top-errors errors=errors}}
    {{save-cancel
      save="awsLogin"
      cancel="cancel"
      createLabel="nodeDriver.amazonec2.access.next"
      savingLabel="nodeDriver.amazonec2.access.loading"
    }}
  {{/if}}

  <div class="{{unless (gte step 2) 'hide'}}">
    {{#accordion-list-item
      title=(t 'nodeDriver.amazonec2.zone.title')
      detail=(t 'nodeDriver.amazonec2.zone.detail')
      expandAll=expandAll
      expand=(action expandFn)
      expandOnInit=true
    }}
      {{#if (eq step 2)}}
        <div class="row">
          <label class="acc-label">{{t 'nodeDriver.amazonec2.availabilityZone'}}</label>
          <select class="form-control" onchange={{action (mut selectedZone) value="target.value"}}>
            {{#each zoneChoices as |choice|}}
              <option value={{choice}} selected={{eq selectedZone choice}}>{{choice}}</option>
            {{/each}}
          </select>
        </div>

        <div class="row">
          <label class="acc-label pt-20">{{t 'nodeDriver.amazonec2.subnet'}}</label>
          {{#if subnetChoices.length}}
            {{#each subnetChoices as |choice|}}
              {{#if choice.isVpc}}
                <hr class="mt-20 mb-20" />
                <div class="radio">
                  <label class="acc-label pb-0">{{radio-button selection=selectedSubnet value=choice.value}} {{choice.label}}
                    {{#each choice.tags as |tag|}}
                      <span class="tag-xs bg-info mr-5">
                        <i class="icon icon-tag"></i>
                        {{tag}}
                      </span>
                    {{/each}}
                  </label>
                </div>
              {{else}}
                <div class="radio">
                <label class="ml-20">
                  {{radio-button selection=selectedSubnet value=choice.value}} <i class="icon icon-level-down text-muted" style="transform: scaleX(-1) rotate(90deg);"></i> {{choice.label}}
                  {{#each choice.tags as |tag|}}
                    <span class="tag-xs bg-info mr-5">
                      <i class="icon icon-tag"></i>
                      {{tag}}
                    </span>
                  {{/each}}
                </label>
                </div>
              {{/if}}
            {{/each}}
          {{else}}
            There are no subnets to choose from.
          {{/if}}
        </div>
      {{else}}
        <div class="row">
          <div class="span-6">
            <label class="acc-label">{{t 'nodeDriver.amazonec2.availabilityZone'}}</label>
            {{config.region}}{{config.zone}}
          </div>
          <div class="span-6">
            <label class="acc-label pt-20">{{t 'nodeDriver.amazonec2.subnet'}}</label>
            {{#if config.subnetId}}
              {{config.subnetId}}
            {{else}}
              {{config.vpcId}}
            {{/if}}
          </div>
        </div>
      {{/if}}
    {{/accordion-list-item}}

    {{#if (eq step 2)}}
      {{top-errors errors=errors}}
      {{save-cancel
        save="selectSubnet"
        cancel="cancel"
        createLabel="nodeDriver.amazonec2.zone.next"
        savingLabel="nodeDriver.amazonec2.zone.loading"
      }}
    {{/if}}
  </div>

  <div class="{{unless (gte step 3) 'hide'}}">
    {{#accordion-list-item
      title=(t 'nodeDriver.amazonec2.securityGroup.title')
      detail=(t 'nodeDriver.amazonec2.securityGroup.detail')
      expandAll=expandAll
      expand=(action expandFn)
      expandOnInit=true
    }}
      <div class="row">
        {{#if (eq step 3)}}
          <div class="radio pt-10">
            <label>
              {{radio-button selection=whichSecurityGroup value="default"}}
                {{t 'nodeDriver.amazonec2.securityGroup.defaultCreate' groupName=defaultSecurityGroupName htmlSafe=true}}
            </label>
          </div>

          {{#if (and settings.isRancher (not isCustomSecurityGroup))}}
            <p class="text-info ml-20"><a href="{{settings.docsBase}}/hosts/amazon/#required-ports-for-rancher-to-work" target="_blank">{{t 'nodeDriver.amazonec2.portHelp.link'}}</a> {{t 'nodeDriver.amazonec2.portHelp.text'}}</p>
          {{/if}}

          <div class="radio pt-10">
            <label>
              {{radio-button selection=whichSecurityGroup value="custom"}}
              {{t 'nodeDriver.amazonec2.securityGroup.choose'}}
            </label>
          </div>

          {{#if isCustomSecurityGroup}}
            <select class="form-control existing-security-groups" multiple="true" onchange={{action 'multiSecurityGroupSelect' ''}}>
              {{#each allSecurityGroups as |choice|}}
                <option value={{choice.name}} selected={{array-includes selectedSecurityGroup choice.name}}>{{choice.name}} ({{choice.id}})</option>
              {{/each}}
            </select>
          {{/if}}
        {{else}}
          <div>
            {{#if (is-array config.securityGroup)}}
              <div class="comma-seperated-list"><commit_msg>fix link for port requirements<commit_after>{{#accordion-list showExpandAll=false as | al expandFn |}}
  <div class="over-hr"><span>{{driverOptionsTitle}}</span></div>

  {{#accordion-list-item
    title=(t 'nodeDriver.amazonec2.access.title')
    detail=(t 'nodeDriver.amazonec2.access.detail')
    expandAll=expandAll
    expand=(action expandFn)
    expandOnInit=true
  }}
    <div class="row">
      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.region.label'}}</label>
        {{#if (eq step 1)}}
          <select class="form-control" onchange={{action (mut config.region) value="target.value"}}>
            {{#each regionChoices as |choice|}}
              <option value={{choice}} selected={{eq config.region choice}}>{{choice}}</option>
            {{/each}}
          </select>
        {{else}}
          <div>{{config.region}}</div>
        {{/if}}
      </div>

      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.accessKey.label'}}</label>
        {{#if (eq step 1)}}
          {{input type="text" name="username" classNames="form-control" placeholder=(t 'nodeDriver.amazonec2.accessKey.placeholder') value=config.accessKey}}
        {{else}}
          <div>{{config.accessKey}}</div>
        {{/if}}
      </div>

      <div class="col span-4">
        <label class="acc-label">{{t 'nodeDriver.amazonec2.secretKey.label'}}</label>
        {{#if (eq step 1)}}
          {{input type="password" name="password" classNames="form-control" placeholder=(t 'nodeDriver.amazonec2.secretKey.placeholder') value=config.secretKey}}
        {{else}}
          <div class="text-muted text-italic">{{t 'nodeDriver.amazonec2.secretKey.provided'}}</div>
        {{/if}}
      </div>
    </div>

    {{#if (eq step 1)}}
      <div class="row">
        <div class="span-8 offset-4">
          <p class="text-info text-small m-0">{{t 'nodeDriver.amazonec2.access.help'}}</p>
        </div>
      </div>
    {{/if}}
  {{/accordion-list-item}}

  {{#if (eq step 1)}}
    {{top-errors errors=errors}}
    {{save-cancel
      save="awsLogin"
      cancel="cancel"
      createLabel="nodeDriver.amazonec2.access.next"
      savingLabel="nodeDriver.amazonec2.access.loading"
    }}
  {{/if}}

  <div class="{{unless (gte step 2) 'hide'}}">
    {{#accordion-list-item
      title=(t 'nodeDriver.amazonec2.zone.title')
      detail=(t 'nodeDriver.amazonec2.zone.detail')
      expandAll=expandAll
      expand=(action expandFn)
      expandOnInit=true
    }}
      {{#if (eq step 2)}}
        <div class="row">
          <label class="acc-label">{{t 'nodeDriver.amazonec2.availabilityZone'}}</label>
          <select class="form-control" onchange={{action (mut selectedZone) value="target.value"}}>
            {{#each zoneChoices as |choice|}}
              <option value={{choice}} selected={{eq selectedZone choice}}>{{choice}}</option>
            {{/each}}
          </select>
        </div>

        <div class="row">
          <label class="acc-label pt-20">{{t 'nodeDriver.amazonec2.subnet'}}</label>
          {{#if subnetChoices.length}}
            {{#each subnetChoices as |choice|}}
              {{#if choice.isVpc}}
                <hr class="mt-20 mb-20" />
                <div class="radio">
                  <label class="acc-label pb-0">{{radio-button selection=selectedSubnet value=choice.value}} {{choice.label}}
                    {{#each choice.tags as |tag|}}
                      <span class="tag-xs bg-info mr-5">
                        <i class="icon icon-tag"></i>
                        {{tag}}
                      </span>
                    {{/each}}
                  </label>
                </div>
              {{else}}
                <div class="radio">
                <label class="ml-20">
                  {{radio-button selection=selectedSubnet value=choice.value}} <i class="icon icon-level-down text-muted" style="transform: scaleX(-1) rotate(90deg);"></i> {{choice.label}}
                  {{#each choice.tags as |tag|}}
                    <span class="tag-xs bg-info mr-5">
                      <i class="icon icon-tag"></i>
                      {{tag}}
                    </span>
                  {{/each}}
                </label>
                </div>
              {{/if}}
            {{/each}}
          {{else}}
            There are no subnets to choose from.
          {{/if}}
        </div>
      {{else}}
        <div class="row">
          <div class="span-6">
            <label class="acc-label">{{t 'nodeDriver.amazonec2.availabilityZone'}}</label>
            {{config.region}}{{config.zone}}
          </div>
          <div class="span-6">
            <label class="acc-label pt-20">{{t 'nodeDriver.amazonec2.subnet'}}</label>
            {{#if config.subnetId}}
              {{config.subnetId}}
            {{else}}
              {{config.vpcId}}
            {{/if}}
          </div>
        </div>
      {{/if}}
    {{/accordion-list-item}}

    {{#if (eq step 2)}}
      {{top-errors errors=errors}}
      {{save-cancel
        save="selectSubnet"
        cancel="cancel"
        createLabel="nodeDriver.amazonec2.zone.next"
        savingLabel="nodeDriver.amazonec2.zone.loading"
      }}
    {{/if}}
  </div>

  <div class="{{unless (gte step 3) 'hide'}}">
    {{#accordion-list-item
      title=(t 'nodeDriver.amazonec2.securityGroup.title')
      detail=(t 'nodeDriver.amazonec2.securityGroup.detail')
      expandAll=expandAll
      expand=(action expandFn)
      expandOnInit=true
    }}
      <div class="row">
        {{#if (eq step 3)}}
          <div class="radio pt-10">
            <label>
              {{radio-button selection=whichSecurityGroup value="default"}}
                {{t 'nodeDriver.amazonec2.securityGroup.defaultCreate' groupName=defaultSecurityGroupName htmlSafe=true}}
            </label>
          </div>

          {{#if (and settings.isRancher (not isCustomSecurityGroup))}}
            <p class="text-info ml-20"><a href="{{settings.docsBase}}/installation/references/" target="_blank">{{t 'nodeDriver.amazonec2.portHelp.link'}}</a> {{t 'nodeDriver.amazonec2.portHelp.text'}}</p>
          {{/if}}

          <div class="radio pt-10">
            <label>
              {{radio-button selection=whichSecurityGroup value="custom"}}
              {{t 'nodeDriver.amazonec2.securityGroup.choose'}}
            </label>
          </div>

          {{#if isCustomSecurityGroup}}
            <select class="form-control existing-security-groups" multiple="true" onchange={{action 'multiSecurityGroupSelect' ''}}>
              {{#each allSecurityGroups as |choice|}}
                <option value={{choice.name}} selected={{array-includes selectedSecurityGroup choice.name}}>{{choice.name}} ({{choice.id}})</option>
              {{/each}}
            </select>
          {{/if}}
        {{else}}
          <div>
            {{#if (is-array config.securityGroup)}}
              <div class="comma-seperated-list">
{'fraction_non_alphanumeric': 0.17549881999570907, 'fraction_numerical': 0.009297003504255167, 'mean_word_length': 2.058617672790901, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 197, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4556305', 'n_tokens_mistral': 4327, 'n_tokens_neox': 4149, 'n_words': 759}