This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push: new b3e16ae dashboard: fix lint and translations b3e16ae is described below commit b3e16ae6584ad8539c704aba6e31b4b6fadf65a6 Author: Rohit Yadav <rohit.ya...@shapeblue.com> AuthorDate: Sat Jun 6 00:46:36 2020 +0530 dashboard: fix lint and translations Fixes translations on metrics and local storage values Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com> --- src/locales/en.json | 2 +- src/views/dashboard/CapacityDashboard.vue | 19 ++++++++-- src/views/infra/zone/ZoneWizardZoneDetailsStep.vue | 42 +++++++++++----------- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 7b039ec..48dc6d4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1166,7 +1166,7 @@ "label.maxvpc": "Max. VPCs", "label.may.continue": "You may now continue.", "label.memallocated": "Mem Allocation", -"label.memory": "Memory (in MB)", +"label.memory": "Memory", "label.memory.maximum.mb": "Max Memory (in MB)", "label.memory.total": "Memory Total", "label.memory.used": "Memory Used", diff --git a/src/views/dashboard/CapacityDashboard.vue b/src/views/dashboard/CapacityDashboard.vue index 8e1c97f..3057569 100644 --- a/src/views/dashboard/CapacityDashboard.vue +++ b/src/views/dashboard/CapacityDashboard.vue @@ -54,7 +54,7 @@ :key="stat.type"> <chart-card :loading="loading"> <div class="capacity-dashboard-chart-card-inner"> - <h4>{{ $t(stat.name) }}</h4> + <h4>{{ $t(ts[stat.name]) }}</h4> <a-progress type="dashboard" :status="getStatus(parseFloat(stat.percentused))" @@ -138,7 +138,20 @@ export default { events: [], zones: [], zoneSelected: {}, - stats: [] + stats: [], + ts: { + CPU: 'label.cpu', + CPU_CORE: 'label.cpunumber', + GPU: 'label.gpu', + LOCAL_STORAGE: 'label.local.storage', + MEMORY: 'label.memory', + PRIVATE_IP: 'label.management.ips', + SECONDARY_STORAGE: 'label.secondary.storage', + STORAGE: 'label.storage', + STORAGE_ALLOCATED: 'label.primary.storage', + VIRTUAL_NETWORK_PUBLIC_IP: 'label.public.ips', + VLAN: 'label.vlan' + } } }, mounted () { @@ -181,7 +194,7 @@ export default { case 'STORAGE': case 'STORAGE_ALLOCATED': case 'SECONDARY_STORAGE': - case 'CAPACITY_TYPE_LOCAL_STORAGE': + case 'LOCAL_STORAGE': value = parseFloat(value / (1024 * 1024 * 1024.0), 10).toFixed(2) if (value >= 1024.0) { value = parseFloat(value / 1024.0).toFixed(2) + ' TB' diff --git a/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue b/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue index 5baf1c0..5775cdf 100644 --- a/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue +++ b/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue @@ -136,27 +136,27 @@ }]" /> </a-form-item> - <a-form-item - :label="$t('label.ip6gateway')" - v-bind="formItemLayout" - v-if="isAdvancedZone && securityGroupsEnabled" - has-feedback> - <a-input - v-decorator="['ip6gateway', { - rules: [ - { - message: 'Please enter IpV6 Gateway', - initialValue: ip6gateway - }, - { - validator: checkIpFormat, - ipV6: true, - message: 'Please enter a valid IPv6 Gatweay.' - } - ] - }]" - /> - </a-form-item> + <a-form-item + :label="$t('label.ip6gateway')" + v-bind="formItemLayout" + v-if="isAdvancedZone && securityGroupsEnabled" + has-feedback> + <a-input + v-decorator="['ip6gateway', { + rules: [ + { + message: 'Please enter IpV6 Gateway', + initialValue: ip6gateway + }, + { + validator: checkIpFormat, + ipV6: true, + message: 'Please enter a valid IPv6 Gatweay.' + } + ] + }]" + /> + </a-form-item> <a-form-item :label="$t('label.internal.dns.1')" v-bind="formItemLayout"