diff --git a/src/views/assets/Asset/AssetList/AllList.vue b/src/views/assets/Asset/AssetList/AllList.vue index 4706c7539..2ad4d0f14 100644 --- a/src/views/assets/Asset/AssetList/AllList.vue +++ b/src/views/assets/Asset/AssetList/AllList.vue @@ -13,7 +13,7 @@ /> diff --git a/src/views/assets/Asset/AssetList/HostList.vue b/src/views/assets/Asset/AssetList/HostList.vue index 19c22fceb..14c0dba51 100644 --- a/src/views/assets/Asset/AssetList/HostList.vue +++ b/src/views/assets/Asset/AssetList/HostList.vue @@ -27,7 +27,7 @@ export default { } ] }, - columnsMeta: { + addColumnsMeta: { actions: { formatter: ActionsFormatter, formatterArgs: { diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index b1d09fb5b..41d6aafbc 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -28,7 +28,7 @@ export default { }, category: { type: String, - default: 'all' + default: '' }, tableConfig: { type: Object, @@ -114,6 +114,10 @@ export default { actions: { formatter: ActionsFormatter, formatterArgs: { + onUpdate: ({ row }) => { + const routeName = _.capitalize(row.category.value) + 'Update' + vm.$router.push({ name: routeName, params: { id: row.id }}) + }, performDelete: ({ row }) => { const id = row.id const url = `/api/v1/assets/assets/${id}/` @@ -124,7 +128,6 @@ export default { } }, defaultHeaderActions: { - createRoute: 'HostCreate', onCreate: () => { this.showPlatform = true }, @@ -189,7 +192,7 @@ export default { iTableConfig() { const config = _.merge(this.defaultConfig, this.tableConfig, { url: this.url, - category: this.category + ...(this.category && { category: this.category }) }) if (this.addColumns.length > 0) { config.columns = [