{{#accordion-list showExpandAll=false as | al expandFn |}}
{{driverOptionsTitle}}
{{#accordion-list-item title=(t "nodeDriver.aliyunecs.accountSection.label") detail=(t "nodeDriver.aliyunecs.accountSection.detail") expandAll=expandAll expand=(action expandFn) expandOnInit=true }}
{{#input-or-display editable=(eq step 1) value=config.accessKeyId }} {{input type="text" class="form-control" value=config.accessKeyId placeholder=(t "nodeDriver.aliyunecs.accessKey.placeholder") }} {{/input-or-display}}
{{#if (eq step 1)}} {{input type="password" class="form-control" value=config.accessKeySecret placeholder=(t "nodeDriver.aliyunecs.accessKeySecret.placeholder") }} {{else}}
{{t "nodeDriver.aliyunecs.accessKeySecret.provided"}}
{{/if}}
{{#input-or-display editable=(eq step 1) value=config.apiEndpoint }} {{#if showCustomApiEndpoint}} {{/if}} {{/input-or-display}}
{{/accordion-list-item}} {{#if (eq step 1)}} {{top-errors errors=errors}} {{save-cancel save=(action "alyLogin") cancel=(action "cancel") createLabel="nodeDriver.aliyunecs.accountSection.next" savingLabel="nodeDriver.aliyunecs.accountSection.loading" }} {{/if}}
{{#accordion-list-item title=(t "nodeDriver.aliyunecs.networkSection.label") detail=(t "nodeDriver.aliyunecs.networkSection.detail") expandAll=expandAll expand=(action expandFn) expandOnInit=true }}
{{#input-or-display editable=(eq step 2) value=config.region}} {{new-select classNames="form-control" content=regions value=config.region }} {{/input-or-display}}
{{#input-or-display editable=(eq step 2) value=config.zone}} {{new-select classNames="form-control" content=zones value=config.zone optionLabelPath="raw.LocalName" prompt="nodeDriver.aliyunecs.zone.prompt" localizedPrompt=true }} {{/input-or-display}}
{{#input-or-display editable=(eq step 2) value=config.vpcId}} {{new-select classNames="form-control" content=vpcs value=config.vpcId prompt="nodeDriver.aliyunecs.vpcId.prompt" localizedPrompt=true }} {{/input-or-display}}
{{#input-or-display editable=(eq step 2) value=config.securityGroup}} {{new-select classNames="form-control" content=securityGroups value=config.securityGroup prompt="nodeDriver.aliyunecs.securityGroup.prompt" localizedPrompt=true }} {{#if (or (not config.securityGroup) (eq config.securityGroup "docker-machine"))}}

{{t "nodeDriver.aliyunecs.securityGroup.defaultCreate" groupName="docker-machine" htmlSafe=true }}

{{/if}} {{/input-or-display}}
{{#input-or-display editable=(eq step 2) value=config.vswitchId}} {{new-select classNames="form-control" content=filteredVSwitches value=config.vswitchId prompt="nodeDriver.aliyunecs.vswitchId.prompt" localizedPrompt=true }} {{/input-or-display}}
{{#input-or-display editable=(eq step 2) value=config.privateAddressOnly}}
{{input type="checkbox" class="form-control" checked=config.privateAddressOnly }}
{{/input-or-display}}
{{/accordion-list-item}} {{#if (eq step 2)}} {{top-errors errors=errors}} {{save-cancel save=(action "loadStorageTypes") cancel=(action "cancel") createLabel="nodeDriver.aliyunecs.networkSection.next" savingLabel="nodeDriver.aliyunecs.networkSection.loading" }} {{/if}}
{{#accordion-list-item title=(t "nodeDriver.aliyunecs.storageSection.label") detail=(t "nodeDriver.aliyunecs.storageSection.detail") expandAll=expandAll expand=(action expandFn) expandOnInit=true }}
{{#input-or-display editable=(eq step 3) value=config.ioOptimized}}
{{/input-or-display}}
{{#input-or-display editable=(eq step 3) value=config.systemDiskCategory}} {{new-select classNames="form-control" content=diskCategoryChoices optionLabelPath="value" value=config.systemDiskCategory }} {{/input-or-display}}
{{#input-or-display editable=(eq step 3) value=config.diskCategory}} {{new-select classNames="form-control" content=diskCategoryChoices optionLabelPath="value" value=config.diskCategory }} {{/input-or-display}}
{{#input-or-display editable=(eq step 3) value=config.diskSize}}
{{input type="text" class="form-control" value=config.diskSize placeholder=(t "nodeDriver.aliyunecs.dataDiskSize.placeholder") }}
GB
{{/input-or-display}}
{{/accordion-list-item}} {{#if (eq step 3)}} {{top-errors errors=errors}} {{save-cancel save=(action "loadInstanceTypes") cancel=(action "cancel") createLabel="nodeDriver.aliyunecs.storageSection.next" savingLabel="nodeDriver.aliyunecs.storageSection.loading" }} {{/if}}
{{#accordion-list-item title=(t "nodeDriver.aliyunecs.instanceOptionsSection.label") detail=(t "nodeDriver.aliyunecs.instanceOptionsSection.detail") expandAll=expandAll expand=(action expandFn) expandOnInit=true }}
{{input type="text" class="form-control" value=config.description placeholder=(t "nodeDriver.aliyunecs.instanceDescription.placeholder") }}
{{new-select classNames="form-control" content=instanceTypes value=config.instanceType }}
{{new-select classNames="form-control" content=images optionValuePath="value" value=config.imageId }}
{{#unless config.privateAddressOnly}}
{{input-integer min=1 max=100 class="form-control" value=config.internetMaxBandwidth placeholder=(t "nodeDriver.aliyunecs.internetMaxBandwidth.placeholder") }}
Mbps
{{/unless}}
{{form-value-array initialValues=config.tag addActionLabel="nodeDriver.aliyunecs.tags.addActionLabel" valueLabel="nodeDriver.aliyunecs.tags.valueLabel" valuePlaceholder="nodeDriver.aliyunecs.tags.placeholder" changed=(action (mut config.tag)) }}
{{/accordion-list-item}}
{{templateOptionsTitle}}
{{form-name-description model=model nameRequired=true rowClass="row mb-10" }} {{form-user-labels initialLabels=labelResource.labels setLabels=(action "setLabels") expand=(action expandFn) }} {{form-node-taints model=model expand=(action expandFn) }} {{form-engine-opts machine=model showEngineUrl=showEngineUrl }} {{top-errors errors=errors}} {{save-cancel save=(action "save") cancel=(action "cancel") editing=editing }}
{{/accordion-list}}