src: fix doclinks and translation across UI (#481)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Hoang Nguyen 2020-07-27 14:33:31 +07:00 committed by Rohit Yadav
parent 1ee5654209
commit 4f97fea9ea
139 changed files with 1524 additions and 1027 deletions

View File

@ -110,7 +110,7 @@ export default {
}) })
} }
}).catch(function (e) { }).catch(function (e) {
console.log('Error encountered while fetching async job result' + e) console.log(this.$t('error.fetching.async.job.result') + e)
}) })
} }
} }

View File

@ -20,7 +20,7 @@
<div> <div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<strong>{{ $t('label.dedicated') }}</strong> <strong>{{ $t('label.dedicated') }}</strong>
<div>Yes</div> <div>{{ $t('label.yes') }}</div>
</div> </div>
<p> <p>
<strong>{{ $t('label.domainid') }}</strong><br/> <strong>{{ $t('label.domainid') }}</strong><br/>
@ -38,7 +38,7 @@
<a-list-item v-else> <a-list-item v-else>
<div> <div>
<strong>{{ $t('label.dedicated') }}</strong> <strong>{{ $t('label.dedicated') }}</strong>
<div>No</div> <div>{{ $t('label.no') }}</div>
<a-button type="primary" style="margin-top: 10px; margin-bottom: 10px;" @click="modalActive = true" :disabled="!dedicateButtonAvailable"> <a-button type="primary" style="margin-top: 10px; margin-bottom: 10px;" @click="modalActive = true" :disabled="!dedicateButtonAvailable">
{{ dedicatedButtonLabel }} {{ dedicatedButtonLabel }}
</a-button> </a-button>
@ -71,9 +71,9 @@ export default {
return { return {
modalActive: false, modalActive: false,
dedicateButtonAvailable: true, dedicateButtonAvailable: true,
dedicatedButtonLabel: 'Dedicate', dedicatedButtonLabel: this.$t('label.dedicate'),
releaseButtonLabel: 'Release', releaseButtonLabel: this.$t('label.release'),
dedicatedModalLabel: 'Dedicate', dedicatedModalLabel: this.$t('label.dedicate'),
dedicatedDomainId: null, dedicatedDomainId: null,
dedicatedAccountId: null dedicatedAccountId: null
} }
@ -185,12 +185,12 @@ export default {
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to release dedicated zone', errorMessage: this.$t('error.release.dedicate.zone'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: this.$t('message.releasing.dedicated.zone'), loadingMessage: this.$t('message.releasing.dedicated.zone'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
} }
@ -215,12 +215,12 @@ export default {
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to release dedicated pod', errorMessage: this.$t('error.release.dedicate.pod'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: this.$t('message.releasing.dedicated.pod'), loadingMessage: this.$t('message.releasing.dedicated.pod'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
} }
@ -245,12 +245,12 @@ export default {
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to release dedicated cluster', errorMessage: this.$t('error.release.dedicate.cluster'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: this.$t('message.releasing.dedicated.cluster'), loadingMessage: this.$t('message.releasing.dedicated.cluster'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
} }
@ -275,12 +275,12 @@ export default {
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to release dedicated host', errorMessage: this.$t('error.release.dedicate.host'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: this.$t('message.releasing.dedicated.host'), loadingMessage: this.$t('message.releasing.dedicated.host'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
} }

View File

@ -29,7 +29,7 @@
</a-spin> </a-spin>
</div> </div>
<div class="form__item" v-if="accountsList"> <div class="form__item" v-if="accountsList">
<p class="form__label">Account</p> <p class="form__label">{{ $t('label.account') }}</p>
<a-select style="width: 100%" @change="handleChangeAccount"> <a-select style="width: 100%" @change="handleChangeAccount">
<a-select-option v-for="(account, index) in accountsList" :value="account.name" :key="index"> <a-select-option v-for="(account, index) in accountsList" :value="account.name" :key="index">
{{ account.name }} {{ account.name }}

View File

@ -99,18 +99,18 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('label.zone.dedicated'), title: this.$t('label.zone.dedicated'),
jobid: response.dedicatezoneresponse.jobid, jobid: response.dedicatezoneresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domain.id')} : ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate zone', errorMessage: this.$t('error.dedicate.zone.failed'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
this.dedicatedDomainModal = false this.dedicatedDomainModal = false
}, },
loadingMessage: this.$t('message.dedicating.zone'), loadingMessage: this.$t('message.dedicating.zone'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
@ -143,18 +143,18 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('label.pod.dedicated'), title: this.$t('label.pod.dedicated'),
jobid: response.dedicatepodresponse.jobid, jobid: response.dedicatepodresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate pod', errorMessage: this.$t('error.dedicate.pod.failed'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
this.dedicatedDomainModal = false this.dedicatedDomainModal = false
}, },
loadingMessage: this.$t('message.dedicating.pod'), loadingMessage: this.$t('message.dedicating.pod'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
@ -187,18 +187,18 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('message.cluster.dedicated'), title: this.$t('message.cluster.dedicated'),
jobid: response.dedicateclusterresponse.jobid, jobid: response.dedicateclusterresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate cluster', errorMessage: this.$t('error.dedicate.cluster.failed'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
this.dedicatedDomainModal = false this.dedicatedDomainModal = false
}, },
loadingMessage: this.$t('message.dedicating.cluster'), loadingMessage: this.$t('message.dedicating.cluster'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
@ -231,18 +231,18 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('message.host.dedicated'), title: this.$t('message.host.dedicated'),
jobid: response.dedicatehostresponse.jobid, jobid: response.dedicatehostresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')}: ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate host', errorMessage: this.$t('error.dedicate.host.failed'),
errorMethod: () => { errorMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()
this.dedicatedDomainModal = false this.dedicatedDomainModal = false
}, },
loadingMessage: this.$t('message.dedicating.host'), loadingMessage: this.$t('message.dedicating.host'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.parentFetchData() this.parentFetchData()
this.fetchParentData() this.fetchParentData()

View File

@ -85,10 +85,10 @@
</div> </div>
<div slot="actions" v-if="!disableSettings && 'updateTemplate' in $store.getters.apis && 'updateVirtualMachine' in $store.getters.apis && isAdminOrOwner()"> <div slot="actions" v-if="!disableSettings && 'updateTemplate' in $store.getters.apis && 'updateVirtualMachine' in $store.getters.apis && isAdminOrOwner()">
<a-popconfirm <a-popconfirm
title="Delete setting?" :title="`${$t('label.delete.setting')}?`"
@confirm="deleteDetail(index)" @confirm="deleteDetail(index)"
okText="Yes" :okText="$t('label.yes')"
cancelText="No" :cancelText="$t('label.no')"
placement="left" placement="left"
> >
<a-button shape="circle" type="danger" icon="delete" /> <a-button shape="circle" type="danger" icon="delete" />
@ -185,8 +185,8 @@ export default {
} }
if (!(apiName in this.$store.getters.apis)) { if (!(apiName in this.$store.getters.apis)) {
this.$notification.error({ this.$notification.error({
message: 'Failed to execute API: ' + apiName, message: this.$t('error.execute.api.failed') + ' ' + apiName,
description: 'User is not permitted to use the API' description: this.$t('message.user.not.permitted.api')
}) })
return return
} }
@ -221,7 +221,7 @@ export default {
}, },
addDetail () { addDetail () {
if (this.newKey === '' || this.newValue === '') { if (this.newKey === '' || this.newValue === '') {
this.error = 'Must provide a valid key and value for setting' this.error = this.$t('message.error.provide.setting')
return return
} }
this.error = false this.error = false

View File

@ -33,6 +33,10 @@
<router-link :to="{ path: '/volume/' + volume.uuid }">{{ volume.type }} - {{ volume.path }}</router-link> ({{ parseFloat(volume.size / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB) <router-link :to="{ path: '/volume/' + volume.uuid }">{{ volume.type }} - {{ volume.path }}</router-link> ({{ parseFloat(volume.size / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB)
</div> </div>
</div> </div>
<div v-else-if="['name', 'type'].includes(item)">
<span v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(resource[item])">{{ $t(resource[item].toLowerCase()) }}</span>
<span v-else>{{ resource[item] }}</span>
</div>
<div v-else> <div v-else>
{{ resource[item] }} {{ resource[item] }}
</div> </div>

View File

@ -29,10 +29,13 @@
</slot> </slot>
</div> </div>
<slot name="name"> <slot name="name">
<h4 class="name"> <div v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(resource.name)">{{ $t(resource.name.toLowerCase()) }}</div>
{{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }} <div v-else>
</h4> <h4 class="name">
<console style="margin-left: 10px" :resource="resource" size="default" v-if="resource.id" /> {{ resource.displayname || resource.displaytext || resource.name || resource.hostname || resource.username || resource.ipaddress || resource.virtualmachinename || resource.templatetype }}
</h4>
<console style="margin-left: 10px" :resource="resource" size="default" v-if="resource.id" />
</div>
</slot> </slot>
</div> </div>
<slot name="actions"> <slot name="actions">
@ -41,7 +44,10 @@
{{ resource.instancename }} {{ resource.instancename }}
</a-tag> </a-tag>
<a-tag v-if="resource.type"> <a-tag v-if="resource.type">
{{ resource.type }} <span v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(resource.type)">{{ $t(resource.type.toLowerCase()) }}</span>
<span v-else>
{{ resource.type }}
</span>
</a-tag> </a-tag>
<a-tag v-if="resource.issourcenat"> <a-tag v-if="resource.issourcenat">
{{ $t('label.issourcenat') }} {{ $t('label.issourcenat') }}
@ -94,7 +100,7 @@
<div class="resource-detail-item__details"> <div class="resource-detail-item__details">
<a-tooltip placement="right" > <a-tooltip placement="right" >
<template slot="title"> <template slot="title">
<span>Copy ID</span> <span>{{ $t('label.copyid') }}</span>
</template> </template>
<a-button <a-button
style="margin-left: -5px" style="margin-left: -5px"
@ -102,7 +108,7 @@
icon="barcode" icon="barcode"
type="dashed" type="dashed"
size="small" size="small"
@click="$message.success('Copied to clipboard')" @click="$message.success($t('label.copied.clipboard'))"
v-clipboard:copy="resource.id" /> v-clipboard:copy="resource.id" />
</a-tooltip> </a-tooltip>
<span style="margin-left: 10px;">{{ resource.id }}</span> <span style="margin-left: 10px;">{{ resource.id }}</span>
@ -146,7 +152,7 @@
<div class="resource-detail-item" v-if="resource.memory"> <div class="resource-detail-item" v-if="resource.memory">
<div class="resource-detail-item__label">{{ $t('label.memory') }}</div> <div class="resource-detail-item__label">{{ $t('label.memory') }}</div>
<div class="resource-detail-item__details"> <div class="resource-detail-item__details">
<a-icon type="bulb" />{{ resource.memory }} MB Memory <a-icon type="bulb" />{{ resource.memory + ' ' + $t('label.mb.memory') }}
</div> </div>
<div> <div>
<span v-if="resource.memorykbs && resource.memoryintfreekbs"> <span v-if="resource.memorykbs && resource.memoryintfreekbs">
@ -163,7 +169,7 @@
<div class="resource-detail-item" v-else-if="resource.memorytotalgb"> <div class="resource-detail-item" v-else-if="resource.memorytotalgb">
<div class="resource-detail-item__label">{{ $t('label.memory') }}</div> <div class="resource-detail-item__label">{{ $t('label.memory') }}</div>
<div class="resource-detail-item__details"> <div class="resource-detail-item__details">
<a-icon type="bulb" />{{ resource.memorytotalgb }} Memory <a-icon type="bulb" />{{ resource.memorytotalgb + ' ' + $t('label.memory') }}
</div> </div>
<div> <div>
<span v-if="resource.memoryusedgb"> <span v-if="resource.memoryusedgb">
@ -191,7 +197,7 @@
<div style="display: flex; flex-direction: column; width: 100%;"> <div style="display: flex; flex-direction: column; width: 100%;">
<div> <div>
<a-icon type="bulb" />{{ resource.memorytotal }} Memory <a-icon type="bulb" />{{ resource.memorytotal + ' ' + $t('label.memory') }}
</div> </div>
<div> <div>
<span <span
@ -224,10 +230,10 @@
<span style="width: 100%;" v-else-if="resource.sizegb || resource.size">{{ resource.sizegb || (resource.size/1024.0) }}</span> <span style="width: 100%;" v-else-if="resource.sizegb || resource.size">{{ resource.sizegb || (resource.size/1024.0) }}</span>
</div> </div>
<div style="margin-left: 25px; margin-top: 5px" v-if="resource.diskkbsread && resource.diskkbswrite && resource.diskioread && resource.diskiowrite"> <div style="margin-left: 25px; margin-top: 5px" v-if="resource.diskkbsread && resource.diskkbswrite && resource.diskioread && resource.diskiowrite">
<a-tag style="margin-bottom: 5px;">Read {{ toSize(resource.diskkbsread) }}</a-tag> <a-tag style="margin-bottom: 5px;">{{ $t('label.read') + ' ' + toSize(resource.diskkbsread) }}</a-tag>
<a-tag style="margin-bottom: 5px;">Write {{ toSize(resource.diskkbswrite) }}</a-tag><br/> <a-tag style="margin-bottom: 5px;">{{ $t('label.write') + ' ' + toSize(resource.diskkbswrite) }}</a-tag><br/>
<a-tag style="margin-bottom: 5px;">Read (IO) {{ resource.diskioread }}</a-tag> <a-tag style="margin-bottom: 5px;">{{ $t('label.read.io') + ' ' + resource.diskioread }}</a-tag>
<a-tag>Write (IO) {{ resource.diskiowrite }}</a-tag> <a-tag>{{ $t('label.writeio') + ' ' + resource.diskiowrite }}</a-tag>
</div> </div>
</div> </div>
<div class="resource-detail-item" v-else-if="resource.disksizetotalgb"> <div class="resource-detail-item" v-else-if="resource.disksizetotalgb">
@ -259,8 +265,8 @@
<a-icon type="wifi" /> <a-icon type="wifi" />
<div> <div>
<div v-if="'networkkbsread' in resource && 'networkkbswrite' in resource"> <div v-if="'networkkbsread' in resource && 'networkkbswrite' in resource">
<a-tag><a-icon type="arrow-down" /> RX {{ toSize(resource.networkkbsread) }}</a-tag> <a-tag><a-icon type="arrow-down" />RX {{ toSize(resource.networkkbsread) }}</a-tag>
<a-tag><a-icon type="arrow-up" /> TX {{ toSize(resource.networkkbswrite) }}</a-tag> <a-tag><a-icon type="arrow-up" />TX {{ toSize(resource.networkkbswrite) }}</a-tag>
</div> </div>
<div v-else>{{ resource.nic.length }} NIC(s)</div> <div v-else>{{ resource.nic.length }} NIC(s)</div>
<div <div
@ -499,7 +505,7 @@
v-if="$router.resolve('/' + item.name).route.name !== '404'" v-if="$router.resolve('/' + item.name).route.name !== '404'"
:to="{ path: '/' + item.name + '?' + item.param + '=' + (item.param === 'account' ? resource.name + '&domainid=' + resource.domainid : resource.id) }"> :to="{ path: '/' + item.name + '?' + item.param + '=' + (item.param === 'account' ? resource.name + '&domainid=' + resource.domainid : resource.id) }">
<a-button style="margin-right: 10px" :icon="$router.resolve('/' + item.name).route.meta.icon" > <a-button style="margin-right: 10px" :icon="$router.resolve('/' + item.name).route.meta.icon" >
View {{ $t(item.title) }} {{ $t('label.view') + ' ' + $t(item.title) }}
</a-button> </a-button>
</router-link> </router-link>
</div> </div>
@ -513,9 +519,9 @@
{{ $t('label.apikey') }} {{ $t('label.apikey') }}
<a-tooltip placement="right" > <a-tooltip placement="right" >
<template slot="title"> <template slot="title">
<span>Copy {{ $t('label.apikey') }}</span> <span>{{ $t('label.copy') + ' ' + $t('label.apikey') }}</span>
</template> </template>
<a-button shape="circle" type="dashed" size="small" @click="$message.success('Copied to clipboard')" v-clipboard:copy="resource.apikey"> <a-button shape="circle" type="dashed" size="small" @click="$message.success($t('label.copied.clipboard'))" v-clipboard:copy="resource.apikey">
<a-icon type="copy"/> <a-icon type="copy"/>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
@ -530,9 +536,9 @@
{{ $t('label.secretkey') }} {{ $t('label.secretkey') }}
<a-tooltip placement="right" > <a-tooltip placement="right" >
<template slot="title"> <template slot="title">
<span>Copy {{ $t('label.secretkey') }}</span> <span>{{ $t('label.copy') + ' ' + $t('label.secretkey') }}</span>
</template> </template>
<a-button shape="circle" type="dashed" size="small" @click="$message.success('Copied to clipboard')" v-clipboard:copy="resource.secretkey"> <a-button shape="circle" type="dashed" size="small" @click="$message.success($t('label.copied.clipboard'))" v-clipboard:copy="resource.secretkey">
<a-icon type="copy"/> <a-icon type="copy"/>
</a-button> </a-button>
</a-tooltip> </a-tooltip>

View File

@ -56,8 +56,8 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="total" :total="total"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40']" :pageSizeOptions="device === 'desktop' ? ['20', '50', '100', '500'] : ['10', '20', '50', '100', '500']"
@change="handleTableChange" @change="handleTableChange"
@showSizeChange="handlePageSizeChange" @showSizeChange="handlePageSizeChange"
showSizeChanger> showSizeChanger>
@ -72,6 +72,7 @@
<script> <script>
import { api } from '@/api' import { api } from '@/api'
import { mixinDevice } from '@/utils/mixin.js'
import Status from '@/components/widgets/Status' import Status from '@/components/widgets/Status'
export default { export default {
@ -79,6 +80,7 @@ export default {
components: { components: {
Status Status
}, },
mixins: [mixinDevice],
props: { props: {
resource: { resource: {
type: Object, type: Object,

View File

@ -69,6 +69,10 @@
<console :resource="record" size="small" style="margin-right: 5px" /> <console :resource="record" size="small" style="margin-right: 5px" />
<span v-if="$route.path.startsWith('/globalsetting')">{{ text }}</span> <span v-if="$route.path.startsWith('/globalsetting')">{{ text }}</span>
<span v-if="$route.path.startsWith('/alert')">
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ $t(text.toLowerCase()) }}</router-link>
</span>
<span v-else> <span v-else>
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link> <router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link> <router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
@ -78,6 +82,10 @@
<a slot="templatetype" slot-scope="text, record" href="javascript:;"> <a slot="templatetype" slot-scope="text, record" href="javascript:;">
<router-link :to="{ path: $route.path + '/' + record.templatetype }">{{ text }}</router-link> <router-link :to="{ path: $route.path + '/' + record.templatetype }">{{ text }}</router-link>
</a> </a>
<template slot="type" slot-scope="text">
<span v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(text)">{{ $t(text.toLowerCase()) }}</span>
<span v-else>{{ text }}</span>
</template>
<a slot="displayname" slot-scope="text, record" href="javascript:;"> <a slot="displayname" slot-scope="text, record" href="javascript:;">
<router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link> <router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link>
</a> </a>
@ -182,7 +190,7 @@
<div slot="order" slot-scope="text, record" class="shift-btns"> <div slot="order" slot-scope="text, record" class="shift-btns">
<a-tooltip placement="top"> <a-tooltip placement="top">
<template slot="title">Move to top</template> <template slot="title">{{ $t('label.move.to.top') }}</template>
<a-button <a-button
shape="round" shape="round"
@click="moveItemTop(record)" @click="moveItemTop(record)"
@ -191,7 +199,7 @@
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
<template slot="title">Move to bottom</template> <template slot="title">{{ $t('label.move.to.bottom') }}</template>
<a-button <a-button
shape="round" shape="round"
@click="moveItemBottom(record)" @click="moveItemBottom(record)"
@ -200,13 +208,13 @@
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
<template slot="title">Move up one row</template> <template slot="title">{{ $t('label.move.up.row') }}</template>
<a-button shape="round" @click="moveItemUp(record)" class="shift-btn"> <a-button shape="round" @click="moveItemUp(record)" class="shift-btn">
<a-icon type="caret-up" class="shift-btn" /> <a-icon type="caret-up" class="shift-btn" />
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
<template slot="title">Move down one row</template> <template slot="title">{{ $t('label.move.down.row') }}</template>
<a-button shape="round" @click="moveItemDown(record)" class="shift-btn"> <a-button shape="round" @click="moveItemDown(record)" class="shift-btn">
<a-icon type="caret-down" class="shift-btn" /> <a-icon type="caret-down" class="shift-btn" />
</a-button> </a-button>
@ -328,7 +336,7 @@ export default {
changeProject (project) { changeProject (project) {
this.$store.dispatch('SetProject', project) this.$store.dispatch('SetProject', project)
this.$store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark') this.$store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark')
this.$message.success(`Switched to "${project.name}"`) this.$message.success(this.$t('message.switch.to') + ' ' + project.name)
this.$router.push({ name: 'dashboard' }) this.$router.push({ name: 'dashboard' })
}, },
saveValue (record) { saveValue (record) {
@ -338,7 +346,7 @@ export default {
}).then(json => { }).then(json => {
this.editableValueKey = null this.editableValueKey = null
this.$message.success('Setting Updated: ' + record.name) this.$message.success(`${this.$t('message.setting.updated')} ${record.name}`)
if (json.updateconfigurationresponse && if (json.updateconfigurationresponse &&
json.updateconfigurationresponse.configuration && json.updateconfigurationresponse.configuration &&
!json.updateconfigurationresponse.configuration.isdynamic && !json.updateconfigurationresponse.configuration.isdynamic &&
@ -350,7 +358,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
console.error(error) console.error(error)
this.$message.error('There was an error saving this setting.') this.$message.error(this.$t('message.error.save.setting'))
}).finally(() => { }).finally(() => {
this.$emit('refresh') this.$emit('refresh')
}) })

View File

@ -25,10 +25,10 @@
<strong> <strong>
{{ $t('label.' + item + 'limit') }} {{ $t('label.' + item + 'limit') }}
</strong> </strong>
({{ resource[item + 'available'] === '-1' ? 'Unlimited' : resource[item + 'available'] }} {{ $t('label.available') }}) ({{ resource[item + 'available'] === '-1' ? $t('label.unlimited') : resource[item + 'available'] }} {{ $t('label.available') }})
<div class="list-item__vals"> <div class="list-item__vals">
<div class="list-item__data"> <div class="list-item__data">
{{ $t('label.used') }} / {{ $t('label.limit') }} : {{ resource[item + 'total'] }} / {{ resource[item + 'limit'] === '-1' ? 'Unlimited' : resource[item + 'limit'] }} {{ $t('label.used') }} / {{ $t('label.limit') }} : {{ resource[item + 'total'] }} / {{ resource[item + 'limit'] === '-1' ? $t('label.unlimited') : resource[item + 'limit'] }}
</div> </div>
<a-progress <a-progress
status="normal" status="normal"

View File

@ -105,7 +105,7 @@ export default {
this.formLoading = false this.formLoading = false
} catch (e) { } catch (e) {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: e description: e
}) })
this.formLoading = false this.formLoading = false
@ -134,7 +134,7 @@ export default {
this.formLoading = true this.formLoading = true
Promise.all(arrAsync).then(() => { Promise.all(arrAsync).then(() => {
this.$message.success('Apply Successful') this.$message.success(this.$t('message.apply.success'))
this.fetchData() this.fetchData()
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)

View File

@ -126,7 +126,7 @@ export default {
this.items = response.listconfigurationsresponse.configuration this.items = response.listconfigurationsresponse.configuration
}).catch(error => { }).catch(error => {
console.error(error) console.error(error)
this.$message.error('There was an error loading these settings.') this.$message.error(this.$t('message.error.loading.setting'))
}).finally(() => { }).finally(() => {
this.tabLoading = false this.tabLoading = false
if (!callback) return if (!callback) return
@ -140,13 +140,14 @@ export default {
name: item.name, name: item.name,
value: this.editableValue value: this.editableValue
}).then(() => { }).then(() => {
this.$message.success('Setting ' + item.name + ' updated to ' + this.editableValue) const message = `${this.$t('label.setting')} ${item.name} ${this.$t('label.update.to')} ${this.editableValue}`
this.$message.success(message)
}).catch(error => { }).catch(error => {
console.error(error) console.error(error)
this.$message.error('There was an error saving this setting.') this.$message.error(this.$t('message.error.save.setting'))
this.$notification.error({ this.$notification.error({
message: this.$t('label.error'), message: this.$t('label.error'),
description: 'There was an error saving this setting. Please try again later.' description: this.$t('message.error.try.save.setting')
}) })
}).finally(() => { }).finally(() => {
this.tabLoading = false this.tabLoading = false

View File

@ -26,7 +26,13 @@
{{ $t(item.meta.title) }} {{ $t(item.meta.title) }}
</router-link> </router-link>
<span v-else-if="$route.params.id"> <span v-else-if="$route.params.id">
{{ resource.name || resource.displayname || resource.displaytext || resource.hostname || resource.username || resource.ipaddress || $route.params.id }} <label v-if="'name' in resource">
<span v-if="['USER.LOGIN', 'USER.LOGOUT', 'ROUTER.HEALTH.CHECKS', 'FIREWALL.CLOSE', 'ALERT.SERVICE.DOMAINROUTER'].includes(resource.name)">{{ $t(resource.name.toLowerCase()) }}</span>
<span v-else>{{ resource.name }}</span>
</label>
<label v-else>
{{ resource.name || resource.displayname || resource.displaytext || resource.hostname || resource.username || resource.ipaddress || $route.params.id }}
</label>
</span> </span>
<span v-else> <span v-else>
{{ $t(item.meta.title) }} {{ $t(item.meta.title) }}

View File

@ -143,7 +143,6 @@ export default {
icon: 'sync', icon: 'sync',
label: 'label.reinstall.vm', label: 'label.reinstall.vm',
message: 'message.reinstall.vm', message: 'message.reinstall.vm',
docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots',
dataView: true, dataView: true,
args: ['virtualmachineid', 'templateid'], args: ['virtualmachineid', 'templateid'],
show: (record) => { return ['Running', 'Stopped'].includes(record.state) }, show: (record) => { return ['Running', 'Stopped'].includes(record.state) },

View File

@ -28,6 +28,7 @@ export default {
name: 'template', name: 'template',
title: 'label.templates', title: 'label.templates',
icon: 'save', icon: 'save',
docHelp: 'adminguide/templates.html',
permission: ['listTemplates'], permission: ['listTemplates'],
params: { templatefilter: 'self', showunique: 'true' }, params: { templatefilter: 'self', showunique: 'true' },
resourceType: 'Template', resourceType: 'Template',
@ -273,6 +274,7 @@ export default {
name: 'kubernetesiso', name: 'kubernetesiso',
title: 'label.kubernetes.isos', title: 'label.kubernetes.isos',
icon: kubernetes, icon: kubernetes,
docHelp: 'plugins/cloudstack-kubernetes-service.html#kubernetes-supported-versions',
permission: ['listKubernetesSupportedVersions'], permission: ['listKubernetesSupportedVersions'],
columns: ['name', 'state', 'semanticversion', 'isostate', 'mincpunumber', 'minmemory', 'zonename'], columns: ['name', 'state', 'semanticversion', 'isostate', 'mincpunumber', 'minmemory', 'zonename'],
details: ['name', 'semanticversion', 'zoneid', 'zonename', 'isoid', 'isoname', 'isostate', 'mincpunumber', 'minmemory', 'supportsha', 'state'], details: ['name', 'semanticversion', 'zoneid', 'zonename', 'isoid', 'isoname', 'isostate', 'mincpunumber', 'minmemory', 'supportsha', 'state'],

View File

@ -50,6 +50,7 @@ export default {
{ {
api: 'createStoragePool', api: 'createStoragePool',
icon: 'plus', icon: 'plus',
docHelp: 'installguide/configuration.html#add-primary-storage',
label: 'label.add.primary.storage', label: 'label.add.primary.storage',
listView: true, listView: true,
popup: true, popup: true,

View File

@ -34,6 +34,7 @@ export default {
{ {
api: 'addImageStore', api: 'addImageStore',
icon: 'plus', icon: 'plus',
docHelp: 'installguide/configuration.html#add-secondary-storage',
label: 'label.add.secondary.storage', label: 'label.add.secondary.storage',
listView: true, listView: true,
popup: true, popup: true,

View File

@ -250,6 +250,7 @@ export default {
name: 'vpcoffering', name: 'vpcoffering',
title: 'label.vpc.offerings', title: 'label.vpc.offerings',
icon: 'deployment-unit', icon: 'deployment-unit',
docHelp: 'plugins/nuage-plugin.html?#vpc-offerings',
permission: ['listVPCOfferings', 'listInfrastructure'], permission: ['listVPCOfferings', 'listInfrastructure'],
params: { isrecursive: 'true' }, params: { isrecursive: 'true' },
resourceType: 'VpcOffering', resourceType: 'VpcOffering',
@ -263,6 +264,7 @@ export default {
actions: [{ actions: [{
api: 'createVPCOffering', api: 'createVPCOffering',
icon: 'plus', icon: 'plus',
docHelp: 'plugins/nuage-plugin.html?#optional-create-and-enable-vpc-offering',
label: 'label.add.vpc.offering', label: 'label.add.vpc.offering',
listView: true, listView: true,
popup: true, popup: true,

View File

@ -48,6 +48,7 @@ export default {
{ {
api: 'quotaCredits', api: 'quotaCredits',
icon: 'plus', icon: 'plus',
docHelp: 'plugins/quota.html#quota-credits',
label: 'label.quota.add.credits', label: 'label.quota.add.credits',
dataView: true, dataView: true,
args: ['value', 'min_balance', 'quota_enforce'], args: ['value', 'min_balance', 'quota_enforce'],

View File

@ -58,7 +58,7 @@ export default {
api: 'updateProjectInvitation', api: 'updateProjectInvitation',
icon: 'key', icon: 'key',
label: 'label.enter.token', label: 'label.enter.token',
docHelp: 'adminguide/projects.html#setting-up-invitations', docHelp: 'adminguide/projects.html#accepting-a-membership-invitation',
listView: true, listView: true,
popup: true, popup: true,
component: () => import('@/views/project/InvitationTokenTemplate.vue') component: () => import('@/views/project/InvitationTokenTemplate.vue')
@ -67,7 +67,7 @@ export default {
api: 'listProjectInvitations', api: 'listProjectInvitations',
icon: 'team', icon: 'team',
label: 'label.project.invitation', label: 'label.project.invitation',
docHelp: 'adminguide/projects.html#setting-up-invitations', docHelp: 'adminguide/projects.html#accepting-a-membership-invitation',
listView: true, listView: true,
popup: true, popup: true,
showBadge: true, showBadge: true,
@ -102,7 +102,7 @@ export default {
icon: 'pause-circle', icon: 'pause-circle',
label: 'label.suspend.project', label: 'label.suspend.project',
message: 'message.suspend.project', message: 'message.suspend.project',
docHelp: 'adminguide/projects.html#suspending-or-deleting-a-project', docHelp: 'adminguide/projects.html#sending-project-membership-invitations',
dataView: true, dataView: true,
show: (record, store) => { show: (record, store) => {
return (record.account === store.userInfo.account || ['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) && record.state !== 'Suspended' return (record.account === store.userInfo.account || ['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) && record.state !== 'Suspended'

View File

@ -26,6 +26,7 @@ export default {
name: 'volume', name: 'volume',
title: 'label.volumes', title: 'label.volumes',
icon: 'hdd', icon: 'hdd',
docHelp: 'adminguide/storage.html#working-with-volumes',
permission: ['listVolumesMetrics'], permission: ['listVolumesMetrics'],
resourceType: 'Volume', resourceType: 'Volume',
columns: () => { columns: () => {
@ -66,6 +67,7 @@ export default {
{ {
api: 'createVolume', api: 'createVolume',
icon: 'plus', icon: 'plus',
docHelp: 'adminguide/storage.html#creating-a-new-volume',
label: 'label.action.create.volume', label: 'label.action.create.volume',
listView: true, listView: true,
popup: true, popup: true,
@ -74,6 +76,7 @@ export default {
{ {
api: 'createVolume', api: 'createVolume',
icon: 'cloud-upload', icon: 'cloud-upload',
docHelp: 'adminguide/storage.html#uploading-an-existing-volume-to-a-virtual-machine',
label: 'label.upload.volume.from.local', label: 'label.upload.volume.from.local',
listView: true, listView: true,
popup: true, popup: true,
@ -82,6 +85,7 @@ export default {
{ {
api: 'uploadVolume', api: 'uploadVolume',
icon: 'link', icon: 'link',
docHelp: 'adminguide/storage.html#uploading-an-existing-volume-to-a-virtual-machine',
label: 'label.upload.volume.from.url', label: 'label.upload.volume.from.url',
listView: true, listView: true,
args: ['url', 'name', 'zoneid', 'format', 'diskofferingid', 'checksum'], args: ['url', 'name', 'zoneid', 'format', 'diskofferingid', 'checksum'],
@ -111,6 +115,7 @@ export default {
{ {
api: 'createSnapshot', api: 'createSnapshot',
icon: 'camera', icon: 'camera',
docHelp: 'adminguide/storage.html#working-with-volume-snapshots',
label: 'label.action.take.snapshot', label: 'label.action.take.snapshot',
dataView: true, dataView: true,
show: (record) => { return record.state === 'Ready' }, show: (record) => { return record.state === 'Ready' },
@ -120,6 +125,7 @@ export default {
{ {
api: 'createSnapshotPolicy', api: 'createSnapshotPolicy',
icon: 'clock-circle', icon: 'clock-circle',
docHelp: 'adminguide/storage.html#working-with-volume-snapshots',
label: 'label.action.recurring.snapshot', label: 'label.action.recurring.snapshot',
dataView: true, dataView: true,
show: (record) => { return record.state === 'Ready' }, show: (record) => { return record.state === 'Ready' },
@ -137,6 +143,7 @@ export default {
{ {
api: 'resizeVolume', api: 'resizeVolume',
icon: 'fullscreen', icon: 'fullscreen',
docHelp: 'adminguide/storage.html#resizing-volumes',
label: 'label.action.resize.volume', label: 'label.action.resize.volume',
dataView: true, dataView: true,
popup: true, popup: true,
@ -146,6 +153,7 @@ export default {
{ {
api: 'migrateVolume', api: 'migrateVolume',
icon: 'drag', icon: 'drag',
docHelp: 'adminguide/storage.html#id2',
label: 'label.migrate.volume', label: 'label.migrate.volume',
args: ['volumeid', 'storageid', 'livemigrate'], args: ['volumeid', 'storageid', 'livemigrate'],
dataView: true, dataView: true,
@ -225,6 +233,7 @@ export default {
name: 'snapshot', name: 'snapshot',
title: 'label.snapshots', title: 'label.snapshots',
icon: 'build', icon: 'build',
docHelp: 'adminguide/storage.html#working-with-volume-snapshots',
permission: ['listSnapshots'], permission: ['listSnapshots'],
resourceType: 'Snapshot', resourceType: 'Snapshot',
columns: () => { columns: () => {
@ -284,6 +293,7 @@ export default {
name: 'vmsnapshot', name: 'vmsnapshot',
title: 'label.vm.snapshots', title: 'label.vm.snapshots',
icon: 'camera', icon: 'camera',
docHelp: 'adminguide/storage.html#working-with-volume-snapshots',
permission: ['listVMSnapshot'], permission: ['listVMSnapshot'],
resourceType: 'VMSnapshot', resourceType: 'VMSnapshot',
columns: () => { columns: () => {
@ -336,6 +346,7 @@ export default {
{ {
api: 'restoreBackup', api: 'restoreBackup',
icon: 'sync', icon: 'sync',
docHelp: 'adminguide/virtual_machines.html#restoring-vm-backups',
label: 'label.backup.restore', label: 'label.backup.restore',
message: 'message.backup.restore', message: 'message.backup.restore',
dataView: true dataView: true

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@ router.beforeEach((to, from, next) => {
if (Object.keys(store.getters.apis).length === 0) { if (Object.keys(store.getters.apis).length === 0) {
const cachedApis = Vue.ls.get(APIS, {}) const cachedApis = Vue.ls.get(APIS, {})
if (Object.keys(cachedApis).length > 0) { if (Object.keys(cachedApis).length > 0) {
message.loading('Loading...', 1.5) message.loading(`${i18n.t('label.loading')}...`, 1.5)
} }
store store
.dispatch('GetInfo') .dispatch('GetInfo')
@ -66,7 +66,7 @@ router.beforeEach((to, from, next) => {
.catch(() => { .catch(() => {
notification.error({ notification.error({
message: 'Error', message: 'Error',
description: 'Exception caught while discoverying features' description: i18n.t('message.error.discovering.feature')
}) })
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
next({ path: '/user/login', query: { redirect: to.fullPath } }) next({ path: '/user/login', query: { redirect: to.fullPath } })

View File

@ -22,6 +22,7 @@ import message from 'ant-design-vue/es/message'
import router from '@/router' import router from '@/router'
import store from '@/store' import store from '@/store'
import { login, logout, api } from '@/api' import { login, logout, api } from '@/api'
import i18n from '@/locales'
import { ACCESS_TOKEN, CURRENT_PROJECT, DEFAULT_THEME, APIS, ASYNC_JOB_IDS } from '@/store/mutation-types' import { ACCESS_TOKEN, CURRENT_PROJECT, DEFAULT_THEME, APIS, ASYNC_JOB_IDS } from '@/store/mutation-types'
const user = { const user = {
@ -124,7 +125,7 @@ const user = {
commit('SET_APIS', cachedApis) commit('SET_APIS', cachedApis)
resolve(cachedApis) resolve(cachedApis)
} else { } else {
const hide = message.loading('Discovering features, please wait...', 0) const hide = message.loading(i18n.t('message.discovering.feature'), 0)
api('listApis').then(response => { api('listApis').then(response => {
const apis = {} const apis = {}
const apiList = response.listapisresponse.api const apiList = response.listapisresponse.api
@ -142,7 +143,7 @@ const user = {
router.addRoutes(store.getters.addRouters) router.addRoutes(store.getters.addRouters)
}) })
hide() hide()
message.success('Discovered all available features!') message.success(i18n.t('message.sussess.discovering.feature'))
}).catch(error => { }).catch(error => {
reject(error) reject(error)
}) })

View File

@ -38,12 +38,12 @@ export const pollJobPlugin = {
const { const {
jobId, jobId,
name = '', name = '',
successMessage = 'Success', successMessage = i18n.t('label.success'),
successMethod = () => {}, successMethod = () => {},
errorMessage = 'Error', errorMessage = i18n.t('label.error'),
errorMethod = () => {}, errorMethod = () => {},
loadingMessage = 'Loading...', loadingMessage = `${i18n.t('label.loading')}...`,
catchMessage = 'Error caught', catchMessage = i18n.t('label.error.caught'),
catchMethod = () => {}, catchMethod = () => {},
action = null action = null
} = options } = options
@ -98,7 +98,7 @@ export const pollJobPlugin = {
}).catch(e => { }).catch(e => {
console.error(`${catchMessage} - ${e}`) console.error(`${catchMessage} - ${e}`)
notification.error({ notification.error({
message: this.$t('label.error'), message: i18n.t('label.error'),
description: catchMessage, description: catchMessage,
duration: 0 duration: 0
}) })
@ -113,11 +113,11 @@ export const notifierPlugin = {
install (Vue) { install (Vue) {
Vue.prototype.$notifyError = function (error) { Vue.prototype.$notifyError = function (error) {
console.log(error) console.log(error)
var msg = 'Request Failed' var msg = i18n.t('message.request.failed')
var desc = '' var desc = ''
if (error && error.response) { if (error && error.response) {
if (error.response.status) { if (error.response.status) {
msg = `Request Failed (${error.response.status})` msg = `${i18n.t('message.request.failed')} (${error.response.status})`
} }
if (error.message) { if (error.message) {
desc = error.message desc = error.message

View File

@ -22,6 +22,7 @@ import store from '@/store'
import { VueAxios } from './axios' import { VueAxios } from './axios'
import notification from 'ant-design-vue/es/notification' import notification from 'ant-design-vue/es/notification'
import { CURRENT_PROJECT } from '@/store/mutation-types' import { CURRENT_PROJECT } from '@/store/mutation-types'
import i18n from '@/locales'
const service = axios.create({ const service = axios.create({
timeout: 600000 timeout: 600000
@ -33,15 +34,15 @@ const err = (error) => {
console.log(response) console.log(response)
if (response.status === 403) { if (response.status === 403) {
const data = response.data const data = response.data
notification.error({ message: 'Forbidden', description: data.message }) notification.error({ message: i18n.t('label.forbidden'), description: data.message })
} }
if (response.status === 401) { if (response.status === 401) {
if (response.config && response.config.params && ['listIdps'].includes(response.config.params.command)) { if (response.config && response.config.params && ['listIdps'].includes(response.config.params.command)) {
return return
} }
notification.error({ notification.error({
message: 'Unauthorized', message: i18n.t('label.unauthorized'),
description: 'Session expired, authorization verification failed', description: i18n.t('message.authorization.failed'),
key: 'http-401' key: 'http-401'
}) })
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
@ -51,14 +52,14 @@ const err = (error) => {
}) })
} }
if (response.status === 404) { if (response.status === 404) {
notification.error({ message: 'Not Found', description: 'Resource not found' }) notification.error({ message: i18n.t('label.not.found'), description: i18n.t('message.resource.not.found') })
router.push({ path: '/exception/404' }) router.push({ path: '/exception/404' })
} }
} }
if (error.isAxiosError && !error.response) { if (error.isAxiosError && !error.response) {
notification.warn({ notification.warn({
message: error.message || 'Network Error', message: error.message || i18n.t('message.network.error'),
description: 'Unable to reach the management server or a browser extension may be blocking the network request.', description: i18n.t('message.network.error.description'),
key: 'network-error' key: 'network-error'
}) })
} }

View File

@ -439,7 +439,7 @@ export default {
const project = json.listprojectsresponse.project[0] const project = json.listprojectsresponse.project[0]
this.$store.dispatch('SetProject', project) this.$store.dispatch('SetProject', project)
this.$store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark') this.$store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark')
this.$message.success(`Switched to "${project.name}"`) this.$message.success(`${this.$t('message.switch.to')} "${project.name}"`)
const query = Object.assign({}, this.$route.query) const query = Object.assign({}, this.$route.query)
delete query.projectid delete query.projectid
this.$router.replace({ query }) this.$router.replace({ query })
@ -767,7 +767,7 @@ export default {
}, },
errorMethod: () => this.fetchData(), errorMethod: () => this.fetchData(),
loadingMessage: `${this.$t(action.label)} - ${resourceName}`, loadingMessage: `${this.$t(action.label)} - ${resourceName}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
action action
}) })
}, },

View File

@ -42,7 +42,7 @@
:placeholder="$t('label.username')" :placeholder="$t('label.username')"
v-decorator="[ v-decorator="[
'username', 'username',
{rules: [{ required: true, message: 'Enter your username' }, { validator: handleUsernameOrEmail }], validateTrigger: 'change'} {rules: [{ required: true, message: $t('message.error.username') }, { validator: handleUsernameOrEmail }], validateTrigger: 'change'}
]" ]"
> >
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/> <a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
@ -57,7 +57,7 @@
:placeholder="$t('label.password')" :placeholder="$t('label.password')"
v-decorator="[ v-decorator="[
'password', 'password',
{rules: [{ required: true, message: 'Enter your password' }], validateTrigger: 'blur'} {rules: [{ required: true, message: $t('message.error.password') }], validateTrigger: 'blur'}
]" ]"
> >
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/> <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
@ -71,7 +71,7 @@
:placeholder="$t('label.domain')" :placeholder="$t('label.domain')"
v-decorator="[ v-decorator="[
'domain', 'domain',
{rules: [{ required: false, message: 'Enter your domain, leave empty for ROOT domain' }], validateTrigger: 'change'} {rules: [{ required: false, message: $t('message.error.domain') }], validateTrigger: 'change'}
]" ]"
> >
<a-icon slot="prefix" type="block" :style="{ color: 'rgba(0,0,0,.25)' }"/> <a-icon slot="prefix" type="block" :style="{ color: 'rgba(0,0,0,.25)' }"/>
@ -212,9 +212,10 @@ export default {
}, },
requestFailed (err) { requestFailed (err) {
if (err && err.response && err.response.data && err.response.data.loginresponse) { if (err && err.response && err.response.data && err.response.data.loginresponse) {
this.$message.error('Error ' + err.response.data.loginresponse.errorcode + ': ' + err.response.data.loginresponse.errortext) const error = err.response.data.loginresponse.errorcode + ': ' + err.response.data.loginresponse.errortext
this.$message.error(`${this.$t('label.error')} ${error}`)
} else { } else {
this.$message.error('Login Failed') this.$message.error(this.$t('message.login.failed'))
} }
} }
} }

View File

@ -148,7 +148,7 @@ export default {
affinitygroupids: this.selectedRowKeys.join(',') affinitygroupids: this.selectedRowKeys.join(',')
}).then(response => { }).then(response => {
this.$notification.success({ this.$notification.success({
message: 'Successfully changed affinity groups' message: this.$t('message.success.change.affinity.group')
}) })
this.$parent.$parent.close() this.$parent.$parent.close()
this.parentFetchData() this.parentFetchData()

View File

@ -31,7 +31,7 @@
</span> </span>
<a-input <a-input
v-decorator="['name', { v-decorator="['name', {
rules: [{ required: true, message: 'Please enter Kubernetes cluster name' }] rules: [{ required: true, message: $t('message.error.kubecluster.name') }]
}]" }]"
:placeholder="apiParams.name.description"/> :placeholder="apiParams.name.description"/>
</a-form-item> </a-form-item>
@ -44,7 +44,7 @@
</span> </span>
<a-input <a-input
v-decorator="['description', { v-decorator="['description', {
rules: [{ required: true, message: 'Please enter Kubernetes cluster description' }] rules: [{ required: true, message: $t('message.error.cluster.description') }]
}]" }]"
:placeholder="apiParams.description.description"/> :placeholder="apiParams.description.description"/>
</a-form-item> </a-form-item>
@ -58,7 +58,7 @@
<a-select <a-select
id="zone-selection" id="zone-selection"
v-decorator="['zoneid', { v-decorator="['zoneid', {
rules: [{ required: true, message: 'Please select zone for Kubernetes cluster' }] rules: [{ required: true, message: $t('message.error.zone.for.cluster') }]
}]" }]"
showSearch showSearch
optionFilterProp="children" optionFilterProp="children"
@ -83,7 +83,7 @@
<a-select <a-select
id="version-selection" id="version-selection"
v-decorator="['kubernetesversionid', { v-decorator="['kubernetesversionid', {
rules: [{ required: true, message: 'Please select Kubernetes version for Kubernetes cluster' }] rules: [{ required: true, message: $t('message.error.version.for.cluster') }]
}]" }]"
showSearch showSearch
optionFilterProp="children" optionFilterProp="children"
@ -108,7 +108,7 @@
<a-select <a-select
id="offering-selection" id="offering-selection"
v-decorator="['serviceofferingid', { v-decorator="['serviceofferingid', {
rules: [{ required: true, message: 'Please select service offering for Kubernetes cluster' }] rules: [{ required: true, message: $t('message.error.serviceoffering.for.cluster') }]
}]" }]"
showSearch showSearch
optionFilterProp="children" optionFilterProp="children"
@ -134,7 +134,7 @@
rules: [{ rules: [{
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.validate.number'))
} }
callback() callback()
} }
@ -177,11 +177,11 @@
<a-input <a-input
v-decorator="['masternodes', { v-decorator="['masternodes', {
initialValue: '1', initialValue: '1',
rules: [{ required: true, message: 'Please enter value' }, rules: [{ required: true, message: $t('message.error.input.value') },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.validate.number'))
} }
callback() callback()
} }
@ -211,11 +211,11 @@
<a-input <a-input
v-decorator="['size', { v-decorator="['size', {
initialValue: '1', initialValue: '1',
rules: [{ required: true, message: 'Please enter size for Kubernetes cluster' }, rules: [{ required: true, message: $t('message.error.size.for.cluster') },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.validate.number'))
} }
callback() callback()
} }
@ -478,9 +478,9 @@ export default {
}) })
this.$pollJob({ this.$pollJob({
jobId, jobId,
loadingMessage: `Create Kubernetes cluster ${values.name} in progress`, loadingMessage: `${this.$t('label.kubernetes.cluster.create')} ${values.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
successMessage: `Successfully created Kubernetes cluster ${values.name}`, successMessage: this.$t('message.success.create.kubernetes.cluter') + ' ' + values.name,
successMethod: result => { successMethod: result => {
this.$emit('refresh-data') this.$emit('refresh-data')
} }

View File

@ -26,7 +26,7 @@
<a-form-item :label="$t('label.name')"> <a-form-item :label="$t('label.name')">
<a-input <a-input
v-decorator="['name', { v-decorator="['name', {
rules: [{ required: true, message: 'Please enter name' }] rules: [{ required: true, message: $t('message.error.name') }]
}]" }]"
:placeholder="apiParams.name.description"/> :placeholder="apiParams.name.description"/>
</a-form-item> </a-form-item>
@ -67,8 +67,8 @@
<div v-if="isSubmitted"> <div v-if="isSubmitted">
<p v-html="$t('message.desc.created.ssh.key.pair')"></p> <p v-html="$t('message.desc.created.ssh.key.pair')"></p>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button @click="notifyCopied" v-clipboard:copy="hiddenElement.innerHTML" type="primary">{{ 'Copy to clipboard' }}</a-button> <a-button @click="notifyCopied" v-clipboard:copy="hiddenElement.innerHTML" type="primary">{{ $t('label.copy.clipboard') }}</a-button>
<a-button @click="downloadKey" type="primary">{{ this.$t('Download') }}</a-button> <a-button @click="downloadKey" type="primary">{{ this.$t('label.download') }}</a-button>
<a-button @click="closeAction">{{ this.$t('label.close') }}</a-button> <a-button @click="closeAction">{{ this.$t('label.close') }}</a-button>
</div> </div>
</div> </div>
@ -174,7 +174,7 @@ export default {
if (this.isValidValueForKey(values, 'publickey') && values.publickey.length > 0) { if (this.isValidValueForKey(values, 'publickey') && values.publickey.length > 0) {
params.publickey = values.publickey params.publickey = values.publickey
api('registerSSHKeyPair', params).then(json => { api('registerSSHKeyPair', params).then(json => {
this.$message.success('Successfully registered SSH key pair: ' + values.name) this.$message.success(this.$t('message.success.register.keypair') + ' ' + values.name)
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
}).finally(() => { }).finally(() => {
@ -184,7 +184,7 @@ export default {
}) })
} else { } else {
api('createSSHKeyPair', params).then(json => { api('createSSHKeyPair', params).then(json => {
this.$message.success('Successfully created SSH key pair: ' + values.name) this.$message.success(this.$t('message.success.create.keypair') + ' ' + values.name)
if (json.createsshkeypairresponse && json.createsshkeypairresponse.keypair && json.createsshkeypairresponse.keypair.privatekey) { if (json.createsshkeypairresponse && json.createsshkeypairresponse.keypair && json.createsshkeypairresponse.keypair.privatekey) {
this.isSubmitted = true this.isSubmitted = true
const key = json.createsshkeypairresponse.keypair.privatekey const key = json.createsshkeypairresponse.keypair.privatekey
@ -208,7 +208,7 @@ export default {
}, },
notifyCopied () { notifyCopied () {
this.$notification.info({ this.$notification.info({
message: this.$t('Copied Successfully to cilpboard') message: this.$t('message.success.copy.clipboard')
}) })
}, },
closeAction () { closeAction () {

View File

@ -1031,14 +1031,14 @@ export default {
if (!values.templateid && !values.isoid) { if (!values.templateid && !values.isoid) {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: this.$t('message.template.iso') description: this.$t('message.template.iso')
}) })
return return
} else if (values.isoid && (!values.diskofferingid || values.diskofferingid === '0')) { } else if (values.isoid && (!values.diskofferingid || values.diskofferingid === '0')) {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: this.$t('Please select a Disk Offering to continue') description: this.$t('message.step.3.continue')
}) })
return return
} }
@ -1148,14 +1148,14 @@ export default {
const name = vm.displayname || vm.name || vm.id const name = vm.displayname || vm.name || vm.id
if (vm.password) { if (vm.password) {
this.$notification.success({ this.$notification.success({
message: password + ' for ' + name, message: password + ` ${this.$t('label.for')} ` + name,
description: vm.password, description: vm.password,
duration: 0 duration: 0
}) })
} }
}, },
loadingMessage: `${title} in progress`, loadingMessage: `${title} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: title, title: title,

View File

@ -132,9 +132,9 @@ export default {
}) })
this.$pollJob({ this.$pollJob({
jobId, jobId,
loadingMessage: `Deleting VM ${this.resource.name}`, loadingMessage: `${this.$t('message.deleting.vm')} ${this.resource.name}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
successMessage: `Successfully Deleted VM ${this.resource.name}` successMessage: `${this.$t('message.success.delete.vm')} ${this.resource.name}`
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)

View File

@ -70,8 +70,8 @@
<a-popconfirm <a-popconfirm
:title="$t('label.set.default.nic')" :title="$t('label.set.default.nic')"
@confirm="setAsDefault(record.nic)" @confirm="setAsDefault(record.nic)"
okText="Yes" :okText="$t('label.yes')"
cancelText="No" :cancelText="$t('label.no')"
v-if="!record.nic.isdefault" v-if="!record.nic.isdefault"
> >
<a-button <a-button
@ -81,7 +81,7 @@
</a-popconfirm> </a-popconfirm>
<a-tooltip placement="bottom" v-if="record.nic.type !== 'L2'"> <a-tooltip placement="bottom" v-if="record.nic.type !== 'L2'">
<template slot="title"> <template slot="title">
{{ "Change IP Address" }} {{ $t('label.change.ip.addess') }}
</template> </template>
<a-button <a-button
icon="swap" icon="swap"
@ -91,7 +91,7 @@
</a-tooltip> </a-tooltip>
<a-tooltip placement="bottom" v-if="record.nic.type !== 'L2'"> <a-tooltip placement="bottom" v-if="record.nic.type !== 'L2'">
<template slot="title"> <template slot="title">
{{ "Manage Secondary IP Addresses" }} {{ $t('label.edit.secondary.ips') }}
</template> </template>
<a-button <a-button
icon="environment" icon="environment"
@ -102,8 +102,8 @@
<a-popconfirm <a-popconfirm
:title="$t('message.network.removenic')" :title="$t('message.network.removenic')"
@confirm="removeNIC(record.nic)" @confirm="removeNIC(record.nic)"
okText="Yes" :okText="$t('label.yes')"
cancelText="No" :cancelText="$t('label.no')"
v-if="!record.nic.isdefault" v-if="!record.nic.isdefault"
> >
<a-button <a-button
@ -183,20 +183,20 @@
{{ $t('message.network.secondaryip') }} {{ $t('message.network.secondaryip') }}
</p> </p>
<a-divider /> <a-divider />
<a-input placeholder="Enter new secondary IP address" v-model="newSecondaryIp"></a-input> <a-input :placeholder="$t('label.new.secondaryip.description')" v-model="newSecondaryIp"></a-input>
<div style="margin-top: 10px; display: flex; justify-content:flex-end;"> <div style="margin-top: 10px; display: flex; justify-content:flex-end;">
<a-button @click="submitSecondaryIP" type="primary" style="margin-right: 10px;">Add Secondary IP</a-button> <a-button @click="submitSecondaryIP" type="primary" style="margin-right: 10px;">{{ $t('label.add.secondary.ip') }}</a-button>
<a-button @click="closeModals">Close</a-button> <a-button @click="closeModals">{{ $t('label.close') }}</a-button>
</div> </div>
<a-divider /> <a-divider />
<a-list itemLayout="vertical"> <a-list itemLayout="vertical">
<a-list-item v-for="(ip, index) in secondaryIPs" :key="index"> <a-list-item v-for="(ip, index) in secondaryIPs" :key="index">
<a-popconfirm <a-popconfirm
title="Release IP?" :title="`${$t('label.action.release.ip')}?`"
@confirm="removeSecondaryIP(ip.id)" @confirm="removeSecondaryIP(ip.id)"
okText="Yes" :okText="$t('label.yes')"
cancelText="No" :cancelText="$t('label.no')"
> >
<a-button <a-button
type="danger" type="danger"
@ -359,20 +359,20 @@ export default {
api('addNicToVirtualMachine', params).then(response => { api('addNicToVirtualMachine', params).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.addnictovirtualmachineresponse.jobid, jobId: response.addnictovirtualmachineresponse.jobid,
successMessage: `Successfully added network`, successMessage: this.$t('message.success.add.network'),
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: 'Adding network failed', errorMessage: this.$t('message.add.network.failed'),
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Adding network...`, loadingMessage: this.$t('message.add.network.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
@ -392,18 +392,18 @@ export default {
}).then(response => { }).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.updatedefaultnicforvirtualmachineresponse.jobid, jobId: response.updatedefaultnicforvirtualmachineresponse.jobid,
successMessage: `Successfully set ${item.networkname} to default. Please manually update the default NIC on the VM now.`, successMessage: `${this.$t('label.success.set')} ${item.networkname} ${this.$t('label.to.default')}. ${this.$t('message.set.default.nic.manual')}.`,
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: `Error setting ${item.networkname} to default`, errorMessage: `${this.$t('label.error.setting')} ${item.networkname} ${this.$t('label.to.default')}`,
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Setting ${item.networkname} to default...`, loadingMessage: `${this.$t('label.setting')} ${item.networkname} ${this.$t('label.to.default')}...`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
@ -423,20 +423,20 @@ export default {
}).then(response => { }).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.updatevmnicipresponse.jobid, jobId: response.updatevmnicipresponse.jobid,
successMessage: `Successfully updated IP Address`, successMessage: this.$t('message.success.update.ipaddress'),
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: `Error`, errorMessage: this.$t('label.error'),
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Updating IP Address...`, loadingMessage: this.$t('message.update.ipaddress.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.closeModals() this.closeModals()
@ -458,18 +458,18 @@ export default {
}).then(response => { }).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.removenicfromvirtualmachineresponse.jobid, jobId: response.removenicfromvirtualmachineresponse.jobid,
successMessage: `Successfully removed`, successMessage: this.$t('message.success.remove.nic'),
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: `There was an error`, errorMessage: this.$t('message.error.remove.nic'),
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Removing NIC...`, loadingMessage: this.$t('message.remove.nic.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.parentFetchData() this.parentFetchData()
@ -493,20 +493,20 @@ export default {
api('addIpToNic', params).then(response => { api('addIpToNic', params).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.addiptovmnicresponse.jobid, jobId: response.addiptovmnicresponse.jobid,
successMessage: `Successfully added secondary IP Address`, successMessage: this.$t('message.success.add.secondary.ipaddress'),
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: `There was an error adding the secondary IP Address`, errorMessage: this.$t('message.error.add.secondary.ipaddress'),
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Add Secondary IP address...`, loadingMessage: this.$t('message.add.secondary.ipaddress.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)
@ -524,20 +524,20 @@ export default {
api('removeIpFromNic', { id }).then(response => { api('removeIpFromNic', { id }).then(response => {
this.$pollJob({ this.$pollJob({
jobId: response.removeipfromnicresponse.jobid, jobId: response.removeipfromnicresponse.jobid,
successMessage: `Successfully removed secondary IP Address`, successMessage: this.$t('message.success.remove.secondary.ipaddress'),
successMethod: () => { successMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)
this.parentFetchData() this.parentFetchData()
}, },
errorMessage: `There was an error removing the secondary IP Address`, errorMessage: this.$t('message.error.remove.secondary.ipaddress'),
errorMethod: () => { errorMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)
this.parentFetchData() this.parentFetchData()
}, },
loadingMessage: `Removing Secondary IP address...`, loadingMessage: this.$t('message.remove.secondary.ipaddress.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loadingNic = false this.loadingNic = false
this.fetchSecondaryIPs(this.selectedNicId) this.fetchSecondaryIPs(this.selectedNicId)

View File

@ -26,7 +26,7 @@
<DetailsTab :resource="resource" :loading="loading" /> <DetailsTab :resource="resource" :loading="loading" />
</a-tab-pane> </a-tab-pane>
<a-tab-pane :tab="$t('label.access')" key="access"> <a-tab-pane :tab="$t('label.access')" key="access">
<a-card title="Kubernetes Cluster Config" :loading="this.versionLoading"> <a-card :title="$t('label.kubeconfig.cluster')" :loading="this.versionLoading">
<div v-if="this.clusterConfig !== ''"> <div v-if="this.clusterConfig !== ''">
<a-textarea :value="this.clusterConfig" :rows="5" readonly /> <a-textarea :value="this.clusterConfig" :rows="5" readonly />
<div :span="24" class="action-button"> <div :span="24" class="action-button">
@ -34,62 +34,61 @@
</div> </div>
</div> </div>
<div v-else> <div v-else>
<p>Kubernetes cluster kubeconfig not available currently</p> <p>{{ $t('message.kubeconfig.cluster.not.available') }}</p>
</div> </div>
</a-card> </a-card>
<a-card title="Using CLI" :loading="this.versionLoading"> <a-card :title="$t('label.using.cli')" :loading="this.versionLoading">
<a-timeline> <a-timeline>
<a-timeline-item> <a-timeline-item>
<p> <p>
Download kubeconfig for the cluster<br><br> {{ $t('label.download.kubeconfig.cluster') }}
The <code>kubectl</code> command-line tool uses kubeconfig files to find the information it needs to choose a cluster and communicate with the API server of a cluster.
</p> </p>
</a-timeline-item> </a-timeline-item>
<a-timeline-item> <a-timeline-item>
<p> <p>
Download <code>kubectl</code> tool for cluster's Kubernetes version<br><br> {{ $t('label.download.kubectl') }} <br><br>
Linux: <a :href="this.kubectlLinuxLink">{{ this.kubectlLinuxLink }}</a><br> {{ $t('label.linux') }}: <a :href="this.kubectlLinuxLink">{{ this.kubectlLinuxLink }}</a><br>
MacOS: <a :href="this.kubectlMacLink">{{ this.kubectlMacLink }}</a><br> {{ $t('label.macos') }}: <a :href="this.kubectlMacLink">{{ this.kubectlMacLink }}</a><br>
Windows: <a :href="this.kubectlWindowsLink">{{ this.kubectlWindowsLink }}</a> {{ $t('label.windows') }}: <a :href="this.kubectlWindowsLink">{{ this.kubectlWindowsLink }}</a>
</p> </p>
</a-timeline-item> </a-timeline-item>
<a-timeline-item> <a-timeline-item>
<p> <p>
Use <code>kubectl</code> and <code>kubeconfig</code> file to access cluster<br><br> {{ $t('label.use.kubectl.access.cluster') }}<br><br>
<code><b>kubectl --kubeconfig /custom/path/kube.conf {COMMAND}</b></code><br><br> <code><b>kubectl --kubeconfig /custom/path/kube.conf {COMMAND}</b></code><br><br>
<em>List pods</em><br> <em>{{ $t('label.list.pods') }}</em><br>
<code>kubectl --kubeconfig /custom/path/kube.conf get pods --all-namespaces</code><br> <code>kubectl --kubeconfig /custom/path/kube.conf get pods --all-namespaces</code><br>
<em>List nodes</em><br> <em>{{ $t('label.list.nodes') }}</em><br>
<code>kubectl --kubeconfig /custom/path/kube.conf get nodes --all-namespaces</code><br> <code>kubectl --kubeconfig /custom/path/kube.conf get nodes --all-namespaces</code><br>
<em>List services</em><br> <em>{{ $t('label.list.services') }}</em><br>
<code>kubectl --kubeconfig /custom/path/kube.conf get services --all-namespaces</code> <code>kubectl --kubeconfig /custom/path/kube.conf get services --all-namespaces</code>
</p> </p>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
</a-card> </a-card>
<a-card title="Kubernetes Dashboard UI"> <a-card :title="$t('label.kubernetes.dashboard')">
<a-timeline> <a-timeline>
<a-timeline-item> <a-timeline-item>
<p> <p>
Run proxy locally<br><br> {{ $t('label.run.proxy.locally') }}<br><br>
<code><b>kubectl --kubeconfig /custom/path/kube.conf proxy</b></code> <code><b>kubectl --kubeconfig /custom/path/kube.conf proxy</b></code>
</p> </p>
</a-timeline-item> </a-timeline-item>
<a-timeline-item> <a-timeline-item>
<p> <p>
Open URL in browser<br><br> {{ $t('label.open.url') }}<br><br>
<a href="http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"><code>http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/</code></a> <a href="http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"><code>http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/</code></a>
</p> </p>
</a-timeline-item> </a-timeline-item>
<a-timeline-item> <a-timeline-item>
<p> <p>
Token for dashboard login can be retrieved using following command<br><br> {{ $t('label.token.for.dashboard.login') }}<br><br>
<code><b>kubectl --kubeconfig /custom/path/kube.conf describe secret $(kubectl --kubeconfig /custom/path/kube.conf get secrets -n kubernetes-dashboard | grep kubernetes-dashboard-token | awk '{print $1}') -n kubernetes-dashboard</b></code> <code><b>kubectl --kubeconfig /custom/path/kube.conf describe secret $(kubectl --kubeconfig /custom/path/kube.conf get secrets -n kubernetes-dashboard | grep kubernetes-dashboard-token | awk '{print $1}') -n kubernetes-dashboard</b></code>
</p> </p>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
<p>More about accessing dashboard UI, <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui">https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui</a></p> <p>{{ $t('label.more.access.dashboard.ui') }}, <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui">https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui</a></p>
</a-card> </a-card>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :tab="$t('label.instances')" key="instances"> <a-tab-pane :tab="$t('label.instances')" key="instances">
@ -247,8 +246,8 @@ export default {
this.clusterConfig = config.configdata this.clusterConfig = config.configdata
} else { } else {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: 'Unable to retrieve Kubernetes cluster config' description: this.$t('message.error.retrieve.kubeconfig')
}) })
} }
}).finally(() => { }).finally(() => {

View File

@ -61,7 +61,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="totalCount" :total="totalCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="handleChangePage" @change="handleChangePage"
@showSizeChange="handleChangePageSize" @showSizeChange="handleChangePageSize"
@ -142,7 +142,7 @@ export default {
this.totalCount -= 1 this.totalCount -= 1
} }
}).catch(error => { }).catch(error => {
this.$message.error('Failed to load hosts: ' + error) this.$message.error(`${this.$t('message.load.host.failed')}: ${error}`)
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
@ -154,23 +154,23 @@ export default {
virtualmachineid: this.resource.id virtualmachineid: this.resource.id
}).then(response => { }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Migrating ${this.resource.name}`, title: `${this.$t('label.migrating')} ${this.resource.name}`,
jobid: response.migratevirtualmachineresponse.jobid, jobid: response.migratevirtualmachineresponse.jobid,
description: this.resource.name, description: this.resource.name,
status: 'progress' status: 'progress'
}) })
this.$pollJob({ this.$pollJob({
jobId: response.migratevirtualmachineresponse.jobid, jobId: response.migratevirtualmachineresponse.jobid,
successMessage: `Migration completed successfully for ${this.resource.name}`, successMessage: `${this.$t('message.success.migrating')} ${this.resource.name}`,
successMethod: () => { successMethod: () => {
this.$parent.$parent.close() this.$parent.$parent.close()
}, },
errorMessage: 'Migration failed', errorMessage: this.$t('message.migrating.failed'),
errorMethod: () => { errorMethod: () => {
this.$parent.$parent.close() this.$parent.$parent.close()
}, },
loadingMessage: `Migration in progress for ${this.resource.name}`, loadingMessage: `${this.$t('message.migrating.processing')} ${this.resource.name}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.$parent.$parent.close() this.$parent.$parent.close()
} }
@ -178,7 +178,7 @@ export default {
this.$parent.$parent.close() this.$parent.$parent.close()
}).catch(error => { }).catch(error => {
console.error(error) console.error(error)
this.$message.error(`Failed to migrate VM to host ${this.selectedHost.name}`) this.$message.error(`${this.$t('message.migrating.vm.to.host.failed')} ${this.selectedHost.name}`)
}) })
}, },
handleChangePage (page, pageSize) { handleChangePage (page, pageSize) {

View File

@ -35,7 +35,7 @@
rules: [{ rules: [{
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.error.number'))
} }
callback() callback()
} }
@ -191,9 +191,9 @@ export default {
}) })
this.$pollJob({ this.$pollJob({
jobId, jobId,
loadingMessage: `Scale Kubernetes cluster ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.kubernetes.cluster.scale')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
successMessage: `Successfully scaled Kubernetes cluster ${this.resource.name}`, successMessage: `${this.$t('message.success.scale.kubernetes')} ${this.resource.name}`,
successMethod: result => { successMethod: result => {
this.$emit('refresh-data') this.$emit('refresh-data')
} }

View File

@ -187,16 +187,16 @@ export default {
jobId, jobId,
successMethod: result => { successMethod: result => {
this.$notification.success({ this.$notification.success({
message: 'Successfully changed offering' message: this.$t('message.success.change.offering')
}) })
}, },
loadingMessage: 'Scale in progress', loadingMessage: this.$t('message.scale.processing'),
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
} }
} else { } else {
this.$notification.success({ this.$notification.success({
message: 'Successfully changed offering' message: this.$t('message.success.change.offering')
}) })
} }
this.$parent.$parent.close() this.$parent.$parent.close()

View File

@ -163,12 +163,11 @@ export default {
}) })
this.$pollJob({ this.$pollJob({
jobId, jobId,
loadingMessage: `Upgrade Kubernetes cluster ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.kubernetes.cluster.upgrade')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
successMessage: `Successfully upgraded Kubernetes cluster ${this.resource.name}`, successMessage: `${this.$t('message.success.upgrade.kubernetes')} ${this.resource.name}`,
successMethod: result => { successMethod: result => {
this.$emit('refresh-data') this.$emit('refresh-data')
console.log('hello!')
} }
}) })
}).catch(error => { }).catch(error => {

View File

@ -48,10 +48,10 @@
</div> </div>
<div slot="interval" slot-scope="text, record"> <div slot="interval" slot-scope="text, record">
<span v-if="record.intervaltype==='WEEKLY'"> <span v-if="record.intervaltype==='WEEKLY'">
{{ $t('label.interval.weekly').replace('{number}', $t(listDayOfWeek[record.schedule.split(':')[2] - 1])) }} {{ `${$t('label.every')} ${$t(listDayOfWeek[record.schedule.split(':')[2] - 1])}` }}
</span> </span>
<span v-else-if="record.intervaltype==='MONTHLY'"> <span v-else-if="record.intervaltype==='MONTHLY'">
{{ $t('label.interval.monthly').replace('{number}', record.schedule.split(':')[2]) }} {{ `${$t('label.day')} ${record.schedule.split(':')[2]} ${$t('label.of.month')}` }}
</span> </span>
</div> </div>
<div slot="timezone" slot-scope="text, record"> <div slot="timezone" slot-scope="text, record">
@ -159,7 +159,7 @@ export default {
if (json.deletebackupscheduleresponse.success) { if (json.deletebackupscheduleresponse.success) {
this.$notification.success({ this.$notification.success({
message: this.$t('label.scheduled.backups'), message: this.$t('label.scheduled.backups'),
description: 'Successfully deleted Configure VM backup schedule' description: this.$t('message.success.delete.backup.schedule')
}) })
} }
this.refreshSchedule() this.refreshSchedule()

View File

@ -58,7 +58,7 @@
<a-input-number <a-input-number
style="width: 100%" style="width: 100%"
v-decorator="['time', { v-decorator="['time', {
rules: [{required: true, message: 'Please enter input'}] rules: [{required: true, message: $t('message.error.required.input')}]
}]" }]"
:min="1" :min="1"
:max="59"/> :max="59"/>
@ -76,7 +76,7 @@
rules: [{ rules: [{
type: 'object', type: 'object',
required: true, required: true,
message: 'Please select time' message: $t('message.error.time')
}] }]
}]" /> }]" />
</a-form-item> </a-form-item>
@ -269,7 +269,7 @@ export default {
api('createBackupSchedule', params).then(json => { api('createBackupSchedule', params).then(json => {
this.$notification.success({ this.$notification.success({
message: this.$t('label.scheduled.backups'), message: this.$t('label.scheduled.backups'),
description: 'Successfully Configure VM backup schedule' description: this.$t('message.success.config.backup.schedule')
}) })
this.refreshSchedule() this.refreshSchedule()
this.resetForm() this.resetForm()

View File

@ -41,7 +41,7 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="rowCount" :total="rowCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -41,7 +41,7 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="rowCount" :total="rowCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -228,7 +228,7 @@ export default {
if (!this.checkValidRange(value, min, max)) { if (!this.checkValidRange(value, min, max)) {
this.errors[input].status = 'error' this.errors[input].status = 'error'
this.errors[input].message = this.$t('message.error.invalid.range', { min: min, max: max }) this.errors[input].message = `${this.$t('message.please.enter.value')} ${this.$t('label.from')} ${min} ${this.$t('label.to')} ${max})`
return false return false
} }

View File

@ -52,7 +52,7 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="rowCount" :total="rowCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -81,7 +81,7 @@ export default {
updateDiskSize (value) { updateDiskSize (value) {
if (value < this.minDiskSize) { if (value < this.minDiskSize) {
this.inputValue = this.minDiskSize this.inputValue = this.minDiskSize
this.error = 'The value must not be less than ' + this.minDiskSize + ' GB' this.error = `${this.$t('message.error.limit.value')} ` + this.minDiskSize + ' GB'
return return
} }
this.error = false this.error = false

View File

@ -57,7 +57,7 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="rowCount" :total="rowCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -40,7 +40,7 @@
:current="options.page" :current="options.page"
:pageSize="options.pageSize" :pageSize="options.pageSize"
:total="rowCount" :total="rowCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -48,7 +48,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="itemCount" :total="itemCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100', '500']" :pageSizeOptions="['10', '20', '40', '80', '100', '500']"
@change="onChangePage" @change="onChangePage"
@showSizeChange="onChangePageSize" @showSizeChange="onChangePageSize"

View File

@ -109,7 +109,7 @@
:key="event.id" :key="event.id"
:color="getEventColour(event)"> :color="getEventColour(event)">
<span :style="{ color: '#999' }"><small>{{ event.created }}</small></span><br/> <span :style="{ color: '#999' }"><small>{{ event.created }}</small></span><br/>
<span :style="{ color: '#666' }"><small>{{ event.type }}</small></span><br/> <span :style="{ color: '#666' }"><small>{{ $t(event.type.toLowerCase()) }}</small></span><br/>
<span :style="{ color: '#aaa' }">({{ event.username }}) {{ event.description }}</span> <span :style="{ color: '#aaa' }">({{ event.username }}) {{ event.description }}</span>
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>

View File

@ -187,14 +187,14 @@ export default {
if (json && json.listvolumesresponse) { if (json && json.listvolumesresponse) {
count = json.listvolumesresponse.count count = json.listvolumesresponse.count
} }
this.stats.splice(3, 1, { name: 'Total Volumes', count: count, icon: 'database', path: '/volume' }) this.stats.splice(3, 1, { name: this.$t('label.total.volume'), count: count, icon: 'database', path: '/volume' })
}) })
api('listNetworks', { listall: true }).then(json => { api('listNetworks', { listall: true }).then(json => {
var count = 0 var count = 0
if (json && json.listnetworksresponse) { if (json && json.listnetworksresponse) {
count = json.listnetworksresponse.count count = json.listnetworksresponse.count
} }
this.stats.splice(4, 1, { name: 'Total Networks', count: count, icon: 'apartment', path: '/guestnetwork' }) this.stats.splice(4, 1, { name: this.$t('label.total.network'), count: count, icon: 'apartment', path: '/guestnetwork' })
}) })
api('listPublicIpAddresses', { listall: true }).then(json => { api('listPublicIpAddresses', { listall: true }).then(json => {
var count = 0 var count = 0

View File

@ -48,7 +48,7 @@
<h1>{{ config[type].title }}</h1> <h1>{{ config[type].title }}</h1>
<div class="desc">{{ config[type].desc }}</div> <div class="desc">{{ config[type].desc }}</div>
<div class="action"> <div class="action">
<a-button type="primary" @click="handleToHome">Go Back</a-button> <a-button type="primary" @click="handleToHome">{{ $t('label.go.back') }}</a-button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -207,8 +207,8 @@
</a-form-item> </a-form-item>
</div> </div>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button @click="closeAction">{{ this.$t('Cancel') }}</a-button> <a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</a-spin> </a-spin>
@ -295,7 +295,7 @@ export default {
this.selectedDomain = this.domainsList[0].id || '' this.selectedDomain = this.domainsList[0].id || ''
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext description: error.response.data.errorresponse.errortext
}) })
}).finally(() => { }).finally(() => {
@ -358,8 +358,8 @@ export default {
api('createAccount', params).then(response => { api('createAccount', params).then(response => {
this.$emit('refresh-data') this.$emit('refresh-data')
this.$notification.success({ this.$notification.success({
message: 'Create Account', message: this.$t('label.create.account'),
description: 'Successfully created account ' + params.username description: `${this.$t('message.success.create.account')} ${params.username}`
}) })
const users = response.createaccountresponse.account.user const users = response.createaccountresponse.account.user
if (values.samlenable && users) { if (values.samlenable && users) {
@ -371,11 +371,11 @@ export default {
}).then(response => { }).then(response => {
this.$notification.success({ this.$notification.success({
message: this.$t('samlenable'), message: this.$t('samlenable'),
description: 'Successfully enabled SAML Authorization' description: this.$t('message.success.enable.saml.auth')
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message, description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message,
duration: 0 duration: 0
}) })
@ -387,7 +387,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message, description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message,
duration: 0 duration: 0
}) })

View File

@ -122,7 +122,7 @@
initialValue: selectedIdp, initialValue: selectedIdp,
rules: [{ required: samlEnable, message: `${this.$t('message.error.select')}` }] rules: [{ required: samlEnable, message: `${this.$t('message.error.select')}` }]
}]" }]"
placeholder="Choose SAML identity provider" :placeholder="$t('label.choose.saml.indentity')"
:loading="loading"> :loading="loading">
<a-select-option v-for="(idp, idx) in listIdps" :key="idx"> <a-select-option v-for="(idp, idx) in listIdps" :key="idx">
{{ idp.orgName }} {{ idp.orgName }}
@ -210,7 +210,7 @@ export default {
scopedSlots: { customRender: 'email' } scopedSlots: { customRender: 'email' }
}, },
{ {
title: this.$t('Conflict'), title: this.$t('label.user.conflict'),
dataIndex: 'conflictingusersource', dataIndex: 'conflictingusersource',
scopedSlots: { customRender: 'conflictingusersource' } scopedSlots: { customRender: 'conflictingusersource' }
} }
@ -387,8 +387,8 @@ export default {
} }
} else if (apiName === 'importLdapUsers' && response.ldapuserresponse && values.samlEnable) { } else if (apiName === 'importLdapUsers' && response.ldapuserresponse && values.samlEnable) {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: 'Unable to find users IDs to enable SAML Single Sign On, kindly enable it manually.' description: this.$t('message.error.enable.saml')
}) })
} else { } else {
if (apiName === 'ldapCreateAccount') { if (apiName === 'ldapCreateAccount') {

View File

@ -31,7 +31,7 @@
</span> </span>
<a-input-password <a-input-password
v-decorator="['currentpassword', { v-decorator="['currentpassword', {
rules: [{ required: true, message: 'Please enter current password' }] rules: [{ required: true, message: $t('message.error.current.password') }]
}]" }]"
:placeholder="apiParams.currentpassword.description"/> :placeholder="apiParams.currentpassword.description"/>
</a-form-item> </a-form-item>
@ -44,7 +44,7 @@
</span> </span>
<a-input-password <a-input-password
v-decorator="['password', { v-decorator="['password', {
rules: [{ required: true, message: 'Please enter new password' }] rules: [{ required: true, message: $t('message.error.new.password') }]
}]" }]"
:placeholder="apiParams.password.description"/> :placeholder="apiParams.password.description"/>
</a-form-item> </a-form-item>
@ -60,7 +60,7 @@
rules: [ rules: [
{ {
required: true, required: true,
message: 'Please confirm new password' message: $t('message.error.confirm.password')
}, },
{ {
validator: validateTwoPassword validator: validateTwoPassword
@ -143,7 +143,7 @@ export default {
api('updateUser', params).then(json => { api('updateUser', params).then(json => {
this.$notification.success({ this.$notification.success({
message: this.$t('label.action.change.password'), message: this.$t('label.action.change.password'),
description: 'Successfully changed password for user "' + this.resource.username + '"' description: `${this.$t('message.success.change.password')} ${this.resource.username}`
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)

View File

@ -38,7 +38,7 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<div class="card-footer"> <div class="card-footer">
<a-button @click="handleClose">{{ $t('Close') }}</a-button> <a-button @click="handleClose">{{ $t('label.close') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ $t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
@ -102,12 +102,12 @@ export default {
}).then(response => { }).then(response => {
this.$notification.success({ this.$notification.success({
message: values.samlEnable ? this.$t('label.saml.enable') : this.$t('label.saml.disable'), message: values.samlEnable ? this.$t('label.saml.enable') : this.$t('label.saml.disable'),
description: values.samlEnable ? `Successfully enabled SAML Authorization for ${this.resource.username}` description: values.samlEnable ? `${this.$t('message.success.enable.saml.auth')} ${this.$t('label.for')} ${this.resource.username}`
: `Successfully disabled SAML Authorization for ${this.resource.username}` : `${this.$t('message.success.disable.saml.auth')} ${this.$t('label.for')} ${this.resource.username}`
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message, description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message,
duration: 0 duration: 0
}) })

View File

@ -169,8 +169,8 @@ export default {
} }
}, },
errorMethod: () => this.parentFetchData(), errorMethod: () => this.parentFetchData(),
loadingMessage: `${this.$t(action.label)} in progress for ${this.resource.name}`, loadingMessage: `${this.$t(action.label)} ${this.$t('label.in.progress')} ${this.$t('label.for')} ${this.resource.name}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
action action
}) })
}, },
@ -255,7 +255,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
}).finally(f => { }).finally(f => {

View File

@ -176,7 +176,7 @@ export default {
this.treeSelected = domains[0] || {} this.treeSelected = domains[0] || {}
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: error.response.headers['x-description'], description: error.response.headers['x-description'],
duration: 0 duration: 0
}) })

View File

@ -19,8 +19,8 @@
<a-select <a-select
:value="defaultValue" :value="defaultValue"
@change="handleChange"> @change="handleChange">
<a-select-option value="allow">Allow</a-select-option> <a-select-option value="allow">{{ $t('label.allow') }}</a-select-option>
<a-select-option value="deny">Deny</a-select-option> <a-select-option value="deny">{{ $t('label.deny') }}</a-select-option>
</a-select> </a-select>
</template> </template>

View File

@ -48,13 +48,13 @@
@change="onPermissionChange(null, $event)" /> @change="onPermissionChange(null, $event)" />
</div> </div>
<div class="rules-table__col rules-table__col--description"> <div class="rules-table__col rules-table__col--description">
<a-input v-model="newRuleDescription" placeholder="Description"></a-input> <a-input v-model="newRuleDescription" :placeholder="$t('label.description')"></a-input>
</div> </div>
<div class="rules-table__col rules-table__col--actions"> <div class="rules-table__col rules-table__col--actions">
<a-tooltip <a-tooltip
placement="bottom"> placement="bottom">
<template slot="title"> <template slot="title">
Save new Rule {{ $t('label.save.new.rule') }}
</template> </template>
<a-button <a-button
:disabled="!('createRolePermission' in $store.getters.apis)" :disabled="!('createRolePermission' in $store.getters.apis)"
@ -96,7 +96,7 @@
{{ record.description }} {{ record.description }}
</template> </template>
<div v-else class="no-description"> <div v-else class="no-description">
No description entered. {{ $t('message.no.description') }}
</div> </div>
</div> </div>
<div class="rules-table__col rules-table__col--actions"> <div class="rules-table__col rules-table__col--actions">

View File

@ -18,10 +18,10 @@
<template> <template>
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template slot="title"> <template slot="title">
Delete rule {{ $t('label.delete.rule') }}
</template> </template>
<a-popconfirm <a-popconfirm
title="Delete Rule?" :title="`${$t('label.delete.rule')}?`"
@confirm="handleDelete" @confirm="handleDelete"
:disabled="disabled"> :disabled="disabled">
<a-button type="danger" shape="circle" :disabled="disabled"> <a-button type="danger" shape="circle" :disabled="disabled">

View File

@ -182,7 +182,8 @@ export default {
params.id = row.id params.id = row.id
// show loading // show loading
const loading = this.$message.loading('Delete certificate in progress for ' + row.name, 0) const message = `${this.$t('label.delete.certificate')} ${this.$t('label.in.progress.for')} ${row.name}`
const loading = this.$message.loading(message, 0)
api('deleteSslCert', params).then(json => { api('deleteSslCert', params).then(json => {
const jsonResponse = json.deletesslcertresponse const jsonResponse = json.deletesslcertresponse
@ -191,10 +192,10 @@ export default {
setTimeout(loading) setTimeout(loading)
if (jsonResponse.success) { if (jsonResponse.success) {
this.$message.success('Delete success', 3) this.$message.success(this.$t('message.success.delete'), 3)
this.fetchData() this.fetchData()
} else { } else {
this.$message.error('Delete fail', 3) this.$message.error(this.$t('message.delete.failed'), 3)
} }
}).catch(error => { }).catch(error => {
// hide loading // hide loading
@ -206,14 +207,13 @@ export default {
}, },
onShowConfirm (row) { onShowConfirm (row) {
const self = this const self = this
let title = this.$t('label.deleteconfirm') const title = `${this.$t('label.deleteconfirm')} ${this.$t('label.certificate')}`
title = title.replace('{name}', this.$t('label.certificate'))
this.$confirm({ this.$confirm({
title: title, title: title,
okText: 'OK', okText: this.$t('label.ok'),
okType: 'danger', okType: 'danger',
cancelText: 'Cancel', cancelText: this.$t('label.cancel'),
onOk () { onOk () {
self.onDelete(row) self.onDelete(row)
} }

View File

@ -31,7 +31,7 @@
</span> </span>
<a-input <a-input
v-decorator="['semanticversion', { v-decorator="['semanticversion', {
rules: [{ required: true, message: 'Please enter Kubernetes semantic version' }] rules: [{ required: true, message: $t('message.error.kuberversion') }]
}]" }]"
:placeholder="apiParams.semanticversion.description"/> :placeholder="apiParams.semanticversion.description"/>
</a-form-item> </a-form-item>
@ -44,7 +44,7 @@
</span> </span>
<a-input <a-input
v-decorator="['name', { v-decorator="['name', {
rules: [{ message: 'Please enter name' }] rules: [{ message: $t('message.error.name') }]
}]" }]"
:placeholder="$t('label.name')"/> :placeholder="$t('label.name')"/>
</a-form-item> </a-form-item>
@ -62,7 +62,7 @@
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && value.length > 1 && value.indexOf(0) !== -1) { if (value && value.length > 1 && value.indexOf(0) !== -1) {
callback('All Zones cannot be combined with any other zone') callback(this.$t('message.error.zone.combined'))
} }
callback() callback()
} }
@ -90,7 +90,7 @@
</span> </span>
<a-input <a-input
v-decorator="['url', { v-decorator="['url', {
rules: [{ required: true, message: 'Please enter binaries ISO URL' }] rules: [{ required: true, message: $t('message.error.binaries.iso.url') }]
}]" }]"
:placeholder="apiParams.url.description" /> :placeholder="apiParams.url.description" />
</a-form-item> </a-form-item>
@ -103,7 +103,7 @@
</span> </span>
<a-input <a-input
v-decorator="['checksum', { v-decorator="['checksum', {
rules: [{ required: false, message: 'Please enter input' }] rules: [{ required: false, message: $t('message.error.required.input') }]
}]" }]"
:placeholder="apiParams.checksum.description" /> :placeholder="apiParams.checksum.description" />
</a-form-item> </a-form-item>
@ -116,11 +116,11 @@
</span> </span>
<a-input <a-input
v-decorator="['mincpunumber', { v-decorator="['mincpunumber', {
rules: [{ required: true, message: 'Please enter value' }, rules: [{ required: true, message: $t('message.please.enter.value') },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.validate.number'))
} }
callback() callback()
} }
@ -138,11 +138,11 @@
</span> </span>
<a-input <a-input
v-decorator="['minmemory', { v-decorator="['minmemory', {
rules: [{ required: true, message: 'Please enter value' }, rules: [{ required: true, message: $t('message.please.enter.value') },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value && (isNaN(value) || value <= 0)) { if (value && (isNaN(value) || value <= 0)) {
callback('Please enter a valid number') callback(this.$t('message.validate.number'))
} }
callback() callback()
} }
@ -246,7 +246,7 @@ export default {
params.minmemory = values.minmemory params.minmemory = values.minmemory
} }
api('addKubernetesSupportedVersion', params).then(json => { api('addKubernetesSupportedVersion', params).then(json => {
this.$message.success('Successfully added Kubernetes version: ' + values.semanticversion) this.$message.success(`${this.$t('message.success.add.kuberversion')}: ${values.semanticversion}`)
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
}).finally(() => { }).finally(() => {

View File

@ -62,7 +62,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="itemCount" :total="itemCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="handleChangePage" @change="handleChangePage"
@showSizeChange="handleChangePageSize" @showSizeChange="handleChangePageSize"
@ -259,8 +259,8 @@ export default {
} }
}, },
errorMethod: () => this.fetchData(), errorMethod: () => this.fetchData(),
loadingMessage: `Deleting ISO ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.deleting.iso')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
@ -317,12 +317,12 @@ export default {
this.fetchData() this.fetchData()
}, },
errorMethod: () => this.fetchData(), errorMethod: () => this.fetchData(),
loadingMessage: `Copy ISO ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.action.copy.iso')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
}).finally(() => { }).finally(() => {

View File

@ -19,7 +19,7 @@
<div class="form-layout"> <div class="form-layout">
<span v-if="uploadPercentage > 0"> <span v-if="uploadPercentage > 0">
<a-icon type="loading" /> <a-icon type="loading" />
Do not close this form, file upload is in progress... {{ $t('message.upload.file.processing') }}
<a-progress :percent="uploadPercentage" /> <a-progress :percent="uploadPercentage" />
</span> </span>
<a-spin :spinning="loading" v-else> <a-spin :spinning="loading" v-else>
@ -47,7 +47,7 @@
<a-icon type="cloud-upload" /> <a-icon type="cloud-upload" />
</p> </p>
<p class="ant-upload-text" v-if="fileList.length === 0"> <p class="ant-upload-text" v-if="fileList.length === 0">
Click or drag file to this area to upload {{ $t('label.volume.volumefileupload.description') }}
</p> </p>
</a-upload-dragger> </a-upload-dragger>
</a-form-item> </a-form-item>
@ -265,8 +265,8 @@ export default {
const { fileList } = this const { fileList } = this
if (this.fileList.length > 1) { if (this.fileList.length > 1) {
this.$notification.error({ this.$notification.error({
message: 'ISO Upload Failed', message: this.$t('message.upload.iso.failed'),
description: 'Only one ISO can be uploaded at a time', description: this.$t('message.error.upload.iso.description'),
duration: 0 duration: 0
}) })
} }
@ -290,14 +290,14 @@ export default {
timeout: 86400000 timeout: 86400000
}).then((json) => { }).then((json) => {
this.$notification.success({ this.$notification.success({
message: 'Upload Successful', message: this.$t('message.success.upload'),
description: 'This ISO file has been uploaded. Please check its status at Templates menu' description: this.$t('message.success.upload.description')
}) })
this.closeAction() this.closeAction()
}).catch(e => { }).catch(e => {
this.$notification.error({ this.$notification.error({
message: 'Upload Failed', message: this.$t('message.upload.failed'),
description: `Failed to upload ISO - ${e}`, description: `${this.$t('message.upload.iso.failed.description')} - ${e}`,
duration: 0 duration: 0
}) })
this.closeAction() this.closeAction()
@ -338,8 +338,8 @@ export default {
api('registerIso', params).then(json => { api('registerIso', params).then(json => {
this.$emit('refresh-data') this.$emit('refresh-data')
this.$notification.success({ this.$notification.success({
message: this.$t('label.action.register.iso'), message: 'label.action.register.iso',
description: 'Sucessfully registered ISO ' + params.name description: `${this.$t('message.success.register.iso')} ${params.name}`
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
@ -358,8 +358,8 @@ export default {
const response = this.handleUpload() const response = this.handleUpload()
if (response === 'upload successful') { if (response === 'upload successful') {
this.$notification.success({ this.$notification.success({
message: 'Upload Successful', message: this.$t('message.success.upload'),
description: 'This ISO file has been uploaded. Please check its status in the Images > ISOs menu' description: this.$t('message.success.upload.iso.description')
}) })
} }
}).catch(error => { }).catch(error => {

View File

@ -19,7 +19,7 @@
<div class="form-layout"> <div class="form-layout">
<span v-if="uploadPercentage > 0"> <span v-if="uploadPercentage > 0">
<a-icon type="loading" /> <a-icon type="loading" />
Do not close this form, file upload is in progress... {{ $t('message.upload.file.processing') }}
<a-progress :percent="uploadPercentage" /> <a-progress :percent="uploadPercentage" />
</span> </span>
<a-spin :spinning="loading" v-else> <a-spin :spinning="loading" v-else>
@ -52,7 +52,7 @@
<a-icon type="cloud-upload" /> <a-icon type="cloud-upload" />
</p> </p>
<p class="ant-upload-text" v-if="fileList.length === 0"> <p class="ant-upload-text" v-if="fileList.length === 0">
Click or drag file to this area to upload {{ $t('label.volume.volumefileupload.description') }}
</p> </p>
</a-upload-dragger> </a-upload-dragger>
</a-form-item> </a-form-item>
@ -476,14 +476,14 @@ export default {
timeout: 86400000 timeout: 86400000
}).then((json) => { }).then((json) => {
this.$notification.success({ this.$notification.success({
message: 'Upload Successful', message: this.$t('message.success.upload'),
description: 'This template file has been uploaded. Please check its status at Templates menu' description: this.$t('message.success.upload.template.description')
}) })
this.closeAction() this.closeAction()
}).catch(e => { }).catch(e => {
this.$notification.error({ this.$notification.error({
message: 'Upload Failed', message: this.$t('message.upload.failed'),
description: `Failed to upload Template - ${e}`, description: `${this.$t('message.upload.template.failed.description')} - ${e}`,
duration: 0 duration: 0
}) })
this.closeAction() this.closeAction()
@ -854,8 +854,8 @@ export default {
api('registerTemplate', params).then(json => { api('registerTemplate', params).then(json => {
this.$emit('refresh-data') this.$emit('refresh-data')
this.$notification.success({ this.$notification.success({
message: 'Register Template', message: this.$t('label.register.template'),
description: 'Successfully registered template ' + params.name description: `${this.$t('message.success.register.template')} ${params.name}`
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
@ -867,8 +867,8 @@ export default {
this.loading = true this.loading = true
if (this.fileList.length > 1) { if (this.fileList.length > 1) {
this.$notification.error({ this.$notification.error({
message: 'Template Upload Failed', message: this.$t('message.error.upload.template'),
description: 'Only one template can be uploaded at a time', description: this.$t('message.error.upload.template.description'),
duration: 0 duration: 0
}) })
} }
@ -894,7 +894,7 @@ export default {
if (allZoneExists.length > 0 && zones.length > 1) { if (allZoneExists.length > 0 && zones.length > 1) {
this.zoneError = 'error' this.zoneError = 'error'
this.zoneErrorMessage = this.$t('label.error.zone.combined') this.zoneErrorMessage = this.$t('message.error.zone.combined')
} }
}, },
closeAction () { closeAction () {

View File

@ -54,7 +54,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="itemCount" :total="itemCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="handleChangePage" @change="handleChangePage"
@showSizeChange="handleChangePageSize" @showSizeChange="handleChangePageSize"
@ -270,8 +270,8 @@ export default {
} }
}, },
errorMethod: () => this.fetchData(), errorMethod: () => this.fetchData(),
loadingMessage: `Deleting template ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.deleting.template')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
@ -335,12 +335,12 @@ export default {
this.fetchData() this.fetchData()
}, },
errorMethod: () => this.fetchData(), errorMethod: () => this.fetchData(),
loadingMessage: `Copy template ${this.resource.name} in progress`, loadingMessage: `${this.$t('label.action.copy.template')} ${this.resource.name} ${this.$t('label.in.progress')}`,
catchMessage: 'Error encountered while fetching async job result' catchMessage: this.$t('error.fetching.async.job.result')
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
}).finally(() => { }).finally(() => {

View File

@ -129,7 +129,7 @@ export default {
params.state = this.states[values.state].id params.state = this.states[values.state].id
} }
api('updateKubernetesSupportedVersion', params).then(json => { api('updateKubernetesSupportedVersion', params).then(json => {
this.$message.success('Successfully updated Kubernetes supported version: ' + this.resource.name) this.$message.success(`${this.$t('message.success.update.kubeversion')}: ${this.resource.name}`)
}).catch(error => { }).catch(error => {
this.$notifyError(error) this.$notifyError(error)
}).finally(() => { }).finally(() => {

View File

@ -23,26 +23,26 @@
<div class="form__item"> <div class="form__item">
<p class="form__label">{{ $t('label.operation') }}</p> <p class="form__label">{{ $t('label.operation') }}</p>
<a-select v-model="selectedOperation" defaultValue="Add" @change="fetchData"> <a-select v-model="selectedOperation" :defaultValue="$t('label.add')" @change="fetchData">
<a-select-option :value="$t('label.add')">{{ $t('label.add') }}</a-select-option> <a-select-option :value="$t('label.add')">{{ $t('label.add') }}</a-select-option>
<a-select-option :value="$t('label.remove')">{{ $t('label.remove') }}</a-select-option> <a-select-option :value="$t('label.remove')">{{ $t('label.remove') }}</a-select-option>
<a-select-option :value="$t('label.reset')">{{ $t('label.reset') }}</a-select-option> <a-select-option :value="$t('label.reset')">{{ $t('label.reset') }}</a-select-option>
</a-select> </a-select>
</div> </div>
<template v-if="selectedOperation !== 'Reset'"> <template v-if="selectedOperation !== $t('label.reset')">
<div class="form__item"> <div class="form__item">
<p class="form__label"> <p class="form__label">
<span class="required">*</span> <span class="required">*</span>
{{ $t('label.sharewith') }} {{ $t('label.sharewith') }}
</p> </p>
<a-select v-model="selectedShareWith" defaultValue="Account" @change="fetchData"> <a-select v-model="selectedShareWith" :defaultValue="$t('label.account')" @change="fetchData">
<a-select-option :value="$t('label.account')">{{ $t('label.account') }}</a-select-option> <a-select-option :value="$t('label.account')">{{ $t('label.account') }}</a-select-option>
<a-select-option :value="$t('label.project')">{{ $t('label.project') }}</a-select-option> <a-select-option :value="$t('label.project')">{{ $t('label.project') }}</a-select-option>
</a-select> </a-select>
</div> </div>
<template v-if="selectedShareWith === 'Account'"> <template v-if="selectedShareWith === $t('label.account')">
<div class="form__item"> <div class="form__item">
<p class="form__label"> <p class="form__label">
{{ $t('label.account') }} {{ $t('label.account') }}
@ -55,11 +55,12 @@
@change="handleChange" @change="handleChange"
style="width: 100%"> style="width: 100%">
<a-select-option v-for="account in accountsList" :key="account.name"> <a-select-option v-for="account in accountsList" :key="account.name">
{{ account.name }}</a-select-option> {{ account.name }}
</a-select-option>
</a-select> </a-select>
</div> </div>
<div v-else> <div v-else>
<a-input v-model="selectedAccountsList" placeholder="Enter comma-separated list of commands"></a-input> <a-input v-model="selectedAccountsList" :placeholder="$t('label.comma.separated.list.description')"></a-input>
</div> </div>
</div> </div>
</template> </template>
@ -71,12 +72,13 @@
</p> </p>
<a-select <a-select
mode="multiple" mode="multiple"
placeholder="Select Projects" :placeholder="$t('label.select.projects')"
:value="selectedProjects" :value="selectedProjects"
@change="handleChange" @change="handleChange"
style="width: 100%"> style="width: 100%">
<a-select-option v-for="project in projectsList" :key="project.name"> <a-select-option v-for="project in projectsList" :key="project.name">
{{ project.name }}</a-select-option> {{ project.name }}
</a-select-option>
</a-select> </a-select>
</div> </div>
</template> </template>
@ -112,7 +114,7 @@ export default {
selectedAccounts: [], selectedAccounts: [],
selectedProjects: [], selectedProjects: [],
selectedAccountsList: '', selectedAccountsList: '',
selectedOperation: 'Add', selectedOperation: this.$t('label.add'),
selectedShareWith: this.$t('label.account'), selectedShareWith: this.$t('label.account'),
accountError: false, accountError: false,
projectError: false, projectError: false,
@ -125,7 +127,7 @@ export default {
accountsList () { accountsList () {
return this.accounts.length > 0 ? this.accounts return this.accounts.length > 0 ? this.accounts
.filter(a => .filter(a =>
this.selectedOperation === 'Add' this.selectedOperation === this.$t('label.add')
? !this.permittedAccounts.includes(a.name) ? !this.permittedAccounts.includes(a.name)
: this.permittedAccounts.includes(a.name) : this.permittedAccounts.includes(a.name)
) : this.accounts ) : this.accounts
@ -133,7 +135,7 @@ export default {
projectsList () { projectsList () {
return this.projects > 0 ? this.projects return this.projects > 0 ? this.projects
.filter(p => .filter(p =>
this.selectedOperation === 'Add' this.selectedOperation === this.$t('label.add')
? !this.permittedProjects.includes(p.id) ? !this.permittedProjects.includes(p.id)
: this.permittedProjects.includes(p.id) : this.permittedProjects.includes(p.id)
) : this.projects ) : this.projects
@ -150,7 +152,7 @@ export default {
} else { } else {
this.fetchTemplatePermissions() this.fetchTemplatePermissions()
} }
if (this.selectedShareWith === 'Account') { if (this.selectedShareWith === this.$t('label.account')) {
this.selectedAccounts = [] this.selectedAccounts = []
this.fetchAccounts() this.fetchAccounts()
} else { } else {
@ -212,8 +214,8 @@ export default {
}) })
}, },
handleChange (selectedItems) { handleChange (selectedItems) {
if (this.selectedOperation === 'Add' || this.selectedOperation === 'Remove') { if (this.selectedOperation === this.$t('label.add') || this.selectedOperation === this.$t('label.remove')) {
if (this.selectedShareWith === 'Account') { if (this.selectedShareWith === this.$t('label.account')) {
this.selectedAccounts = selectedItems this.selectedAccounts = selectedItems
} else { } else {
this.selectedProjects = selectedItems this.selectedProjects = selectedItems
@ -226,7 +228,7 @@ export default {
submitData () { submitData () {
let variableKey = '' let variableKey = ''
let variableValue = '' let variableValue = ''
if (this.selectedShareWith === 'Account') { if (this.selectedShareWith === this.$t('label.account')) {
variableKey = 'accounts' variableKey = 'accounts'
if (this.showAccountSelect) { if (this.showAccountSelect) {
variableValue = this.selectedAccounts.map(account => account).join(',') variableValue = this.selectedAccounts.map(account => account).join(',')
@ -250,7 +252,7 @@ export default {
}) })
.then(response => { .then(response => {
this.$notification.success({ this.$notification.success({
message: 'Successfully updated ' + resourceType + ' permissions' message: `${this.$t('label.success.updated')} ${resourceType} ${this.$t('label.permissions')}`
}) })
}) })
.catch(error => { .catch(error => {
@ -266,7 +268,6 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.form { .form {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -31,7 +31,7 @@
<img v-if="imageUrl" :src="imageUrl" alt="avatar" /> <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div> <div class="ant-upload-text">{{ $t('label.upload') }}</div>
</div> </div>
</a-upload> </a-upload>
</div> </div>

View File

@ -31,7 +31,7 @@
<img v-if="imageUrl" :src="imageUrl" alt="avatar" /> <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div> <div class="ant-upload-text">{{ $t('label.upload') }}</div>
</div> </div>
</a-upload> </a-upload>
</div> </div>

View File

@ -38,7 +38,7 @@
</div> </div>
<a-form-item :label="$t('label.zoneid')"> <a-form-item :label="$t('label.zoneid')">
<a-select <a-select
v-decorator="['zone', { initialValue: this.zoneSelected, rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['zone', { initialValue: this.zoneSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => changeZone(val)"> @change="val => changeZone(val)">
<a-select-option :value="zone.id" v-for="(zone) in zones" :key="zone.id"> <a-select-option :value="zone.id" v-for="(zone) in zones" :key="zone.id">
{{ zone.name }} {{ zone.name }}
@ -48,7 +48,7 @@
<div v-if="this.scope === 'cluster' || this.scope === 'host'"> <div v-if="this.scope === 'cluster' || this.scope === 'host'">
<a-form-item :label="$t('label.podid')"> <a-form-item :label="$t('label.podid')">
<a-select <a-select
v-decorator="['pod', { initialValue: this.podSelected, rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['pod', { initialValue: this.podSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => changePod(val)"> @change="val => changePod(val)">
<a-select-option :value="pod.id" v-for="(pod) in pods" :key="pod.id"> <a-select-option :value="pod.id" v-for="(pod) in pods" :key="pod.id">
{{ pod.name }} {{ pod.name }}
@ -57,7 +57,7 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.clusterid')"> <a-form-item :label="$t('label.clusterid')">
<a-select <a-select
v-decorator="['cluster', { initialValue: this.clusterSelected, rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['cluster', { initialValue: this.clusterSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => fetchHypervisor(val)"> @change="val => fetchHypervisor(val)">
<a-select-option :value="cluster.id" v-for="cluster in clusters" :key="cluster.id"> <a-select-option :value="cluster.id" v-for="cluster in clusters" :key="cluster.id">
{{ cluster.name }} {{ cluster.name }}
@ -68,7 +68,7 @@
<div v-if="this.scope === 'host'"> <div v-if="this.scope === 'host'">
<a-form-item :label="$t('label.hostid')"> <a-form-item :label="$t('label.hostid')">
<a-select <a-select
v-decorator="['host', { initialValue: this.hostSelected, rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['host', { initialValue: this.hostSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => this.hostSelected = val"> @change="val => this.hostSelected = val">
<a-select-option :value="host.id" v-for="host in hosts" :key="host.id"> <a-select-option :value="host.id" v-for="host in hosts" :key="host.id">
{{ host.name }} {{ host.name }}
@ -77,11 +77,11 @@
</a-form-item> </a-form-item>
</div> </div>
<a-form-item :label="$t('label.name')"> <a-form-item :label="$t('label.name')">
<a-input v-decorator="['name', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['name', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.protocol')"> <a-form-item :label="$t('label.protocol')">
<a-select <a-select
v-decorator="['protocol', { initialValue: this.protocols[0], rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['protocol', { initialValue: this.protocols[0], rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => this.protocolSelected = val"> @change="val => this.protocolSelected = val">
<a-select-option :value="protocol" v-for="(protocol,idx) in protocols" :key="idx"> <a-select-option :value="protocol" v-for="(protocol,idx) in protocols" :key="idx">
{{ protocol }} {{ protocol }}
@ -91,44 +91,44 @@
<div <div
v-if="protocolSelected === 'nfs' || protocolSelected === 'SMB' || protocolSelected === 'iscsi' || protocolSelected === 'vmfs'|| protocolSelected === 'Gluster'"> v-if="protocolSelected === 'nfs' || protocolSelected === 'SMB' || protocolSelected === 'iscsi' || protocolSelected === 'vmfs'|| protocolSelected === 'Gluster'">
<a-form-item :label="$t('label.server')"> <a-form-item :label="$t('label.server')">
<a-input v-decorator="['server', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]" /> <a-input v-decorator="['server', { rules: [{ required: true, message: `${$t('label.required')}` }] }]" />
</a-form-item> </a-form-item>
</div> </div>
<div v-if="protocolSelected === 'nfs' || protocolSelected === 'SMB' || protocolSelected === 'ocfs2' || protocolSelected === 'preSetup'|| protocolSelected === 'SharedMountPoint'"> <div v-if="protocolSelected === 'nfs' || protocolSelected === 'SMB' || protocolSelected === 'ocfs2' || protocolSelected === 'preSetup'|| protocolSelected === 'SharedMountPoint'">
<a-form-item :label="$t('label.path')"> <a-form-item :label="$t('label.path')">
<a-input v-decorator="['path', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]" /> <a-input v-decorator="['path', { rules: [{ required: true, message: `${$t('label.required')}` }] }]" />
</a-form-item> </a-form-item>
</div> </div>
<div v-if="protocolSelected === 'SMB'"> <div v-if="protocolSelected === 'SMB'">
<a-form-item :label="$t('label.smbusername')"> <a-form-item :label="$t('label.smbusername')">
<a-input v-decorator="['smbUsername', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['smbUsername', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.smbpassword')"> <a-form-item :label="$t('label.smbpassword')">
<a-input-password v-decorator="['smbPassword', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input-password v-decorator="['smbPassword', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.smbdomain')"> <a-form-item :label="$t('label.smbdomain')">
<a-input v-decorator="['smbDomain', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['smbDomain', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
</div> </div>
<div v-if="protocolSelected === 'iscsi'"> <div v-if="protocolSelected === 'iscsi'">
<a-form-item :label="$t('label.iqn')"> <a-form-item :label="$t('label.iqn')">
<a-input v-decorator="['iqn', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['iqn', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.lun')"> <a-form-item :label="$t('label.lun')">
<a-input v-decorator="['lun', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['lun', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
</div> </div>
<div v-if="protocolSelected === 'vmfs'"> <div v-if="protocolSelected === 'vmfs'">
<a-form-item :label="$t('label.vcenterdatacenter')"> <a-form-item :label="$t('label.vcenterdatacenter')">
<a-input v-decorator="['vCenterDataCenter', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['vCenterDataCenter', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.vcenterdatastore')"> <a-form-item :label="$t('label.vcenterdatastore')">
<a-input v-decorator="['vCenterDataStore', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"/> <a-input v-decorator="['vCenterDataStore', { rules: [{ required: true, message: `${$t('label.required')}` }] }]"/>
</a-form-item> </a-form-item>
</div> </div>
<a-form-item :label="$t('label.providername')"> <a-form-item :label="$t('label.providername')">
<a-select <a-select
v-decorator="['provider', { initialValue: providerSelected, rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" v-decorator="['provider', { initialValue: providerSelected, rules: [{ required: true, message: `${$t('label.required')}`}] }]"
@change="val => this.providerSelected = val"> @change="val => this.providerSelected = val">
<a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx"> <a-select-option :value="provider" v-for="(provider,idx) in providers" :key="idx">
{{ provider }} {{ provider }}
@ -166,7 +166,7 @@
</div> </div>
<div v-if="protocolSelected === 'CLVM'"> <div v-if="protocolSelected === 'CLVM'">
<a-form-item :label="$t('label.volumegroup')"> <a-form-item :label="$t('label.volumegroup')">
<a-input v-decorator="['volumegroup', { rules: [{ required: true, message: `${this.$t('label.required')}`}] }]" /> <a-input v-decorator="['volumegroup', { rules: [{ required: true, message: `${$t('label.required')}`}] }]" />
</a-form-item> </a-form-item>
</div> </div>
<div v-if="protocolSelected === 'Gluster'"> <div v-if="protocolSelected === 'Gluster'">

View File

@ -45,7 +45,7 @@
'zone', 'zone',
{ {
initialValue: this.zoneSelected, initialValue: this.zoneSelected,
rules: [{ required: true, message: `${this.$t('label.required')}`}] rules: [{ required: true, message: `${$t('label.required')}`}]
}]" }]"
@change="val => { zoneSelected = val }" @change="val => { zoneSelected = val }"
> >
@ -61,7 +61,7 @@
v-decorator="[ v-decorator="[
'server', 'server',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -70,7 +70,7 @@
v-decorator="[ v-decorator="[
'path', 'path',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -81,7 +81,7 @@
v-decorator="[ v-decorator="[
'smbUsername', 'smbUsername',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -90,7 +90,7 @@
v-decorator="[ v-decorator="[
'smbPassword', 'smbPassword',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -99,7 +99,7 @@
v-decorator="[ v-decorator="[
'smbDomain', 'smbDomain',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -110,7 +110,7 @@
v-decorator="[ v-decorator="[
'url', 'url',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -119,7 +119,7 @@
v-decorator="[ v-decorator="[
'account', 'account',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -128,7 +128,7 @@
v-decorator="[ v-decorator="[
'username', 'username',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -137,7 +137,7 @@
v-decorator="[ v-decorator="[
'key', 'key',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>

View File

@ -56,7 +56,7 @@
<div class="form__item"> <div class="form__item">
<div class="form__label"><span class="required">* </span>{{ $t('label.clusternamelabel') }}</div> <div class="form__label"><span class="required">* </span>{{ $t('label.clusternamelabel') }}</div>
<span class="required required-label" ref="requiredCluster">Required</span> <span class="required required-label" ref="requiredCluster">{{ $t('label.required') }}</span>
<a-input :placeholder="placeholder.clustername" v-model="clustername"></a-input> <a-input :placeholder="placeholder.clustername" v-model="clustername"></a-input>
</div> </div>
@ -242,7 +242,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.addclusterresponse.errortext, description: error.response.data.addclusterresponse.errortext,
duration: 0 duration: 0
}) })
@ -268,23 +268,23 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('message.cluster.dedicated'), title: this.$t('message.cluster.dedicated'),
jobid: response.dedicateclusterresponse.jobid, jobid: response.dedicateclusterresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')} : ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate cluster', errorMessage: this.$t('error.dedicate.cluster.failed'),
errorMethod: () => { errorMethod: () => {
this.loading = false this.loading = false
}, },
loadingMessage: this.$t('message.dedicate.zone'), loadingMessage: this.$t('message.dedicate.zone'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loading = false this.loading = false
} }
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext, description: error.response.data.errorresponse.errortext,
duration: 0 duration: 0
}) })

View File

@ -57,19 +57,19 @@
<div class="form__item required-field"> <div class="form__item required-field">
<div class="form__label"><span class="required">* </span>{{ selectedClusterHyperVisorType === 'VMware' ? $t('label.vcenterhost') : $t('label.hostnamelabel') }}</div> <div class="form__label"><span class="required">* </span>{{ selectedClusterHyperVisorType === 'VMware' ? $t('label.vcenterhost') : $t('label.hostnamelabel') }}</div>
<span class="required required-label">Required</span> <span class="required required-label">{{ $t('label.required') }}</span>
<a-input v-model="hostname"></a-input> <a-input v-model="hostname"></a-input>
</div> </div>
<div class="form__item required-field" v-if="selectedClusterHyperVisorType !== 'VMware'"> <div class="form__item required-field" v-if="selectedClusterHyperVisorType !== 'VMware'">
<div class="form__label"><span class="required">* </span>{{ $t('label.username') }}</div> <div class="form__label"><span class="required">* </span>{{ $t('label.username') }}</div>
<span class="required required-label">Required</span> <span class="required required-label">{{ $t('label.required') }}</span>
<a-input :placeholder="placeholder.username" v-model="username"></a-input> <a-input :placeholder="placeholder.username" v-model="username"></a-input>
</div> </div>
<div class="form__item required-field" v-if="selectedClusterHyperVisorType !== 'VMware'"> <div class="form__item required-field" v-if="selectedClusterHyperVisorType !== 'VMware'">
<div class="form__label"><span class="required">* </span>{{ $t('label.password') }}</div> <div class="form__label"><span class="required">* </span>{{ $t('label.password') }}</div>
<span class="required required-label">Required</span> <span class="required required-label">{{ $t('label.required') }}</span>
<a-input :placeholder="placeholder.password" type="password" v-model="password"></a-input> <a-input :placeholder="placeholder.password" type="password" v-model="password"></a-input>
</div> </div>
@ -80,7 +80,7 @@
</div> </div>
<div class="form__item required-field"> <div class="form__item required-field">
<div class="form__label"><span class="required">* </span>{{ $t('label.agent.password') }}</div> <div class="form__label"><span class="required">* </span>{{ $t('label.agent.password') }}</div>
<span class="required required-label">Required</span> <span class="required required-label">{{ $t('label.required') }}</span>
<a-input type="password" v-model="agentpassword"></a-input> <a-input type="password" v-model="agentpassword"></a-input>
</div> </div>
<div class="form__item"> <div class="form__item">
@ -296,7 +296,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.addhostresponse.errortext, description: error.response.data.addhostresponse.errortext,
duration: 0 duration: 0
}) })
@ -321,23 +321,23 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('message.host.dedicated'), title: this.$t('message.host.dedicated'),
jobid: response.dedicatehostresponse.jobid, jobid: response.dedicatehostresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')} : ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate host', errorMessage: this.$t('error.dedicate.host.failed'),
errorMethod: () => { errorMethod: () => {
this.loading = false this.loading = false
}, },
loadingMessage: this.$t('message.dedicate.host'), loadingMessage: this.$t('message.dedicating.host'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loading = false this.loading = false
} }
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext, description: error.response.data.errorresponse.errortext,
duration: 0 duration: 0
}) })

View File

@ -44,7 +44,7 @@
:footer="null" :footer="null"
@cancel="sslModalClose"> @cancel="sslModalClose">
<p> <p>
Please submit a new X.509 compliant SSL certificate chain to be updated to each console proxy and secondary storage virtual instance: {{ $t('message.update.ssl') }}
</p> </p>
<a-form @submit.prevent="handleSslFormSubmit" ref="sslForm" :form="form"> <a-form @submit.prevent="handleSslFormSubmit" ref="sslForm" :form="form">
@ -63,7 +63,7 @@
name="rootCert" name="rootCert"
v-decorator="[ v-decorator="[
'root', 'root',
{rules: [{ required: true, message: `${this.$t('label.required')}` }], validateTrigger:'change'} {rules: [{ required: true, message: `${$t('label.required')}` }], validateTrigger:'change'}
]" ]"
></a-textarea> ></a-textarea>
</a-form-item> </a-form-item>
@ -95,7 +95,7 @@
<a-form-item> <a-form-item>
<a-button @click="addIntermediateCert"> <a-button @click="addIntermediateCert">
<a-icon type="plus-circle" /> <a-icon type="plus-circle" />
Add intermediate certificate {{ $t('label.add.intermediate.certificate') }}
</a-button> </a-button>
</a-form-item> </a-form-item>
@ -113,7 +113,7 @@
name="serverCert" name="serverCert"
v-decorator="[ v-decorator="[
'server', 'server',
{rules: [{ required: true, message: `${this.$t('label.required')}` }], validateTrigger:'change'} {rules: [{ required: true, message: `${$t('label.required')}` }], validateTrigger:'change'}
]" ]"
></a-textarea> ></a-textarea>
</a-form-item> </a-form-item>
@ -132,7 +132,7 @@
name="pkcsKey" name="pkcsKey"
v-decorator="[ v-decorator="[
'pkcs', 'pkcs',
{rules: [{ required: true, message: `${this.$t('label.required')}` }], validateTrigger:'change'} {rules: [{ required: true, message: `${$t('label.required')}` }], validateTrigger:'change'}
]" ]"
></a-textarea> ></a-textarea>
</a-form-item> </a-form-item>
@ -150,7 +150,7 @@
name="dnsSuffix" name="dnsSuffix"
v-decorator="[ v-decorator="[
'dns', 'dns',
{rules: [{ required: true, message: `${this.$t('label.required')}` }], validateTrigger:'change'} {rules: [{ required: true, message: `${$t('label.required')}` }], validateTrigger:'change'}
]" ]"
></a-input> ></a-input>
</a-form-item> </a-form-item>
@ -265,24 +265,24 @@ export default {
api('queryAsyncJobResult', { jobid: jobId }).then(json => { api('queryAsyncJobResult', { jobid: jobId }).then(json => {
const result = json.queryasyncjobresultresponse const result = json.queryasyncjobresultresponse
if (result.jobstatus === 1 && this.maxCerts === count) { if (result.jobstatus === 1 && this.maxCerts === count) {
this.$message.success('Certificate Uploaded: ' + result.jobresult.customcertificate.message) this.$message.success(`${this.$t('label.certificate.upload')}: ${result.jobresult.customcertificate.message}`)
this.$notification.success({ this.$notification.success({
message: 'Certificate Uploaded', message: this.$t('label.certificate.upload'),
description: result.jobresult.customcertificate.message || 'Certificate successfully uploaded' description: result.jobresult.customcertificate.message || this.$t('message.success.certificate.upload')
}) })
} else if (result.jobstatus === 2) { } else if (result.jobstatus === 2) {
this.$notification.error({ this.$notification.error({
message: 'Certificate Upload Failed', message: this.$t('label.certificate.upload.failed'),
description: result.jobresult.errortext || 'Failed to update SSL Certificate. Failed to pass certificate validation check', description: result.jobresult.errortext || this.$t('label.certificate.upload.failed.description'),
duration: 0 duration: 0
}) })
} else if (result.jobstatus === 0) { } else if (result.jobstatus === 0) {
this.$message this.$message
.loading('Certificate upload in progress: ' + count, 2) .loading(`${this.$t('message.certificate.upload.processing')}: ${count}`, 2)
.then(() => this.pollActionCompletion(jobId, count)) .then(() => this.pollActionCompletion(jobId, count))
} }
}).catch(e => { }).catch(e => {
console.log('Error encountered while fetching async job result' + e) console.log(this.$t('error.fetching.async.job.result') + e)
}) })
}, },

View File

@ -23,7 +23,7 @@
<a-select <a-select
v-decorator="['zoneid', { v-decorator="['zoneid', {
initialValue: this.zoneId, initialValue: this.zoneId,
rules: [{ required: true, message: `${this.$t('label.required')}` }] } rules: [{ required: true, message: `${$t('label.required')}` }] }
]"> ]">
<a-select-option <a-select-option
v-for="zone in zonesList" v-for="zone in zonesList"
@ -40,7 +40,7 @@
v-decorator="[ v-decorator="[
'name', 'name',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -51,7 +51,7 @@
v-decorator="[ v-decorator="[
'gateway', 'gateway',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -62,7 +62,7 @@
v-decorator="[ v-decorator="[
'netmask', 'netmask',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -73,7 +73,7 @@
v-decorator="[ v-decorator="[
'startip', 'startip',
{ {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
/> />
</a-form-item> </a-form-item>
@ -194,7 +194,7 @@ export default {
this.$parent.$parent.close() this.$parent.$parent.close()
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.createpodresponse.errortext, description: error.response.data.createpodresponse.errortext,
duration: 0 duration: 0
}) })
@ -219,23 +219,23 @@ export default {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: this.$t('message.pod.dedicated'), title: this.$t('message.pod.dedicated'),
jobid: response.dedicatepodresponse.jobid, jobid: response.dedicatepodresponse.jobid,
description: `Domain ID: ${this.dedicatedDomainId}`, description: `${this.$t('label.domainid')} : ${this.dedicatedDomainId}`,
status: 'progress' status: 'progress'
}) })
}, },
errorMessage: 'Failed to dedicate pod', errorMessage: this.$t('error.dedicate.pod.failed'),
errorMethod: () => { errorMethod: () => {
this.loading = false this.loading = false
}, },
loadingMessage: this.$t('message.dedicate.pod'), loadingMessage: this.$t('message.dedicating.pod'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.loading = false this.loading = false
} }
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext, description: error.response.data.errorresponse.errortext,
duration: 0 duration: 0
}) })

View File

@ -35,8 +35,8 @@
<a-popconfirm <a-popconfirm
:title="`${$t('label.delete')}?`" :title="`${$t('label.delete')}?`"
@confirm="handleDelete(record)" @confirm="handleDelete(record)"
okText="Yes" :okText="$t('label.yes')"
cancelText="No" :cancelText="$t('label.no')"
placement="top" placement="top"
> >
<a-button :disabled="!('releaseDedicatedGuestVlanRange' in $store.getters.apis)" icon="delete" type="danger" shape="circle"></a-button> <a-button :disabled="!('releaseDedicatedGuestVlanRange' in $store.getters.apis)" icon="delete" type="danger" shape="circle"></a-button>
@ -49,7 +49,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="totalCount" :total="totalCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="handleChangePage" @change="handleChangePage"
@showSizeChange="handleChangePageSize" @showSizeChange="handleChangePageSize"
@ -68,7 +68,7 @@
<a-form-item :label="$t('label.vlanrange')"> <a-form-item :label="$t('label.vlanrange')">
<a-input <a-input
v-decorator="['range', { v-decorator="['range', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
></a-input> ></a-input>
</a-form-item> </a-form-item>
@ -84,7 +84,7 @@
<a-select <a-select
@change="handleDomainChange" @change="handleDomainChange"
v-decorator="['domain', { v-decorator="['domain', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
> >
<a-select-option v-for="domain in domains" :key="domain.id" :value="domain.id">{{ domain.name }}</a-select-option> <a-select-option v-for="domain in domains" :key="domain.id" :value="domain.id">{{ domain.name }}</a-select-option>
@ -94,7 +94,7 @@
<a-form-item :label="$t('label.account')" v-if="selectedScope === 'account'"> <a-form-item :label="$t('label.account')" v-if="selectedScope === 'account'">
<a-select <a-select
v-decorator="['account', { v-decorator="['account', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
> >
<a-select-option <a-select-option
@ -109,7 +109,7 @@
<a-form-item :label="$t('label.project')" v-if="selectedScope === 'project'"> <a-form-item :label="$t('label.project')" v-if="selectedScope === 'project'">
<a-select <a-select
v-decorator="['project', { v-decorator="['project', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
> >
<a-select-option <a-select-option
@ -202,7 +202,7 @@ export default {
this.totalCount = response.listdedicatedguestvlanrangesresponse.count || 0 this.totalCount = response.listdedicatedguestvlanrangesresponse.count || 0
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.errorresponse.errortext, description: error.response.data.errorresponse.errortext,
duration: 0 duration: 0
}) })
@ -286,7 +286,7 @@ export default {
id: item.id id: item.id
}).then(response => { }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Deleted dedicated VLAN/VNI range ${item.guestvlanrange} for ${item.account}`, title: `${this.$t('label.delete.dedicated.vlan.range')} ${item.guestvlanrange} ${this.$t('label.for')} ${item.account}`,
jobid: response.releasededicatedguestvlanrangeresponse.jobid, jobid: response.releasededicatedguestvlanrangeresponse.jobid,
status: 'progress' status: 'progress'
}) })
@ -296,13 +296,13 @@ export default {
this.fetchData() this.fetchData()
this.parentFinishLoading() this.parentFinishLoading()
}, },
errorMessage: 'Deleting failed', errorMessage: this.$t('label.deleting.failed'),
errorMethod: () => { errorMethod: () => {
this.fetchData() this.fetchData()
this.parentFinishLoading() this.parentFinishLoading()
}, },
loadingMessage: `Deleting ${item.id}`, loadingMessage: `${this.$t('label.deleting')} ${item.id}`,
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.fetchData() this.fetchData()
this.parentFinishLoading() this.parentFinishLoading()
@ -310,7 +310,7 @@ export default {
}) })
}).catch(error => { }).catch(error => {
console.log(error) console.log(error)
this.$message.error('Failed to delete.') this.$message.error(this.$t('message.fail.to.delete'))
this.fetchData() this.fetchData()
this.parentFinishLoading() this.parentFinishLoading()
}) })

View File

@ -58,7 +58,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="items.length" :total="items.length"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="changePage" @change="changePage"
@showSizeChange="changePageSize" @showSizeChange="changePageSize"
@ -78,7 +78,7 @@
<a-form-item :label="$t('label.podid')" class="form__item"> <a-form-item :label="$t('label.podid')" class="form__item">
<a-select <a-select
v-decorator="['pod', { v-decorator="['pod', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
> >
<a-select-option v-for="item in items" :key="item.id" :value="item.id">{{ item.name }}</a-select-option> <a-select-option v-for="item in items" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
@ -86,12 +86,12 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.gateway')" class="form__item"> <a-form-item :label="$t('label.gateway')" class="form__item">
<a-input <a-input
v-decorator="['gateway', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['gateway', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.netmask')" class="form__item"> <a-form-item :label="$t('label.netmask')" class="form__item">
<a-input <a-input
v-decorator="['netmask', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['netmask', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.vlan')" class="form__item"> <a-form-item :label="$t('label.vlan')" class="form__item">
@ -101,12 +101,12 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.startip')" class="form__item"> <a-form-item :label="$t('label.startip')" class="form__item">
<a-input <a-input
v-decorator="['startip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['startip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.endip')" class="form__item"> <a-form-item :label="$t('label.endip')" class="form__item">
<a-input <a-input
v-decorator="['endip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['endip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.system.vms')" class="form__item"> <a-form-item :label="$t('label.system.vms')" class="form__item">
@ -249,7 +249,7 @@ export default {
vlan: record.vlanid vlan: record.vlanid
}).then(response => { }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Successfully removed IP Range`, title: this.$t('message.success.remove.iprange'),
jobid: response.deletemanagementnetworkiprangeresponse.jobid, jobid: response.deletemanagementnetworkiprangeresponse.jobid,
status: 'progress' status: 'progress'
}) })
@ -259,13 +259,13 @@ export default {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
errorMessage: 'Removing failed', errorMessage: this.$t('message.remove.failed'),
errorMethod: () => { errorMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
loadingMessage: `Removing IP Range...`, loadingMessage: this.$t('message.remove.iprange.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
@ -293,7 +293,7 @@ export default {
vlan: values.vlan || null vlan: values.vlan || null
}).then(response => { }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Successfully added IP Range`, title: this.$t('message.success.add.iprange'),
jobid: response.createmanagementnetworkiprangeresponse.jobid, jobid: response.createmanagementnetworkiprangeresponse.jobid,
status: 'progress' status: 'progress'
}) })
@ -303,13 +303,13 @@ export default {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
errorMessage: 'Adding failed', errorMessage: this.$t('message.add.failed'),
errorMethod: () => { errorMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
loadingMessage: `Adding IP Range...`, loadingMessage: this.$t('message.add.iprange.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()

View File

@ -77,7 +77,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="items.length" :total="items.length"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="changePage" @change="changePage"
@showSizeChange="changePageSize" @showSizeChange="changePageSize"
@ -132,12 +132,12 @@
> >
<a-form-item :label="$t('label.gateway')" class="form__item"> <a-form-item :label="$t('label.gateway')" class="form__item">
<a-input <a-input
v-decorator="['gateway', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['gateway', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.netmask')" class="form__item"> <a-form-item :label="$t('label.netmask')" class="form__item">
<a-input <a-input
v-decorator="['netmask', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['netmask', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.vlan')" class="form__item"> <a-form-item :label="$t('label.vlan')" class="form__item">
@ -147,12 +147,12 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.startip')" class="form__item"> <a-form-item :label="$t('label.startip')" class="form__item">
<a-input <a-input
v-decorator="['startip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['startip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.endip')" class="form__item"> <a-form-item :label="$t('label.endip')" class="form__item">
<a-input <a-input
v-decorator="['endip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['endip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<div class="form__item"> <div class="form__item">
@ -160,8 +160,7 @@
<a-switch @change="handleShowAccountFields"></a-switch> <a-switch @change="handleShowAccountFields"></a-switch>
</div> </div>
<div v-if="showAccountFields" style="margin-top: 20px;"> <div v-if="showAccountFields" style="margin-top: 20px;">
<p>(optional) Please specify an account to be associated with this IP range.</p> <div v-html="$t('label.set.reservation.desc')"></div>
<p>System VMs: Enable dedication of public IP range for SSVM and CPVM, account field disabled. Reservation strictness defined on 'system.vm.public.ip.reservation.mode.strictness'.</p>
<a-form-item :label="$t('label.system.vms')" class="form__item"> <a-form-item :label="$t('label.system.vms')" class="form__item">
<a-switch v-decorator="['forsystemvms']"></a-switch> <a-switch v-decorator="['forsystemvms']"></a-switch>
</a-form-item> </a-form-item>
@ -384,11 +383,11 @@ export default {
forvirtualnetwork: true forvirtualnetwork: true
}).then(() => { }).then(() => {
this.$notification.success({ this.$notification.success({
message: 'Successfully added IP Range' message: this.$t('message.success.add.iprange')
}) })
}).catch(error => { }).catch(error => {
this.$notification.error({ this.$notification.error({
message: `Error ${error.response.status}`, message: `${this.$t('label.error')} ${error.response.status}`,
description: error.response.data.createvlaniprangeresponse description: error.response.data.createvlaniprangeresponse
? error.response.data.createvlaniprangeresponse.errortext : error.response.data.errorresponse.errortext, ? error.response.data.createvlaniprangeresponse.errortext : error.response.data.errorresponse.errortext,
duration: 0 duration: 0

View File

@ -56,7 +56,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="items.length" :total="items.length"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="changePage" @change="changePage"
@showSizeChange="changePageSize" @showSizeChange="changePageSize"
@ -76,7 +76,7 @@
<a-form-item :label="$t('label.podid')" class="form__item"> <a-form-item :label="$t('label.podid')" class="form__item">
<a-select <a-select
v-decorator="['pod', { v-decorator="['pod', {
rules: [{ required: true, message: `${this.$t('label.required')}` }] rules: [{ required: true, message: `${$t('label.required')}` }]
}]" }]"
> >
<a-select-option v-for="pod in pods" :key="pod.id" :value="pod.id">{{ pod.name }}</a-select-option> <a-select-option v-for="pod in pods" :key="pod.id" :value="pod.id">{{ pod.name }}</a-select-option>
@ -84,12 +84,12 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.gateway')" class="form__item"> <a-form-item :label="$t('label.gateway')" class="form__item">
<a-input <a-input
v-decorator="['gateway', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['gateway', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.netmask')" class="form__item"> <a-form-item :label="$t('label.netmask')" class="form__item">
<a-input <a-input
v-decorator="['netmask', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['netmask', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.vlan')" class="form__item"> <a-form-item :label="$t('label.vlan')" class="form__item">
@ -99,12 +99,12 @@
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.startip')" class="form__item"> <a-form-item :label="$t('label.startip')" class="form__item">
<a-input <a-input
v-decorator="['startip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['startip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item :label="$t('label.endip')" class="form__item"> <a-form-item :label="$t('label.endip')" class="form__item">
<a-input <a-input
v-decorator="['endip', { rules: [{ required: true, message: `${this.$t('label.required')}` }] }]"> v-decorator="['endip', { rules: [{ required: true, message: `${$t('label.required')}` }] }]">
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-form> </a-form>
@ -231,7 +231,7 @@ export default {
this.componentLoading = true this.componentLoading = true
api('deleteStorageNetworkIpRange', { id }).then(response => { api('deleteStorageNetworkIpRange', { id }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Successfully removed IP Range`, title: this.$t('message.success.remove.iprange'),
jobid: response.deletestoragenetworkiprangeresponse.jobid, jobid: response.deletestoragenetworkiprangeresponse.jobid,
status: 'progress' status: 'progress'
}) })
@ -241,13 +241,13 @@ export default {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
errorMessage: 'Removing failed', errorMessage: this.$t('message.remove.failed'),
errorMethod: () => { errorMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
loadingMessage: `Removing IP Range...`, loadingMessage: this.$t('message.remove.iprange.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
@ -275,7 +275,7 @@ export default {
vlan: values.vlan || null vlan: values.vlan || null
}).then(response => { }).then(response => {
this.$store.dispatch('AddAsyncJob', { this.$store.dispatch('AddAsyncJob', {
title: `Successfully added IP Range`, title: this.$t('message.success.add.iprange'),
jobid: response.createstoragenetworkiprangeresponse.jobid, jobid: response.createstoragenetworkiprangeresponse.jobid,
status: 'progress' status: 'progress'
}) })
@ -285,13 +285,13 @@ export default {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
errorMessage: 'Adding failed', errorMessage: this.$t('message.add.failed'),
errorMethod: () => { errorMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()
}, },
loadingMessage: `Adding IP Range...`, loadingMessage: this.$t('message.add.iprange.processing'),
catchMessage: 'Error encountered while fetching async job result', catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => { catchMethod: () => {
this.componentLoading = false this.componentLoading = false
this.fetchData() this.fetchData()

View File

@ -27,7 +27,7 @@
:key="item.title"> :key="item.title">
<span slot="tab"> <span slot="tab">
{{ $t(item.title) }} {{ $t(item.title) }}
<status :text="item.title in nsps ? nsps[item.title].state : 'Disabled'" style="margin-bottom: 6px; margin-left: 6px" /> <status :text="item.title in nsps ? nsps[item.title].state : $t('label.disabled')" style="margin-bottom: 6px; margin-left: 6px" />
</span> </span>
<provider-item <provider-item
v-if="tabKey===item.title" v-if="tabKey===item.title"
@ -1198,7 +1198,7 @@ export default {
} catch (error) { } catch (error) {
this.actionLoading = false this.actionLoading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: error description: error
}) })
} }
@ -1334,7 +1334,7 @@ export default {
} catch (message) { } catch (message) {
this.actionLoading = false this.actionLoading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: message description: message
}) })
} }

View File

@ -24,7 +24,7 @@
:key="idx" :key="idx"
style="margin-bottom: 10px;"> style="margin-bottom: 10px;">
<div><strong>{{ $t(type) }}</strong></div> <div><strong>{{ $t(type) }}</strong></div>
<div>{{ item[type] || 'Use default gateway' }}</div> <div>{{ item[type] || $t('label.network.label.display.for.blank.value') }}</div>
</div> </div>
<div v-if="item.traffictype === 'Public'"> <div v-if="item.traffictype === 'Public'">
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">

View File

@ -105,8 +105,8 @@
</a-col> </a-col>
</a-row> </a-row>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button :loading="loading" @click="onCloseAction">{{ this.$t('Cancel') }}</a-button> <a-button :loading="loading" @click="onCloseAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</div> </div>
@ -255,7 +255,7 @@ export default {
} catch (error) { } catch (error) {
this.loading = false this.loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -129,8 +129,8 @@
</a-col> </a-col>
</a-row> </a-row>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button :loading="loading" @click="onCloseAction">{{ this.$t('Cancel') }}</a-button> <a-button :loading="loading" @click="onCloseAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</div> </div>
@ -290,7 +290,7 @@ export default {
} catch (error) { } catch (error) {
this.loading = false this.loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -85,8 +85,8 @@
</a-col> </a-col>
</a-row> </a-row>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button :loading="loading" @click="onCloseAction">{{ this.$t('Cancel') }}</a-button> <a-button :loading="loading" @click="onCloseAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</div> </div>
@ -167,7 +167,7 @@ export default {
} catch (error) { } catch (error) {
this.loading = false this.loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -152,8 +152,8 @@
</a-col> </a-col>
</a-row> </a-row>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button :loading="loading" @click="onCloseAction">{{ this.$t('Cancel') }}</a-button> <a-button :loading="loading" @click="onCloseAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</div> </div>
@ -379,7 +379,7 @@ export default {
} catch (error) { } catch (error) {
this.loading = false this.loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -130,8 +130,8 @@
</a-col> </a-col>
</a-row> </a-row>
<div :span="24" class="action-button"> <div :span="24" class="action-button">
<a-button :loading="loading" @click="onCloseAction">{{ this.$t('Cancel') }}</a-button> <a-button :loading="loading" @click="onCloseAction">{{ this.$t('label.cancel') }}</a-button>
<a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('OK') }}</a-button> <a-button :loading="loading" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
</div> </div>
</a-form> </a-form>
</div> </div>
@ -324,7 +324,7 @@ export default {
} catch (error) { } catch (error) {
this.loading = false this.loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -196,7 +196,7 @@ export default {
} catch (error) { } catch (error) {
this.listData[args.title].loading = false this.listData[args.title].loading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -101,7 +101,7 @@
:current="page" :current="page"
:pageSize="pageSize" :pageSize="pageSize"
:total="itemCount" :total="itemCount"
:showTotal="total => `Total ${total} ${$t('label.items')}`" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
:pageSizeOptions="['10', '20', '40', '80', '100']" :pageSizeOptions="['10', '20', '40', '80', '100']"
@change="changePage" @change="changePage"
@showSizeChange="changePageSize" @showSizeChange="changePageSize"
@ -301,7 +301,7 @@ export default {
} catch (error) { } catch (error) {
this.actionLoading = false this.actionLoading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }
@ -337,7 +337,7 @@ export default {
} catch (error) { } catch (error) {
this.actionLoading = false this.actionLoading = false
this.$notification.error({ this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message
}) })
} }

View File

@ -94,7 +94,7 @@ export default {
}, },
description: { description: {
type: String, type: String,
default: 'Creating IP Ranges' default: 'label.creating.iprange'
}, },
isFixError: { isFixError: {
type: Boolean, type: Boolean,
@ -142,7 +142,7 @@ export default {
} }
if (!this.checkFromTo(values.vlanRangeStart, values.vlanRangeEnd)) { if (!this.checkFromTo(values.vlanRangeStart, values.vlanRangeEnd)) {
this.validStatus = 'error' this.validStatus = 'error'
this.validMessage = 'Please enter a valid VLAN/VNI range' this.validMessage = this.$t('message.error.vlan.range')
return return
} }
if (this.isFixError) { if (this.isFixError) {
@ -169,7 +169,7 @@ export default {
} }
if (!this.checkFromTo(fromVal, toVal)) { if (!this.checkFromTo(fromVal, toVal)) {
this.validStatus = 'error' this.validStatus = 'error'
this.validMessage = 'Please enter a valid VLAN/VNI range' this.validMessage = this.$t('message.error.vlan.range')
} }
callback() callback()
}, },

View File

@ -39,7 +39,7 @@
<a-form-item :style="{ display: 'inline-block', width: '14%' }"> <a-form-item :style="{ display: 'inline-block', width: '14%' }">
<a-input <a-input
v-decorator="[ 'gateway', { v-decorator="[ 'gateway', {
rules: [{ required: true, message: 'Please enter Gateway' }] rules: [{ required: true, message: $t('message.error.gateway') }]
}]" }]"
:placeholder="$t('label.gateway')" :placeholder="$t('label.gateway')"
/> />
@ -47,7 +47,7 @@
<a-form-item :style="{ display: 'inline-block', width: '14%' }"> <a-form-item :style="{ display: 'inline-block', width: '14%' }">
<a-input <a-input
v-decorator="[ 'netmask', { v-decorator="[ 'netmask', {
rules: [{ required: true, message: 'Please enter Netmask' }] rules: [{ required: true, message: $t('message.error.netmask') }]
}]" }]"
:placeholder="$t('label.netmask')" :placeholder="$t('label.netmask')"
/> />
@ -64,12 +64,12 @@
rules: [ rules: [
{ {
required: true, required: true,
message: 'Please enter Start IP' message: $t('message.error.startip')
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IPv4 address.' message: $t('message.error.ipv4.address')
} }
] ]
}]" }]"
@ -82,12 +82,12 @@
rules: [ rules: [
{ {
required: true, required: true,
message: 'Please enter End IP' message: $t('message.error.endip')
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IPv4 address.' message: $t('message.error.ipv4.address')
}] }]
}]" }]"
:placeholder="$t('label.end.ip')" :placeholder="$t('label.end.ip')"
@ -130,7 +130,7 @@ export default {
}, },
description: { description: {
type: String, type: String,
default: 'Creating IP Ranges' default: 'label.creating.iprange'
}, },
prefillContent: { prefillContent: {
type: Object, type: Object,

View File

@ -39,7 +39,7 @@
rules: [ rules: [
{ {
required: field.required, required: field.required,
message: field.placeHolder, message: $t(field.placeHolder),
initialValue: getPrefilled(field.key) initialValue: getPrefilled(field.key)
} }
] ]
@ -66,7 +66,7 @@
rules: [ rules: [
{ {
required: field.required, required: field.required,
message: field.placeHolder, message: $t(field.placeHolder),
initialValue: getPrefilled(field.key) initialValue: getPrefilled(field.key)
} }
] ]
@ -78,14 +78,14 @@
rules: [ rules: [
{ {
required: field.required, required: field.required,
message: field.placeHolder, message: $t(field.placeHolder),
initialValue: getPrefilled(field.key) initialValue: getPrefilled(field.key)
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: field.ipV4, ipV4: field.ipV4,
ipV6: field.ipV6, ipV6: field.ipV6,
message: field.message message: $t(field.message)
} }
] ]
}]" }]"
@ -123,7 +123,7 @@ export default {
}, },
description: { description: {
type: String, type: String,
default: 'Creating IP Ranges' default: 'label.creating.iprange'
}, },
isFixError: { isFixError: {
type: Boolean, type: Boolean,

View File

@ -35,14 +35,14 @@
</div> </div>
<div class="list__col"> <div class="list__col">
<div class="list__label">{{ $t('label.agentstate') }}</div> <div class="list__label">{{ $t('label.agentstate') }}</div>
<div><status :text="vm.agentstate || 'Unknown'" displayText></status></div> <div><status :text="vm.agentstate || $t('label.unknown')" displayText></status></div>
</div> </div>
<div class="list__col"> <div class="list__col">
<div class="list__label"> <div class="list__label">
{{ $t('label.type') }} {{ $t('label.type') }}
</div> </div>
<div> <div>
{{ vm.systemvmtype == 'consoleproxy' ? 'Console Proxy VM' : 'Secondary Storage VM' }} {{ vm.systemvmtype == 'consoleproxy' ? $t('label.console.proxy.vm') : $t('label.secondary.storage.vm') }}
</div> </div>
</div> </div>
<div class="list__col"> <div class="list__col">

View File

@ -104,32 +104,32 @@ export default {
{ {
title: 'label.zone.type', title: 'label.zone.type',
step: [], step: [],
description: 'Select type of zone basic/advanced.', description: this.$t('message.select.zone.description'),
hint: 'This is the type of zone deployement that you want to use. Basic zone: provides a single network where each VM instance is assigned an IP directly from the network. Guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). Advanced zone: For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks and providing custom network offerings such as firewall, VPN, or load balancer support.' hint: this.$t('message.select.zone.hint')
}, },
{ {
title: 'label.zone.details', title: 'label.zone.details',
step: ['stepAddZone', 'dedicateZone'], step: ['stepAddZone', 'dedicateZone'],
description: 'Populate zone details', description: this.$t('message.zone.detail.description'),
hint: 'A zone is the largest organizational unit in CloudStack, and it typically corresponds to a single datacenter. Zones provide physical isolation and redundancy. A zone consists of one or more pods (each of which contains hosts and primary storage servers) and a secondary storage server which is shared by all pods in the zone.' hint: this.$t('message.zone.detail.hint')
}, },
{ {
title: 'label.network', title: 'label.network',
step: ['physicalNetwork', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic'], step: ['physicalNetwork', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic'],
description: 'Setup network and traffic', description: this.$t('message.network.description'),
hint: 'Configure network components and public/guest/management traffic including IP addresses.' hint: this.$t('message.network.hint')
}, },
{ {
title: 'label.add.resources', title: 'label.add.resources',
step: ['clusterResource', 'hostResource', 'primaryResource', 'secondaryResource'], step: ['clusterResource', 'hostResource', 'primaryResource', 'secondaryResource'],
description: 'Add infrastructure resources', description: this.$t('message.add.resource.description'),
hint: 'Add infrastructure resources - pods, clusters, primary/secondary storages.' hint: this.$t('message.add.resource.hint')
}, },
{ {
title: 'label.launch', title: 'label.launch',
step: ['launchZone'], step: ['launchZone'],
description: 'Zone is ready to launch; please proceed to the next step.', description: this.$t('message.launch.zone.description'),
hint: 'Configure network components and traffic including IP addresses.' hint: this.$t('message.launch.zone.hint')
} }
], ],
zoneConfig: {} zoneConfig: {}
@ -155,7 +155,7 @@ export default {
this.$emit('close-action') this.$emit('close-action')
}, },
onRefreshData () { onRefreshData () {
this.$message.success('Processing complete!') this.$message.success(this.$t('message.processing.complete'))
this.$emit('refresh-data') this.$emit('refresh-data')
this.onCloseAction() this.onCloseAction()
}, },

View File

@ -160,13 +160,13 @@ export default {
{ {
title: 'label.cluster.name', title: 'label.cluster.name',
key: 'clusterName', key: 'clusterName',
placeHolder: 'Please enter cluster name', placeHolder: 'message.error.cluster.name',
required: true required: true
}, },
{ {
title: 'label.vcenter.host', title: 'label.vcenter.host',
key: 'vCenterHost', key: 'vCenterHost',
placeHolder: 'Please enter vCenter Host', placeHolder: 'message.error.vcenter.host',
required: true, required: true,
display: { display: {
hypervisor: ['VMware', 'Ovm3'] hypervisor: ['VMware', 'Ovm3']
@ -175,7 +175,7 @@ export default {
{ {
title: 'label.vcenter.username', title: 'label.vcenter.username',
key: 'vCenterUsername', key: 'vCenterUsername',
placeHolder: 'Please enter vCenter Username', placeHolder: 'message.error.vcenter.username',
required: true, required: true,
display: { display: {
hypervisor: ['VMware', 'Ovm3'] hypervisor: ['VMware', 'Ovm3']
@ -184,7 +184,7 @@ export default {
{ {
title: 'label.vcenter.password', title: 'label.vcenter.password',
key: 'vCenterPassword', key: 'vCenterPassword',
placeHolder: 'Please enter vCenter Password', placeHolder: 'message.error.vcenter.password',
required: true, required: true,
password: true, password: true,
display: { display: {
@ -194,7 +194,7 @@ export default {
{ {
title: 'label.vcenter.datacenter', title: 'label.vcenter.datacenter',
key: 'vCenterDatacenter', key: 'vCenterDatacenter',
placeHolder: 'Please enter vCenter Datacenter', placeHolder: 'message.error.vcenter.datacenter',
required: true, required: true,
display: { display: {
hypervisor: ['VMware', 'Ovm3'] hypervisor: ['VMware', 'Ovm3']
@ -221,7 +221,7 @@ export default {
{ {
title: 'label.cisco.nexus1000v.ip.address', title: 'label.cisco.nexus1000v.ip.address',
key: 'vsmipaddress', key: 'vsmipaddress',
placeHolder: 'Please enter Nexus 1000v IP Address', placeHolder: 'message.error.nexus1000v.ipaddess',
required: false, required: false,
display: { display: {
vSwitchEnabled: true vSwitchEnabled: true
@ -230,7 +230,7 @@ export default {
{ {
title: 'label.cisco.nexus1000v.username', title: 'label.cisco.nexus1000v.username',
key: 'vsmusername', key: 'vsmusername',
placeHolder: 'Please enter Nexus 1000v Username', placeHolder: 'message.error.nexus1000v.username',
required: false, required: false,
display: { display: {
vSwitchEnabled: true vSwitchEnabled: true
@ -239,7 +239,7 @@ export default {
{ {
title: 'label.cisco.nexus1000v.password', title: 'label.cisco.nexus1000v.password',
key: 'vsmpassword', key: 'vsmpassword',
placeHolder: 'Please enter Nexus 1000v Password', placeHolder: 'message.error.nexus1000v.password',
required: false, required: false,
display: { display: {
vSwitchEnabled: true vSwitchEnabled: true
@ -252,7 +252,7 @@ export default {
{ {
title: 'label.host.name', title: 'label.host.name',
key: 'hostName', key: 'hostName',
placeHolder: 'Please enter host name', placeHolder: 'message.error.host.name',
required: true, required: true,
display: { display: {
hypervisor: ['VMware', 'BareMetal', 'Ovm', 'Hyperv', 'KVM', 'XenServer', 'LXC', 'Simulator'] hypervisor: ['VMware', 'BareMetal', 'Ovm', 'Hyperv', 'KVM', 'XenServer', 'LXC', 'Simulator']
@ -261,7 +261,7 @@ export default {
{ {
title: 'label.username', title: 'label.username',
key: 'hostUserName', key: 'hostUserName',
placeHolder: 'Please enter host username', placeHolder: 'message.error.host.username',
required: true, required: true,
display: { display: {
hypervisor: ['VMware', 'BareMetal', 'Ovm', 'Hyperv', 'KVM', 'XenServer', 'LXC', 'Simulator'] hypervisor: ['VMware', 'BareMetal', 'Ovm', 'Hyperv', 'KVM', 'XenServer', 'LXC', 'Simulator']
@ -270,7 +270,7 @@ export default {
{ {
title: 'label.password', title: 'label.password',
key: 'hostPassword', key: 'hostPassword',
placeHolder: 'Please enter host password', placeHolder: 'message.error.host.password',
required: true, required: true,
password: true, password: true,
display: { display: {
@ -280,7 +280,7 @@ export default {
{ {
title: 'label.agent.username', title: 'label.agent.username',
key: 'agentUserName', key: 'agentUserName',
placeHolder: 'Please enter Agent username', placeHolder: 'message.error.agent.username',
required: false, required: false,
defaultValue: 'Oracle', defaultValue: 'Oracle',
display: { display: {
@ -290,7 +290,7 @@ export default {
{ {
title: 'label.agent.password', title: 'label.agent.password',
key: 'agentPassword', key: 'agentPassword',
placeHolder: 'Please enter Agent password', placeHolder: 'message.error.agent.password',
required: true, required: true,
password: true, password: true,
display: { display: {
@ -300,7 +300,7 @@ export default {
{ {
title: 'label.tags', title: 'label.tags',
key: 'hostTags', key: 'hostTags',
placeHolder: 'Please enter host tags', placeHolder: 'message.error.host.tags',
required: false required: false
} }
] ]
@ -310,7 +310,7 @@ export default {
{ {
title: 'label.name', title: 'label.name',
key: 'primaryStorageName', key: 'primaryStorageName',
placeHolder: 'Please enter name', placeHolder: 'message.error.name',
required: true required: true
}, },
{ {
@ -323,7 +323,7 @@ export default {
{ {
title: 'label.protocol', title: 'label.protocol',
key: 'primaryStorageProtocol', key: 'primaryStorageProtocol',
placeHolder: 'Please select option', placeHolder: 'message.error.select',
required: true, required: true,
select: true, select: true,
options: this.primaryStorageProtocols options: this.primaryStorageProtocols
@ -331,7 +331,7 @@ export default {
{ {
title: 'label.server', title: 'label.server',
key: 'primaryStorageServer', key: 'primaryStorageServer',
placeHolder: 'Please enter server', placeHolder: 'message.error.server',
required: true, required: true,
display: { display: {
primaryStorageProtocol: ['nfs', 'iscsi', 'gluster', 'SMB'] primaryStorageProtocol: ['nfs', 'iscsi', 'gluster', 'SMB']
@ -340,7 +340,7 @@ export default {
{ {
title: 'label.path', title: 'label.path',
key: 'primaryStoragePath', key: 'primaryStoragePath',
placeHolder: 'Please enter path', placeHolder: 'message.error.path',
required: true, required: true,
display: { display: {
primaryStorageProtocol: ['nfs', 'SMB', 'SharedMountPoint', 'ocfs2'] primaryStorageProtocol: ['nfs', 'SMB', 'SharedMountPoint', 'ocfs2']
@ -349,7 +349,7 @@ export default {
{ {
title: 'label.SR.name', title: 'label.SR.name',
key: 'primaryStorageSRLabel', key: 'primaryStorageSRLabel',
placeHolder: 'Please enter SR Name-Label', placeHolder: 'message.error.sr.namelabel',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'PreSetup' primaryStorageProtocol: 'PreSetup'
@ -358,7 +358,7 @@ export default {
{ {
title: 'label.target.iqn', title: 'label.target.iqn',
key: 'primaryStorageTargetIQN', key: 'primaryStorageTargetIQN',
placeHolder: 'Please enter Target IQN', placeHolder: 'message.error.target.iqn',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'iscsi' primaryStorageProtocol: 'iscsi'
@ -367,7 +367,7 @@ export default {
{ {
title: 'label.LUN.number', title: 'label.LUN.number',
key: 'primaryStorageLUN', key: 'primaryStorageLUN',
placeHolder: 'Please enter LUN #', placeHolder: 'message.error.lun',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'iscsi' primaryStorageProtocol: 'iscsi'
@ -376,7 +376,7 @@ export default {
{ {
title: 'label.smb.domain', title: 'label.smb.domain',
key: 'primaryStorageSMBDomain', key: 'primaryStorageSMBDomain',
placeHolder: 'Please enter SMB Domain', placeHolder: 'message.error.sbdomain',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'SMB' primaryStorageProtocol: 'SMB'
@ -385,7 +385,7 @@ export default {
{ {
title: 'label.smb.username', title: 'label.smb.username',
key: 'primaryStorageSMBUsername', key: 'primaryStorageSMBUsername',
placeHolder: 'Please enter SMB Username', placeHolder: 'message.error.sbdomain.username',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'SMB' primaryStorageProtocol: 'SMB'
@ -394,7 +394,7 @@ export default {
{ {
title: 'label.smb.password', title: 'label.smb.password',
key: 'primaryStorageSMBPassword', key: 'primaryStorageSMBPassword',
placeHolder: 'Please enter SMB Password', placeHolder: 'message.error.sbdomain.password',
required: true, required: true,
password: true, password: true,
display: { display: {
@ -404,7 +404,7 @@ export default {
{ {
title: 'label.rados.monitor', title: 'label.rados.monitor',
key: 'primaryStorageRADOSMonitor', key: 'primaryStorageRADOSMonitor',
placeHolder: 'Please enter RADOS Monitor', placeHolder: 'message.error.rados.monitor',
required: false, required: false,
display: { display: {
primaryStorageProtocol: ['rbd'] primaryStorageProtocol: ['rbd']
@ -413,7 +413,7 @@ export default {
{ {
title: 'label.rados.pool', title: 'label.rados.pool',
key: 'primaryStorageRADOSPool', key: 'primaryStorageRADOSPool',
placeHolder: 'Please enter RADOS Pool', placeHolder: 'message.error.rados.pool',
required: false, required: false,
display: { display: {
primaryStorageProtocol: ['rbd'] primaryStorageProtocol: ['rbd']
@ -422,7 +422,7 @@ export default {
{ {
title: 'label.rados.user', title: 'label.rados.user',
key: 'primaryStorageRADOSUser', key: 'primaryStorageRADOSUser',
placeHolder: 'Please enter RADOS User', placeHolder: 'message.error.rados.user',
required: false, required: false,
display: { display: {
primaryStorageProtocol: ['rbd'] primaryStorageProtocol: ['rbd']
@ -431,7 +431,7 @@ export default {
{ {
title: 'label.rados.secret', title: 'label.rados.secret',
key: 'primaryStorageRADOSSecret', key: 'primaryStorageRADOSSecret',
placeHolder: 'Please enter RADOS Secret', placeHolder: 'message.error.rados.secret',
required: false, required: false,
display: { display: {
primaryStorageProtocol: ['rbd'] primaryStorageProtocol: ['rbd']
@ -440,7 +440,7 @@ export default {
{ {
title: 'label.volgroup', title: 'label.volgroup',
key: 'primaryStorageVolumeGroup', key: 'primaryStorageVolumeGroup',
placeHolder: 'Please enter Volume Group', placeHolder: 'message.error.volumne.group',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'clvm' primaryStorageProtocol: 'clvm'
@ -449,7 +449,7 @@ export default {
{ {
title: 'label.volume', title: 'label.volume',
key: 'primaryStorageVolume', key: 'primaryStorageVolume',
placeHolder: 'Please enter Volume', placeHolder: 'message.error.volumne',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'gluster' primaryStorageProtocol: 'gluster'
@ -458,7 +458,7 @@ export default {
{ {
title: 'label.vcenter.datacenter', title: 'label.vcenter.datacenter',
key: 'primaryStorageVmfsDatacenter', key: 'primaryStorageVmfsDatacenter',
placeHolder: 'Please enter vCenter Datacenter', placeHolder: 'message.error.vcenter.datacenter',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'vmfs' primaryStorageProtocol: 'vmfs'
@ -467,7 +467,7 @@ export default {
{ {
title: 'label.vcenter.datastore', title: 'label.vcenter.datastore',
key: 'primaryStorageVmfsDatastore', key: 'primaryStorageVmfsDatastore',
placeHolder: 'Please enter vCenter Datastore', placeHolder: 'message.error.vcenter.datastore',
required: true, required: true,
display: { display: {
primaryStorageProtocol: 'vmfs' primaryStorageProtocol: 'vmfs'
@ -476,7 +476,7 @@ export default {
{ {
title: 'label.storage.tags', title: 'label.storage.tags',
key: 'primaryStorageTags', key: 'primaryStorageTags',
placeHolder: 'Please enter storage tags', placeHolder: 'message.error.storage.tags',
required: false required: false
} }
] ]
@ -502,7 +502,7 @@ export default {
title: 'label.server', title: 'label.server',
key: 'secondaryStorageServer', key: 'secondaryStorageServer',
required: true, required: true,
placeHolder: 'Please enter Server', placeHolder: 'message.error.server',
display: { display: {
secondaryStorageProvider: ['NFS', 'SMB'] secondaryStorageProvider: ['NFS', 'SMB']
} }
@ -511,7 +511,7 @@ export default {
title: 'label.path', title: 'label.path',
key: 'secondaryStoragePath', key: 'secondaryStoragePath',
required: true, required: true,
placeHolder: 'Please enter Path', placeHolder: 'message.error.path',
display: { display: {
secondaryStorageProvider: ['NFS', 'SMB'] secondaryStorageProvider: ['NFS', 'SMB']
} }
@ -520,7 +520,7 @@ export default {
title: 'label.smb.domain', title: 'label.smb.domain',
key: 'secondaryStorageSMBDomain', key: 'secondaryStorageSMBDomain',
required: true, required: true,
placeHolder: 'Please enter SMB Domain', placeHolder: 'message.error.sbdomain',
display: { display: {
secondaryStorageProvider: ['SMB'] secondaryStorageProvider: ['SMB']
} }
@ -529,7 +529,7 @@ export default {
title: 'label.smb.username', title: 'label.smb.username',
key: 'secondaryStorageSMBUsername', key: 'secondaryStorageSMBUsername',
required: true, required: true,
placeHolder: 'Please enter SMB Username', placeHolder: 'message.error.smb.username',
display: { display: {
secondaryStorageProvider: ['SMB'] secondaryStorageProvider: ['SMB']
} }
@ -539,7 +539,7 @@ export default {
key: 'secondaryStorageSMBPassword', key: 'secondaryStorageSMBPassword',
required: true, required: true,
password: true, password: true,
placeHolder: 'Please enter SMB Password', placeHolder: 'message.error.smb.password',
display: { display: {
secondaryStorageProvider: ['SMB'] secondaryStorageProvider: ['SMB']
} }
@ -548,7 +548,7 @@ export default {
title: 'label.s3.access_key', title: 'label.s3.access_key',
key: 'secondaryStorageAccessKey', key: 'secondaryStorageAccessKey',
required: true, required: true,
placeHolder: 'Please enter Access Key', placeHolder: 'message.error.access.key',
display: { display: {
secondaryStorageProvider: ['S3'] secondaryStorageProvider: ['S3']
} }
@ -557,7 +557,7 @@ export default {
title: 'label.s3.secret_key', title: 'label.s3.secret_key',
key: 'secondaryStorageSecretKey', key: 'secondaryStorageSecretKey',
required: true, required: true,
placeHolder: 'Please enter Secret Key', placeHolder: 'message.error.secret.key',
display: { display: {
secondaryStorageProvider: ['S3'] secondaryStorageProvider: ['S3']
} }
@ -566,7 +566,7 @@ export default {
title: 'label.s3.bucket', title: 'label.s3.bucket',
key: 'secondaryStorageBucket', key: 'secondaryStorageBucket',
required: true, required: true,
placeHolder: 'Please enter Bucket', placeHolder: 'message.error.bucket',
display: { display: {
secondaryStorageProvider: ['S3'] secondaryStorageProvider: ['S3']
} }
@ -626,7 +626,7 @@ export default {
title: 'label.s3.nfs.server', title: 'label.s3.nfs.server',
key: 'secondaryStorageNFSServer', key: 'secondaryStorageNFSServer',
required: true, required: true,
placeHolder: 'Please enter S3 NFS Server', placeHolder: 'message.error.s3nfs.server',
display: { display: {
secondaryStorageProvider: ['S3'] secondaryStorageProvider: ['S3']
} }
@ -635,7 +635,7 @@ export default {
title: 'label.s3.nfs.path', title: 'label.s3.nfs.path',
key: 'secondaryStorageNFSPath', key: 'secondaryStorageNFSPath',
required: true, required: true,
placeHolder: 'Please enter S3 NFS Path', placeHolder: 'message.error.s3nfs.path',
display: { display: {
secondaryStorageProvider: ['S3'] secondaryStorageProvider: ['S3']
} }
@ -644,7 +644,7 @@ export default {
title: 'label.url', title: 'label.url',
key: 'secondaryStorageURL', key: 'secondaryStorageURL',
required: true, required: true,
placeHolder: 'Please enter URL', placeHolder: 'message.error.url',
display: { display: {
secondaryStorageProvider: ['Swift'] secondaryStorageProvider: ['Swift']
} }

View File

@ -1533,7 +1533,7 @@ export default {
} catch (e) { } catch (e) {
this.loading = false this.loading = false
await this.$notification.error({ await this.$notification.error({
message: 'Request Failed', message: this.$t('message.request.failed'),
description: e description: e
}) })
} }
@ -1587,7 +1587,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'createPhysicalNetwork failed. Error: ' + result.jobresult.errortext message = `createPhysicalNetwork ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1616,7 +1616,9 @@ export default {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
this.setStepStatus(STATUS_FAILED) this.setStepStatus(STATUS_FAILED)
message = 'Failed to add ' + trafficType + ' traffic type to basic zone. Error: ' + result.jobresult.errortext message = `${this.$t('message.failed.to.add')} ` + trafficType +
` ${this.$t('message.traffic.type.to.basic.zone')}. ${this.$t('label.error')}: ` +
result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1637,7 +1639,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'updatePhysicalNetwork failed. Error:' + result.jobresult.errortext message = `updatePhysicalNetwork ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1660,7 +1662,7 @@ export default {
providerId = items[0].id providerId = items[0].id
} }
if (!type && providerId == null) { if (!type && providerId == null) {
message = 'error: listNetworkServiceProviders API doesn\'t return VirtualRouter provider ID' message = this.$t('message.listnsp.not.return.providerid')
reject(message) reject(message)
return return
} }
@ -1682,7 +1684,7 @@ export default {
virtualRouterElementId = items[0].id virtualRouterElementId = items[0].id
} }
if (virtualRouterElementId === null) { if (virtualRouterElementId === null) {
message = 'error: listVirtualRouterElements API doesn\'t return Virtual Router Element Id' message = this.$t('message.virtual.router.not.return.elementid')
reject(message) reject(message)
return return
} }
@ -1705,7 +1707,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'configureVirtualRouterElement failed. Error: ' + result.jobresult.errortext message = `configureVirtualRouterElement ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1730,13 +1732,13 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'updateNetworkServiceProvider failed. Error: ' message = `updateNetworkServiceProvider ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: `
switch (type) { switch (type) {
case 'netscalerProvider': case 'netscalerProvider':
message = 'failed to enable Netscaler provider. Error: ' message = `${this.$t('message.enable.netsacler.provider.failed')}. ${this.$t('label.error')}: `
break break
case 'enableSecurityGroupProvider': case 'enableSecurityGroupProvider':
message = 'failed to enable security group provider. Error: ' message = `${this.$t('message.enable.securitygroup.provider.failed')}. ${this.$t('label.error')}: `
break break
} }
message += result.jobresult.errortext message += result.jobresult.errortext
@ -1777,7 +1779,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'configureOvsElement failed. Error: ' + result.jobresult.errortext message = `configureOvsElement ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1800,7 +1802,7 @@ export default {
internalLbElementId = items[0].id internalLbElementId = items[0].id
} }
if (internalLbElementId == null) { if (internalLbElementId == null) {
message = 'error: listInternalLoadBalancerElements API doesn\'t return Internal LB Element Id' message = this.$t('message.interloadbalance.not.return.elementid')
reject(message) reject(message)
return return
} }
@ -1819,7 +1821,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'configureVirtualRouterElement failed. Error: ' + result.jobresult.errortext message = `configureVirtualRouterElement ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -1840,7 +1842,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'addNetworkServiceProvider&name=Netscaler failed. Error: ' + result.jobresult.errortext message = `addNetworkServiceProvider&name=Netscaler ${this.$t('label.failed').toLowerCase()}. ${this.$t('label.error')}: ` + result.jobresult.errortext
reject(message) reject(message)
return return
} }
@ -2006,7 +2008,7 @@ export default {
if (jobId) { if (jobId) {
const result = await this.pollJob(jobId) const result = await this.pollJob(jobId)
if (result.jobstatus === 2) { if (result.jobstatus === 2) {
message = 'addNetscalerDevice' + result.jobresult.errortext message = 'addNetscalerDevice ' + result.jobresult.errortext
reject(message) reject(message)
return return
} }

View File

@ -199,7 +199,7 @@ export default {
key: 'netscalerIp', key: 'netscalerIp',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
}, },
{ {
title: 'label.username', title: 'label.username',
@ -240,14 +240,14 @@ export default {
key: 'gslbproviderpublicip', key: 'gslbproviderpublicip',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
}, },
{ {
title: 'label.gslb.service.private.ip', title: 'label.gslb.service.private.ip',
key: 'gslbproviderprivateip', key: 'gslbproviderprivateip',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
}, },
{ {
title: 'label.numretries', title: 'label.numretries',
@ -305,7 +305,7 @@ export default {
placeHolder: 'message.installwizard.tooltip.addpod.reservedsystemstartip', placeHolder: 'message.installwizard.tooltip.addpod.reservedsystemstartip',
required: true, required: true,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
}, },
{ {
title: 'label.end.reserved.system.ip', title: 'label.end.reserved.system.ip',
@ -313,7 +313,7 @@ export default {
placeHolder: 'message.installwizard.tooltip.addpod.reservedsystemendip', placeHolder: 'message.installwizard.tooltip.addpod.reservedsystemendip',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
} }
], ],
guestTrafficFields: [ guestTrafficFields: [
@ -335,7 +335,7 @@ export default {
placeHolder: 'message.installwizard.tooltip.configureguesttraffic.gueststartip', placeHolder: 'message.installwizard.tooltip.configureguesttraffic.gueststartip',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
}, },
{ {
title: 'label.guest.end.ip', title: 'label.guest.end.ip',
@ -343,7 +343,7 @@ export default {
placeHolder: 'message.installwizard.tooltip.configureguesttraffic.guestendip', placeHolder: 'message.installwizard.tooltip.configureguesttraffic.guestendip',
required: false, required: false,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: 'message.error.ipv4.address'
} }
] ]
} }

View File

@ -20,7 +20,7 @@
<a-card <a-card
class="ant-form-text" class="ant-form-text"
style="text-align: justify; margin: 10px 0; padding: 20px;" style="text-align: justify; margin: 10px 0; padding: 20px;"
v-html="zoneType !== null ? $t(zoneDescription[zoneType]) : 'Please select zone type below.'"> v-html="zoneType !== null ? $t(zoneDescription[zoneType]) : $t('message.error.select.zone.type')">
</a-card> </a-card>
<a-table <a-table
bordered bordered
@ -68,13 +68,13 @@
centered centered
> >
<a-form :form="form"> <a-form :form="form">
<span class="ant-form-text"> Please specify the traffic label you want associated with this traffic type. </span> <span class="ant-form-text"> {{ $t('message.edit.traffic.type') }} </span>
<a-form-item v-bind="formItemLayout" style="margin-top:16px;" :label="$t('label.traffic.label')"> <a-form-item v-bind="formItemLayout" style="margin-top:16px;" :label="$t('label.traffic.label')">
<a-input <a-input
v-decorator="['trafficLabel', { v-decorator="['trafficLabel', {
rules: [{ rules: [{
required: true, required: true,
message: 'Please enter traffic label', message: $t('message.error.traffic.label'),
}] }]
}]" }]"
/> />
@ -148,7 +148,7 @@
</div> </div>
<a-modal <a-modal
:visible="showError" :visible="showError"
title="Error!" :title="`${$t('label.error')}!`"
@ok="() => { showError = false }" @ok="() => { showError = false }"
@cancel="() => { showError = false }" @cancel="() => { showError = false }"
centered centered

View File

@ -31,7 +31,7 @@
v-decorator="['name', { v-decorator="['name', {
rules: [{ rules: [{
required: true, required: true,
message: 'Please enter zone name', message: $t('message.error.zone.name'),
initialValue: name initialValue: name
}] }]
}]" }]"
@ -46,13 +46,13 @@
rules: [ rules: [
{ {
required: true, required: true,
message: 'Please enter IpV4 DNS 1', message: $t('message.error.ipv4.dns1'),
initialValue: ipv4Dns1 initialValue: ipv4Dns1
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: $t('message.error.ipv4.address')
} }
] ]
}]" }]"
@ -66,13 +66,13 @@
v-decorator="['ipv4Dns2', { v-decorator="['ipv4Dns2', {
rules: [ rules: [
{ {
message: 'Please enter IpV4 DNS 2', message: $t('message.error.ipv4.dns2'),
initialValue: ipv4Dns2 initialValue: ipv4Dns2
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: $t('message.error.ipv4.address')
} }
] ]
}]" }]"
@ -87,13 +87,13 @@
v-decorator="['ipv6Dns1', { v-decorator="['ipv6Dns1', {
rules: [ rules: [
{ {
message: 'Please enter IpV6 DNS 1', message: $t('message.error.ipv6.dns1'),
initialValue: ipv6Dns1 initialValue: ipv6Dns1
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV6: true, ipV6: true,
message: 'Please enter a valid IP v6 address.' message: $t('message.error.ipv6.address')
} }
] ]
}]" }]"
@ -108,13 +108,13 @@
v-decorator="['ipv6Dns2', { v-decorator="['ipv6Dns2', {
rules: [ rules: [
{ {
message: 'Please enter IpV6 DNS 2', message: $t('message.error.ipv6.dns2'),
initialValue: ipv6Dns2 initialValue: ipv6Dns2
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV6: true, ipV6: true,
message: 'Please enter a valid IP v6 address.' message: $t('message.error.ipv6.address')
} }
] ]
}]" }]"
@ -129,7 +129,7 @@
v-decorator="['ipv6Cidr', { v-decorator="['ipv6Cidr', {
rules: [ rules: [
{ {
message: 'Please enter IpV6 CIDR', message: $t('message.error.ipv6.cidr'),
initialValue: ip6cidr initialValue: ip6cidr
} }
] ]
@ -145,13 +145,13 @@
v-decorator="['ip6gateway', { v-decorator="['ip6gateway', {
rules: [ rules: [
{ {
message: 'Please enter IpV6 Gateway', message: $t('message.error.ipv6.gateway'),
initialValue: ip6gateway initialValue: ip6gateway
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV6: true, ipV6: true,
message: 'Please enter a valid IPv6 Gatweay.' message: $t('message.error.ipv6.gateway.format')
} }
] ]
}]" }]"
@ -166,13 +166,13 @@
rules: [ rules: [
{ {
required: true, required: true,
message: 'Please enter Internal DNS 1', message: $t('message.error.internal.dns1'),
initialValue: internalDns1 initialValue: internalDns1
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: $t('message.error.ipv4.address')
} }
] ]
}]" }]"
@ -186,13 +186,13 @@
v-decorator="['internalDns2', { v-decorator="['internalDns2', {
rules: [ rules: [
{ {
message: 'Please enter Internal DNS 2', message: $t('message.error.internal.dns2'),
initialValue: internalDns2 initialValue: internalDns2
}, },
{ {
validator: checkIpFormat, validator: checkIpFormat,
ipV4: true, ipV4: true,
message: 'Please enter a valid IP v4 address.' message: $t('message.error.ipv4.address')
} }
] ]
}]" }]"
@ -208,11 +208,11 @@
v-decorator="['hypervisor',{ v-decorator="['hypervisor',{
rules: [{ rules: [{
required: true, required: true,
message: 'Please select hypervisor type', message: $t('message.error.hypervisor.type'),
initialValue: currentHypervisor initialValue: currentHypervisor
}] }]
}]" }]"
placeholder="Please select hypervisor type" :placeholder="$t('message.error.hypervisor.type')"
> >
<a-select-option v-for="hypervisor in hypervisors" :key="hypervisor.name"> <a-select-option v-for="hypervisor in hypervisors" :key="hypervisor.name">
{{ hypervisor.name }} {{ hypervisor.name }}
@ -228,11 +228,11 @@
:loading="availableNetworkOfferings === null" :loading="availableNetworkOfferings === null"
v-decorator="['networkOfferingId', { v-decorator="['networkOfferingId', {
rules: [{ rules: [{
message: 'Please select network offering', message: $t('message.error.network.offering'),
initialValue: currentNetworkOfferingId initialValue: currentNetworkOfferingId
}] }]
}]" }]"
placeholder="Please select network offering" :placeholder="$t('message.error.network.offering')"
> >
<a-select-option <a-select-option
v-for="networkOffering in availableNetworkOfferings" v-for="networkOffering in availableNetworkOfferings"
@ -248,7 +248,7 @@
<a-input <a-input
v-decorator="['networkDomain', { v-decorator="['networkDomain', {
rules: [{ rules: [{
message: 'Please enter Network domain', message: $t('message.error.network.domain'),
intialValue: networkDomain intialValue: networkDomain
}] }]
}]" }]"
@ -287,7 +287,7 @@
initialValue: domain initialValue: domain
}] }]
}]" }]"
placeholder="Please select domain to dedicate to" :placeholder="$t('message.error.select.domain.to.dedicate')"
> >
<a-select-option v-for="dom in domains" :key="dom.id"> <a-select-option v-for="dom in domains" :key="dom.id">
{{ dom.path }} {{ dom.path }}

Some files were not shown because too many files have changed in this diff Show More