Compare commits

..

7 Commits

Author SHA1 Message Date
“huailei000”
ee55cebf0e fix: 修复临时密码提示翻译 2022-04-29 10:53:55 +08:00
ibuler
2e5096f386 perf: 修改 build 2022-04-29 10:53:55 +08:00
feng626
bf57ee8910 fix: 开放platform 权限 2022-04-29 10:38:44 +08:00
feng626
f86f08f2b6 Merge pull request #1713 from jumpserver/pr@v2.21@workbench_orgs
fix: myorgs -> workbench_orgs
2022-04-25 11:36:57 +08:00
feng626
6eb429823d fix: myorgs -> workbench_orgs 2022-04-25 11:34:37 +08:00
feng626
d6be84026c Merge pull request #1711 from jumpserver/pr@v2.21@fix_temporary_password_text
fix: 修改临时密码提示文案
2022-04-25 11:05:26 +08:00
“huailei000”
4a7680ec7a fix: 修改临时密码提示文案 2022-04-25 03:00:15 +00:00
305 changed files with 1900 additions and 4650 deletions

View File

@@ -1,7 +1,7 @@
FROM node:10 as stage-build
ARG NPM_REGISTRY="https://registry.npmmirror.com"
ARG NPM_REGISTRY="https://registry.npm.taobao.org"
ENV NPM_REGISTY=$NPM_REGISTRY
ARG SASS_BINARY_SITE="https://npmmirror.com/mirrors/node-sass"
ARG SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"
ENV SASS_BINARY_SITE=$SASS_BINARY_SITE
WORKDIR /data

View File

@@ -24,9 +24,9 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
)
app.listen(port, function () {
// debug(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
// debug(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})

View File

@@ -56,7 +56,7 @@ const responseFake = (url, type, respond) => {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
// debug('request invoke:' + req.path)
console.log('request invoke:' + req.path)
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}

View File

@@ -59,9 +59,9 @@ module.exports = app => {
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
// debug(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
} catch (error) {
// debug(chalk.redBright(error))
console.log(chalk.redBright(error))
}
}
})

View File

@@ -25,8 +25,6 @@
"axios": "0.21.1",
"axios-retry": "^3.1.9",
"cron-parser": "^4.0.0",
"crypto-js": "^4.1.1",
"css-color-function": "^1.3.3",
"deepmerge": "^4.2.2",
"echarts": "^4.7.0",
"element-ui": "2.13.2",
@@ -34,11 +32,10 @@
"install": "^0.13.0",
"jquery": "^3.5.0",
"js-cookie": "2.2.0",
"jsencrypt": "^3.2.1",
"krry-transfer": "^1.7.3",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"lodash": "^4.17.21",
"lodash": "^4.17.15",
"lodash.clonedeep": "^4.5.0",
"lodash.frompairs": "^4.0.1",
"lodash.get": "^4.4.2",
@@ -50,8 +47,8 @@
"lodash.set": "^4.3.2",
"lodash.topairs": "^4.3.0",
"lodash.values": "^4.3.0",
"moment": "^2.29.4",
"moment-parseformat": "^4.0.0",
"moment": "^2.29.1",
"moment-parseformat": "^3.0.0",
"normalize.css": "7.0.0",
"npm": "^7.8.0",
"nprogress": "0.2.0",
@@ -97,7 +94,7 @@
"lint-staged": "^10.1.2",
"mockjs": "1.0.1-beta3",
"runjs": "^4.3.2",
"sass": "~1.32.6",
"sass": "^1.26.10",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",

View File

@@ -9,7 +9,23 @@
<meta http-equiv="Cache" content="no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title><%= webpackConfig.name %></title>
<link rel="stylesheet" href="<%= BASE_URL %>theme/element-ui.css">
<style>
::-webkit-scrollbar {
width:14px;
}
::-webkit-scrollbar-track {
border-radius:10px;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
box-shadow: 8px 10px 20px #C6C6C6 inset;
border: 3px solid rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-thumb:hover {
box-shadow: 8px 10px 20px #878787 inset;
}
</style>
</head>
<body>
<noscript>

View File

@@ -1,23 +0,0 @@
# 主题颜色
```
alpha-1: "rgba(64, 158, 255, 0.1)"
alpha-2: "rgba(64, 158, 255, 0.2)"
alpha-3: "rgba(64, 158, 255, 0.3)"
alpha-4: "rgba(64, 158, 255, 0.4)"
alpha-5: "rgba(64, 158, 255, 0.5)"
alpha-6: "rgba(64, 158, 255, 0.6)"
alpha-7: "rgba(64, 158, 255, 0.7)"
alpha-8: "rgba(64, 158, 255, 0.8)"
alpha-9: "rgba(64, 158, 255, 0.9)"
light-1: "#53a8ff"
light-2: "#66b1ff"
light-3: "#79bbff"
light-4: "#8cc5ff"
light-5: "#a0cfff"
light-6: "#b3d8ff"
light-7: "#c6e2ff"
light-8: "#d9ecff"
light-9: "#ecf5ff"
primary: "#409EFF"
```
primary是初始主题颜色其他颜色均属于primary的系列颜色

File diff suppressed because one or more lines are too long

View File

@@ -9,6 +9,3 @@ export default {
name: 'App'
}
</script>
<style>
</style>

View File

@@ -1,8 +1,8 @@
import request from '@/utils/request'
export function updateInterface(formData) {
export function postInterface(formData) {
return request({
url: '/api/v1/xpack/interface/setting/',
url: '/api/v1/xpack/interface/setting',
method: 'put',
headers: {
'Content-Type': 'multipart/form-data'
@@ -12,15 +12,15 @@ export function updateInterface(formData) {
}
export function getInterfaceInfo() {
return request({
url: '/api/v1/xpack/interface/setting/',
url: '/api/v1/xpack/interface/setting',
method: 'get'
})
}
export function restoreInterface() {
return request({
url: '/api/v1/xpack/interface/setting/restore/',
method: 'put'
url: '/api/v1/xpack/interface/restore',
method: 'get'
})
}
@@ -34,10 +34,3 @@ export function importLicense(formData) {
data: formData
})
}
export function previewThemes() {
return request({
url: `/api/v1/xpack/interface/setting/themes/`,
method: 'get'
})
}

View File

@@ -68,21 +68,15 @@ export function importLdapUser(data) {
})
}
export function getPublicSettings(isOpen) {
let url
if (isOpen) {
url = '/api/v1/settings/public/open/'
} else {
url = '/api/v1/settings/public/'
}
export function getPublicSettings() {
return request({
url: url,
url: '/api/v1/settings/public/',
method: 'get'
})
}
export function getLogo() {
return request({
url: '/api/v1/xpack/interface/setting/',
url: '/api/v1/xpack/interface/setting',
method: 'get'
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/img/header-profile.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -1,156 +0,0 @@
<template>
<div>
<GenericListPage :table-config="tableConfig" :header-actions="headerActions" :help-message="title" />
<ShowSecretInfo v-if="showViewSecretDialog" :visible.sync="showViewSecretDialog" :account="account" />
</div>
</template>
<script>
import { ActionsFormatter, DetailFormatter, DisplayFormatter } from '@/components/TableFormatters'
import ShowSecretInfo from '../AccountListTable/ShowSecretInfo'
import { GenericListPage } from '@/layout/components'
export default {
name: 'AccountHistoryTable',
components: {
GenericListPage,
ShowSecretInfo
},
props: {
url: {
type: String,
required: true
},
exportUrl: {
type: String,
default() {
return this.url.replace('/assets/accounts-history/', '/assets/account-history-secrets/')
}
},
hasLeftActions: {
type: Boolean,
default: false
},
otherActions: {
type: Array,
default: null
},
hasClone: {
type: Boolean,
default: false
}
},
data() {
const vm = this
return {
showViewSecretDialog: false,
account: {},
tableConfig: {
url: this.url,
permissions: {
app: 'assets',
resource: 'authbook'
},
columns: [
'hostname', 'ip', 'username', 'version',
'systemuser', 'date_created', 'date_updated', 'actions'
],
columnsShow: {
min: ['username', 'actions'],
default: ['hostname', 'ip', 'username', 'version', 'actions']
},
columnsMeta: {
hostname: {
prop: 'hostname',
label: this.$t('assets.Hostname'),
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.$hasPerm('assets.view_asset'),
getRoute({ row }) {
return {
name: 'AssetDetail',
params: { id: row.asset }
}
}
}
},
ip: {
width: '120px'
},
username: {
showOverflowTooltip: true
},
systemuser: {
formatter: DisplayFormatter
},
version: {
width: '70px'
},
actions: {
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasClone: this.hasClone,
moreActionsTitle: this.$t('common.More'),
extraActions: [
{
name: 'View',
title: this.$t('common.View'),
can: this.$hasPerm('assets.view_assethistoryaccountsecret'),
type: 'primary',
callback: ({ row }) => {
vm.account = row
vm.showViewSecretDialog = true
}
}
]
}
}
}
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasMoreActions: false,
hasCreate: false,
hasImport: false,
hasExport: this.$hasPerm('assets.view_assethistoryaccountsecret'),
exportOptions: {
url: this.exportUrl,
mfaVerifyRequired: true
},
searchConfig: {
exclude: ['systemuser', 'asset']
},
hasSearch: true
}
}
},
computed: {
title() {
return this.$t('accounts.AccountHistableHelpMessage')
}
},
watch: {
url(iNew) {
this.$set(this.tableConfig, 'url', iNew)
this.$set(this.headerActions.exportOptions, 'url', iNew.replace('/accounts-history/', '/account-history-secrets/'))
}
},
mounted() {
if (this.otherActions) {
const actionColumn = this.tableConfig.columns[this.tableConfig.columns.length - 1]
for (const item of this.otherActions) {
actionColumn.formatterArgs.extraActions.push(item)
}
}
},
methods: {
}
}
</script>
<style lang='less' scoped>
</style>

View File

@@ -1,9 +1,8 @@
<template>
<div>
<UserConfirmDialog
:url="url"
@UserConfirmDone="getAuthInfo"
@UserConfirmCancel="exit"
<MFAVerifyDialog
@MFAVerifyDone="getAuthInfo"
@MFAVerifyCancel="exit"
/>
<Dialog
:title="dialogTitle"
@@ -37,12 +36,12 @@
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
import MFAVerifyDialog from '@/components/MFAVerifyDialog'
export default {
name: 'ShowSecretInfo',
components: {
Dialog,
UserConfirmDialog
MFAVerifyDialog
},
props: {
account: {
@@ -58,13 +57,16 @@ export default {
return {
dialogTitle: this.$t('common.ViewSecret'),
authInfo: {},
showAuthInfo: false,
url: `/api/v1/assets/account-secrets/${this.account.id}/`
showAuthInfo: false
}
},
mounted() {
this.getAuthInfo()
},
methods: {
getAuthInfo() {
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
const url = `/api/v1/assets/account-secrets/${this.account.id}/`
this.$axios.get(url, { disableFlashErrorMsg: true }).then(resp => {
this.authInfo = resp
this.showAuthInfo = true
})

View File

@@ -31,7 +31,6 @@
<script>
import Dialog from '@/components/Dialog'
import { UpdateToken, UploadKey } from '@/components/FormFields'
import { encryptPassword } from '@/utils/crypto'
export default {
name: 'UpdateSecretInfo',
components: {
@@ -62,10 +61,10 @@ export default {
handleConfirm() {
const data = {}
if (this.authInfo.password !== '') {
data.password = encryptPassword(this.authInfo.password)
data.password = this.authInfo.password
}
if (this.authInfo.private_key !== '') {
data.private_key = encryptPassword(this.authInfo.private_key)
data.private_key = this.authInfo.private_key
if (this.authInfo.passphrase) data.passphrase = this.authInfo.passphrase
}
this.$axios.patch(

View File

@@ -13,7 +13,6 @@ import ShowSecretInfo from './ShowSecretInfo'
import UpdateSecretInfo from './UpdateSecretInfo'
import { connectivityMeta } from './const'
import { openTaskPage } from '@/utils/jms'
// import i18n from '@/i18n/i18n'
export default {
name: 'AccountListTable',
@@ -110,10 +109,7 @@ export default {
type: 'primary',
callback: ({ row }) => {
vm.account = row
vm.showViewSecretDialog = false
setTimeout(() => {
vm.showViewSecretDialog = true
})
vm.showViewSecretDialog = true
}
},
{
@@ -150,20 +146,11 @@ export default {
vm.showUpdateSecretDialog = false
setTimeout(() => {
vm.showUpdateSecretDialog = true
console.log('Show update1: ', vm.showUpdateSecretDialog)
})
console.log('Show update2: ', vm.showUpdateSecretDialog)
}
}
// {
// name: 'History',
// title: i18n.t('common.History'),
// can: this.$hasPerm('assets.view_assethistoryaccount') && !this.$store.getters.currentOrgIsRoot,
// callback: ({ row }) => {
// this.$router.push({
// name: 'AssetAccountHistoryList',
// query: { id: row.id }
// })
// }
// }
]
}
}
@@ -171,8 +158,7 @@ export default {
},
headerActions: {
hasLeftActions: this.hasLeftActions,
hasMoreActions: true,
hasCreate: false,
hasMoreActions: false,
hasImport: false,
hasExport: this.$hasPerm('assets.view_assetaccountsecret'),
exportOptions: {

View File

@@ -12,7 +12,7 @@
<el-link :href="announcement.link" target="_blank" class="link-more">
{{ $t('common.ViewMore') }}
</el-link>
<i class="fa fa-external-link" />
<i class="fa fa-share-square-o" />
</span>
</el-alert>
</template>

View File

@@ -1,9 +1,8 @@
<template>
<div>
<UserConfirmDialog
:url="url"
@UserConfirmDone="getAuthInfo"
@UserConfirmCancel="exit"
<MFAVerifyDialog
@MFAVerifyDone="getAuthInfo"
@MFAVerifyCancel="exit"
/>
<Dialog
:title="dialogTitle"
@@ -34,12 +33,12 @@
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
import MFAVerifyDialog from '@/components/MFAVerifyDialog'
export default {
name: 'ShowSecretInfo',
components: {
Dialog,
UserConfirmDialog
MFAVerifyDialog
},
props: {
account: {
@@ -55,13 +54,16 @@ export default {
return {
dialogTitle: this.$t('common.ViewSecret'),
authInfo: {},
showAuthInfo: false,
url: `/api/v1/applications/account-secrets/${this.account.id}/`
showAuthInfo: false
}
},
mounted() {
this.getAuthInfo()
},
methods: {
getAuthInfo() {
this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(resp => {
const url = `/api/v1/applications/account-secrets/${this.account.id}/`
this.$axios.get(url, { disableFlashErrorMsg: true }).then(resp => {
this.authInfo = resp
this.showAuthInfo = true
})

View File

@@ -38,10 +38,6 @@ export default {
hasClone: {
type: Boolean,
default: false
},
systemUserDisabled: {
type: Boolean,
default: true
}
},
data() {
@@ -88,7 +84,7 @@ export default {
showOverflowTooltip: true,
formatter: DetailFormatter,
formatterArgs: {
can: this.systemUserDisabled && this.$hasPerm('assets.view_systemuser'),
can: this.$hasPerm('assets.view_systemuser'),
getTitle({ row }) {
return row.systemuser_display
},

View File

@@ -75,8 +75,6 @@ export default {
showMenu: false,
showRefresh: true,
showAssets: false,
showSearch: true,
customTreeHeader: true,
url: '/api/v1/assets/assets/?fields_size=mini',
nodeUrl: '/api/v1/assets/nodes/',
// ?assets=0不显示资产. =1显示资产

View File

@@ -78,22 +78,15 @@ export default {
},
_cleanFormValue(form, remoteMeta) {
for (const [k, v] of Object.entries(remoteMeta)) {
let valueSet = form[k]
if (v.type === 'nested object' && v.children) {
// 有一些字段属性时 nested object 类型,但是没有 children没有children的不需要走递归逻辑
// 比如:认证配置中的属性映射字段
if (typeof valueSet !== 'object') {
// 处理一些前端没有设置初始值的情况
valueSet = {}
}
form[k] = valueSet
this._cleanFormValue(valueSet, v.children)
if (v.default === undefined) {
continue
}
const valueSet = form[k]
if (valueSet !== undefined) {
continue
}
if (v.default === undefined) {
continue
if (v.type === 'nested object' && typeof valueSet === 'object') {
this._cleanFormValue(valueSet, v.children)
}
form[k] = v.default
}

View File

@@ -1,7 +1,6 @@
import Vue from 'vue'
import Select2 from '@/components/FormFields/Select2'
import NestedField from '@/components/AutoDataForm/components/NestedField'
import Swicher from '@/components/FormFields/Swicher'
import rules from '@/components/DataForm/rules'
import { assignIfNot } from '@/utils/common'
@@ -46,8 +45,7 @@ export class FormFieldGenerator {
}
break
case 'boolean':
type = ''
field.component = Swicher
type = 'checkbox'
break
case 'nested object':
type = 'nestedField'

View File

@@ -85,9 +85,6 @@ export default {
{ label: i18n.t('common.No'), value: false }
]
}
if (option.value === 'id') {
option.label = 'ID'
}
vm.internalOptions.push(option)
}
},

View File

@@ -18,7 +18,6 @@
<script>
import DataZTree from '../DataZTree'
import $ from '@/utils/jquery-vendor'
import { mapGetters } from 'vuex'
export default {
name: 'AutoDataZTree',
@@ -38,10 +37,6 @@ export default {
showCreate: true,
showDelete: true,
showUpdate: true,
showSearch: false,
// 自定义header
customTreeHeader: false,
customTreeHeaderName: this.$t('assets.AssetTree'),
async: {
enable: true,
url: (process.env.VUE_APP_ENV === 'production') ? (`${this.setting.treeUrl}`) : (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`),
@@ -71,9 +66,6 @@ export default {
}
},
computed: {
...mapGetters([
'currentOrg'
]),
treeSetting() {
this.$log.debug('Settings: ', this.setting)
return _.merge(this.defaultSetting, this.setting)
@@ -90,8 +82,8 @@ export default {
},
methods: {
refreshTree: function() {
// const refreshIconRef = $('#tree-refresh')
// refreshIconRef.click()
const refreshIconRef = $('#tree-refresh')
refreshIconRef.click()
},
editTreeNode: function() {
this.hideRMenu()
@@ -120,17 +112,16 @@ export default {
}
let url = ''
const query = Object.assign({}, this.$route.query)
const objectId = treeNode.meta.data.id
if (treeNode.meta.type === 'node') {
this.currentNode = treeNode
this.currentNodeId = treeNode.meta.data.id
query['node'] = this.currentNodeId
query['asset'] = ''
url = `${this.setting.url}${combinator}node_id=${objectId}&show_current_asset=${show_current_asset}`
url = `${this.setting.url}${combinator}node_id=${treeNode.meta.data.id}&show_current_asset=${show_current_asset}`
} else if (treeNode.meta.type === 'asset') {
query['asset'] = treeNode.meta.data.id
query['node'] = ''
url = `${this.setting.url}${combinator}asset_id=${objectId}&show_current_asset=${show_current_asset}`
url = `${this.setting.url}${combinator}asset_id=${treeNode.meta.data.id}&show_current_asset=${show_current_asset}`
}
this.$router.push({ query })
this.$emit('urlChange', url)
@@ -160,12 +151,11 @@ export default {
url,
{ 'value': treeNode.name }
).then(res => {
let assetsAmount = treeNode.meta.data['assetsAmount']
let assetsAmount = treeNode.meta.data.assetsAmount
if (!assetsAmount) {
assetsAmount = 0
}
treeNode.name = treeNode.name + ' (' + assetsAmount + ')'
treeNode.meta.data = res
this.zTree.updateNode(treeNode)
this.$message.success(this.$t('common.updateSuccessMsg'))
}).finally(() => { this.refreshTree() })
@@ -180,7 +170,7 @@ export default {
const rMenuID = this.$refs.dataztree.$refs.ztree.iRMenuID
const zTreeID = this.$refs.dataztree.$refs.ztree.iZTreeID
const offset = $(`#${zTreeID}`).offset()
const scrollTop = document.querySelector('.treebox')?.scrollTop
const scrollTop = document.querySelector('.treebox').scrollTop
x -= offset.left
// Tmp
y -= (offset.top + scrollTop) / 3 - 10
@@ -200,7 +190,7 @@ export default {
return
}
// 屏蔽收藏资产
if (treeNode?.id === '-12') {
if (treeNode.id === '-12') {
return
}
if (!treeNode && event.target.tagName.toLowerCase() !== 'button' && $(event.target).parents('a').length === 0) {
@@ -237,7 +227,7 @@ export default {
this.$message.success(this.$t('common.updateSuccessMsg'))
}).catch(error => {
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
}).finally()
}).finally(() => this.refreshTree())
},
createTreeNode: function() {
this.hideRMenu()
@@ -253,14 +243,13 @@ export default {
id: data['key'],
name: data['value'],
pId: parentNode.id,
isParent: true,
meta: {
data: data,
type: 'node'
data: data
}
}
newNode.checked = this.zTree.getSelectedNodes()[0].checked
this.zTree.addNodes(parentNode, 0, newNode)
// vm.$refs.dataztree.refresh()
const node = this.zTree.getNodeByParam('id', newNode.id, parentNode)
this.currentNodeId = node.meta.data.id || newNode.id
this.zTree.editName(node)

View File

@@ -238,7 +238,7 @@ export default {
updateContabValue(name, value, from) {
this.contabValueObj[name] = value
if (from && from !== name) {
// debug(`来自组件 ${from} 改变了 ${name} ${value}`)
console.log(`来自组件 ${from} 改变了 ${name} ${value}`)
this.changeRadio(name, value)
}
},

View File

@@ -53,7 +53,7 @@ export default {
}
} catch (error) {
this.isShow = false
// debug(error, 'error')
console.log(error, 'error')
}
}
}

View File

@@ -146,7 +146,7 @@ export default {
* - el-form 的 resetFields 不会触发 input & change 事件,无法监听
* - bug1: https://github.com/FEMessage/el-data-table/issues/176#issuecomment-587280825
* - bug2:
* 0. 建议先在监听器 watch.value 里 // debug(v.name, oldV.name)
* 0. 建议先在监听器 watch.value 里 console.log(v.name, oldV.name)
* 1. 打开 basic 示例
* 2. 在 label 为 name 的输入框里输入 1此时 log'1' ''
* 3. 点击 reset 按钮,此时 log 两条数据: '1' '1', '' ''

View File

@@ -14,7 +14,7 @@
<slot v-for="item in fields" :slot="`$id:${item.id}`" :name="`$id:${item.id}`" />
<el-form-item v-if="hasButtons" class="form-buttons">
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" :loading="button.loading" @click="handleClick(button)">{{ button.title }}</el-button>
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" @click="handleClick(button)">{{ button.title }}</el-button>
<el-button v-if="defaultButton && hasReset" size="small" @click="resetForm('form')">{{ $t('common.Reset') }}</el-button>
<el-button v-if="defaultButton && hasSaveContinue" size="small" @click="submitForm('form', true)">{{ $t('common.SaveAndAddAnother') }}</el-button>
<el-button v-if="defaultButton" size="small" :loading="isSubmitting" type="primary" @click="submitForm('form')">{{ $t('common.Submit') }}</el-button>
@@ -97,11 +97,11 @@ export default {
},
handleClick(button) {
const callback = button.callback || function(values, form) {
// debug('Click ', button.title, ': ', values)
// console.log('Click ', button.title, ': ', values)
}
const form = this.$refs['form']
const values = form.getFormValue()
callback(values, form, button)
callback(values, form)
}
}
}
@@ -145,7 +145,7 @@ export default {
line-height: 18px;
}
.el-form ::v-deep .help-block a {
color: var(--color-primary);
color: #1c84c6;
}
.form-buttons {
padding-top: 10px;

View File

@@ -14,23 +14,10 @@ export const EmailCheck = {
trigger: ['blur', 'change']
}
export const specialEmojiCheck = {
validator: (rule, value, callback) => {
value = value.trim()
if (/[\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/.test(value)) {
callback(new Error(i18n.t('common.NotSpecialEmoji')))
} else {
callback()
}
},
trigger: ['blur', 'change']
}
export default {
Required,
RequiredChange,
EmailCheck,
specialEmojiCheck
EmailCheck
}
export const JsonRequired = {

View File

@@ -1,50 +1,14 @@
<template>
<div>
<div
v-if="treeSetting.customTreeHeader"
class="tree-header treebox"
>
<div class="content">
<span class="title">
{{ treeSetting.customTreeHeaderName }}
</span>
<span class="tree-banner-icon-zone">
<a id="searchIcon" class="tree-search special">
<i
class="fa fa-search tree-banner-icon"
@click.stop="treeSearch"
/>
<input
id="searchInput"
v-model="treeSearchValue"
type="text"
autocomplete="off"
class="tree-input"
>
</a>
<i
class="fa fa-refresh tree-banner-icon"
style="margin-right: 2px;"
@click.stop="refresh"
/>
</span>
</div>
<ul v-show="loading" class="ztree">
<ul v-show="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<div v-show="!loading" class="treebox">
<ul :id="iZTreeID" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<ul v-show="!loading" :id="iZTreeID" class="ztree" />
<div v-if="treeSetting.treeUrl===''" class="tree-empty">
{{ this.$t('common.tree.Empty') }}
</div>
</div>
<div v-else class="treebox">
<ul v-show="loading" class="ztree">
{{ this.$t('common.tree.Loading') }}...
</ul>
<ul v-show="!loading" :id="iZTreeID" class="ztree" />
<div v-if="treeSetting.treeUrl===''" class="tree-empty">
{{ this.$t('common.tree.Empty') }}
<a id="tree-refresh"><i class="fa fa-refresh" /></a>
<div v-if="treeSetting.treeUrl===''">
{{ this.$t('common.tree.Empty') }}<a id="tree-refresh"><i class="fa fa-refresh" /></a>
</div>
</div>
<div :id="iRMenuID" class="rMenu">
@@ -60,7 +24,6 @@
// eslint-disable-next-line no-unused-vars
import $ from '@/utils/jquery-vendor.js'
import '@ztree/ztree_v3/js/jquery.ztree.all.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.exhide.min.js'
import '@/styles/ztree.css'
import axiosRetry from 'axios-retry'
@@ -82,8 +45,7 @@ export default {
zTree: '',
rMenu: '',
init: false,
loading: false,
treeSearchValue: ''
loading: false
}
},
computed: {
@@ -92,9 +54,8 @@ export default {
}
},
mounted() {
window.refresh = this.refresh
window.treeSearch = this.treeSearch
this.initTree()
// $('.treebox').css('height', window.innerHeight - 60)
},
beforeDestroy() {
$.fn.zTree.destroy(this.iZTreeID)
@@ -121,7 +82,9 @@ export default {
retryDelay: () => { return 5000 }
}
}).then(res => {
if (!res) res = []
if (!res) {
res = []
}
if (res.length === 0) {
res.push({
name: this.$t('common.tree.Empty')
@@ -131,13 +94,15 @@ export default {
if (this.init) {
vm.zTree.destroy()
}
this.zTree = $.fn.zTree.init($(`#${this.iZTreeID}`), this.treeSetting, res)
if (!this.treeSetting.customTreeHeader) {
this.rootNodeAddDom(this.zTree)
}
// 手动上报事件, Tree加载完成
this.$emit('TreeInitFinish', this.zTree)
if (this.treeSetting.showRefresh) {
this.rootNodeAddDom(
this.zTree,
this.treeSetting.callback.refresh
)
}
if (this.treeSetting.showMenu) {
this.rMenu = $(`#${this.iRMenuID}`)
@@ -150,196 +115,43 @@ export default {
vm.init = true
})
},
rootNodeAddDom(ztree) {
const { showSearch, showRefresh } = this.treeSetting
const searchIcon = `<a class="tree-search" id="searchIcon">
<i class='fa fa-search tree-banner-icon' onclick="treeSearch()" /></i>
<input type="text" autocomplete="off" id="searchInput" class="tree-input" />
</a>`
const refreshIcon = "<a id='tree-refresh' onclick='refresh()'><i class='fa fa-refresh'></i></a>"
const treeActions = `${showSearch ? searchIcon : ''}${showRefresh ? refreshIcon : ''}`
const icons = `<span class="">${treeActions}</span>`
rootNodeAddDom: function(ztree, callback) {
const vm = this
const refreshIcon = "<a id='tree-refresh'><i class='fa fa-refresh'></i></a>"
const rootNode = ztree.getNodes()[0]
let $rootNodeRef
if (rootNode) {
const $rootNodeRef = $('#' + rootNode.tId + '_a')
$rootNodeRef.after(icons)
}
},
refresh() {
this.treeSearchValue = ''
const result = this.treeSetting?.callback?.refresh()
if (result && result.then) {
result.finally(() => {
this.initTree()
})
$rootNodeRef = $('#' + rootNode.tId + '_a')
$rootNodeRef.after(refreshIcon)
} else {
this.initTree()
$rootNodeRef = $('#' + ztree.setting.treeId)
$rootNodeRef.html(refreshIcon)
}
},
treeSearch() {
const searchIcon = document.getElementById(`searchIcon`)
const searchInput = document.getElementById(`searchInput`)
searchIcon.classList.toggle('active')
searchInput.focus()
searchInput.onclick = (e) => {
e.stopPropagation()
}
searchInput.onblur = (e) => {
e.stopPropagation()
if (!(e.target.value)) {
searchIcon.classList.toggle('active')
}
}
searchInput.oninput = _.debounce((e) => {
e.stopPropagation()
const value = e.target.value || ''
if (this.treeSetting.async.enable) {
this.filterAssetsServer(value)
const refreshIconRef = $('#tree-refresh')
refreshIconRef.bind('click', function() {
const result = callback()
if (result && result.then) {
result.finally(() => {
vm.initTree()
})
} else {
this.filterTree(value)
vm.initTree()
}
}, 600)
})
},
refresh: function() {
const refreshIconRef = $('#tree-refresh')
refreshIconRef.click()
},
getCheckedNodes: function() {
return this.zTree.getCheckedNodes(true)
},
recurseParent(node) {
const parentNode = node.getParentNode()
if (parentNode && parentNode.pId) {
return [parentNode, ...this.recurseParent(parentNode)]
} else if (parentNode) {
return [parentNode]
} else {
return []
}
},
recurseChildren(node) {
if (!node.isParent) {
return []
}
const children = node.children
if (!children) {
return []
}
let allChildren = []
children.forEach((n) => {
allChildren = [...children, ...this.recurseChildren(n)]
})
return allChildren
},
groupBy(array, filter) {
const groups = {}
array.forEach(function(o) {
const group = JSON.stringify(filter(o))
groups[group] = groups[group] || []
groups[group].push(o)
})
return Object.keys(groups).map(function(group) {
return groups[group]
})
},
filterTree(keyword, tree = this.zTree) {
if (!this.zTree) return
const searchNode = tree.getNodesByFilter((node) => node.id === 'search')
if (searchNode) tree.removeNode(searchNode[0])
const nodes = tree.transformToArray(tree.getNodes())
if (!keyword) {
tree.showNodes(nodes)
return
}
if (!keyword) {
if (tree.hiddenNodes) {
tree.showNodes(tree.hiddenNodes)
tree.hiddenNodes = null
}
if (tree.expandNodes) {
tree.expandNodes.forEach((node) => {
if (node.id !== nodes[0].id) {
tree.expandNode(node, false)
}
})
tree.expandNodes = null
}
return null
}
let shouldShow = []
const matchedNodes = tree.getNodesByFilter((node) => {
return node.name.toLowerCase().indexOf(keyword.toLowerCase()) > -1
})
if (matchedNodes.length < 1) {
let name = this.$t('common.Search')
const assetsAmount = matchedNodes.length
name = `${name} (${assetsAmount})`
const newNode = { id: 'search', name: name, isParent: false, open: false }
tree.addNodes(null, newNode)
}
matchedNodes.forEach((node) => {
const parents = this.recurseParent(node)
const children = this.recurseChildren(node)
shouldShow = [...shouldShow, ...parents, ...children, node]
})
tree.hiddenNodes = nodes
tree.expandNodes = shouldShow
tree.hideNodes(nodes)
tree.showNodes(shouldShow)
for (const node of shouldShow) {
if (node.isParent) {
tree.expandNode(node, true)
}
}
},
filterAssetsServer(keyword) {
if (!this.zTree) return
let searchNode = this.zTree.getNodesByFilter((node) => node.id === 'search')
if (searchNode) {
this.zTree.removeChildNodes(searchNode[0])
this.zTree.removeNode(searchNode[0])
}
const treeNodes = this.zTree.getNodes()
if (!keyword) {
if (treeNodes.length !== 0) {
this.zTree.showNodes(treeNodes)
}
return
}
if (treeNodes.length !== 0) {
this.zTree.hideNodes(treeNodes)
}
let treeUrl = this.treeSetting.treeUrl
const filterField = treeUrl.includes('?') ? `&search=${keyword}` : `?search=${keyword}`
if (treeUrl.indexOf('assets/nodes/children/tree') > -1) {
treeUrl = treeUrl + '&all=all'
}
const searchUrl = `${treeUrl}${filterField}`
this.$axios.get(searchUrl).then(nodes => {
let name = this.$t('common.Search')
const assetsAmount = nodes.length
name = `${name} (${assetsAmount})`
const newNode = { id: 'search', name: name, isParent: true, open: true, zAsync: true }
searchNode = this.zTree.addNodes(null, newNode)[0]
searchNode.zAsync = true
const nodesGroupByOrg = this.groupBy(nodes, (node) => {
return node.meta.data.org_name
})
for (const item of nodesGroupByOrg) {
this.zTree.addNodes(searchNode, item)
}
searchNode.open = true
})
return
}
}
}
</script>
<style lang='scss' scoped>
<style lang='less' scoped>
div.rMenu {
position: absolute;
visibility: hidden;
@@ -379,7 +191,7 @@ export default {
top: 100%;
z-index: 1000;
}
.ztree ::v-deep .fa {
.ztree ::v-deep .fa-refresh {
font: normal normal normal 14px/1 FontAwesome !important;
}
.dropdown a:hover {
@@ -406,106 +218,4 @@ export default {
height: 80vh;
overflow: auto;
}
::v-deep #tree-refresh {
margin-left: 3px;
}
::v-deep .tree-banner-icon-zone {
position: absolute;
right: 7px;
height: 30px;
overflow: hidden;
.fa {
color: #838385!important;;
&:hover {
color: #606266!important;;
}
}
}
::v-deep .tree-search {
position: relative;
top: -2px;
width: 20px;
height: 20px;
display: inline-block;
border-radius: 12px;
vertical-align: sub;
transition: .25s;
overflow: hidden;
.fa {
width: 13px!important;
}
.fa-search {
padding-top: 1px;
}
}
::v-deep .tree-search .tree-banner-icon {
position: absolute;
top: 1px;
left: 6px;
width: 6px;
height: 6px;
border-radius: 12px;
padding: 10px 6px;
overflow: hidden;
background-color: transparent!important;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
::v-deep .tree-search.active {
width: 160px;
background-color: #ffffff!important;
}
::v-deep .tree-search.active:hover {
border-radius: 12px;
}
::v-deep .tree-search input {
position: relative;
left: 20px;
width: 133px;
height: 100%;
background-color: #ffffff!important;
color: #606266;
display: flex;
justify-content: center;
align-items: center;
border: none;
outline: none;
}
.tree-header {
position: relative;
.title {
font-weight: 500;
}
.content {
height: 30px;
line-height: 30px;
border-bottom: 1px solid #e0e0e0;
border-radius: 3px;
padding: 0 5px;
box-sizing: border-box;
overflow: hidden;
cursor: pointer;
background-color: #D7D8DC;
.rotate {
transition: all .1.8s;
transform: rotate(-90deg);
}
.fa-caret-down {
font-size: 16px;
}
.special {
top: 1px!important;
}
}
}
.tree-empty {
margin-left: 4px;
}
</style>

View File

@@ -72,7 +72,7 @@ export default {
},
methods: {
defaultCallback: function(action) {
// debug(action)
// console.log(action)
}
}
}

View File

@@ -105,7 +105,7 @@ export default {
.el-input__inner{
border: 1px solid #dcdee2;
border-radius: 3px;
height: 32x;
height: 36px;
}
.el-date-editor ::v-deep .el-range-separator{
line-height: 28px;

View File

@@ -52,7 +52,6 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.json-editor {
&>>> .jsoneditor {
border: 1px solid #e5e6e7;
@@ -67,8 +66,8 @@ export default {
display: none;
}
&>>> .jsoneditor-menu {
background: var(--color-primary);
border-bottom: 1px solid var(--color-primary);
background: #1ab394;
border-bottom: 1px solid #1ab394;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<Password
<password
:value="value"
v-bind="iAttrs"
class="el-input password-input"
@@ -32,8 +32,7 @@ export default {
const defaultAttrs = {
secureLength: 7,
defaultClass: 'el-input__inner',
toggle: true,
showStrengthMeter: false
toggle: true
}
return Object.assign(defaultAttrs, this.attrs)
}
@@ -47,16 +46,17 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/styles/element-variables.scss";
.password-input >>> .Password__badge--error {
background-color: var(--color-danger);
background-color: $--color-danger;
}
.password-input >>> .Password__strength-meter--fill[data-score="4"] {
background: var(--color-success);
background: $--color-primary;
width: 100%;
}
.password-input >>> .Password__badge--success {
background: var(--color-success);
background: $--color-primary;
}
.password-input >>> .Password__strength-meter {

View File

@@ -1,8 +1,8 @@
<template>
<el-switch
v-model="iValue"
:active-color="activeColor"
inactive-color="#dcdfe6"
:class="type"
v-bind="$attrs"
v-on="$listeners"
/>
@@ -26,6 +26,21 @@ export default {
}
},
computed: {
activeColor() {
// $--color-primary: #1ab394;
// $--color-success: #1c84c6;
// $--color-info: #23c6c8;
// $--color-warning: #f8ac59;
// $--color-danger: #ed5565;
switch (this.type) {
case 'primary':
return '#1ab394'
case 'danger':
return '#ed5565'
default:
return '#1ab394'
}
},
iValue: {
set: function(newValue) {
this.$emit('input', newValue)

View File

@@ -1,15 +1,9 @@
<template>
<div class="upload-key">
<input ref="upLoadFile" type="file" style="display: none" @change="onChange">
<el-button v-if="!fingerprint" size="mini" @click.native.stop="onUpLoad">
<el-button size="mini" @click.native.stop="onUpLoad">
{{ this.$t('common.SelectFile') }}
</el-button>
<span v-else>
<el-button type="text" icon="el-icon-edit" @click.native.stop="onUpLoad">
{{ this.$t('common.Update') }}
</el-button>
<span v-if="!fileName" class="fingerprint">{{ fingerprint }}</span>
</span>
<span>{{ fileName }}</span>
<div v-if="tip !== ''">{{ tip }}</div>
</div>
@@ -18,6 +12,10 @@
<script>
export default {
props: {
// value: {
// type: String,
// default: () => ''
// },
tip: {
type: String,
default: () => ''
@@ -25,10 +23,6 @@ export default {
toFormat: {
type: String,
default: () => 'string'
},
fingerprint: {
type: String,
default: ''
}
},
data() {
@@ -50,7 +44,7 @@ export default {
const reader = new FileReader()
reader.onload = function() {
let result = this.result
if (vm.toFormat === 'object' && vm.fileName.endsWith('.json')) {
if (vm.toFormat === 'object') {
result = JSON.parse(result)
}
vm.$emit('input', result)
@@ -64,7 +58,4 @@ export default {
</script>
<style scoped>
.fingerprint {
font-size: 12px
}
</style>

View File

@@ -66,7 +66,6 @@ export default {
data() {
return {
attrs: {
showStrengthMeter: true
}
}
},

View File

@@ -21,13 +21,12 @@ export default {
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
<style scoped>
.hamburger {
display: inline-block;
vertical-align: middle;
font-size: 20px;
color: $menuText;
color: rgb(167, 177, 194);
}
.hamburger.is-active {
transform: rotate(180deg);

View File

@@ -1,10 +1,9 @@
<template>
<div>
<UserConfirmDialog
<MFAVerifyDialog
v-if="mfaDialogShow"
:url="url"
@UserConfirmDone="showExportDialog"
@UserConfirmCancel="handleExportCancel"
@MFAVerifyDone="showExportDialog"
@MFAVerifyCancel="handleExportCancel"
/>
<Dialog
v-if="exportDialogShow"
@@ -32,7 +31,7 @@
<script>
import Dialog from '@/components/Dialog'
import UserConfirmDialog from '@/components/UserConfirmDialog'
import MFAVerifyDialog from '@/components/MFAVerifyDialog'
import { createSourceIdCache } from '@/api/common'
import * as queryUtil from '@/components/DataTable/compenents/el-data-table/utils/query'
@@ -40,7 +39,7 @@ export default {
name: 'ExportDialog',
components: {
Dialog,
UserConfirmDialog
MFAVerifyDialog
},
props: {
selectedRows: {

View File

@@ -83,7 +83,7 @@ export default {
default: () => ''
},
canImportCreate: {
type: [Boolean, Function],
type: Boolean,
default: false
},
canImportUpdate: {
@@ -205,9 +205,8 @@ export default {
}
return this.url.indexOf('?') === -1 ? `${this.url}?${query}` : `${this.url}&${query}`
},
// eslint-disable-next-line handle-callback-err
catchError(error) {
// debug(error)
console.log(error)
},
onSuccess(msg) {
this.errorMsg = ''
@@ -233,7 +232,7 @@ export default {
</script>
<style lang='scss' scoped>
@import "~@/styles/variables.scss";
@import "~@/styles/element-variables.scss";
.error-msg {
color: $--color-danger;
}

View File

@@ -202,13 +202,10 @@ export default {
}]
for (const item of tableTitles) {
const dataItemLens = tableData.map(d => {
if (!d) {
return 0
}
const prop = item[1]
const itemColData = d[prop]
if (typeof itemColData === 'boolean') {
return 5 // boolean is 5 characters long 并且 boolean.length 是 undefined
if (!d) {
return 0
}
if (typeof itemColData !== 'number' && (!itemColData || !itemColData.length)) {
return 0
@@ -408,7 +405,7 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
@import "~@/styles/element-variables.scss";
.summary-item {
padding: 0 10px
}

View File

@@ -27,7 +27,7 @@ export default {
createRoute: {
type: [String, Object, Function],
default: function() {
return this.$route.name?.replace('List', 'Create')
return this.$route.name.replace('List', 'Create')
}
},
createInNewPage: {

View File

@@ -78,7 +78,7 @@ export default {
default: () => []
},
canCreate: {
type: [Boolean, Function],
type: Boolean,
default: false
},
canBulkUpdate: {

View File

@@ -127,10 +127,6 @@ export default {
color: #888;
}
.action-search >>> .el-cascader {
line-height: 32px !important;
}
.right-side-actions {
display: flex;
padding-left: 10px;
@@ -150,19 +146,17 @@ export default {
.datepicker{
margin-left: 10px;
}
.table-header {
line-height: 32px;
}
.left-side {
float: left;
display: block;
line-height: 36px;
}
.right-side {
float: right;
}
.search {
display: flex;
flex-direction: row;
flex-direction: row
}
.mobile .search {
display: inherit;
@@ -177,16 +171,9 @@ export default {
float: right;
}
.mobile .search.right {
float: none;
}
.mobile .search.right .action-search {
width: 100%;
float: left;
}
.mobile .right-side {
padding-top: 5px;
}
.filter-field.right-side-item.action-search {
height: 34px;
}
</style>

View File

@@ -1,5 +1,5 @@
export function cleanActions(actions, canDefaults, { selectedRows, reloadTable }) {
// debug('Start clean actions: ', selectedRows.length, reloadTable)
// console.log('Start clean actions: ', selectedRows.length, reloadTable)
const cleanedActions = []
const cloneActions = _.cloneDeep(actions)
cloneActions.forEach((action) => {

View File

@@ -84,22 +84,15 @@ export default {
extraQuery: this.extraQuery
})
const formatterArgs = {
'columnsMeta.actions.formatterArgs.canUpdate': () => {
return this.hasActionPerm('change') && !this.currentOrgIsRoot
},
'columnsMeta.actions.formatterArgs.canUpdate': 'change',
'columnsMeta.actions.formatterArgs.canDelete': 'delete',
'columnsMeta.actions.formatterArgs.canClone': () => {
return this.hasActionPerm('add') && !this.currentOrgIsRoot
},
'columnsMeta.actions.formatterArgs.canClone': 'add',
'columnsMeta.name.formatterArgs.can': 'view'
}
for (const [arg, action] of Object.entries(formatterArgs)) {
const notSet = _.get(config, arg) === undefined
const isFunction = typeof action === 'function'
if (notSet) {
const hasActionPerm = isFunction ? action() : this.hasActionPerm(action)
_.set(config, arg, hasActionPerm)
_.set(config, arg, this.hasActionPerm(action))
}
}
this.$log.debug('Header actions', this.headerActions)

View File

@@ -0,0 +1,77 @@
<template>
<Dialog
:title="$t('common.MFAVerify')"
:width="'50'"
:show-confirm="false"
:show-cancel="false"
:visible.sync="visible"
:destroy-on-close="true"
v-bind="$attrs"
v-on="$listeners"
>
<el-row :gutter="20">
<el-col :md="4" :sm="24">
<div style="line-height: 34px;text-align: center">MFA</div>
</el-col>
<el-col :md="14" :sm="24">
<el-input v-model="MFAToken" />
<span class="help-tips help-block">{{ $t('common.MFARequireForSecurity') }}</span>
</el-col>
<el-col :md="4" :sm="24">
<el-button size="mini" type="primary" style="line-height:20px " @click="verifyMFA">
{{ this.$t('common.Confirm') }}
</el-button>
</el-col>
</el-row>
</Dialog>
</template>
<script>
import Dialog from '@/components/Dialog'
export default {
name: 'MFAVerifyDialog',
components: {
Dialog
},
data() {
return {
MFAToken: '',
visible: false
}
},
watch: {
visible(val) {
if (!val) {
this.$emit('MFAVerifyCancel', true)
}
}
},
mounted() {
this.$axios.get('/api/v1/authentication/otp/verify/', { disableFlashErrorMsg: true }).then(() => {
this.$emit('MFAVerifyDone', true)
}).catch(err => {
this.$log.debug('Verify otp code error: ', err)
this.visible = true
})
},
methods: {
verifyMFA() {
if (this.MFAToken.length !== 6) {
return this.$message.error(this.$tc('common.MFAErrorMsg'))
}
this.$axios.post(
`/api/v1/authentication/otp/verify/`, {
code: this.MFAToken
}
).then(res => {
this.$emit('MFAVerifyDone', true)
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -61,6 +61,10 @@ const defaultDeleteCallback = function({ row, col, cellValue, reload }) {
done()
reload()
this.$message.success(this.$t('common.deleteSuccessMsg'))
} catch (error) {
if (!error.response || !error.response.data || !error.response.data.msg) {
this.$message.error(this.$t('common.deleteErrorMsg') + ' ' + error)
}
} finally {
instance.confirmButtonLoading = false
}
@@ -145,7 +149,6 @@ export default {
v.fa = this.cleanValue(v, 'fa')
v.order = v.order || 100
v.tip = this.cleanValue(v, 'tip')
v.title = this.cleanValue(v, 'title')
return v
})
actions = actions.filter((v) => v.has)

View File

@@ -17,7 +17,7 @@ export default {
}
// const locale = this.$i18n.locale
// const value = dt.toLocaleString(locale, { hourCycle: 'h23' })
// debug(this.$i18n.locale)
// console.log(this.$i18n.locale)
return {
value: value
}

View File

@@ -1,12 +1,5 @@
<template>
<el-link
class="detail"
:disabled="disabled"
:type="col.type || 'info'"
@click="goDetail"
>
{{ iTitle }}
</el-link>
<el-link class="detail" :disabled="disabled" :type="col.type || 'success'" @click="goDetail">{{ iTitle }}</el-link>
</template>
<script>

View File

@@ -106,9 +106,35 @@ export default {
handler(val) {
if (val && val.length > 0) {
const routeFilter = this.checkInTableColumns()
this.filterTagSearch(routeFilter)
const routerSearch = routeFilter.search || {}
let routerSearchAttrs = []
if (typeof routerSearch?.value === 'string') {
routerSearchAttrs = routerSearch?.value?.split(',') || []
}
for (const attr of routerSearchAttrs) {
routeFilter[`search_${attr}`] = {
...routerSearch,
value: attr
}
}
if (routerSearchAttrs.length !== 0) {
delete routeFilter.search
}
const asFilterTags = _.cloneDeep(this.filterTags)
this.filterTags = {
...asFilterTags,
...routeFilter
}
if (Object.keys(routeFilter).length > 0) {
setTimeout(() => {
return this.$emit('tagSearch', this.filterMaps)
}, 490)
}
}
},
immediate: true,
deep: true
}
},
@@ -123,90 +149,43 @@ export default {
methods: {
// 获取url中的查询条件判断是不是包含在当前查询条件里
checkInTableColumns() {
const searchFieldOptions = {}
const queryInfoValues = this.options.map((i) => i.value)
const routeQuery = this.getUrlQuery ? this.$route?.query : {}
const routeQueryKeysLength = Object.keys(routeQuery).length
if (routeQueryKeysLength < 1) return searchFieldOptions
for (const [key, value] of Object.entries(routeQuery)) {
const valueDecode = decodeURI(value)
const isSearch = key === 'search'
if (isSearch) {
searchFieldOptions[key] = {
key,
label: '',
value: valueDecode
}
continue
}
if (queryInfoValues.includes(key)) {
searchFieldOptions[key] = this.getInQueryInfoFields(key, value)
}
const routeQueryKeys = Object.keys(routeQuery)
const routeQueryKeysLength = routeQueryKeys.length
const keys = {}
if (routeQueryKeysLength < 1) {
return keys
}
return searchFieldOptions
},
getInQueryInfoFields(key, value) {
let searchFieldOption = {}
let valueDecode = decodeURI(value)
const currentOptions = this.options || []
for (const [key, value] of Object.entries(routeQuery)) {
let valueDecode = decodeURI(value)
const isSearch = key !== 'search'
const curOptions = this.options || []
for (let k = 0, len = currentOptions.length; k < len; k++) {
const current = currentOptions[k]
if (key === current.value) {
const curChildren = current.children || []
if (current?.type === 'boolean') {
for (let k = 0, len = curOptions.length; k < len; k++) {
const cur = curOptions[k]
if (cur?.type === 'boolean') {
valueDecode = !!valueDecode
}
searchFieldOption = {
...current,
key,
label: current.label,
value: valueDecode
}
if (curChildren.length > 0) {
for (const item of curChildren) {
if (valueDecode === item.value) {
searchFieldOption.valueLabel = item.label
break
if (key === cur.value || !isSearch) {
const curChildren = cur.children || []
keys[key] = {
...cur,
key,
label: isSearch ? cur.label : '',
value: valueDecode
}
if (isSearch && curChildren.length > 0) {
for (const item of curChildren) {
if (valueDecode === item.value) {
keys[key].valueLabel = item.label
break
}
}
}
}
break
}
}
return searchFieldOption
},
filterTagSearch(routeFilter) {
const routerSearch = routeFilter.search || {}
let routerSearchAttrs = []
if (typeof routerSearch?.value === 'string') {
routerSearchAttrs = routerSearch?.value?.split(',') || []
}
for (const attr of routerSearchAttrs) {
routeFilter[`search_${attr}`] = {
...routerSearch,
value: attr
}
}
if (routerSearchAttrs.length !== 0) {
delete routeFilter.search
}
const asFilterTags = _.cloneDeep(this.filterTags)
this.filterTags = {
...asFilterTags,
...routeFilter
}
if (Object.keys(routeFilter).length > 0) {
setTimeout(() => {
return this.$emit('tagSearch', this.filterMaps)
}, 490)
}
return keys
},
getValueLabel(key, value) {
for (const field of this.options) {

View File

@@ -77,7 +77,7 @@ export default {
}
},
mounted() {
// debug(this.treeSetting)
// console.log(this.treeSetting)
},
methods: {
handleUrlChange(url) {
@@ -113,13 +113,12 @@ export default {
float: right;
text-align: center;
padding: 5px 0;
background-color: var(--color-primary);
border-color: var(--color-primary);
background-color: #1ab394;
border-color: #1ab394;
color: #FFFFFF;
border-radius: 3px;
line-height: 1.428;
cursor:pointer;
height: 30px;
}
.el-tree{
background-color: inherit !important;
@@ -135,8 +134,5 @@ export default {
}
.transition-box.left {
background: #f3f3f3;
border: 1px solid #e0e0e0;
border-radius: 3px;
margin-right: 2px;
}
</style>

View File

@@ -1,230 +0,0 @@
<template>
<Dialog
:title="title"
:width="'36%'"
:show-confirm="false"
:show-cancel="false"
:visible.sync="visible"
:destroy-on-close="true"
v-bind="$attrs"
class="dialog-content"
v-on="$listeners"
>
<div v-if="ConfirmType === 'relogin'">
<el-row :gutter="24" style="margin: 0 auto;">
<el-col :md="24" :sm="24">
<el-alert
:title="this.$t('auth.ReLoginTitle')"
type="info"
center
:closable="false"
style="margin-bottom: 20px;"
/>
</el-col>
</el-row>
<el-row :gutter="24" style="margin: 0 auto;">
<el-col :md="24" :sm="24">
<el-button
size="mini"
type="primary"
style="width: 100%; line-height:20px;"
@click="logOut"
>
{{ this.$t('auth.ReLogin') }}
</el-button>
</el-col>
</el-row>
</div>
<div v-else>
<el-row :gutter="24" style="margin: 0 auto;">
<el-col :span="24" :md="24" :sm="24" class="add">
<el-select
v-model="Select"
:disabled="ConfirmType === 'password'"
style="width: 100%; margin-bottom: 20px;"
@change="helpText(Select)"
>
<el-option
v-for="(item, i) of Content"
:key="i"
:label="item.display_name"
:value="item.name"
:disabled="item.disabled"
/>
</el-select>
</el-col>
</el-row>
<el-row :gutter="24" style="margin: 0 auto;">
<el-col :md="24 - smsWidth" :sm="24">
<el-input v-model="SecretKey" :show-password="showPassword" :placeholder="HelpText" style="margin-bottom: 20px;" />
</el-col>
<el-col v-if="Select === 'sms'" :md="smsWidth" :sm="24">
<el-button
size="mini"
type="primary"
style="line-height:20px; float: right;"
:disabled="smsBtndisabled"
@click="sendChallengeCode"
>
{{ smsBtnText }}
</el-button>
</el-col>
</el-row>
<el-row :gutter="24" style="margin: 0 auto;">
<el-col :md="24" :sm="24">
<el-button
size="mini"
type="primary"
style="width: 100%; line-height:20px;"
@click="userConfirm"
>
{{ this.$t('common.Confirm') }}
</el-button>
</el-col>
</el-row>
</div>
</Dialog>
</template>
<script>
import Dialog from '@/components/Dialog'
export default {
name: 'UserConfirmDialog',
components: {
Dialog
},
props: {
url: {
type: String,
default: () => ''
}
},
data() {
return {
title: '',
smsWidth: 0,
Select: '',
Level: null,
HelpText: '',
smsBtnText: '',
smsBtndisabled: false,
ConfirmType: '',
Content: null,
SecretKey: '',
visible: false
}
},
computed: {
showPassword() {
if (this.ConfirmType === 'password') {
return true
}
return false
}
},
watch: {
visible(val) {
if (!val) {
this.$emit('UserConfirmCancel', true)
}
}
},
mounted() {
this.smsBtnText = this.$t('common.SendVerificationCode')
this.$axios.get(`${this.url}`, { disableFlashErrorMsg: true }).then(
() => { this.$emit('UserConfirmDone', true) }).catch((err) => {
const confirm_type = err.response.data.code
this.$axios.get('/api/v1/authentication/confirm/', { params: { confirm_type: confirm_type }}).then((data) => {
this.ConfirmType = data.confirm_type
this.Content = data.content
if (this.ConfirmType === 'relogin') {
this.$axios.post(
`/api/v1/authentication/confirm/`,
{
confirm_type: this.ConfirmType,
secret_key: ''
},
{ disableFlashErrorMsg: true },
).then(() => { this.$emit('UserConfirmDone', true) }).catch(() => {
this.title = this.$t('auth.NeedReLogin')
this.visible = true
})
return
}
if (this.ConfirmType === 'mfa') {
this.Select = this.Content.filter(item => !item.disabled)[0].name
if (this.Select === 'sms') {
this.smsWidth = 6
}
this.HelpText = this.Content.filter(item => !item.disabled)[0].placeholder
} else if (this.ConfirmType === 'password') {
this.Select = this.$t('setting.password')
this.HelpText = this.$t('common.PasswordRequireForSecurity')
this.Content = [{ 'name': 'password' }]
}
this.title = this.$t('common.CurrentUserVerify')
this.visible = true
})
})
},
methods: {
helpText(val) {
this.HelpText = this.Content.filter(item => item.name === val)[0]?.placeholder
if (val === 'sms') {
this.smsWidth = 6
} else {
this.smsWidth = 0
}
},
logOut() {
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
},
sendChallengeCode() {
this.$axios.post(
`/api/v1/authentication/mfa/select/`, {
type: 'sms'
}
).then(res => {
this.$message.success(this.$t('common.VerificationCodeSent'))
let time = 60
const interval = setInterval(() => {
this.smsBtnText = this.$t('common.Pending') + `: ${time}`
this.smsBtndisabled = true
time -= 1
if (time === 0) {
this.smsBtnText = this.$t('common.SendVerificationCode')
this.smsBtndisabled = false
clearInterval(interval)
}
}, 1000)
})
},
userConfirm() {
if (this.Select === 'otp' && this.SecretKey.length !== 6) {
return this.$message.error(this.$t('common.MFAErrorMsg'))
}
this.$axios.post(
`/api/v1/authentication/confirm/`, {
confirm_type: this.ConfirmType,
mfa_type: this.ConfirmType === 'password' ? undefined : this.Select,
secret_key: this.SecretKey
}
).then(res => {
this.$emit('UserConfirmDone', true)
})
}
}
}
</script>
<style lang="scss" scoped>
.dialog-content >>> .el-dialog__footer{
padding: 0;
}
.dialog-content >>> .el-dialog{
padding: 8px;
}
</style>

View File

@@ -25,6 +25,6 @@ export { default as UploadField } from './FormFields/UploadField'
export { default as AccountListTable } from './AccountListTable/index'
export { default as AppAccountListTable } from './AppAccountListTable'
export { default as AssetRelationCard } from './AssetRelationCard'
export { default as UserConfirmDialog } from './UserConfirmDialog'
export { default as MFAVerifyDialog } from './MFAVerifyDialog'
export { default as Announcement } from './Announcement'
export { default as CronTab } from './CronTab'

View File

@@ -18,7 +18,7 @@ router.beforeEach(async(to, from, next) => {
next()
} catch (e) {
const msg = 'Start service error: ' + e
// debug(e)
console.log(e)
}
})
@@ -31,7 +31,7 @@ function generateViewRoutesIfChange({ to, from }) {
function setPageTitle() {
const currentRoute = router.currentRoute
const loginTitle = store.getters.publicSettings['INTERFACE']['login_title']
const loginTitle = store.getters.publicSettings['LOGIN_TITLE']
const routeTitle = currentRoute.meta.title
if (routeTitle) {
document.title = routeTitle + ' - ' + loginTitle

View File

@@ -1,7 +1,6 @@
{
"": "",
"accounts": {
"AccountHistableHelpMessage": "Record the historical version of the current account",
"PleaseClickLeftAssetToViewAssetAccount": "Asset account list, please click on the assets on the left to view",
"PleaseClickLeftApplicationToViewApplicationAccount": "Application account list, please click on the application on the left to view",
"PleaseClickLeftAssetToViewGatheredUser": "Gathered user list, please click on the assets on the left to view"
@@ -10,7 +9,6 @@
"name": "Name",
"username": "Username",
"ip_group": "IP group",
"ip_group_help_text": "IP segments should be separated by comma, with * indicating a match all. Such as: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64",
"action": "Action",
"priority": "Priority",
"date_created": "Date created",
@@ -99,7 +97,6 @@
"Action": "Action",
"ActiveSelected": "Active selected",
"AdminUser": "Admin user",
"AssetTree": "Asset tree",
"ReplaceNodeAssetsAdminUser":"Replace node assets admin user with this",
"AdminUserDetail": "Admin user detail",
"DynamicUsername": "Dynamic username",
@@ -128,7 +125,7 @@
"Charset": "Charset",
"CmdFilter": "CmdFilter",
"CommandFilterDetail": "Command filter detail",
"CommandFilterHelpMessage": "The system user supports binding multiple command filters to achieve the effect of prohibiting the input of certain commands; multiple rules can be configured in the filter. When the system user is used to connect to the asset, the input command takes effect according to the priority of the rules configured in the filter. <br>Example: The first matched rule is \"Allow\", the command is executed, the first matched rule is \"Forbidden\", the command execution is prohibited; if the last rule is not matched, it is allowed to be executed.",
"CommandFilterHelpMessage": "System user bound some command filter, each command filter has some rules, When user login asset with this system user, then run a command, The command will be filter by rules, higher priority rule run first, When a rule matched, if rule action is allow, then allow command execute, else if action is deny, then command with be deny, else match next rule, if none matched, allowed",
"CommandFilterRuleContentHelpText": "One line one command",
"CommandFilterRulePriorityHelpText": "1-100, the higher will be match first",
"CommandFilterRules": "Command filter rules",
@@ -249,18 +246,9 @@
},
"auth": {
"LoginRequiredMsg": "You account has logout, Please login again",
"ReLogin": "Re-Login",
"ReLoginTitle": "The current three-party login user (cas/saml) is not bound to MFA and does not support password verification. Please login again",
"NeedReLogin": "Need Re-Login",
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
"ReLogin": "Re-Login"
},
"common": {
"NeedAddAppsOrSystemUserErrMsg": "Please add apps or system user",
"VerificationCodeSent": "The verification code has been sent",
"SendVerificationCode": "Send verification code",
"History": "History",
"ChangeViewHelpText": "Click to change view",
"Component": "component",
"PrivateCloud": "Private cloud",
"PublicCloud": "Public cloud",
"Correlation": "Correlation",
@@ -279,7 +267,6 @@
"Database": "Database",
"Params": "Params",
"MFAVerify": "Verify MFA",
"CurrentUserVerify": "Verify Current User",
"ViewSecret": "View secret",
"ConnectWebSocketError": "Connect Websocket failed",
"Nothing": "Nothing",
@@ -425,16 +412,14 @@
"downloadImportTemplateMsg": "Download import template",
"downloadUpdateTemplateMsg": "Download update template",
"onlyCSVFilesTips": "Only csv supported",
"ImportFail": "Import fail",
"updateSuccessMsg": "Update success, total: {count}",
"dragUploadFileInfo": "Drag file here or click here to upload",
"dragUploadFileInfo": "Drag file here or click to upload",
"uploadCsvLth10MHelpText": "csv/xlsx files with a size less than 10M",
"hasImportErrorItemMsg": "There is an error item, click the x icon to view the details, and continue to import after editing"
},
"isValid": "Is valid",
"nav": {
"TempPassword": "Temporary password",
"ConnectionToken": "Connection token",
"APIKey": "API Key",
"Workbench": "Workbench",
"Navigation": "Navigation",
@@ -448,7 +433,6 @@
"Logout": "Logout",
"Profile": "Profile",
"Support": "Support",
"Download": "Download",
"UserPage": "User page",
"View": "View",
"EnterpriseEdition": "Enterprise edition"
@@ -518,7 +502,6 @@
},
"Cycle": "Cycle",
"FormatError": "Format error",
"NotSpecialEmoji": "Special emoticons are not allowed",
"WeekCronSelect": {
"Monday": "Monday",
"Tuesday": "Tuesday",
@@ -673,7 +656,6 @@
},
"route": {
"": "",
"AssignedTicketList": "Assigned tickets",
"CreateEndpoint": "Create endpoint",
"UpdateEndpoint": "Update endpoint",
"CreateEndpointRule": "Create endpoint rule",
@@ -692,7 +674,6 @@
"SessionDetail": "SessionDetail",
"Accounts": "Accounts",
"AssetAccount": "Asset Account",
"AssetHistoryAccount": "Asset History Account",
"ApplicationAccount": "Application Account",
"Ticket": "Tickets",
"CommandConfirm": "Command confirm",
@@ -710,7 +691,7 @@
"AssetPermissionUpdate": "Asset permissions update",
"AssetUpdate": "Asset update",
"Assets": "Assets",
"LogsAudit": "Logs audit",
"LogsAudits": "Logs audit",
"SessionsAudit": "Sessions audit",
"SessionList": "Session list",
"BatchCommand": "Batch Command",
@@ -907,27 +888,23 @@
"UseProtocol": "Use protocol",
"SessionState": "Session state",
"Monitor": "Monitor",
"RazorNotSupport": "RDP Client session not support now",
"XRDPNotSupport": "RDP Client session not support now",
"sessionMonitor": "Session Monitor",
"TerminateTaskSendSuccessMsg": "Terminate task has been send, Please check later",
"helpText": {
"esUrl": "Tip: If you have multiple hosts, use comma (, ) to split (eg: http://www.jumpserver.a.com, http://www.jumpserver.b.com)",
"esIndex":"Es provides the default index: jumpserver. If you choose to build an index by date, this blank is the index prefix",
"esIndex":"Es provides the default index: jumpserver",
"esDocType": "Es provides the default document type: command"
}
},
"setting": {
"OAuth2LogoTip": "Tip: Authentication Service Provider (recommended image size: 64px*64px)",
"EndpointListHelpMessage": "The service endpoint is the address (port) for the user to access the service. When the user connects to the asset, the service endpoint will be selected according to the endpoint rules and asset tags, and the connection will be established as the access entry to realize the distributed connection of assets.",
"EndpointRuleListHelpMessage": "For the service endpoint selection strategy, two types are currently supported: <br>1. Specify the endpoint according to the endpoint rule (current page); <br>2. Select the endpoint through the asset tag. The tag name is fixed to endpoint, and the value is the name of the `endpoint`. <br>Two methods preferentially use label matching, because the IP segment may conflict, and the label method exists as a supplement to the rules.",
"EnableKoKoSSHHelpText": "Enabled, connect assets to display SSH Client pull-up method",
"SettingInEndpointHelpText": "Configure the service address and port in System Settings / Terminal Settings / Service Endpoints",
"Feature": "Feature",
"SMSProvider": "SMS provider / Protocol",
"SMSProvider": "SMS provider",
"SMS": "SMS",
"AlibabaCloud": "Alibaba cloud",
"TencentCloud": "Tencent cloud",
"CMPP2": "CMPP v2.0",
"VerifySignTmpl": "Verification code template",
"Radius": "Radius",
"Enable": "Enable",
@@ -981,12 +958,9 @@
"authLdapServerUri": "LDAP server",
"authLdapUserAttrMap": "User attr map",
"authUserAttrMap": "User attr map",
"authUserAttrMapHelpText": "The key on the left is the JumpServer user property, and the value on the right is the authenticated platform user property",
"authUserAttrMapHelpText": "Mapping relationship { idp_key: sp_key}",
"SAML2": "SAML2",
"OAuth2": "OAuth2",
"enableSAML2Auth": "Enable SAML2 Auth",
"enableOAuth2Auth": "Enable OAuth2 Auth",
"tokenHTTPMethod": "Token Obtaining Method",
"SAML2Auth": "SAML2 Auth",
"authSAML2Xml": "IDP metadata XML",
"authSAML2MetadataUrl": "IDP metadata URL",
@@ -1022,7 +996,6 @@
"helpText": {
"TempPassword": "For a while, there is a period of 300 seconds, failure immediately after use",
"ApiKeyList": "The API key is used to sign the request header. The header of each request is different. Please refer to the usage documentation",
"ConnectionTokenList": "The connection token is a kind of authentication information that combines authentication and connection assets. It allows users to log in to assets with one click. Currently supported components include: KoKo, Lion, Magnus, Razor, etc.",
"authLdapSearchFilter": "Choice may be (cn|uid|sAMAccountName)=%(user)s)",
"authLdapSearchOu": "Use | split User OUs",
"authLdapUserAttrMap": "User attr map present how to map LDAP user attr to jumpserver, username, name, email is jumpserver attr",
@@ -1097,8 +1070,6 @@
"refreshLdapCache":"Refreshing Ldap cache ",
"LicenseExpired": "License expired",
"LicenseWillBe": "License will expire at ",
"LicenseReachedAssetAmountLimit": "The number of assets has exceeded the license limit",
"LicenseForTest": "Testing license, This license is only for testing",
"Expire": "Expire",
"WeCom": "WeCom",
"DingTalk": "DingTalk",
@@ -1106,14 +1077,9 @@
"weComTest": "Test",
"FeiShu": "FeiShu",
"feiShuTest": "Test",
"setting": "Setting",
"SystemTools": "System Tools",
"basicTools": "Basic Tools",
"destinationIP": "Destination IP",
"testPort": "Test Port",
"testTools": "Test",
"testHelpText": "Please enter the destination address for testing"
"setting": "Setting"
},
"tickets": {
"PermissionName": "Permission name",
"Accept": "Accept",
@@ -1127,7 +1093,6 @@
"OpenTicket": "Open Ticket",
"HandleTicket": "Handle Ticket",
"FinishedTicket": "Finished Ticket",
"CheckViewAcceptor": "Click to view the acceptor",
"Assignees": "Assignees",
"Close": "Close",
"OpenStatus":"Open",
@@ -1305,10 +1270,6 @@
"Receivers": "Receivers",
"Subscription": "Subscription",
"ChangeReceiver": "Change Receivers",
"Constituency": "Available Fields",
"Selected": "Selected Fields",
"PrePage": "Previous",
"NextPage": "Next",
"Subject": "Subject",
"Message": "Message",
"DeliveryTime": "Delivery time",
@@ -1323,7 +1284,6 @@
"SMS": "SMS"
},
"xpack": {
"Images": "Images",
"NavHelp": "Navigation Link",
"helpDocument": "Docs link",
"helpSupport": "Support link",
@@ -1417,8 +1377,6 @@
"HuaweiPrivatecloud": "Huawei Private Cloud",
"OpenStack": "OpenStack",
"GCP": "Google Cloud Platform",
"FC": "Fusion Compute",
"LAN": "LAN",
"AWS_China": "AWS(China)",
"AWS_Int": "AWS(International)",
"HuaweiCloud": "Huawei Cloud",
@@ -1547,9 +1505,6 @@
"technologyConsult": "Technology Consult",
"RegularlyPerform": "Regularly perform",
"CyclePerform": "Cycle perform",
"ModifyTheme": "Modify theme",
"ClassicGreen": "Classic green",
"ChinaRed": "China red",
"HelpText": {
"CrontabOfCreateUpdatePage": "For example: every Sunday at 03:05 execute <5 3 * * 0> <br/> Using the 5-bit Linux crontab expression <minute hour day month week> (<a href=\"https://tool.lu/crontab/\" target=\"_blank\"> Online tool </a>) <br/> If both regularly perform and cycle perform execution are set, use regularly perform first",
"IntervalOfCreateUpdatePage": "Unit: hour",

View File

@@ -1,7 +1,6 @@
{
"": "",
"accounts": {
"AccountHistableHelpMessage": "現在のアカウントの履歴バージョンを記録する",
"PleaseClickLeftAssetToViewAssetAccount": "資産のアカウントのリスト、左側の資産をクリックして表示します",
"PleaseClickLeftApplicationToViewApplicationAccount": "アカウントのリストを適用して、左側のアプリケーションをクリックして表示します",
"PleaseClickLeftAssetToViewGatheredUser": "ユーザーリストを収集し、左側の資産をクリックして表示します。"
@@ -109,7 +108,6 @@
"HardwareInfo": "ハードウェア情報",
"AssetDetail": "アセットの詳細",
"AssetList": "アセットリスト",
"AssetTree": "アセットツリー",
"ReplaceNodeAssetsAdminUser": "ノード資産を置換する管理者",
"AssetListHelpMessage": "左側は資産ツリーで、右クリックはツリーノードを新規作成、削除、変更することができ、授権資産もノード方式で組織され、右側はそのノードの下に属する資産である\n",
"TestGatewayTestConnection": "テスト接続ゲートウェイ",
@@ -129,7 +127,7 @@
"Charset": "文字セット",
"CmdFilter": "コマンドフィルタ",
"CommandFilterDetail": "コマンドフィルタの詳細",
"CommandFilterHelpMessage": "Xìtǒng yònghù zhīchí bǎng dìng duō gè mìnglìng guòlǜ qì shíxiàn jìnzhǐ shūrù mǒu xiē mìnglìng de xiàoguǒ; guòlǜ qì zhōng kě pèizhì duō gè guīzé, zài shǐyòng gāi xìtǒng yònghù liánjiē zīchǎn shí, shūrù de mìnglìng ànzhào guòlǜ qì zhōng pèizhì de guīzé yōuxiān jí shēngxiào; lì: Shǒuxiān pǐpèi dào de guīzé shì “yǔnxǔ”, zé gāi mìnglìng zhíxíng, shǒuxiān pǐpèi dào de guīzé wèi “jìnzhǐ”, zé jìnzhǐ gāi mìnglìng zhíxíng; rúguǒ zuìhòu wèi pǐpèi dào guīzé, zé yǔnxǔ zhíxíng.\n展开\n140 / 5,000\n翻译结果\nシステムユーザーは、複数のコマンドフィルターのバインドをサポートして、特定のコマンドの入力を禁止する効果を実現します。フィルターで複数のルールを構成できます。システムユーザーがアセットへの接続に使用される場合、入力コマンドは、フィルタで設定されルール。<br>例:最初に一致したルールが「許可」の場合、コマンドが実行されます。最初に一致したルールが「禁止」の場合、コマンド実行が禁止されます。最後ルールが一致しない場合実行が許可されます",
"CommandFilterHelpMessage": "システムユーザーはいくつかのコマンドフィルタバインドすることができ、一つのフィルタはいくつかのルールを定義することができます。ユーザーがこのシステムユーザーを使用して資産にログインし、一つのコマンドを実行するには、フィルタをバインドするすべてのルールが一致する必要があります優先度の高いものが先にマッチされルールがマッチしたとき、ルールのアクションが許可されていれば、このコマンドは発行され、ルールのアクションが禁止されていれば、コマンド実行されなくなりますそれ以外の場合は次のルールがマッチし、最後ルールがマッチしない場合実行が許可されます",
"CommandFilterRuleContentHelpText": "各行のコマンド",
"CommandFilterRulePriorityHelpText": "優先度の選択範囲は1-100、1最低優先度、100最高優先度です",
"CommandFilterRules": "コマンドフィルタルール",
@@ -253,18 +251,9 @@
},
"auth": {
"LoginRequiredMsg": "アカウントが終了しました。ログインし直してください",
"ReLogin": "再ログイン",
"ReLoginTitle": "現在、サードパーティのログインユーザーCAS/SAMLは、MFAをバインドしておらず、パスワードチェックをサポートしていません。再ログインしてください。",
"NeedReLogin": "再ログインが必要です",
"ReLoginErr": "ログイン時間が 5 分を超えました。もう一度ログインしてください"
"ReLogin": "再ログイン"
},
"common": {
"NeedAddAppsOrSystemUserErrMsg": "アプリケーションまたはシステムユーザーを追加してください",
"VerificationCodeSent": "検証コードが送信されました",
"SendVerificationCode": "認証コードの送信",
"History": "歴史",
"ChangeViewHelpText": "クリックしてさまざまなビューにアクセス",
"Component": "コンポーネント",
"PrivateCloud": "プライベートクラウド",
"PublicCloud": "パブリッククラウド",
"Correlation": "関連",
@@ -286,7 +275,6 @@
"DateUpdated": "更新日",
"ApprovaLevel": "承認情報",
"MFAVerify": "MFAの検証",
"CurrentUserVerify": "現在のユーザー検証",
"ViewSecret": "パスワードの確認",
"ConnectWebSocketError": "Webソケット接続に失敗しました",
"Action": "アクション",
@@ -435,17 +423,15 @@
"downloadImportTemplateMsg": "作成テンプレートのダウンロード",
"downloadUpdateTemplateMsg": "更新テンプレートのダウンロード",
"onlyCSVFilesTips": "Csvファイルのインポートのみサポート",
"ImportFail": "インポートに失敗しました",
"updateSuccessMsg": "更新のインポートに成功しました。合計:{count}",
"uploadCsvLth10MHelpText": "Csv/xlsxのみアップロードでき、10m以下です",
"dragUploadFileInfo": "ここにファイルをドラッグするか、ここをクリックしてアップロードしてください",
"dragUploadFileInfo": "ファイルをここにドラッグするか、アップロードをクリックします",
"hasImportErrorItemMsg": "インポート失敗項目があります。左側のxをクリックして失敗原因を確認し、表をクリックして編集した後、失敗項目のインポートを続けることができます"
},
"fileType": "ファイルタイプ",
"isValid": "有効",
"nav": {
"TempPassword": "一時パスワード",
"ConnectionToken": "接続トークン",
"APIKey": "APIキー",
"Workbench": "作業台",
"Navigation": "ナビゲーション",
@@ -459,7 +445,6 @@
"Logout": "ログインを終了する",
"Profile": "個人情報",
"Support": "サポート",
"Download": "ダウンロード",
"UserPage": "ユーザービュー",
"View": "ビュー",
"EnterpriseEdition": "企業版"
@@ -493,7 +478,6 @@
"InvalidJson": "JSONの合法的ではありません",
"time_period": "時間帯",
"FormatError": "フォーマットエラー",
"NotSpecialEmoji": "特殊な表情記号の入力は許可されていません",
"WeekCronSelect": {
"Monday": "月曜日",
"Tuesday": "火曜日",
@@ -682,7 +666,6 @@
},
"route": {
"": "",
"AssignedTicketList": "割り当て済みワークオーダー",
"CreateEndpoint": "エンドポイントを作成する",
"UpdateEndpoint": "エンドポイントを更新",
"CreateEndpointRule": "エンドポイントルールを作成する",
@@ -703,7 +686,6 @@
"TicketFlowUpdate": "承認フローの更新",
"Accounts": "アカウント管理",
"AssetAccount": "資産アカウント",
"AssetHistoryAccount": "資産履歴",
"ApplicationAccount": "アプリアカウント",
"Ticket": "ワークオーダー",
"SessionDetail": "セッションの詳細",
@@ -927,25 +909,21 @@
"UseProtocol": "使用契約",
"SessionState": "セッションステータス",
"Monitor": "モニタリング",
"RazorNotSupport": "RDPクライアントセッションは、監視をサポートしていません",
"XRDPNotSupport": "RDPクライアントセッションは、監視をサポートしていません",
"sessionMonitor": "モニタリング",
"TerminateTaskSendSuccessMsg": "最終タスクが発行されました。後で更新して確認してください。",
"helpText": {
"esUrl": "ヒント: 複数のホストがある場合は、カンマ ( , ) で分割します。 (Eg: http://www.jumpserver.a.com:3000、http://www.jumpserver.b.com:3000)",
"esIndex": "Esはデフォルトindexを提供します。日付による索引の作成を選択した場合、この空は索引接頭辞です。",
"esIndex": "Esはデフォルトindexを提供します。",
"esDocType": "Esデフォルトのドキュメントタイプ: command"
}
},
"setting": {
"OAuth2LogoTip": "ヒント: 認証サービス プロバイダー (推奨画像サイズ: 64px*64px)",
"EndpointListHelpMessage": "サービスエンドポイントは、ユーザーがサービスにアクセスするためのアドレス(ポート)です。ユーザーがアセットに接続すると、エンドポイントルールとアセットタグに従ってサービスエンドポイントが選択され、接続がアクセスエントリとして確立されます。資産の分散接続を実現します。",
"EndpointRuleListHelpMessage": "サービスエンドポイント選択戦略では、現在2つのタイプがサポートされています<br> 1. エンドポイントルールに従ってエンドポイントを指定します(現在のページ);<br>2. アセットタグを介してエンドポイントを選択します。タグ名はに固定されていますエンドポイントであり、値はエンドポイントの名前です。 <br> IPセグメントが競合する可能性があるため、2つの方法が優先的にラベル照合を使用し、ラベル方法はルールの補足として存在します。",
"EnableKoKoSSHHelpText": "有効にすると、アセットを接続してSSHクライアントのプルアップ方式を表示します",
"SettingInEndpointHelpText": "[システム設定]/[端末設定]/[サービスエンドポイント]でサービスアドレスとポートを構成します",
"Feature": "機能",
"AlibabaCloud": "Alibaba cloud",
"TencentCloud": "テンセント雲",
"CMPP2": "CMPP v2.0",
"Radius": "Radius",
"VerifySignTmpl": "認証コードメールテンプレート",
"Enable": "有効化",
@@ -1003,11 +981,9 @@
"authLdapServerUri": "LDAPアドレス",
"authLdapUserAttrMap": "ユーザー属性マッピング",
"authUserAttrMap": "ユーザー属性マッピング",
"authUserAttrMapHelpText": "左側のキーがJumpServerユーザ属性、右側の値が認証プラットフォームユーザ属性",
"OAuth2": "OAuth2",
"authUserAttrMapHelpText": "マッピング関係 {idp:sp}",
"SAML2": "SAML2",
"enableSAML2Auth": "SAML2認証をオンにする",
"enableOAuth2Auth": "OAuth2認証をオンにする",
"tokenHTTPMethod": "Token 取得方法",
"SAML2Auth": "SAML2認定",
"authSAML2Xml": "IDPメタデータXML",
"authSAML2MetadataUrl": "IDPメタデータURL",
@@ -1046,7 +1022,6 @@
"helpText": {
"TempPassword": "一時パスワードの有効期間は300秒で、使用後すぐに失効します",
"ApiKeyList": "Api keyを使用してリクエストヘッダに署名します。リクエストのヘッダごとに異なります。使用ドキュメントを参照してください",
"ConnectionTokenList": "接続トークンは、認証アセットと接続アセットを組み合わせた一種の認証情報であり、ユーザーはワンクリックでアセットにログインできます。現在サポートされているコンポーネントには、KoKo、Lion、Magnus、Razorなどがあります。",
"authLdapSearchFilter": "可能なオプションは (cnまたはuidまたはsamaccount tname = %(user)s) です",
"authLdapSearchOu": "| を使用して各OUを区切る",
"authLdapUserAttrMap": "ユーザー属性マッピングは、LDAPのユーザー属性をjumpserverユーザーにマッピングする方法を表します。username、name、emailはjumpserverの属性です",
@@ -1123,8 +1098,6 @@
"refreshLdapCache": "Ldapキャッシュを更新します。後でお願いします。",
"LicenseExpired": "ライセンスが期限切れです",
"LicenseWillBe": "ライセンスはまもなく",
"LicenseReachedAssetAmountLimit": "アセットの数がライセンス制限を超えました",
"LicenseForTest": "試験用ライセンス本ライセンスは試験用にのみ使用されます",
"Expire": "期限切れ",
"WeCom": "企業wechat",
"DingTalk": "ホッチキス",
@@ -1134,13 +1107,7 @@
"SMS": "SMS設定",
"feiShuTest": "テスト",
"setting": "設定",
"SystemTools": "システムツール",
"basicTools": "基本的なツール",
"destinationIP": "宛先アドレス",
"testPort": "テストポート",
"testTools": "テスト",
"testHelpText": "テストの宛先アドレスを入力してください",
"SMSProvider": "メールサービス業者 / プロトコル"
"SMSProvider": "メールサービス業者"
},
"tickets": {
"OneAssigneeType": "一次受付者タイプ",
@@ -1182,7 +1149,6 @@
"OpenTicket": "ワークオーダーの作成",
"HandleTicket": "作業指示の処理",
"FinishedTicket": "ワークオーダーの完了",
"CheckViewAcceptor": "クリックして受付人を表示",
"IP": "IP",
"Hostname": "ホスト名",
"Asset": "資産",
@@ -1344,10 +1310,6 @@
"Receivers": "受取人",
"Subscription": "メッセージ購読",
"ChangeReceiver": "メッセージ受信者の修正",
"Constituency": "未選択",
"Selected": "選択済み",
"PrePage": "前のページ",
"NextPage": "次のページ",
"Subject": "テーマ",
"Message": "メッセージ",
"DeliveryTime": "送信時間",
@@ -1362,7 +1324,6 @@
"SMS": "Sms"
},
"xpack": {
"Images": "画像",
"NavHelp": "ナビゲーションバーのリンク",
"helpDocument": "ドキュメントリンク",
"helpSupport": "サポートリンク",
@@ -1459,8 +1420,6 @@
"HuaweiPrivatecloud": "ファーウェイプライベートクラウド",
"OpenStack": "OpenStack",
"GCP": "Googleクラウド",
"FC": "Fusion Compute",
"LAN": "ローカルエリアネットワーク",
"AWS_China": "AWS(中国)",
"AWS_Int": "AWS (国際)",
"HuaweiCloud": "ファーウェイ雲",
@@ -1592,9 +1551,6 @@
"technologyConsult": "技術コンサルティング",
"RegularlyPerform": "定期的に実行する",
"CyclePerform": "サイクル実行",
"ModifyTheme": "テーマを変更",
"ClassicGreen": "クラシックグリーン",
"ChinaRed": "チャイナレッド",
"HelpText": {
"CrontabOfCreateUpdatePage": "例: 毎週日曜日03:05に <5 3 * * 0> <br/> 5桁のLinux crontab式を使用して、時分割日月曜日> (<a href = \"https://tool.lu/crontab/\" target = \"_ ツール </a>) <br/> 定期実行とサイクル実行を同時に設定している場合は、優先的に定期実行を使って",
"IntervalOfCreateUpdatePage": "単位: 時",

View File

@@ -1,7 +1,6 @@
{
"": "",
"accounts": {
"AccountHistableHelpMessage": "记录当前账号的历史版本",
"PleaseClickLeftAssetToViewAssetAccount": "资产账号列表,点击左侧资产进行查看",
"PleaseClickLeftApplicationToViewApplicationAccount": "应用账号列表,点击左侧应用进行查看",
"PleaseClickLeftAssetToViewGatheredUser": "收集用户列表,点击左侧资产进行查看"
@@ -110,7 +109,6 @@
"AssetDetail": "资产详情",
"AssetList": "资产列表",
"ReplaceNodeAssetsAdminUser":"替换节点资产的管理员",
"AssetTree": "资产树",
"AssetListHelpMessage": "左侧是资产树,右击可以新建、删除、更改树节点,授权资产也是以节点方式组织的,右侧是属于该节点下的资产\n",
"TestGatewayTestConnection":"测试连接网关",
"TestGatewayHelpMessage": "如果使用了nat端口映射请设置为ssh真实监听的端口",
@@ -129,7 +127,7 @@
"Charset": "字符集",
"CmdFilter": "命令过滤器",
"CommandFilterDetail": "命令过滤器详情",
"CommandFilterHelpMessage": "系统用户支持绑定多个命令过滤器实现禁止输入某些命令的效果;过滤器中可配置多个规则,在使用该系统用户连接资产时,输入的命令按照过滤器中配置的规则优先级生效。<br>例:首先匹配到的规则是“允许”,则该命令执行,首先匹配到的规则为“禁止”,则禁止该命令执行;如果最后匹配到规则,则允许执行",
"CommandFilterHelpMessage": "系统用户可以绑定一些命令过滤器,一个过滤器可以定义一些规则 当用户使用这个系统用户登录资产,然后执行一个命令 这个命令需要被绑定过滤器的所有规则匹配,高优先级先被匹配, 当一个规则匹配到了,如果规则的动作是允许,这个命令会被放行, 如果规则的动作是禁止,命令将会被禁止执行, 否则就匹配下一个规则,如果最后没有匹配到规则,则允许执行",
"CommandFilterRuleContentHelpText": "每行一个命令",
"CommandFilterRulePriorityHelpText": "优先级可选范围为1-1001最低优先级100最高优先级",
"CommandFilterRules": "命令过滤器规则",
@@ -253,17 +251,9 @@
},
"auth": {
"LoginRequiredMsg": "账号已退出,请重新登录",
"ReLogin": "重新登录",
"ReLoginTitle": "当前三方登录用户CAS/SAML未绑定 MFA 且不支持密码校验,请重新登录。",
"NeedReLogin": "需要重新登录",
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
"ReLogin": "重新登录"
},
"common": {
"NeedAddAppsOrSystemUserErrMsg": "需要添加应用或系统用户",
"VerificationCodeSent": "验证码已发送",
"SendVerificationCode": "发送验证码",
"History": "历史",
"ChangeViewHelpText": "点击切换不同视图",
"Component": "组件",
"PrivateCloud": "私有云",
"PublicCloud": "公有云",
@@ -286,7 +276,6 @@
"DateUpdated": "更新日期",
"ApprovaLevel": "审批信息",
"MFAVerify": "验证 MFA",
"CurrentUserVerify": "验证当前用户",
"ViewSecret": "查看密码",
"ConnectWebSocketError": "连接 WebSocket 失败",
"Action": "动作",
@@ -435,17 +424,15 @@
"downloadImportTemplateMsg": "下载创建模板",
"downloadUpdateTemplateMsg": "下载更新模板",
"onlyCSVFilesTips": "仅支持csv文件导入",
"ImportFail": "导入失败",
"updateSuccessMsg": "导入更新成功,总共:{count}",
"uploadCsvLth10MHelpText": "只能上传 csv/xlsx, 且不超过 10M",
"dragUploadFileInfo": "将文件拖到此处,或点击此处上传",
"dragUploadFileInfo": "将文件拖到此处,或点击上传",
"hasImportErrorItemMsg": "存在导入失败项,点击左侧 x 查看失败原因,点击表格编辑后,可以继续导入失败项"
},
"fileType": "文件类型",
"isValid": "有效",
"nav": {
"TempPassword": "临时密码",
"ConnectionToken": "连接令牌",
"APIKey": "API Key",
"Workbench": "工作台",
"Navigation": "导航",
@@ -459,7 +446,6 @@
"Logout": "退出登录",
"Profile": "个人信息",
"Support": "支持",
"Download": "下载",
"UserPage": "用户视图",
"View": "视图",
"EnterpriseEdition": "企业版"
@@ -493,7 +479,6 @@
"InvalidJson": "不是合法 JSON",
"time_period": "时段",
"FormatError": "格式错误",
"NotSpecialEmoji": "不允许输入特殊表情符号",
"WeekCronSelect": {
"Monday": "星期一",
"Tuesday": "星期二",
@@ -702,11 +687,8 @@
"TicketFlowUpdate": "更新审批流",
"Accounts": "账号管理",
"AssetAccount": "资产账号",
"AssetHistoryAccount": "资产历史账号",
"ApplicationAccount": "应用账号",
"Ticket":"工单",
"MyTickets": "我的申请",
"AssignedTicketList": "待我审批",
"SessionDetail": "会话详情",
"CommandConfirm": "命令复核",
"AdminUserCreate": "创建管理用户",
@@ -928,25 +910,21 @@
"UseProtocol": "使用协议",
"SessionState": "会话状态",
"Monitor": "监控",
"RazorNotSupport": "RDP 客户端会话, 暂不支持监控",
"XRDPNotSupport": "RDP 客户端会话, 暂不支持监控",
"sessionMonitor": "监控",
"TerminateTaskSendSuccessMsg": "终断任务已下发,请稍后刷新查看",
"helpText": {
"esUrl": "提示:如果有多台主机,请使用逗号 ( , ) 进行分割。eg: http://www.jumpserver.a.com:3000,http://www.jumpserver.b.com:3000",
"esIndex": "es 提供默认 indexjumpserver。如果开启按日期建立索引,那么输入的值会作为索引前缀",
"esDocType": "es 默认文档类型command"
"esIndex": "es提供默认indexjumpserver",
"esDocType": "es默认文档类型command"
}
},
"setting": {
"OAuth2LogoTip": "提示:认证服务提供商(建议图片大小为: 64px*64px",
"EndpointListHelpMessage": "服务端点是用户访问服务的地址(端口),当用户在连接资产时,会根据端点规则和资产标签选择服务端点,作为访问入口建立连接,实现分布式连接资产",
"EndpointRuleListHelpMessage": "对于服务端点选择策略,目前支持两种:<br>1、根据端点规则指定端点(当前页面)<br>2、通过资产标签选择端点标签名固定是 endpoint值是端点的名称。<br>两种方式优先使用标签匹配,因为 IP 段可能冲突,标签方式是作为规则的补充存在的。",
"EnableKoKoSSHHelpText": "开启时连接资产会显示 SSH Client 拉起方式",
"SettingInEndpointHelpText": "在 系统设置 / 终端设置 / 服务端点 中配置服务地址和端口",
"Feature": "功能",
"AlibabaCloud": "阿里云",
"TencentCloud": "腾讯云",
"CMPP2": "CMPP v2.0",
"Radius": "Radius",
"VerifySignTmpl": "验证码短信模板",
"Enable": "启用",
@@ -1004,10 +982,9 @@
"authLdapServerUri": "LDAP地址",
"authLdapUserAttrMap": "用户属性映射",
"authUserAttrMap": "用户属性映射",
"authUserAttrMapHelpText": "左侧的键为 JumpServer 用户属性,右侧的值为认证平台用户属性",
"OAuth2": "OAuth2",
"enableOAuth2Auth": "开启 OAuth2 认证",
"tokenHTTPMethod": "Token 获取方法",
"authUserAttrMapHelpText": "映射关系 {idpsp}",
"SAML2": "SAML2",
"enableSAML2Auth": "开启 SAML2 认证",
"SAML2Auth": "SAML2 认证",
"authSAML2Xml": "IDP metadata XML",
"authSAML2MetadataUrl": "IDP metadata URL",
@@ -1046,7 +1023,6 @@
"helpText": {
"TempPassword": "临时密码有效期为 300 秒,使用后立刻失效",
"ApiKeyList": "使用api key签名请求头每个请求的头部是不一样的, 请查阅使用文档",
"ConnectionTokenList": "连接令牌是将身份验证和连接资产结合起来使用的一种认证信息支持用户一键登录到资产目前支持的组件包括KoKo、Lion、Magnus、Razor 等",
"authLdapSearchFilter": "可能的选项是(cn或uid或sAMAccountName=%(user)s)",
"authLdapSearchOu": "使用|分隔各OU",
"authLdapUserAttrMap": "用户属性映射代表怎样将LDAP中用户属性映射到jumpserver用户上username, name,email 是jumpserver的属性",
@@ -1123,8 +1099,6 @@
"refreshLdapCache":"刷新Ldap缓存请稍后",
"LicenseExpired": "许可证已经过期",
"LicenseWillBe": "许可证即将在 ",
"LicenseReachedAssetAmountLimit": "资产数量已经超过许可证数量限制",
"LicenseForTest": "测试用途许可证, 本许可证仅用于 开发、测试PoC和演示",
"Expire": " 过期",
"WeCom": "企业微信",
"DingTalk": "钉钉",
@@ -1134,14 +1108,7 @@
"SMS": "短信设置",
"feiShuTest": "测试",
"setting": "设置",
"SMSProvider": "短信服务商",
"SystemTools": "系统工具",
"basicTools": "基本工具",
"destinationIP": "目的地址",
"testPort": "端口",
"testTools": "测试",
"testHelpText": "请输入目的地址进行测试",
"SMSProvider": "短信服务商 / 协议"
"SMSProvider": "短信服务商"
},
"tickets": {
"OneAssigneeType": "一级受理人类型",
@@ -1163,8 +1130,8 @@
"Assignee": "处理人",
"Assignees": "待处理人",
"Close": "关闭",
"OpenStatus":"审批中",
"CloseStatus":"已完成",
"OpenStatus":"开启",
"CloseStatus":"关闭",
"Comment": "备注",
"MyTickets": "我发起的",
"RequestPerm":"授权申请",
@@ -1183,7 +1150,6 @@
"OpenTicket": "创建工单",
"HandleTicket": "处理工单",
"FinishedTicket": "完成工单",
"CheckViewAcceptor": "点击查看受理人",
"IP": "IP",
"Hostname": "主机名",
"Asset": "资产",
@@ -1345,10 +1311,6 @@
"Receivers": "接收人",
"Subscription": "消息订阅",
"ChangeReceiver": "修改消息接收人",
"Constituency": "待选区",
"Selected": "已选中",
"PrePage": "上一页",
"NextPage": "下一页",
"Subject": "主题",
"Message": "消息",
"DeliveryTime": "发送时间",
@@ -1363,7 +1325,6 @@
"SMS": "短信"
},
"xpack": {
"Images": "图片",
"NavHelp": "导航栏链接",
"helpDocument": "文档链接",
"helpSupport": "支持链接",
@@ -1460,8 +1421,6 @@
"HuaweiPrivatecloud": "华为私有云",
"OpenStack": "OpenStack",
"GCP": "谷歌云",
"FC": "Fusion Compute",
"LAN": "局域网",
"AWS_China": "AWS(中国)",
"AWS_Int": "AWS(国际)",
"HuaweiCloud": "华为云",
@@ -1514,8 +1473,8 @@
"DeleteReleasedAssets": "删除已释放资产"
},
"Template": {
"Template": "模版管理"
},
"Template": "模版管理"
},
"Corporation": "公司",
"Edition": "版本",
"Execute": "执行",
@@ -1548,7 +1507,7 @@
"NoLicense": "暂无许可证",
"Node": "节点",
"Organization": {
"AllOrganization": "组织列表",
"AllOrganization": "所有组织",
"OrganizationCreate": "创建组织",
"OrganizationLists": "组织列表",
"OrganizationDetail": "组织详情",
@@ -1593,9 +1552,6 @@
"technologyConsult": "技术咨询",
"RegularlyPerform": "定期执行",
"CyclePerform": "周期执行",
"ModifyTheme": "修改主题",
"ClassicGreen": "经典绿",
"ChinaRed": "中国红",
"HelpText": {
"CrontabOfCreateUpdatePage": "例如:每周日 03:05 执行 <5 3 * * 0> <br/> 使用5位 Linux crontab 表达式 <分 时 日 月 星期> <a href=\"https://tool.lu/crontab/\" target=\"_blank\">在线工具</a> <br/> 如果同时设置了定期执行和周期执行,优先使用定期执行",
"IntervalOfCreateUpdatePage": "单位:时",

View File

@@ -1 +1 @@
<svg t="1659513943772" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5163" width="200" height="200"><path d="M1024 146.285714v731.428572H0V146.285714h1024z m-149.942857 94.573715L512 602.88l-362.057143-362.057143L98.267429 292.571429 512 706.340571 925.769143 292.571429l-51.748572-51.712z" fill="#7c7e7f" p-id="5164"></path></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645509697274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2361" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M867.046319 156.952658 156.952658 156.952658c-49.040926 0-88.317465 39.720653-88.317465 88.76158l-0.444115 532.570501c0 49.040926 39.720653 88.76158 88.76158 88.76158l710.09366 0c49.040926 0 88.76158-39.720653 88.76158-88.76158L955.807898 245.714238C955.808922 196.673311 916.087245 156.952658 867.046319 156.952658zM867.046319 334.476841l-355.047342 221.903949-355.047342-221.903949 0-88.76158 355.047342 221.903949 355.047342-221.903949L867.046319 334.476841z" p-id="2362"></path></svg>

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 865 B

View File

@@ -1,9 +1,11 @@
<template>
<div class="footer" :class="device" :style="style">
<div class="pull-right version">
Version <strong> dev </strong> <span v-if="!publicSettings.XPACK_LICENSE_IS_VALID"> GPLv3. </span>
<div class="footer" :style="style">
<div class="pull-right">
Version <strong> dev </strong> <span v-if="!publicSettings.XPACK_LICENSE_IS_VALID"> GPLv2. </span>
</div>
<div style="padding-left:20px;">
{{ publicSettings.XPACK_LICENSE_INFO.corporation }}
</div>
<div>{{ corporation }}</div>
</div>
</template>
<script>
@@ -25,10 +27,7 @@ export default {
if (this.device === 'mobile') {
return ''
}
return this.sidebar.opened ? ('margin-left: 220px;') : ('margin-left: 54px')
},
corporation() {
return this.publicSettings.XPACK_LICENSE_INFO.corporation
return this.sidebar.opened ? ('margin-left: 210px;') : ('margin-left: 54px')
}
}
}
@@ -39,9 +38,9 @@ export default {
height: 35px !important;
}
.pull-right {
float: right
float: right!important;
}
.footer {
.footer{
position: fixed;
bottom: 0;
left: 0;
@@ -56,11 +55,4 @@ export default {
font-size: 13px;
}
}
.mobile.footer {
text-align: center;
}
.mobile.footer .pull-right{
float: none;
display: block;
}
</style>

View File

@@ -16,8 +16,6 @@
<script>
import AutoDataForm from '@/components/AutoDataForm'
import { getUpdateObjURL } from '@/utils/common'
import { encryptPassword } from '@/utils/crypto'
export default {
name: 'GenericCreateUpdateForm',
components: {
@@ -89,7 +87,7 @@ export default {
createSuccessNextRoute: {
type: Object,
default: function() {
const routeName = this.$route.name?.replace('Create', 'List')
const routeName = this.$route.name.replace('Create', 'List')
return { name: routeName }
}
},
@@ -97,14 +95,15 @@ export default {
updateSuccessNextRoute: {
type: Object,
default: function() {
const routeName = this.$route.name?.replace('Update', 'List')
const routeName = this.$route.name.replace('Update', 'List')
return { name: routeName }
}
},
objectDetailRoute: {
type: Object,
default: function() {
const routeName = this.$route.name?.replace('Update', 'Detail')
const routeName = this.$route.name
.replace('Update', 'Detail')
.replace('Create', 'Detail')
return { name: routeName }
}
@@ -137,16 +136,6 @@ export default {
if (params.id) {
url = getUpdateObjURL(url, params.id)
}
const clone_from = this.$route.query['clone_from']
const query = clone_from ? `clone_from=${clone_from}` : ''
if (query) {
if (url.indexOf('?') === -1) {
url = `${url}?${query}`
} else {
url = `${url}&${query}`
}
}
return url
}
},
@@ -229,14 +218,6 @@ export default {
hasDetailInMsg: {
type: Boolean,
default: true
},
encryptedFields: {
type: Array,
default: () => ['password', 'token', 'private_key']
},
needGetObjectDetail: {
type: Boolean,
default: true
}
},
data() {
@@ -284,27 +265,10 @@ export default {
isUpdateMethod() {
return ['put', 'patch'].indexOf(this.method.toLowerCase()) > -1
},
encryptFields(values) {
// 批量提交clean 后可能是个数组
if (values instanceof Array) {
return values.map((item) => this.encryptFields(item))
}
values = { ...values }
for (const field of this.encryptedFields) {
let value = values[field]
if (!value || typeof value !== 'string') {
continue
}
value = encryptPassword(value)
values[field] = value
}
return values
},
handleSubmit(values, formName, addContinue) {
let handler = this.onSubmit || this.defaultOnSubmit
handler = handler.bind(this)
values = this.cleanFormValue(values)
values = this.encryptFields(values)
return handler(values, formName, addContinue)
},
defaultOnSubmit(validValues, formName, addContinue) {
@@ -316,7 +280,7 @@ export default {
},
async getFormValue() {
const cloneFrom = this.$route.query['clone_from']
if ((!this.isUpdateMethod() && !cloneFrom) || !this.needGetObjectDetail) {
if (!this.isUpdateMethod() && !cloneFrom) {
return Object.assign(this.form, this.initial)
}
let object = this.object

View File

@@ -197,10 +197,6 @@ export default {
if (typeof route === 'string') {
route = { name: route, params: {}}
}
route = {
...route,
query: this.$route.query || {}
}
route.params.id = id
this.$router.push(route)
},

View File

@@ -97,13 +97,12 @@ export default {
getDefaultFormSetting() {
const vm = this
return {
needGetObjectDetail: false,
submitMethod: () => 'patch',
cleanFormValue: (value) => {
cleanFormValue: function(value) {
const filterValue = {}
Object.keys(value)
.filter((key) => vm.checkedFields?.includes(key))
.forEach((key) => { filterValue[key] = value[key] })
Object.keys(value).filter((key) => vm.checkedFields?.includes(key)).forEach((key) => {
filterValue[key] = value[key]
})
const formValue = []
let object = {}
for (const row of vm.selectedRows) {

View File

@@ -16,9 +16,6 @@
<el-dropdown-item v-if="$store.getters.publicSettings.AUTH_TEMP_TOKEN && $hasPerm('authentication.view_temptoken')" icon="el-icon-magic-stick" command="tempPassword">
{{ $t('common.nav.TempPassword') }}
</el-dropdown-item>
<el-dropdown-item v-if="$hasPerm('authentication.view_connectiontoken')" icon="el-icon-place" command="connectionToken">
{{ $t('common.nav.ConnectionToken') }}
</el-dropdown-item>
<el-dropdown-item divided command="logout"><svg-icon icon-class="logout" style="margin-right: 4px" />
{{ $t('common.nav.Logout') }}
</el-dropdown-item>
@@ -60,9 +57,6 @@ export default {
break
case 'tempPassword':
this.$router.push('/profile/temp-password')
break
case 'connectionToken':
this.$router.push('/profile/connection-token')
}
},
logout() {
@@ -73,8 +67,8 @@ export default {
<style scoped>
.header-avatar {
height: 24px;
width: 24px;
height: 30px;
width: 30px;
margin-right: 5px;
vertical-align: middle;
}

View File

@@ -6,7 +6,6 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="docs">{{ $t('common.nav.Docs') }}</el-dropdown-item>
<el-dropdown-item command="support">{{ $t('common.nav.Support') }}</el-dropdown-item>
<el-dropdown-item command="toolsDownload">{{ $t('common.nav.Download') }}</el-dropdown-item>
<el-dropdown-item v-if="!hasLicence" command="enterprise">{{ $t('common.nav.EnterpriseEdition') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -44,9 +43,6 @@ export default {
case 'enterprise':
window.open('https://jumpserver.org/enterprise.html', '_blank')
break
case 'toolsDownload':
window.open('/core/download/', '_blank')
break
default:
window.open(this.URLSite.HELP_DOCUMENT_URL, '_blank')
break

View File

@@ -121,7 +121,7 @@ export default {
</script>
<style lang="scss" scoped>
@import '~@/styles/variables.scss';
@import '~@/styles/element-variables.scss';
.org-select {
padding: 0 10px 0 18px;

View File

@@ -31,20 +31,18 @@
@mouseleave="hoverMsgId = ''"
@click="showMsgDetail(msg)"
>
<el-row :gutter="10" class="msg-item-head">
<el-col :span="15" class="msg-item-head-type">
<div class="msg-item-head">
<span class="msg-item-head-type">
<i :class="msg['has_read'] ? 'fa-envelope-open-o' : 'fa-envelope'" class="fa msg-icon" />
{{ msg.subject }}
</el-col>
<el-col :span="9">
<span v-if="hoverMsgId !== msg.id || msg['has_read']" class="msg-item-head-time">
{{ formatDate(msg.date_created) }}
</span>
<span v-else class="msg-item-read-btn" @click.stop="markAsRead([msg])">
<a>{{ $t('notifications.MarkAsRead') }}</a>
</span>
</el-col>
</el-row>
</span>
<span v-if="hoverMsgId !== msg.id || msg['has_read']" class="msg-item-head-time">
{{ formatDate(msg.date_created) }}
</span>
<div v-else class="msg-item-read-btn" @click.stop="markAsRead([msg])">
<a>{{ $t('notifications.MarkAsRead') }}</a>
</div>
</div>
<div class="msg-item-txt">
<span v-html="msg.message" />
</div>
@@ -98,7 +96,7 @@ export default {
},
computed: {
width() {
return this.$store.state.app.device === 'mobile' ? '70%' : '380px'
return this.$store.state.app.device === 'mobile' ? '70%' : '20%'
}
},
mounted() {
@@ -272,7 +270,7 @@ export default {
.msg-item-head-type {
float: left;
//width: 220px;
width: 220px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
@@ -309,9 +307,6 @@ export default {
.msg-detail-txt {
margin-bottom: 20px;
line-height: 25px;
&>>> a {
color: var(--color-success)!important;
}
}
}

View File

@@ -1,40 +1,31 @@
<template>
<el-tooltip
v-model="iShowTip"
:manual="true"
:content="tipText"
class="item"
effect="dark"
placement="bottom-start"
<el-menu
:default-active="currentViewRoute.name"
class="menu-main"
:class="mode"
:mode="mode"
@select="handleSelectView"
>
<el-menu
:default-active="currentViewRoute.name"
class="menu-main"
:class="mode"
:mode="mode"
@select="handleSelectView"
<el-submenu
index="2"
popper-class="view-switcher"
>
<el-submenu
index="2"
popper-class="view-switcher"
<template slot="title">
<span class="title-label">
<i class="fa fa-bars" />
<span>{{ $t('common.nav.View') }}</span>
</span>
</template>
<el-menu-item
v-for="view of views"
:key="view.name"
:index="view.name"
>
<template slot="title">
<span class="title-label">
<i class="fa fa-bars" />
<span>{{ $t('common.nav.View') }}</span>
</span>
</template>
<el-menu-item
v-for="view of views"
:key="view.name"
:index="view.name"
>
<i v-if="mode === 'horizontal'" class="icons" :class="view.meta.icon" />
<span slot="title" class="icons-title">{{ view.meta.title }}</span>
</el-menu-item>
</el-submenu>
</el-menu>
</el-tooltip>
<i v-if="mode === 'horizontal'" class="icons" :class="view.meta.icon" />
<span slot="title" class="icons-title">{{ view.meta.title }}</span>
</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
@@ -55,7 +46,6 @@ export default {
},
data() {
return {
tipText: this.$t('common.ChangeViewHelpText'),
showTip: true
}
},
@@ -82,36 +72,6 @@ export default {
},
currentView() {
return this.viewsMapper[this.currentViewRoute.name]
},
tipHasRead: {
set(val) {
localStorage.setItem('viewSwitcherTip', val)
},
get() {
return localStorage.getItem('viewSwitcherTip')
}
},
iShowTip: {
get() {
if (this.mode !== 'horizontal') {
return false
}
if (this.views.length < 1) {
return false
}
if (this.tipHasRead) {
return false
}
return this.showTip
},
set(val) {
this.showTip = val
}
}
},
created() {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile/i.test(navigator.userAgent)) {
this.showTip = false
}
},
methods: {
@@ -120,10 +80,6 @@ export default {
localStorage.setItem('PreView', key)
// Next 之前要重置 init 状态,否则这些路由守卫就不走了
await store.dispatch('app/reset')
if (!this.tipHasRead) {
this.tipHasRead = '1'
this.iShowTip = false
}
this.$router.push(routeName)
}
}
@@ -153,6 +109,7 @@ export default {
padding: 10px 10px;
text-align: center;
height: 70px;
width: 70px;
&:hover {
color: inherit;
i {
@@ -160,10 +117,10 @@ export default {
}
}
&:first-child {
margin-left: 16px;
margin-left: 20px;
}
&:last-child {
margin-right: 16px;
margin-right: 20px;
}
}
.el-submenu.is-opened {

View File

@@ -16,7 +16,7 @@
<SystemSetting />
</el-tooltip>
</li>
<li v-if="ticketsEnabled" class="header-item header-hover">
<li v-if="this.$hasLicense() && this.$hasPerm('tickets.view_ticket')" class="header-item header-hover">
<Tickets />
</li>
<li class="header-item active-menu">
@@ -69,12 +69,7 @@ export default {
computed: {
...mapGetters([
'sidebar', 'publicSettings', 'currentOrgRoles', 'currentViewRoute'
]),
ticketsEnabled() {
return this.publicSettings['TICKETS_ENABLED'] &&
this.$hasLicense() &&
this.$hasPerm('tickets.view_ticket')
}
])
},
methods: {
toggleSideBar() {
@@ -87,27 +82,20 @@ export default {
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
$header-height: 55px;
.navbar {
position: relative;
height: $header-height;
line-height: $header-height;
height: 55px;
overflow: hidden;
background: #f3f3f4;
.navbar-left {
float: left;
.left-item {
line-height: $header-height;
line-height: 55px;
display: inline-block;
vertical-align: middle;
&>>> .el-submenu__title {
font-family: "open sans","Helvetica Neue",Helvetica,Arial,sans-serif;
padding: 0 8px;
line-height: $header-height;
height: $header-height;
padding: 0 14px;
}
&>>> .org-select {
padding: 0;
@@ -117,17 +105,15 @@ export default {
.navbar-right {
float: right;
margin-right: 10px;
height: 55px;
line-height: 55px;
.header-hover {
line-height: 56px!important;
&:hover {
background-color: #e6e6e6;
}
}
.header-item {
line-height: $header-height;
line-height: 55px;
display: inline-block;
padding-right: 10px;
padding-left: 10px;
@@ -165,8 +151,8 @@ export default {
padding: 0 10px!important;
line-height: 30px;
border-radius: 4px;
border-color: $--color-primary;
background-color: $--color-primary;
border-color: #1ab394;
background-color: #1ab394;
color: #fff;
cursor: pointer;
transition: .2s;

View File

@@ -31,10 +31,10 @@ export default {
]),
// eslint-disable-next-line vue/return-in-computed-property
logoTextSrc() {
return this.publicSettings['INTERFACE']['logo_index']
return this.publicSettings.LOGO_URLS.logo_index
},
logoSrc() {
return this.publicSettings['INTERFACE']['logo_logout']
return this.publicSettings.LOGO_URLS.logo_logout
}
},
created() {

View File

@@ -6,26 +6,13 @@
</div>
<div class="active-mobile">
<ViewSwitcher mode="vertical" class="mobile-view-switch" />
<Organization v-if="$hasLicense()" class="organization" />
<Organization class="organization" />
</div>
<div class="nav-title" :class="{'collapsed': isCollapse}">
<svg-icon
v-if="isRouteMeta.view === 'settings'"
icon-class="setting-fill"
style="margin-right: 0;"
/>
<i
v-else
class="fa"
:class="isRouteMeta.icon"
/>
<span
v-show="!isCollapse"
style="margin-left: 3px;"
>{{ isRouteMeta.title || '' }}</span>
{{ isTitle }}
</div>
</div>
<el-scrollbar class="menu-wrap" wrap-class="scrollbar-wrapper">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
class="left-menu"
:default-active="activeMenu"
@@ -58,10 +45,10 @@
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import Hamburger from '@/components/Hamburger'
import ViewSwitcher from '../NavHeader/ViewSwitcher'
import Organization from '../NavHeader/Organization'
import variables from '@/styles/variables.scss'
export default {
components: {
@@ -111,8 +98,8 @@ export default {
isCollapse() {
return !this.sidebar.opened
},
isRouteMeta() {
return this.currentViewRoute.meta || {}
isTitle() {
return this.currentViewRoute.meta?.title || ''
}
},
methods: {
@@ -123,10 +110,8 @@ export default {
}
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.nav-header {
overflow: hidden;
background: $subMenuBg url('~@/assets/img/header-profile.png') no-repeat center center;
background-image: url('~@/assets/img/header-profile.png');
}
.nav-logo {
@@ -135,17 +120,16 @@ export default {
.nav-title {
box-sizing: border-box;
margin: 17px 0 17px 20px;
height: 55px;
padding: 17px 0 17px 22px;
font-size: 15px;
font-weight: 460;
color: #fff;
overflow: hidden;
white-space: nowrap;
cursor: pointer;
//background: #293846;
}
.collapsed {
text-align: left;
padding: 6px 12px!important;
}
.organizations {
@@ -156,7 +140,7 @@ export default {
display: block;
width: 100%;
height: 40px;
background-color: $subMenuBg;
background-color: #293846;
.toggle-bar {
width: 55px;
@@ -171,7 +155,7 @@ export default {
}
.toggle-bar:hover {
background-color: $subMenuHover;
background-color: rgb(59, 76, 91);
}
.hamburger-container {

View File

@@ -1,10 +1,7 @@
<template>
<div v-if="!loading">
<el-alert v-if="licenseMsg" type="error">
{{ licenseMsg }} !
<router-link :to="{ name: 'License' }" style="padding-left: 5px">
{{ $t('common.View') }} <i class="fa fa-external-link" />
</router-link>
<el-alert v-if="isExpire" type="error">
{{ isExpire }}
</el-alert>
</div>
</template>
@@ -14,7 +11,7 @@ import { toSafeLocalDateStr } from '@/utils/common'
import { mapGetters } from 'vuex'
export default {
name: 'LicenseRelatedTip',
name: 'LicenseExpireTip',
data() {
return {
loading: true,
@@ -26,15 +23,8 @@ export default {
'publicSettings',
'currentUser'
]),
licenseMsg() {
if (this.expireMsg) {
return this.expireMsg
} else {
return this.reachLimitsMsg
}
},
expireMsg() {
if (!this.publicSettings['XPACK_ENABLED'] || !this.$hasPerm('settings.change_license')) {
isExpire() {
if (!this.publicSettings.XPACK_ENABLED || this.currentUser.role !== 'Admin') {
return false
}
const intervalDays = this.getIntervalDays(this.licenseData.date_expired)
@@ -45,22 +35,10 @@ export default {
return this.$t('setting.LicenseWillBe') + this.licenseData.date_expired + this.$t('setting.Expire')
}
return false
},
reachLimitsMsg() {
if (!this.publicSettings['XPACK_ENABLED'] || !this.$hasPerm('settings.change_license')) {
return false
}
if (this.licenseData.corporation === 'FIT2CLOUD') {
return this.$t('setting.LicenseForTest')
}
if (this.licenseData['current_asset_count'] > this.licenseData.asset_count) {
return this.$t('setting.LicenseReachedAssetAmountLimit')
}
return false
}
},
mounted() {
if (this.publicSettings['XPACK_ENABLED'] && this.$hasPerm('settings.change_license')) {
if (this.publicSettings.XPACK_ENABLED && this.currentUser.role === 'Admin') {
this.$axios.get('/api/v1/xpack/license/detail').then(res => {
this.licenseData = res
}).finally(() => {

View File

@@ -1,7 +1,7 @@
<template>
<div>
<slot name="globalNotification">
<LicenseRelatedTip />
<LicenseExpireTip />
<PasswordExpireTip />
</slot>
<div class="page-heading">
@@ -21,12 +21,12 @@
</template>
<script>
import LicenseRelatedTip from '@/layout/components/Page/LicenseRelatedTip'
import LicenseExpireTip from '@/layout/components/Page/LicenseExpireTip'
import PasswordExpireTip from '@/layout/components/Page/PasswordExpireTip'
export default {
name: 'PageHeading',
components: {
LicenseRelatedTip,
LicenseExpireTip,
PasswordExpireTip
},
props: {

View File

@@ -1,7 +1,7 @@
<template>
<div>
<el-alert v-if="expireMsg" type="error">
{{ expireMsg }}
<el-alert v-if="isExpire" type="error">
{{ isExpire }}
</el-alert>
</div>
</template>
@@ -22,7 +22,7 @@ export default {
'publicSettings',
'currentUser'
]),
expireMsg() {
isExpire() {
// 用户来源不是Local时不显示密码过期提示
if (this.currentUser.source !== 'local') {
return false
@@ -33,9 +33,7 @@ export default {
return this.$t('users.passwordExpired')
}
if (securityPasswordExpirationTime - intervalTime <= 5) {
return this.$t('users.passwordWillExpiredPrefixMsg') +
(securityPasswordExpirationTime - intervalTime) +
this.$t('users.passwordWillExpiredSuffixMsg')
return this.$t('users.passwordWillExpiredPrefixMsg') + (securityPasswordExpirationTime - intervalTime) + this.$t('users.passwordWillExpiredSuffixMsg')
}
return false
}

View File

@@ -200,7 +200,6 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.tags-view-container {
height: 34px;
width: 100%;
@@ -229,9 +228,9 @@ export default {
margin-right: 15px;
}
&.active {
background-color: $--color-primary;
background-color: #1AB394;
color: #fff;
border-color: $--color-primary;
border-color: #1AB394;
&::before {
content: "";
background: #fff;

View File

@@ -3,7 +3,9 @@ import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'elementCss'
import locale from 'elementLocale'
import '@/styles/index.scss' // global css
import App from './App'

View File

@@ -21,16 +21,6 @@ export default [
app: 'assets',
permissions: ['assets.view_authbook']
}
},
{
path: 'history',
name: 'AssetAccountHistoryList',
component: () => import('@/views/accounts/AssetAccount/AssetAccountHistoryList'),
hidden: true,
meta: {
title: i18n.t('route.AssetHistoryAccount'),
permissions: ['assets.view_assethistoryaccount']
}
}
]
},

View File

@@ -62,18 +62,7 @@ export default {
title: i18n.t('common.nav.TempPassword'),
icon: 'magic',
hidden: ({ settings }) => !settings['AUTH_TEMP_TOKEN'],
permissions: ['authentication.view_temptoken'],
activeMenu: '/profile/temp-password'
}
},
{
path: '/profile/connection-token',
component: () => import('@/views/profile/ConnectionToken'),
name: 'ConnectionToken',
meta: {
title: i18n.t('common.nav.ConnectionToken'),
icon: 'map-pin',
permissions: ['authentication.view_connectiontoken']
permissions: ['authentication.view_temptoken']
}
}
]

View File

@@ -295,16 +295,6 @@ export default {
permissions: ['settings.change_other']
}
},
{
path: '/settings/tools',
name: 'Tools',
component: () => import('@/views/settings/Tools'),
meta: {
title: i18n.t('setting.SystemTools'),
icon: 'wrench',
permissions: ['settings.view_setting']
}
},
{
path: '/settings/license',
name: 'License',

View File

@@ -4,11 +4,11 @@ import i18n from '@/i18n/i18n'
export default {
path: '/tickets',
redirect: '/tickets/my-tickets',
redirect: '/tickets/tickets',
component: Layout,
meta: {
title: i18n.t('route.Tickets'),
icon: 'fa-check-square-o',
icon: 'check-square-o',
view: 'tickets',
type: 'view',
showNavSwitcher: false,
@@ -17,40 +17,26 @@ export default {
permissions: ['tickets.view_ticket']
},
children: [
{
path: '/tickets/my-tickets',
name: 'MyTicketList',
component: () => import('@/views/tickets/MyTicketList'),
meta: {
title: i18n.t('tickets.MyTickets'),
icon: 'file-text-o',
showOrganization: false,
permissions: []
}
},
{
path: '/tickets/assigned-tickets',
name: 'AssignedTicketList',
component: () => import('@/views/tickets/AssignedTicketList'),
meta: {
title: i18n.t('route.AssignedTicketList'),
icon: 'check-square-o',
showOrganization: false,
permissions: []
}
},
{
path: '/tickets/tickets',
redirect: '',
component: empty,
hidden: true,
meta: {
title: i18n.t('route.Tickets'),
icon: 'file-text-o',
showOrganization: false
},
children: [
{
path: '',
name: 'TicketList',
component: () => import('@/views/tickets'),
meta: {
title: i18n.t('route.Tickets'),
icon: 'file-text-o',
permissions: ['tickets.view_ticket']
}
},
{
path: 'request-asset-perm/create',
name: 'RequestAssetPermTicketCreateUpdate',
@@ -81,16 +67,6 @@ export default {
},
hidden: true
},
{
path: 'login-confirm/:id',
name: 'LoginTicketDetail',
component: () => import('@/views/tickets/LoginConfirm/Detail'),
meta: {
title: i18n.t('route.TicketDetail'),
permissions: ['tickets.view_ticket']
},
hidden: true
},
{
path: 'request-application-perm/create',
name: 'RequestApplicationPermTicketCreateUpdate',

View File

@@ -7,7 +7,6 @@ const getters = {
consoleOrgs: state => state.users.consoleOrgs,
auditOrgs: state => state.users.auditOrgs,
workbenchOrgs: state => state.users.workbenchOrgs,
noRootWorkbenchOrgs: state => state.users.noRootWorkbenchOrgs,
usingOrgs: state => state.users.usingOrgs,
currentOrg: state => state.users.currentOrg,
currentOrgIsDefault: state => state.users.currentOrg['is_default'],

View File

@@ -126,7 +126,7 @@ function cleanRoute(tmp, parent) {
} else {
tmp.meta.fullPath = parentFullPath ? parentFullPath + '/' + tmp.path : parentFullPath
}
// debug('Full path: ', tmp.meta.fullPath)
// console.log('Full path: ', tmp.meta.fullPath)
}
// 设置默认active menu
if (tmp.meta.type === 'crud' && !tmp.meta.activeMenu) {

View File

@@ -1,7 +1,5 @@
import defaultSettings from '@/settings'
import { getPublicSettings } from '@/api/settings'
import { changeElementColor, changeThemeColors } from '@/utils/theme/index'
import { changeMenuColor } from '@/utils/theme/color'
const { showSettings, fixedHeader, sidebarLogo, tagsView } = defaultSettings
@@ -11,8 +9,7 @@ const state = {
sidebarLogo: sidebarLogo,
tagsView: tagsView,
publicSettings: null,
hasValidLicense: false,
themeColors: JSON.parse(localStorage.getItem('themeColors')) || {}
hasValidLicense: false
}
const mutations = {
@@ -23,15 +20,10 @@ const mutations = {
},
SET_PUBLIC_SETTINGS: (state, settings) => {
state.publicSettings = settings
state.themeColors = settings?.INTERFACE?.theme_info?.colors || {}
if (settings['XPACK_ENABLED']) {
state.hasValidLicense = settings['XPACK_LICENSE_IS_VALID']
}
},
setTheme(state, data) {
state.themeColors = data
localStorage.setItem('themeColors', JSON.stringify(data))
}
}
@@ -40,38 +32,30 @@ const actions = {
commit('CHANGE_SETTING', data)
},
// get user Profile
getPublicSettings({ commit, state }, isOpen) {
getPublicSettings({ commit, state }) {
return new Promise((resolve, reject) => {
getPublicSettings(isOpen).then(response => {
const data = response || {}
if (isOpen) {
const faviconURL = data['INTERFACE']?.favicon
let link = document.querySelector("link[rel*='icon']")
if (!link) {
link = document.createElement('link')
link.type = 'image/x-icon'
link.rel = 'shortcut icon'
document.getElementsByTagName('head')[0].appendChild(link)
}
if (faviconURL) {
link.href = faviconURL
}
// 动态修改Title
document.title = data['INTERFACE']['login_title']
getPublicSettings().then(response => {
const data = response.data || {}
const faviconURL = data['LOGO_URLS']?.favicon
let link = document.querySelector("link[rel*='icon']")
if (!link) {
link = document.createElement('link')
link.type = 'image/x-icon'
link.rel = 'shortcut icon'
document.getElementsByTagName('head')[0].appendChild(link)
}
const themeColors = data?.INTERFACE?.theme_info?.colors || {}
if (faviconURL) {
link.href = faviconURL
}
// 动态修改Title
document.title = data['LOGIN_TITLE']
commit('SET_PUBLIC_SETTINGS', data)
changeThemeColors(themeColors)
resolve(response)
}).catch(error => {
reject(error)
})
})
},
changeThemeStyle({ commit }, themeColors) {
changeMenuColor(themeColors)
changeElementColor(themeColors)
commit('setTheme', themeColors)
}
}

View File

@@ -6,7 +6,6 @@ import {
} from '@/utils/auth'
import { resetRouter } from '@/router'
import Vue from 'vue'
const _ = require('lodash')
const getDefaultState = () => {
return {
@@ -17,7 +16,6 @@ const getDefaultState = () => {
auditOrgs: [],
consoleOrgs: [],
workbenchOrgs: [],
noRootWorkbenchOrgs: [],
usingOrgs: [],
perms: [],
MFAVerifyAt: null,
@@ -43,9 +41,6 @@ const mutations = {
state.perms = profile.perms
state.consoleOrgs = profile['console_orgs']
state.workbenchOrgs = profile['workbench_orgs']
state.noRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {
return item.id !== '00000000-0000-0000-0000-000000000000'
})
state.auditOrgs = profile['audit_orgs']
state.currentOrg = getCurrentOrgLocal(profile.username)
},
@@ -69,9 +64,6 @@ const mutations = {
},
SET_MFA_VERIFY(state) {
state.MFAVerifyAt = (new Date()).valueOf()
},
ADD_WORKBENCH_ORGS(state, org) {
state.workbenchOrgs.push(org)
}
}
@@ -90,7 +82,7 @@ const actions = {
commit('SET_PROFILE', response)
resolve(response)
}).catch(error => {
// debug(error)
// console.log(error)
reject(error)
})
})
@@ -117,16 +109,6 @@ const actions = {
setCurrentOrg({ commit }, data) {
commit('SET_CURRENT_ORG', data)
},
currentUserJoinNewOrg({ state, commit }, users) {
const { profile, currentOrg, workbenchOrgs } = state
if (users.includes(profile.id)) {
const currentOrgInfo = { id: currentOrg.id, name: currentOrg.name }
const notExistInWorkbenchOrgs = _.find(workbenchOrgs, currentOrgInfo)
if (!notExistInWorkbenchOrgs) {
commit('ADD_WORKBENCH_ORGS', currentOrg)
}
}
},
setMFAVerify({ commit }) {
commit('SET_MFA_VERIFY')
},

View File

@@ -1,29 +0,0 @@
:root {
--color-primary: #1ab394;
--color-success: #2793d7;
--color-info: #1c84c6;
--color-warning: #f8ac59;
--color-danger: #ed5565;
--menu-bg: #2f4050;
--menu-text: #a7b1c2;
--menu-hover: #293846;
--submenu-bg: #1f2d3d;
--submenu-hover: #001528;
--menu-active-text: white;
--menu-active-left: #1ab394;
}
:export {
--color-primary: #1ab394;
--color-success: #2793d7;
--color-info: #1c84c6;
--color-warning: #f8ac59;
--color-danger: #ed5565;
--menu-bg: #2f4050;
--menu-text: #a7b1c2;
--menu-hover: #293846;
--submenu-bg: #1f2d3d;
--submenu-hover: #001528;
--menu-active-text: white;
--menu-active-left: #1ab394;
}

View File

@@ -1,84 +1,66 @@
/* 这里只写element-variables里面改不动的、且和主题系列颜色相关的样式 */
/* 主题相关看该文件夹下的README.md */
/* info type special treatment */
.el-button--info {
background-color: info;
border-color: info;
}
.el-button--text {
padding: 5px
}
.el-button--text:hover {
background-color: rgba(0, 0, 0, .05);
}
.el-button--success {
background-color: success;
border-color: success;
}
.el-alert--info.is-light {
background-color: light-9;
color: light-2;
border: 1px solid;
}
.el-alert--info .el-alert__description {
color: light-2;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: white;
background-color: primary;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
margin: 0 5px;
background-color: white;
color: #606266;
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
}
// cover some element-ui styles
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.el-upload input[type="file"] {
display: none !important;
$--color-primary: #1ab394;
$--color-success: #1c84c6;
$--color-info: #23c6c8;
$--color-warning: #f8ac59;
$--color-danger: #ed5565;
$--color-link: #1c84c6;
$--color-link-highlight: #23527c;
$--color-text-primary: #303133;
/// color|1|Font Color|2
$--color-text-regular: #606266;
.el-upload {
input[type="file"] {
display: none !important;
}
}
.el-upload__input {
display: none;
}
.upload-container .el-upload {
// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
transform: none;
left: 0;
position: relative;
margin: 0 auto;
}
// refine element ui upload
.upload-container {
.el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
.upload-container .el-upload .el-upload-dragger {
width: 100%;
height: 200px;
}
.el-dropdown-menu a {
display: block
// dropdown
.el-dropdown-menu {
a {
display: block
}
}
.el-table th > .cell {
color: rgb(104, 106, 108);
}
// to fix el-date-picker css style
.el-range-separator {
box-sizing: content-box;
}
@@ -129,6 +111,22 @@ td .el-button.el-button--mini {
border-left-color: rgb(220, 223, 230);
}
.el-alert--success.is-light {
border: #bce8f1 solid 1px;
}
.el-alert--info.is-light {
border: #bce8f1 solid 1px;
}
.el-alert--warning.is-light {
border: #faebcc solid 1px;
}
.el-alert--error.is-light {
border: #f1dfe2 solid 1px;
}
.el-alert__content {
line-height: 1.5;
}
@@ -142,32 +140,32 @@ td .el-button.el-button--mini {
}
.el-card.primary > .el-card__header {
background-color: primary;
border-color: primary;
background-color: $--color-primary;
border-color: $--color-primary;
color: white;
}
.el-card.success > .el-card__header {
background-color: success;
border-color: success;
background-color: $--color-success;
border-color: $--color-success;
color: #ffffff;
}
.el-card.info > .el-card__header {
background-color: info;
border-color: info;
background-color: $--color-info;
border-color: $--color-info;
color: #ffffff;
}
.el-card.warning > .el-card__header {
background-color: warning;
border-color: warning;
background-color: $--color-warning;
border-color: $--color-warning;
color: #ffffff;
}
.el-card.danger > .el-card__header {
background-color: danger;
border-color: danger;
background-color: $--color-danger;
border-color: $--color-danger;
color: #ffffff;
}
@@ -194,14 +192,28 @@ td .el-button.el-button--mini {
line-height: 34px;
}
.el-select-dropdown__item.selected {
font-weight: 400;
color: $--color-text-primary;
background-color: #ddd;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
color: #606266;
background-color: #ddd;
font-weight: 400;
}
.el-select-dropdown__item.hover {
background-color: primary;
//.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
// color: #606266;
// background-color: #ddd;
// font-weight: 400;
//}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
background-color: $--color-primary;
color: white;
}
@@ -210,27 +222,27 @@ td .el-button.el-button--mini {
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after {
color: primary;
color: $--color-primary;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected.hover {
color: white;
background-color: primary;
background-color: $--color-primary;
}
.el-tag.el-tag--info {
background-color: #f1f1f1!important;
border-color: #e5e6e7!important;
color: #333333!important;
background-color: #f1f1f1;
border-color: #e5e6e7;
color: #333333;
}
.el-tag.el-tag--info .el-tag__close {
color: #333333!important;
color: #333333;
background-color: inherit;
}
.el-tag.el-tag--info.is-hit {
border-color: #e5e6e7!important;
border-color: #e5e6e7;
}
.el-tag.el-tag--info .el-tag__close:hover {
@@ -248,61 +260,119 @@ td .el-button.el-button--mini {
}
.text-danger {
color: danger;
color: $--color-danger;
}
.text-primary {
color: primary;
color: $--color-primary;
}
.text-info {
color: info;
color: $--color-info;
}
.text-warning {
color: warning;
color: $--color-warning;
}
.text-success {
color: success;
color: $--color-success;
}
.el-radio__input.is-checked+.el-radio__label {
color: inherit;
}
.el-radio__input.is-checked .el-radio__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-checkbox__input.is-checked .el-checkbox__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-radio__inner:hover {
border-color: #409EFF;
}
.el-textarea__inner {
border-radius: 0;
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #409EFF;
background-color: #409EFF;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
.el-checkbox__inner:hover {
border-color: #409EFF;
}
.el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #409EFF;
}
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
margin: 0 5px;
background-color: white;
color: #606266;
min-width: 28px;
border-radius: 2px;
border: 1px solid #DCDFE6;
font-size: 12px;
line-height: 26px;
font-weight: 400;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: white;
background-color: $--color-primary;
}
.el-pagination.is-background .number {
padding: 0;
}
.el-card.primary .el-card__header {
background-color: primary;
}
.el-card.success .el-card__header {
background-color: success;
}
.el-card.info .el-card__header {
background-color: info;
}
.el-card.warning .el-card__header {
background-color: warning;
}
.el-card.danger .el-card__header {
background-color: danger;
}
.el-message-box__headerbtn .el-message-box__close {
color: #606266;
}
.el-card.primary {
.el-card__header {
background-color: $--color-primary;
}
}
.el-card.success {
.el-card__header {
background-color: $--color-success;
}
}
.el-card.info {
.el-card__header {
background-color: $--color-info;
}
}
.el-card.warning {
.el-card__header {
background-color: $--color-warning;
}
}
.el-card.danger {
.el-card__header {
background-color: $--color-danger;
}
}
.el-tooltip__popper.is-light {
background: #FFF;
border: 1px solid #e7eaec;
@@ -321,13 +391,21 @@ td .el-button.el-button--mini {
border-bottom: 1px solid #e7e7e7 !important;
}
.el-table .cell,
.el-table--border td:first-child .cell,
.el-table--border th:first-child .cell {
.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell {
padding-left: 10px;
padding-right: 14px;
}
.el-tag--dark.el-tag--info {
background-color: #23c6c8;
border-color: #23c6c8;
color: #fff;
}
a {
color: $--color-link !important;
text-decoration: none;
}
.el-tag--default.el-tag--dark {
background-color: #d1dade;
@@ -339,6 +417,7 @@ td .el-button.el-button--mini {
color: #676a6c;
}
.el-table__empty-block {
width: 100% !important;
}
@@ -354,101 +433,62 @@ td .el-button.el-button--mini {
color: #000;
font-size: 22px;
font-weight: 800;
}
.el-tag--default.el-tag--dark {
background-color: #d1dade;
color: #5e5e5e;
border: none;
}
.el-card {
color: #676a6c;
}
.el-table__empty-block {
width: 100% !important;
}
.el-dialog__headerbtn .el-dialog__close {
font-size: 21px;
font-weight: 700;
color: #000;
text-shadow: 0 1px 0 #fff;
}
.el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close {
color: #000;
font-size: 22px;
font-weight: 800;
//color: red;
}
.el-button--danger.is-plain {
color: danger;
color: $--color-danger;
background: #ffffff;
border-color: danger;
}
.el-button--danger.is-plain.is-disabled,
.el-button--danger.is-plain.is-disabled:active,
.el-button--danger.is-plain.is-disabled:focus,
.el-button--danger.is-plain.is-disabled:hover {
color: white;
border-color: $--color-danger;
}
.el-alert .el-alert__description {
margin: 1px 0 0;
}
.el-input-group__prepend div.el-select .el-input__inner {
color: $--color-text-primary;
}
.el-input-group__prepend div.el-select .el-input__inner:hover {
color: $--color-text-primary;
}
.el-table {
font-size: 13px;
}
.el-table-filter__list-item:hover {
color: $--color-text-primary;
}
.el-dialog {
// 居中弹框
position: absolute;
top: 50%;
left: 50%;
margin: 0 !important;
transform: translate(-50%, -50%);
// 防止超出视窗
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
//实现body内部滚动
display: flex;
flex-direction: column;
.el-dialog__body {
max-height: 90vh;
overflow: auto;
}
}
.el-dialog .el-dialog__body {
max-height: 90vh;
overflow: auto;
padding: 30px;
.el-button--text {
color: $--color-link;
padding: 5px;
}
.el-dialog .el-dialog__body form {
padding-right: 20px;
}
.el-dialog .el-dialog__footer {
padding: 10px 30px 30px;
}
.el-cascader {
line-height: 34px;
}
.el-input__icon {
line-height: 34px;
}
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #606266;
}
.el-select-dropdown__item.selected {
font-weight: 400;
color: #606266;
background-color: #ddd;
}
.el-input-group__prepend div.el-select .el-input__inner,
.el-input-group__prepend div.el-select .el-input__inner:hover {
color: #303133;
.el-button--text:hover {
color: $--color-link-highlight;
background-color: rgba(0,0,0,.05)
}

View File

@@ -992,6 +992,3 @@ $--breakpoints-spec: (
'lg-and-down': (max-width: $--xl - 1),
'xl-only' : (min-width: $--xl),
);
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";

View File

@@ -1,29 +1,20 @@
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './sidebar.scss';
@import './element-variables.scss';
@import './element-ui.scss';
@import './theme/index.css';
@import './menu.scss';
@import './fonts/font-awesome.min.css';
::-webkit-scrollbar {
width:14px;
}
::-webkit-scrollbar-track {
border-radius:10px;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
box-shadow: 8px 10px 20px #C6C6C6 inset;
border: 3px solid rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-thumb:hover {
box-shadow: 8px 10px 20px #878787 inset;
}
@import './font-awesome/font-awesome.min.css';
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: auto;
//text-rendering: optimizeLegibility;
color: #676a6c;
//font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 1.428;
@@ -186,4 +177,4 @@ input[type=file] {
.el-pagination {
overflow: auto;
}
}

View File

@@ -1,46 +1,15 @@
@import "./variables";
.left-menu.el-menu {
.el-menu--inline {
background-color: $subMenuBg;
}
.el-menu-item, .el-submenu {
font-weight: 600;
}
.el-submenu, .el-menu-item.submenu-title-noDropdown {
background-color: $menuBg;
.el-submenu__title {
color: $menuText;
&:hover {
color: $menuActiveText;
}
i {
color: $menuText;
}
}
}
.el-menu-item, .el-submenu-sidebar .el-menu-item {
background-color: $subMenuBg;
color: $menuText;
&.is-active{
color: $menuActiveText;
}
&:hover {
background-color: $subMenuHover;
color: $menuActiveText;
}
i {
color: $menuText;
}
}
i.fa {
margin-right: 10px;
width: 13px;
width: 13px;
margin-right: 10px;
}
.is-active i.fa {
color: $menuActiveText;
color: white;
}
.el-submenu .el-menu-item {
@@ -79,20 +48,16 @@
}
li.is-active {
border-left: 4px solid $menuActiveLeft;
}
.el-submenu-sidebar .el-menu-item {
background-color: $subMenuBg ;
border-left: 4px solid #19aa8d;
}
.el-submenu.is-opened {
background-color: $subMenuBg ;
background-color: #1f2d3d ;
.el-submenu__title {
background-color: $subMenuBg!important;
background-color: #1f2d3d!important;
}
& .nest-menu {
background-color: $subMenuBg;
background-color: #1f2d3d;
}
}

View File

@@ -1,4 +1,3 @@
@import "./variables";
#app {
.main-container {
min-height: 100%;
@@ -13,7 +12,7 @@
background-color: $menuBg;
height: 100%;
position: fixed;
font-size: 0;
font-size: 0px;
top: 0;
bottom: 0;
left: 0;
@@ -30,7 +29,7 @@
}
.el-scrollbar__bar.is-vertical {
right: 0;
right: 0px;
}
.el-scrollbar {
@@ -72,7 +71,7 @@
}
.is-active>.el-submenu__title {
color: $menuActiveText !important;
color: $subMenuActiveText !important;
}
& .nest-menu .el-submenu-sidebar>.el-submenu__title,
@@ -101,6 +100,7 @@
.el-tooltip {
// padding: 0 !important;
.svg-icon {
margin-left: 20px;
}
@@ -145,7 +145,7 @@
// mobile responsive
.mobile {
.main-container {
margin-left: 0;
margin-left: 0px;
}
.sidebar-container {
@@ -163,6 +163,7 @@
}
.withoutAnimation {
.main-container,
.sidebar-container {
transition: none;
@@ -181,6 +182,7 @@
.nest-menu .el-submenu-sidebar>.el-submenu__title,
.el-menu-item {
&:hover {
// you can use $subMenuHover
background-color: $menuHover !important;
}
}

View File

@@ -0,0 +1 @@
.el-alert{width:100%;padding:8px 16px;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;position:relative;background-color:#FFF;overflow:hidden;opacity:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:opacity .2s;transition:opacity .2s}.el-alert.is-light .el-alert__closebtn{color:#C0C4CC}.el-alert.is-dark .el-alert__closebtn,.el-alert.is-dark .el-alert__description{color:#FFF}.el-alert.is-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.el-alert--success.is-light{background-color:#e8f3f9;color:#1c84c6}.el-alert--success.is-light .el-alert__description{color:#1c84c6}.el-alert--success.is-dark{background-color:#1c84c6;color:#FFF}.el-alert--info.is-light{background-color:#e9f9fa;color:#23c6c8}.el-alert--info.is-dark{background-color:#23c6c8;color:#FFF}.el-alert--info .el-alert__description{color:#23c6c8}.el-alert--warning.is-light{background-color:#fef7ee;color:#f8ac59}.el-alert--warning.is-light .el-alert__description{color:#f8ac59}.el-alert--warning.is-dark{background-color:#f8ac59;color:#FFF}.el-alert--error.is-light{background-color:#fdeef0;color:#ed5565}.el-alert--error.is-light .el-alert__description{color:#ed5565}.el-alert--error.is-dark{background-color:#ed5565;color:#FFF}.el-alert__content{display:table-cell;padding:0 8px}.el-alert__icon{font-size:16px;width:16px}.el-alert__icon.is-big{font-size:28px;width:28px}.el-alert__title{font-size:13px;line-height:18px}.el-alert__title.is-bold{font-weight:700}.el-alert .el-alert__description{font-size:12px;margin:5px 0 0}.el-alert__closebtn{font-size:12px;opacity:1;position:absolute;top:12px;right:15px;cursor:pointer}.el-alert__closebtn.is-customed{font-style:normal;font-size:13px;top:9px}.el-alert-fade-enter,.el-alert-fade-leave-active{opacity:0}

View File

@@ -0,0 +1 @@
.el-aside{overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.el-avatar{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;overflow:hidden;color:#fff;background:#C0C4CC;width:40px;height:40px;line-height:40px;font-size:14px}.el-avatar>img{display:block;height:100%;vertical-align:middle}.el-avatar--circle{border-radius:50%}.el-avatar--square{border-radius:4px}.el-avatar--icon{font-size:18px}.el-avatar--large{width:40px;height:40px;line-height:40px}.el-avatar--medium{width:36px;height:36px;line-height:36px}.el-avatar--small{width:28px;height:28px;line-height:28px}

View File

@@ -0,0 +1 @@
.el-backtop{position:fixed;background-color:#FFF;width:40px;height:40px;border-radius:50%;color:#1ab394;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:20px;-webkit-box-shadow:0 0 6px rgba(0,0,0,.12);box-shadow:0 0 6px rgba(0,0,0,.12);cursor:pointer;z-index:5}.el-backtop:hover{background-color:#F2F6FC}

View File

@@ -0,0 +1 @@
.el-badge{position:relative;vertical-align:middle;display:inline-block}.el-badge__content{background-color:#ed5565;border-radius:10px;color:#FFF;display:inline-block;font-size:12px;height:18px;line-height:18px;padding:0 6px;text-align:center;white-space:nowrap;border:1px solid #FFF}.el-badge__content.is-fixed{position:absolute;top:0;right:10px;-webkit-transform:translateY(-50%) translateX(100%);transform:translateY(-50%) translateX(100%)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{height:8px;width:8px;padding:0;right:0;border-radius:50%}.el-badge__content--primary{background-color:#1ab394}.el-badge__content--success{background-color:#1c84c6}.el-badge__content--warning{background-color:#f8ac59}.el-badge__content--info{background-color:#23c6c8}.el-badge__content--danger{background-color:#ed5565}

File diff suppressed because one or more lines are too long

View File

Some files were not shown because too many files have changed in this diff Show More