mirror of https://github.com/apache/cloudstack.git
ui: prevent scheduling readyforshutdown job when api inaccessible (#8448)
Non-admin account may not have access to the readyForShutdown API therefore UI should not schedule the job. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
a68dc0bfb5
commit
5c32a0edba
|
|
@ -199,8 +199,10 @@ export default {
|
|||
created () {
|
||||
this.menus = this.mainMenu.find((item) => item.path === '/').children
|
||||
this.collapsed = !this.sidebarOpened
|
||||
const readyForShutdownPollingJob = setInterval(this.checkShutdown, 5000)
|
||||
this.$store.commit('SET_READY_FOR_SHUTDOWN_POLLING_JOB', readyForShutdownPollingJob)
|
||||
if ('readyForShutdown' in this.$store.getters.apis) {
|
||||
const readyForShutdownPollingJob = setInterval(this.checkShutdown, 5000)
|
||||
this.$store.commit('SET_READY_FOR_SHUTDOWN_POLLING_JOB', readyForShutdownPollingJob)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const layoutMode = this.$config.theme['@layout-mode'] || 'light'
|
||||
|
|
|
|||
Loading…
Reference in New Issue