Skip to content

Commit b9932e4

Browse files
authored
Merge pull request #635 from jschoiRR/mold-main#2025
[Mold API, UI] 모니터링 링크 생성 및 설정값 수정(vm, host, cluster)
2 parents 9992c3c + bdfbd02 commit b9932e4

File tree

5 files changed

+16
-42
lines changed

5 files changed

+16
-42
lines changed

api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ public class ApiServiceConfiguration implements Configurable {public static fina
3737
public static final ConfigKey<String> MonitoringWallPortalPort = new ConfigKey<String>("Advanced", String.class, "monitoring.wall.portal.port",
3838
"3000", "Monitoring Service Wall Portal Port.(ex:3000)", true);
3939
public static final ConfigKey<String> MonitoringWallPortalVmUri = new ConfigKey<String>("Advanced", String.class, "monitoring.wall.portal.vm.uri",
40-
"/d/ldwEyoKnz/gasangmeosin-sangse-hyeonhwang", "Monitoring Service Wall Portal Uri.(ex:/d/ldwEyoKnz/gasangmeosin-sangse-hyeonhwang)", true);
40+
"/d/uservm?kiosk&theme=light", "Monitoring Service Wall Portal VM Uri.(ex:/d/uservm?kiosk&theme=light)", true);
4141
public static final ConfigKey<String> MonitoringWallPortalHostUri = new ConfigKey<String>("Advanced", String.class, "monitoring.wall.portal.host.uri",
42-
"/d/Q3Jkjf54z/c8fd170", "Monitoring Service Wall Portal Host Uri.(ex:/d/Q3Jkjf54z/c8fd170)", true);
42+
"/d/Q3Jkjf54zs?kiosk&theme=light", "Monitoring Service Wall Portal Host Uri.(ex:/d/Q3Jkjf54zs?kiosk&theme=light)", true);
4343
public static final ConfigKey<String> MonitoringWallPortalClusterUri = new ConfigKey<String>("Advanced", String.class, "monitoring.wall.portal.cluster.uri",
44-
"/d/fe4e0f7t7qjgga/ed98b8-ec8aa4-ed8ab8-eca285-ed95a9-ed9884-ed99a9", "Monitoring Service Wall Portal Cluster Uri.(ex:/d/fe4e0f7t7qjgga/ed98b8-ec8aa4-ed8ab8-eca285-ed95a9-ed9884-ed99a9)", true);
44+
"/d/fasdasdasdw?kiosk&theme=light", "Monitoring Service Wall Portal Cluster Uri.(ex:/d/fasdasdasdw?kiosk&theme=light)", true);
4545
public static final ConfigKey<Boolean> EventDeleteEnabled = new ConfigKey<>("Advanced", Boolean.class, "event.delete.enabled",
4646
"false", "true if Event Delete Button is enabled, false otherwise)", false);
4747

ui/src/components/header/UserMenu.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ export default {
205205
},
206206
wallPortalLink () {
207207
api('listConfigurations', { keyword: 'monitoring.wall.portal' }).then(json => {
208-
var items = json.listconfigurationsresponse.configuration
209-
var wallPortalProtocol = items.filter(x => x.name === 'monitoring.wall.portal.protocol')[0]?.value
208+
const items = json.listconfigurationsresponse.configuration
209+
const wallPortalProtocol = items.filter(x => x.name === 'monitoring.wall.portal.protocol')[0]?.value
210210
const wallPortalPort = items.filter(x => x.name === 'monitoring.wall.portal.port')[0]?.value
211211
var wallPortalDomain = items.filter(x => x.name === 'monitoring.wall.portal.domain')[0]?.value
212212
if (wallPortalDomain === null || wallPortalDomain === '') {
213213
wallPortalDomain = this.$store.getters.features.host
214214
}
215-
var uri = wallPortalProtocol + '://' + wallPortalDomain + ':' + wallPortalPort
216-
this.uriInfo = uri + '/login?orgId=1'
217-
window.open(uri, '_blank')
215+
const uri = wallPortalProtocol + '://' + wallPortalDomain + ':' + wallPortalPort
216+
this.uriInfo = uri + '/logout'
217+
window.open(this.uriInfo, '_blank')
218218
})
219219
},
220220
async fetchConfigurationSwitch () {

ui/src/components/widgets/WallLinkUrl.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ export default {
6363
uri += wallPortalProtocol + '://' + wallPortalDomain + ':' + wallPortalPort
6464
if (this.scope === 'vm') {
6565
const vmUriPath = items.filter(x => x.name === 'monitoring.wall.portal.vm.uri')[0]?.value
66-
this.uriInfo = uri + vmUriPath + '?kiosk&orgId=2&theme=light&var-vm_uuid=' + this.resource.id
66+
this.uriInfo = uri + vmUriPath + '&var-vm_uuid=' + this.resource.id
6767
this.uriCreateOk = true
6868
} else if (this.scope === 'host') {
6969
const hostUriPath = items.filter(x => x.name === 'monitoring.wall.portal.host.uri')[0]?.value
70-
this.uriInfo = uri + hostUriPath + '?from=now-1h&to=now&theme=light&var-host=' + this.resource.ipaddress
70+
this.uriInfo = uri + hostUriPath + '&var-host=' + this.resource.ipaddress
7171
this.uriCreateOk = true
7272
} else if (this.scope === 'cluster') {
7373
const clusterUriPath = items.filter(x => x.name === 'monitoring.wall.portal.cluster.uri')[0]?.value
74-
this.uriInfo = uri + clusterUriPath + '?theme=light'
74+
this.uriInfo = uri + clusterUriPath
7575
this.uriCreateOk = true
7676
}
7777
})

ui/src/views/image/TemplateZones.vue

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,14 @@
103103
<template #action="{ record }">
104104
<tooltip-button
105105
style="margin-right: 5px"
106-
:dataSource="templates"
107-
:disabled="!('copyTemplate' in $store.getters.apis && record.isready) || templates.includes(record.id)"
106+
:disabled="!('copyTemplate' in $store.getters.apis && record.isready)"
108107
:title="$t('label.action.copy.template')"
109108
icon="copy-outlined"
110-
:loading="copyLoading || fetchLoading"
109+
:loading="copyLoading"
111110
@onClick="showCopyTemplate(record)" />
112111
<tooltip-button
113112
style="margin-right: 5px"
114-
:dataSource="templates"
115-
:disabled="!('deleteTemplate' in $store.getters.apis) || templates.includes(record.id)"
113+
:disabled="!('deleteTemplate' in $store.getters.apis)"
116114
:title="$t('label.action.delete.template')"
117115
type="primary"
118116
:danger="true"
@@ -274,7 +272,6 @@ export default {
274272
return {
275273
columns: [],
276274
dataSource: [],
277-
templates: [],
278275
page: 1,
279276
pageSize: 10,
280277
itemCount: 0,
@@ -397,31 +394,8 @@ export default {
397394
this.itemCount = json.listtemplatesresponse.count || 0
398395
}).catch(error => {
399396
this.$notifyError(error)
400-
}).finally(() => {
401-
})
402-
this.templates = []
403-
api('listDesktopControllerVersions').then(json => {
404-
var items = json.listdesktopcontrollerversionsresponse.desktopcontrollerversion
405-
if (items != null) {
406-
for (var i = 0; i < items.length; i++) {
407-
for (var j = 0; j < items[i].templates.length; j++) {
408-
this.templates.push(items[i].templates[j].id)
409-
}
410-
}
411-
}
412-
}).finally(() => {
413-
})
414-
api('listDesktopMasterVersions').then(json => {
415-
var items = json.listdesktopmasterversionsresponse.desktopmasterversion
416-
if (items != null) {
417-
for (var i = 0; i < items.length; i++) {
418-
this.templates.push(items[i].templateid)
419-
}
420-
}
421397
}).finally(() => {
422398
this.fetchLoading = false
423-
// this.$set(this.resource, 'templates', this.templates)
424-
// this.resource.templetes = this.templates
425399
})
426400
this.fetchZoneData()
427401
},

ui/src/views/plugins/IFrameWall.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export default {
5353
var uri = wallPortalProtocol + '://' + wallPortalDomain + ':' + wallPortalPort
5454
if (typeof hypervisortype !== 'undefined' && hypervisortype !== null && hypervisortype !== '') {
5555
const clusterUriPath = items.filter(x => x.name === 'monitoring.wall.portal.cluster.uri')[0]?.value
56-
this.uriInfo = uri + clusterUriPath + '?theme=light'
56+
this.uriInfo = uri + clusterUriPath
5757
} else {
5858
const hostUriPath = items.filter(x => x.name === 'monitoring.wall.portal.host.uri')[0]?.value
59-
this.uriInfo = uri + hostUriPath + '?from=now-1h&to=now&theme=light&var-host=' + this.resource.ipaddress
59+
this.uriInfo = uri + hostUriPath + '&var-host=' + this.resource.ipaddress
6060
}
6161
this.uriCreateOk = true
6262
})

0 commit comments

Comments
 (0)