mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-26 06:58:53 +00:00
fix: 修复导入引起的问题
This commit is contained in:
@@ -43,6 +43,7 @@ export function getResourceNameByPath(path) {
|
|||||||
|
|
||||||
export function getResourceFromApiUrl(apiUrl) {
|
export function getResourceFromApiUrl(apiUrl) {
|
||||||
const re = new RegExp('/api/v1/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/.*')
|
const re = new RegExp('/api/v1/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/.*')
|
||||||
|
console.log('Api url: ', apiUrl)
|
||||||
const matched = apiUrl.match(re)
|
const matched = apiUrl.match(re)
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
return { path: '', app: '', resource: '' }
|
return { path: '', app: '', resource: '' }
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
import { GenericListTable } from '@/layout/components'
|
import { GenericListTable } from '@/layout/components'
|
||||||
import { DetailFormatter } from '@/components/TableFormatters'
|
import { DetailFormatter } from '@/components/TableFormatters'
|
||||||
import { openTaskPage } from '@/utils/jms'
|
import { openTaskPage } from '@/utils/jms'
|
||||||
import { AppPlanDatabase } from '@/views/perms/const'
|
import { AppPlanDatabase } from '@/views/applications/const'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppChangeAuthPlanList',
|
name: 'AppChangeAuthPlanList',
|
||||||
|
@@ -4,7 +4,20 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericListPage } from '@/layout/components'
|
import { GenericListPage } from '@/layout/components'
|
||||||
import { DATABASE } from '@/views/perms/const'
|
import { DATABASE } from '@/views/applications/const'
|
||||||
|
|
||||||
|
function getAppType(arr) {
|
||||||
|
const searchAppType = []
|
||||||
|
if (arr.length < 1) return searchAppType
|
||||||
|
arr.forEach((i) => {
|
||||||
|
const option = {
|
||||||
|
value: i.name,
|
||||||
|
label: i.title
|
||||||
|
}
|
||||||
|
searchAppType.push(option)
|
||||||
|
})
|
||||||
|
return searchAppType
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -22,7 +35,10 @@ export default {
|
|||||||
],
|
],
|
||||||
columnsShow: {
|
columnsShow: {
|
||||||
min: ['name', 'actions'],
|
min: ['name', 'actions'],
|
||||||
default: ['name', 'type_display', 'attrs.host', 'attrs.port', 'attrs.database', 'comment', 'actions']
|
default: [
|
||||||
|
'name', 'type_display', 'attrs.host', 'attrs.port',
|
||||||
|
'attrs.database', 'comment', 'actions'
|
||||||
|
]
|
||||||
},
|
},
|
||||||
columnsMeta: {
|
columnsMeta: {
|
||||||
type_display: {
|
type_display: {
|
||||||
@@ -75,7 +91,7 @@ export default {
|
|||||||
{
|
{
|
||||||
value: 'type',
|
value: 'type',
|
||||||
label: this.$t('applications.type'),
|
label: this.$t('applications.type'),
|
||||||
children: this.getAppType(appType)
|
children: getAppType(appType)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -89,18 +105,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getAppType(arr) {
|
|
||||||
const searchAppType = []
|
|
||||||
if (arr.length < 1) return searchAppType
|
|
||||||
arr.forEach((i) => {
|
|
||||||
const option = {
|
|
||||||
value: i.name,
|
|
||||||
label: i.title
|
|
||||||
}
|
|
||||||
searchAppType.push(option)
|
|
||||||
})
|
|
||||||
return searchAppType
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@@ -51,7 +51,7 @@ export default {
|
|||||||
title: this.$t('xpack.ComponentMonitor'),
|
title: this.$t('xpack.ComponentMonitor'),
|
||||||
name: 'Monitor',
|
name: 'Monitor',
|
||||||
hidden: () => {
|
hidden: () => {
|
||||||
return !this.$hasPerm('terminal.view_terminal') && this.$store.getters.hasValidLicense
|
return !(this.$hasPerm('terminal.view_terminal') && this.$store.getters.hasValidLicense)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user