abh1sar commented on code in PR #11560: URL: https://github.com/apache/cloudstack/pull/11560#discussion_r2330498248
########## ui/src/components/view/DeployVMFromBackup.vue: ########## @@ -45,14 +45,76 @@ </div> </template> </a-step> + <a-step + v-if="isDRaaSEnabled" + :title="$t('label.select.a.zone')" + status="process"> + <template #description> + <div style="margin-top: 15px"> + <a-form-item :label="$t('label.zoneid')" name="zoneid" ref="zoneid"> + <div v-if="zones.length <= 8"> + <a-row type="flex" :gutter="[16, 18]" justify="start"> + <div v-for="(zoneItem, idx) in zones" :key="idx"> + <a-radio-group + :key="idx" + v-model:value="form.zoneid" + @change="onSelectZoneId(zoneItem.id)"> + <a-col :span="6"> + <a-radio-button + :value="zoneItem.id" + style="border-width: 2px" + class="zone-radio-button"> + <span> + <resource-icon + v-if="zoneItem && zoneItem.icon && zoneItem.icon.base64image" + :image="zoneItem.icon.base64image" + size="2x" /> + <global-outlined size="2x" v-else /> + {{ zoneItem.name }} + </span> + </a-radio-button> + </a-col> + </a-radio-group> + </div> + </a-row> + </div> + <a-select + v-else + v-model:value="form.zoneid" + showSearch + optionFilterProp="label" + :filterOption="(input, option) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }" + @change="onSelectZoneId" + :loading="loading.zones" + v-focus="true" + > + <a-select-option v-for="zone1 in zones" :key="zone1.id" :label="zone1.name"> + <span> + <resource-icon v-if="zone1.icon && zone1.icon.base64image" :image="zone1.icon.base64image" size="2x" style="margin-right: 5px"/> + <global-outlined v-else style="margin-right: 5px" /> + {{ zone1.name }} + </span> + </a-select-option> + </a-select> + </a-form-item> + <a-alert + v-if="isDifferentZoneFromBackup"> + <template #message> + <div v-html="$t('message.create.instance.from.backup.different.zone')"></div> + </template> + </a-alert> + </div> + </template> + </a-step> <a-step v-if="!isNormalAndDomainUser" :title="$t('label.select.deployment.infrastructure')" status="process"> <template #description> <div style="margin-top: 15px"> <a-form-item - v-if="!isNormalAndDomainUser" Review Comment: The check is present in the parent a-step, so not really needed here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org