Skip to content

Commit

Permalink
Merge pull request #219 from Support-pl/dev
Browse files Browse the repository at this point in the history
fixed minor bugs
  • Loading branch information
639852 committed Jun 30, 2023
2 parents 384f7ed + cc7ee0a commit a566432
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/appMain/modules/ione/createInstance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
</div>
<a-row>
<a-col :xs="24" :sm="10">
<a-form-item style="margin-top: 15px" :label="$t('VM name')">
<a-form-item style="margin-top: 15px" :label="$t('name') | capitalize">
<a-input
:style="{ boxShadow: (vmName.length < 2) ? '0 0 2px 2px var(--err)' : null }"
:value="vmName"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export default {
plans: [],
allAddons: {},
addonsCodes: {},
price: {}
price: {},
cpus: {}
}),
methods: {
setData(resource, changeTarifs = true) {
Expand Down Expand Up @@ -229,7 +230,9 @@ export default {
if (id.includes('raid') && !isDiskExist) addons.push(id);
});
this.options.cpu.size = 'loading';
this.options.cpu.size = this.cpus[value] ?? 'loading';
if (this.cpus[value]) return;
this.$api.post(`/sp/${this.itemSP.uuid}/invoke`, {
method: 'checkout_baremetal',
params: { ...this.options.config, addons }
Expand All @@ -240,6 +243,7 @@ export default {
description.toLowerCase().includes('intel')
);
this.cpus[value] = cpu?.description ?? this.$t('No Data');
this.options.cpu.size = cpu?.description ?? this.$t('No Data');
})
.catch(() => {
Expand Down
21 changes: 14 additions & 7 deletions src/components/appMain/newPaaS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
<div class="newCloud_wrapper">
<div class="newCloud">
<div class="newCloud__inputs field">
<a-spin
style="display: block; margin: 15px auto"
v-if="isPlansLoading"
:tip="$t('loading')"
:spinning="isPlansLoading"
/>

<component
v-else
:is="template"
:activeKey="activeKey"
:itemSP="itemSP"
Expand Down Expand Up @@ -49,13 +57,7 @@
</a-select>

<div style="overflow: hidden; margin-top: 15px">
<a-spin
style="display: block; margin: 0 auto"
:tip="$t('loading')"
:spinning="isPlansLoading"
>
<nc-map v-if="locations.length" v-model="locationId" :markers="locations" />
</a-spin>
</div>
</a-row>
</template>
Expand Down Expand Up @@ -765,6 +767,7 @@ export default {
const isTypesEqual = type === location.type;
const isPlanInclude = billing_plans?.includes(uuid);
if (billing_plans.length < 1) return true;
if (location.type === '') return true;
return isTypesEqual && isPlanInclude;
});
Expand Down Expand Up @@ -1036,7 +1039,7 @@ export default {
this.tarification = this.dataLocalStorage.tarification ?? '';
this.vmName = this.dataLocalStorage.titleVM ?? '';
this.locationId = this.dataLocalStorage.locationId ?? '';
this.activeKey = this.dataLocalStorage.activeKey ?? 'location';
this.activeKey = null;
if (this.dataLocalStorage.config) {
this.options.os.id = this.dataLocalStorage.config.template_id;
Expand Down Expand Up @@ -1648,6 +1651,10 @@ export default {
} else if (this.dataLocalStorage.locationId) {
this.tarification = this.periods[0]?.value ?? '';
}
if (this.dataLocalStorage) {
this.activeKey = this.dataLocalStorage.activeKey ?? 'location';
}
});
const type = this.options.drive ? "SSD" : "HDD";
Expand Down
2 changes: 1 addition & 1 deletion src/components/appMain/ovhCreationTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<div class="newCloud__option-field" v-if="images.length > 0">
<a-row>
<a-col :xs="24" :sm="10">
<a-form-item :label="$t('VM name')">
<a-form-item :label="$t('name') | capitalize">
<a-input
:value="vmName"
:style="{ boxShadow: `0 0 2px 2px var(${(vmName.length > 1) ? '--main' : '--err'})` }"
Expand Down
1 change: 1 addition & 0 deletions src/components/services/iaas/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ export default {
} else if (product.paytype === 'onetime') {
product.price = { value: product.price.monthly, currency: '' }
} else {
console.log(product.price);
product.price = product.price.find(({ currency }) => currency === this.currency.id)
}
product.price.currency = this.currency.code
Expand Down

0 comments on commit a566432

Please sign in to comment.