diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index a7e561351d0..c16c6bcdf3d 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -127,7 +127,7 @@ "cpuused": "CPU Utilized", "cpuusedghz": "Used", "createNfsCache": "Create NFS secondary staging store", - "created": "Date", + "created": "Created", "credit": "Credit", "crossZones": "Cross Zones", "current": "isCurrent", diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index d38e0f9e197..80060d15580 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -361,7 +361,7 @@ export default { } if (this.items.length > 0) { this.resource = this.items[0] - if (this.items.length === 1 && Object.keys(this.$route.query).length > 0) { + if (this.items && this.items.length === 1 && Object.keys(this.$route.query).length > 0) { this.dataView = true } } else { diff --git a/ui/src/views/common/InfoCard.vue b/ui/src/views/common/InfoCard.vue index debb5d681c0..04ddeb7f40e 100644 --- a/ui/src/views/common/InfoCard.vue +++ b/ui/src/views/common/InfoCard.vue @@ -122,6 +122,40 @@ +
+ +
+ + + {{ $t('apikey') }} + + + + + + + + {{ resource.apikey }} +

+
+ + + {{ $t('secretkey') }} + + + + + + + + {{ resource.secretkey }} +
+
+
Tags
@@ -239,6 +273,7 @@ export default { tags: [], notes: [], annotation: '', + showKeys: false, showNotesInput: false } }, @@ -247,6 +282,7 @@ export default { this.resource = newItem this.resourceType = this.$route.meta.resourceType this.annotationType = '' + this.showKeys = false switch (this.resourceType) { case 'UserVm': @@ -273,9 +309,21 @@ export default { if (this.annotationType) { this.getNotes() } + if ('apikey' in this.resource) { + this.getUserKeys() + } } }, methods: { + getUserKeys () { + if (!('getUserKeys' in this.$store.getters.apis)) { + return + } + api('getUserKeys', { id: this.resource.id }).then(json => { + this.showKeys = true + this.resource.secretkey = json.getuserkeysresponse.userkeys.secretkey + }) + }, getTags () { if (!('listTags' in this.$store.getters.apis)) { return @@ -398,6 +446,9 @@ export default { margin-left: 10px; margin-right: 10px; } +.user-keys { + word-wrap: break-word; +} .account-center-tags { .ant-tag { margin-bottom: 8px;