mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 06:19:51 +00:00
fix: 修复导入引起的问题
This commit is contained in:
@@ -43,6 +43,7 @@ export function getResourceNameByPath(path) {
|
||||
|
||||
export function getResourceFromApiUrl(apiUrl) {
|
||||
const re = new RegExp('/api/v1/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/.*')
|
||||
console.log('Api url: ', apiUrl)
|
||||
const matched = apiUrl.match(re)
|
||||
if (!matched) {
|
||||
return { path: '', app: '', resource: '' }
|
||||
|
@@ -6,7 +6,7 @@
|
||||
import { GenericListTable } from '@/layout/components'
|
||||
import { DetailFormatter } from '@/components/TableFormatters'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import { AppPlanDatabase } from '@/views/perms/const'
|
||||
import { AppPlanDatabase } from '@/views/applications/const'
|
||||
|
||||
export default {
|
||||
name: 'AppChangeAuthPlanList',
|
||||
|
@@ -4,7 +4,20 @@
|
||||
|
||||
<script>
|
||||
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 {
|
||||
components: {
|
||||
@@ -22,7 +35,10 @@ export default {
|
||||
],
|
||||
columnsShow: {
|
||||
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: {
|
||||
type_display: {
|
||||
@@ -75,7 +91,7 @@ export default {
|
||||
{
|
||||
value: 'type',
|
||||
label: this.$t('applications.type'),
|
||||
children: this.getAppType(appType)
|
||||
children: getAppType(appType)
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -89,18 +105,6 @@ export default {
|
||||
}
|
||||
},
|
||||
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>
|
||||
|
@@ -51,7 +51,7 @@ export default {
|
||||
title: this.$t('xpack.ComponentMonitor'),
|
||||
name: 'Monitor',
|
||||
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