mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
project: bugfix, show projects and its details
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
0182a95ac6
commit
014d708e28
@ -80,11 +80,21 @@ export function generateRouterMap (section) {
|
||||
map.children.push(route)
|
||||
}
|
||||
} else {
|
||||
map.component = section.component ? section.component : AutogenView
|
||||
map.hideChildrenInMenu = true
|
||||
map.children = [{
|
||||
path: '/' + section.name + '/:id',
|
||||
actions: section.actions ? section.actions : [],
|
||||
component: section.viewComponent ? section.viewComponent : section.component
|
||||
meta: {
|
||||
title: section.title,
|
||||
keepAlive: true,
|
||||
icon: section.icon,
|
||||
permission: section.permission,
|
||||
params: section.params ? section.params : {},
|
||||
actions: section.actions ? section.actions : [],
|
||||
viewComponent: section.viewComponent
|
||||
},
|
||||
component: section.viewComponent ? section.viewComponent : AutogenView
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,10 @@ const err = (error) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
if (error.response.status === 404) {
|
||||
notification.error({ message: 'Not Found', description: 'Resource not found' })
|
||||
this.$router.push({ path: '/exception/404' })
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
||||
@ -335,7 +335,6 @@ export default {
|
||||
params['page'] = this.page
|
||||
params['pagesize'] = this.pageSize
|
||||
api(this.apiName, params).then(json => {
|
||||
this.loading = false
|
||||
var responseName
|
||||
var objectName
|
||||
for (const key in json) {
|
||||
@ -364,6 +363,17 @@ export default {
|
||||
} else {
|
||||
this.resource = {}
|
||||
}
|
||||
}).catch(error => {
|
||||
// handle error
|
||||
this.$notification['error']({
|
||||
message: 'Request Failed',
|
||||
description: error.response.headers['x-description']
|
||||
})
|
||||
if (error.response.status === 431) {
|
||||
this.$router.push({ path: '/exception/404' })
|
||||
}
|
||||
}).finally(f => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
onSearch (value) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user