mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 19:15:13 +00:00
feat: add xpack lock feat
This commit is contained in:
parent
caf34a96e6
commit
9933f68ba9
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,3 +17,5 @@ tests/**/coverage/
|
|||||||
*.sln
|
*.sln
|
||||||
.env.development
|
.env.development
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
|
helper.json
|
@ -94,6 +94,7 @@
|
|||||||
"@vue/cli-plugin-unit-jest": "3.6.3",
|
"@vue/cli-plugin-unit-jest": "3.6.3",
|
||||||
"@vue/cli-service": "3.6.0",
|
"@vue/cli-service": "3.6.0",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.29",
|
||||||
|
"@vue/runtime-dom": "3.5.13",
|
||||||
"autoprefixer": "^9.5.1",
|
"autoprefixer": "^9.5.1",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.1",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card :class="'ibox ' + type" shadow="never" v-bind="$attrs">
|
<el-card :class="'ibox ' + type" :shadow="shadow" v-bind="$attrs">
|
||||||
<template #header>
|
<template #header>
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<div v-if="title" slot="header" class="clearfix ibox-title">
|
<div v-if="title" slot="header" class="clearfix ibox-title">
|
||||||
@ -26,6 +26,10 @@ export default {
|
|||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'default'
|
default: 'default'
|
||||||
|
},
|
||||||
|
shadow: {
|
||||||
|
type: String,
|
||||||
|
default: 'never'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
|||||||
.quick-actions ::v-deep button {
|
.quick-actions ::v-deep button {
|
||||||
padding: 4px 5px;
|
padding: 4px 5px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
width: 65px;
|
min-width: 65px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<!-- 默认插槽内容,全宽 -->
|
<!-- 默认插槽内容,全宽 -->
|
||||||
<el-col :md="single" :offset="(24 - single)/2" :sm="24">
|
<el-col :md="single" :sm="24">
|
||||||
<slot />
|
<slot />
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
@ -29,7 +29,22 @@
|
|||||||
<slot name="headingRightSide" />
|
<slot name="headingRightSide" />
|
||||||
</template>
|
</template>
|
||||||
</PageHeading>
|
</PageHeading>
|
||||||
<PageContent class="page-content">
|
<PageContent :class="{'disabled': disabled}" class="page-content">
|
||||||
|
<div v-if="disabled" class="content-disabled-mask">
|
||||||
|
<IBox shadow="always">
|
||||||
|
<div class="disabled-content">
|
||||||
|
<div class="lock-icon">
|
||||||
|
<i class="el-icon-unlock" />
|
||||||
|
</div>
|
||||||
|
<div class="disabled-text">
|
||||||
|
{{ $t('UpgradeEnterpriseEditionHelpText') }}
|
||||||
|
</div>
|
||||||
|
<el-button class="upgrade-btn" type="primary">
|
||||||
|
{{ $t('UpgradeEnterpriseEdition') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</IBox>
|
||||||
|
</div>
|
||||||
<el-alert v-if="helpMessage" type="success">
|
<el-alert v-if="helpMessage" type="success">
|
||||||
<span v-sanitize="helpMessage" class="announcement-main" />
|
<span v-sanitize="helpMessage" class="announcement-main" />
|
||||||
</el-alert>
|
</el-alert>
|
||||||
@ -46,6 +61,7 @@ import UserConfirmDialog from '@/components/Apps/UserConfirmDialog/index.vue'
|
|||||||
import TagsView from '../TagsView/index.vue'
|
import TagsView from '../TagsView/index.vue'
|
||||||
import { toSentenceCase } from '@/utils/common'
|
import { toSentenceCase } from '@/utils/common'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Page',
|
name: 'Page',
|
||||||
@ -53,9 +69,14 @@ export default {
|
|||||||
UserConfirmDialog,
|
UserConfirmDialog,
|
||||||
PageHeading,
|
PageHeading,
|
||||||
PageContent,
|
PageContent,
|
||||||
TagsView
|
TagsView,
|
||||||
|
IBox
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@ -81,7 +102,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['inDrawer']),
|
...mapGetters(['inDrawer', 'hasValidLicense']),
|
||||||
|
iDisabled() {
|
||||||
|
if (this.disabled !== null) {
|
||||||
|
return this.disabled
|
||||||
|
}
|
||||||
|
return !this.hasValidLicense
|
||||||
|
},
|
||||||
noTitle() {
|
noTitle() {
|
||||||
return this.title === 'null' || this.title === null
|
return this.title === 'null' || this.title === null
|
||||||
},
|
},
|
||||||
@ -116,6 +143,10 @@ export default {
|
|||||||
},
|
},
|
||||||
endLongPress() {
|
endLongPress() {
|
||||||
clearTimeout(this.longPressTimer)
|
clearTimeout(this.longPressTimer)
|
||||||
|
},
|
||||||
|
handleUpgrade() {
|
||||||
|
const url = 'http://www.jumpserver.org/support/'
|
||||||
|
window.open(url, '_blank')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,13 +166,6 @@ export default {
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.no-title {
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-head {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
flex: 1; /* 占用剩余高度 */
|
flex: 1; /* 占用剩余高度 */
|
||||||
//height: calc(100% - 50px);
|
//height: calc(100% - 50px);
|
||||||
@ -185,4 +209,59 @@ export default {
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ibox {
|
||||||
|
width: 500px;
|
||||||
|
position: absolute;
|
||||||
|
top: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-disabled-mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
backdrop-filter: blur(2px);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 1000;
|
||||||
|
|
||||||
|
.disabled-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.lock-icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 10px auto;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 40px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled-text {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upgrade-btn {
|
||||||
|
min-width: 120px;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-content.disabled {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@ -30,6 +31,9 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['hasValidLicense'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@ -37,6 +38,9 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['hasValidLicense'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
@ -36,6 +37,9 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['hasValidLicense'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<TabPage
|
<TabPage
|
||||||
:active-menu.sync="activeMenu"
|
:active-menu.sync="activeMenu"
|
||||||
:submenu="tab.submenu"
|
:submenu="tab.submenu"
|
||||||
|
:disabled="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
<TabPage
|
<TabPage
|
||||||
:active-menu.sync="activeMenu"
|
:active-menu.sync="activeMenu"
|
||||||
:submenu="tab.submenu"
|
:submenu="tab.submenu"
|
||||||
|
:disabled="!hasValidLicense"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IntegrationApplicationList',
|
name: 'IntegrationApplicationList',
|
||||||
@ -41,9 +43,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {},
|
computed: {
|
||||||
async mounted() {
|
...mapGetters(['hasValidLicense'])
|
||||||
},
|
}
|
||||||
methods: {}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TabPage } from '@/layout/components'
|
import { TabPage } from '@/layout/components'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountCheck',
|
name: 'AccountCheck',
|
||||||
@ -42,6 +43,9 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['hasValidLicense'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user