mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: Fix dashboard links (#6083)
* ui: Fix dashboard links * Fix event links
This commit is contained in:
parent
07d1ffc4e7
commit
0a4cf5b0b9
@ -52,7 +52,7 @@
|
|||||||
:bordered="false"
|
:bordered="false"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:style="stat.bgcolor ? { 'background': stat.bgcolor } : {}">
|
:style="stat.bgcolor ? { 'background': stat.bgcolor } : {}">
|
||||||
<router-link :to="{ path: stat.path }">
|
<router-link :to="{ path: stat.path, query: stat.query }">
|
||||||
<div
|
<div
|
||||||
class="usage-dashboard-chart-card-inner">
|
class="usage-dashboard-chart-card-inner">
|
||||||
<h3>{{ stat.name }}</h3>
|
<h3>{{ stat.name }}</h3>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
:key="event.id"
|
:key="event.id"
|
||||||
:color="getEventColour(event)">
|
:color="getEventColour(event)">
|
||||||
<span :style="{ color: '#999' }"><small>{{ $toLocaleDate(event.created) }}</small></span><br/>
|
<span :style="{ color: '#999' }"><small>{{ $toLocaleDate(event.created) }}</small></span><br/>
|
||||||
<span :style="{ color: '#666' }"><small><router-link :to="{ path: 'event/' + event.id }">{{ event.type }}</router-link></small></span><br/>
|
<span :style="{ color: '#666' }"><small><router-link :to="{ path: '/event/' + event.id }">{{ event.type }}</router-link></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>
|
||||||
@ -173,7 +173,7 @@ export default {
|
|||||||
count = json.listvirtualmachinesresponse.count
|
count = json.listvirtualmachinesresponse.count
|
||||||
}
|
}
|
||||||
var tileColor = this.$config.theme['@dashboard-tile-runningvms-bg'] || '#dfe9cc'
|
var tileColor = this.$config.theme['@dashboard-tile-runningvms-bg'] || '#dfe9cc'
|
||||||
this.stats.splice(0, 1, { name: this.$t('label.running'), count: count, icon: 'desktop-outlined', bgcolor: tileColor, path: '/vm?state=running&filter=running' })
|
this.stats.splice(0, 1, { name: this.$t('label.running'), count: count, icon: 'desktop-outlined', bgcolor: tileColor, path: '/vm', query: { state: 'running', filter: 'running' } })
|
||||||
})
|
})
|
||||||
api('listVirtualMachines', { state: 'Stopped', listall: true }).then(json => {
|
api('listVirtualMachines', { state: 'Stopped', listall: true }).then(json => {
|
||||||
var count = 0
|
var count = 0
|
||||||
@ -181,7 +181,7 @@ export default {
|
|||||||
count = json.listvirtualmachinesresponse.count
|
count = json.listvirtualmachinesresponse.count
|
||||||
}
|
}
|
||||||
var tileColor = this.$config.theme['@dashboard-tile-stoppedvms-bg'] || '#edcbce'
|
var tileColor = this.$config.theme['@dashboard-tile-stoppedvms-bg'] || '#edcbce'
|
||||||
this.stats.splice(1, 1, { name: this.$t('label.stopped'), count: count, icon: 'poweroff-outlined', bgcolor: tileColor, path: '/vm?state=stopped&filter=stopped' })
|
this.stats.splice(1, 1, { name: this.$t('label.stopped'), count: count, icon: 'poweroff-outlined', bgcolor: tileColor, path: '/vm', query: { state: 'stopped', filter: 'stopped' } })
|
||||||
})
|
})
|
||||||
api('listVirtualMachines', { listall: true }).then(json => {
|
api('listVirtualMachines', { listall: true }).then(json => {
|
||||||
var count = 0
|
var count = 0
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
:bordered="false"
|
:bordered="false"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:style="stat.bgcolor ? { 'background-color': stat.bgcolor } : {}">
|
:style="stat.bgcolor ? { 'background-color': stat.bgcolor } : {}">
|
||||||
<router-link v-if="stat.path" :to="{ path: stat.path }">
|
<router-link v-if="stat.path" :to="{ path: stat.path, query: stat.query }">
|
||||||
<div
|
<div
|
||||||
class="usage-dashboard-chart-card-inner">
|
class="usage-dashboard-chart-card-inner">
|
||||||
<h3>{{ stat.name }}</h3>
|
<h3>{{ stat.name }}</h3>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user