Skip to content

Commit 50586a9

Browse files
authored
UI assorted fixes (#9381)
* config.json: make configuration names consistent with other Makes login related config param to be consistent with the original `loginFooter`. Group them together. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * ui: assorted UI fixes and copy console URL fix This brings in related buttons across some infra views and new columns which are missing. Also fixes the copy console URL issue on some browsers. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> --------- Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 7f8f113 commit 50586a9

File tree

9 files changed

+49
-27
lines changed

9 files changed

+49
-27
lines changed

ui/public/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"docBase": "http://docs.cloudstack.apache.org/en/latest",
1111
"appTitle": "CloudStack",
1212
"footer": "Licensed under the <a href='http://www.apache.org/licenses/' target='_blank'>Apache License</a>, Version 2.0.",
13+
"loginTitle": "CloudStack",
14+
"loginFavicon": "assets/logo.svg",
1315
"loginFooter": "",
1416
"logo": "assets/logo.svg",
1517
"minilogo": "assets/mini-logo.svg",
1618
"banner": "assets/banner.svg",
17-
"loginPageTitle": "CloudStack",
18-
"loginPageFavicon": "assets/logo.svg",
1919
"error": {
2020
"403": "assets/403.png",
2121
"404": "assets/404.png",

ui/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
fetch('./config.json')
5959
.then(response => response.json())
6060
.then(data => {
61-
document.getElementById("favicon").setAttribute("href", data.loginPageFavicon);
62-
document.getElementById("title").innerHTML = data.loginPageTitle;
61+
document.getElementById("favicon").setAttribute("href", data.loginFavicon);
62+
document.getElementById("title").innerHTML = data.loginTitle;
6363
}).catch((err) => {});
6464
</script>
6565
</html>

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@
18911891
"label.service.connectivity.distributedroutercapabilitycheckbox": "Distributed router",
18921892
"label.service.connectivity.regionlevelvpccapabilitycheckbox": "Region level VPC",
18931893
"label.service.group": "Service group",
1894+
"label.serviceip": "Service IP",
18941895
"label.service.lb.elasticlbcheckbox": "Elastic LB",
18951896
"label.service.lb.inlinemodedropdown": "Mode",
18961897
"label.service.lb.lbisolationdropdown": "LB isolation",

ui/src/components/view/InfoCard.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,6 @@
104104
v-if="resource.id"
105105
/>
106106
</a-tooltip>
107-
<a-tooltip placement="right" >
108-
<template #title>
109-
<span>{{ $t('label.copy.consoleurl') }}</span>
110-
</template>
111-
<console
112-
copyUrlToClipboard
113-
style="margin-top: -5px;"
114-
:resource="resource"
115-
size="default"
116-
v-if="resource.id"
117-
/>
118-
</a-tooltip>
119107
</div>
120108
</slot>
121109
</div>

ui/src/components/widgets/Console.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,10 @@ export default {
5656
this.url = (json && json.createconsoleendpointresponse) ? json.createconsoleendpointresponse.consoleendpoint.url : '#/exception/404'
5757
if (json.createconsoleendpointresponse.consoleendpoint.success) {
5858
if (this.copyUrlToClipboard) {
59+
this.$copyText(this.url)
5960
this.$message.success({
6061
content: this.$t('label.copied.clipboard')
6162
})
62-
const hiddenElement = document.createElement('textarea')
63-
hiddenElement.value = this.url
64-
document.body.appendChild(hiddenElement)
65-
hiddenElement.focus()
66-
hiddenElement.select()
67-
68-
document.execCommand('copy')
69-
document.body.removeChild(hiddenElement)
7063
} else {
7164
window.open(this.url, '_blank')
7265
}

ui/src/config/section/account.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,30 @@ export default {
3131
name: 'accountuser',
3232
title: 'label.users',
3333
param: 'account'
34+
}, {
35+
name: 'vm',
36+
title: 'label.vms',
37+
param: 'account'
38+
}, {
39+
name: 'volume',
40+
title: 'label.volumes',
41+
param: 'account'
42+
}, {
43+
name: 'guestnetwork',
44+
title: 'label.networks',
45+
param: 'account'
46+
}, {
47+
name: 'ssh',
48+
title: 'label.sshkeypairs',
49+
param: 'account'
50+
}, {
51+
name: 'userdata',
52+
title: 'label.userdata',
53+
param: 'account'
54+
}, {
55+
name: 'template',
56+
title: 'label.templates',
57+
param: 'account'
3458
}],
3559
filters: () => {
3660
const filters = ['enabled', 'disabled', 'locked']

ui/src/config/section/domain.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ export default {
3232
name: 'account',
3333
title: 'label.accounts',
3434
param: 'domainid'
35+
}, {
36+
name: 'vm',
37+
title: 'label.vms',
38+
param: 'domainid'
39+
}, {
40+
name: 'volume',
41+
title: 'label.volumes',
42+
param: 'domainid'
43+
}, {
44+
name: 'guestnetwork',
45+
title: 'label.networks',
46+
param: 'domainid'
47+
}, {
48+
name: 'template',
49+
title: 'label.templates',
50+
param: 'domainid'
3551
}],
3652
tabs: [
3753
{

ui/src/config/section/infra/hosts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
},
3333
params: { type: 'routing' },
3434
columns: () => {
35-
const fields = ['name', 'state', 'resourcestate', 'ipaddress', 'hypervisor', 'instances', 'powerstate']
35+
const fields = ['name', 'state', 'resourcestate', 'ipaddress', 'hypervisor', 'instances', 'powerstate', 'version']
3636
const metricsFields = ['cpunumber', 'cputotalghz', 'cpuusedghz', 'cpuallocatedghz', 'memorytotalgb', 'memoryusedgb', 'memoryallocatedgb', 'networkread', 'networkwrite']
3737
if (store.getters.metrics) {
3838
fields.push(...metricsFields)

ui/src/config/section/infra/managementServers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default {
2626
permission: ['listManagementServersMetrics'],
2727
resourceType: 'ManagementServer',
2828
columns: () => {
29-
const fields = ['name', 'state', 'version']
30-
const metricsFields = ['collectiontime', 'availableprocessors', 'cpuload', 'heapmemoryused', 'agentcount']
29+
const fields = ['name', 'state', 'serviceip', 'version', 'osdistribution', 'agentcount']
30+
const metricsFields = ['collectiontime', 'availableprocessors', 'cpuload', 'heapmemoryused']
3131
if (store.getters.metrics) {
3232
fields.push(...metricsFields)
3333
}

0 commit comments

Comments
 (0)