feat(ui): Resources and Preference support grouping

This commit is contained in:
pycook
2024-05-19 21:55:36 +08:00
parent 6955714951
commit 0a13ca82c6
4 changed files with 139 additions and 73 deletions

View File

@@ -81,7 +81,7 @@ export default {
if (route.name === 'cmdb') {
const preference = await getPreference()
const lastTypeId = window.localStorage.getItem('ops_ci_typeid') || undefined
if (lastTypeId && preference.some((item) => item.id === Number(lastTypeId))) {
if (lastTypeId && preference.type_ids.some((item) => item === Number(lastTypeId))) {
this.$router.push(`/cmdb/instances/types/${lastTypeId}`)
} else {
this.$router.push('/cmdb/dashboard')