mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-13 06:05:12 +00:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6729382fc0 | ||
|
|
351e08d542 | ||
|
|
c6cf6571b6 | ||
|
|
8ea990d070 | ||
|
|
f4a32170d5 | ||
|
|
073508675e | ||
|
|
1d6ca0a93a | ||
|
|
36aea652d6 | ||
|
|
1a42ce90ab | ||
|
|
31a401b55d | ||
|
|
582a84178d | ||
|
|
9b9f7c936c | ||
|
|
2a6100957f | ||
|
|
16606d6a27 | ||
|
|
0a612f50e6 | ||
|
|
fe36fa9390 | ||
|
|
ba109900ec | ||
|
|
ec7768267f | ||
|
|
cc58b374ab | ||
|
|
04ffbb8fd6 | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -54,7 +54,9 @@ export default {
|
|||||||
sftp_home: '/tmp',
|
sftp_home: '/tmp',
|
||||||
username_selector: '#username',
|
username_selector: '#username',
|
||||||
password_selector: '#password',
|
password_selector: '#password',
|
||||||
submit_selector: '.btn-submit'
|
submit_selector: '.btn-submit',
|
||||||
|
security: 'any',
|
||||||
|
console: false
|
||||||
},
|
},
|
||||||
loading: true,
|
loading: true,
|
||||||
form: {},
|
form: {},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import VueLogger from 'vuejs-logger'
|
|||||||
import loggerOptions from './utils/logger'
|
import loggerOptions from './utils/logger'
|
||||||
import ECharts from 'vue-echarts'
|
import ECharts from 'vue-echarts'
|
||||||
import service from '@/utils/request'
|
import service from '@/utils/request'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import xss from '@/utils/xss'
|
import xss from '@/utils/xss'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +60,7 @@ Vue.prototype.$axios = service
|
|||||||
window._ = require('lodash')
|
window._ = require('lodash')
|
||||||
// Vue.set(Vue.prototype, '_', _)
|
// Vue.set(Vue.prototype, '_', _)
|
||||||
|
|
||||||
Vue.prototype.$message = Message
|
Vue.prototype.$message = message
|
||||||
|
|
||||||
Vue.prototype.$xss = xss
|
Vue.prototype.$xss = xss
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Message as elMessage } from 'element-ui'
|
import { Message as elMessage } from 'element-ui'
|
||||||
|
|
||||||
let messageDom = null
|
let messageDom = null
|
||||||
const Message = (options) => {
|
const message = (options) => {
|
||||||
// 判断弹窗是否已存在, 若存在则关闭
|
// 判断弹窗是否已存在, 若存在则关闭
|
||||||
if (messageDom) messageDom.close()
|
if (messageDom) messageDom.close()
|
||||||
messageDom = elMessage(options)
|
messageDom = elMessage(options)
|
||||||
@@ -10,11 +10,11 @@ const Message = (options) => {
|
|||||||
|
|
||||||
const typeArray = ['success', 'error', 'warning', 'info']
|
const typeArray = ['success', 'error', 'warning', 'info']
|
||||||
typeArray.forEach(type => {
|
typeArray.forEach(type => {
|
||||||
Message[type] = options => {
|
message[type] = options => {
|
||||||
if (typeof options === 'string') options = { message: options }
|
if (typeof options === 'string') options = { message: options }
|
||||||
options.type = type
|
options.type = type
|
||||||
return Message(options)
|
return message(options)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export { Message }
|
export { message }
|
||||||
@@ -4,7 +4,7 @@ import { getTokenFromCookie } from '@/utils/auth'
|
|||||||
import { getErrorResponseMsg } from '@/utils/common'
|
import { getErrorResponseMsg } from '@/utils/common'
|
||||||
import { refreshSessionIdAge } from '@/api/users'
|
import { refreshSessionIdAge } from '@/api/users'
|
||||||
import { MessageBox } from 'element-ui'
|
import { MessageBox } from 'element-ui'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import axiosRetry from 'axios-retry'
|
import axiosRetry from 'axios-retry'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
@@ -93,7 +93,7 @@ export function flashErrorMsg({ response, error }) {
|
|||||||
if (!response.config.disableFlashErrorMsg) {
|
if (!response.config.disableFlashErrorMsg) {
|
||||||
const responseErrorMsg = getErrorResponseMsg(error)
|
const responseErrorMsg = getErrorResponseMsg(error)
|
||||||
const msg = responseErrorMsg || error.message
|
const msg = responseErrorMsg || error.message
|
||||||
Message({
|
message({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 5 * 1000
|
duration: 5 * 1000
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import store from '@/store'
|
|||||||
import router, { resetRouter } from '@/router'
|
import router, { resetRouter } from '@/router'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueCookie from 'vue-cookie'
|
import VueCookie from 'vue-cookie'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
import orgUtil from '@/utils/org'
|
import orgUtil from '@/utils/org'
|
||||||
import orgs from '@/api/orgs'
|
import orgs from '@/api/orgs'
|
||||||
import { getPropView, isViewHasOrgs } from '@/utils/jms'
|
import { getPropView, isViewHasOrgs } from '@/utils/jms'
|
||||||
@@ -119,7 +119,7 @@ export async function generatePageRoutes({ to, from, next }) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// remove token and go to login page to re-login
|
// remove token and go to login page to re-login
|
||||||
// await store.dispatch('user/resetToken')
|
// await store.dispatch('user/resetToken')
|
||||||
Message.error(error || 'Has Error')
|
message.error(error || 'Has Error')
|
||||||
Vue.$log.error('Error occur: ', error)
|
Vue.$log.error('Error occur: ', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { ActionsFormatter } from '@/components/TableFormatters'
|
|||||||
import ViewSecret from '@/components/AccountListTable/ViewSecret'
|
import ViewSecret from '@/components/AccountListTable/ViewSecret'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountBackupPlanList',
|
name: 'AccountTemplateList',
|
||||||
components: {
|
components: {
|
||||||
GenericListPage,
|
GenericListPage,
|
||||||
ViewSecret
|
ViewSecret
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const protocols = this.asset.protocols.map(i => i.name).toString()
|
const protocols = this.asset?.protocols?.map(i => i.name).toString() || ''
|
||||||
return {
|
return {
|
||||||
isShowCreate: false,
|
isShowCreate: false,
|
||||||
accountsSelected: [],
|
accountsSelected: [],
|
||||||
|
|||||||
@@ -79,6 +79,17 @@ export default {
|
|||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
rules: this.$route.params.id ? [] : [RequiredChange]
|
rules: this.$route.params.id ? [] : [RequiredChange]
|
||||||
|
},
|
||||||
|
platform: {
|
||||||
|
el: {
|
||||||
|
multiple: false,
|
||||||
|
ajax: {
|
||||||
|
url: `/api/v1/assets/platforms/`,
|
||||||
|
transformOption: (item) => {
|
||||||
|
return { label: item.name, value: item.id }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import ProtocolSelector from '@/components/FormFields/ProtocolSelector'
|
|||||||
import AssetAccounts from '@/views/assets/Asset/AssetCreateUpdate/components/AssetAccounts'
|
import AssetAccounts from '@/views/assets/Asset/AssetCreateUpdate/components/AssetAccounts'
|
||||||
import rules from '@/components/DataForm/rules'
|
import rules from '@/components/DataForm/rules'
|
||||||
import { Select2 } from '@/components/FormFields'
|
import { Select2 } from '@/components/FormFields'
|
||||||
import { Message } from '@/utils/Message'
|
import { message } from '@/utils/message'
|
||||||
|
|
||||||
export const filterSelectValues = (values) => {
|
export const filterSelectValues = (values) => {
|
||||||
if (!values) return
|
if (!values) return
|
||||||
@@ -19,7 +19,7 @@ export const filterSelectValues = (values) => {
|
|||||||
const inputValue = { name, value }
|
const inputValue = { name, value }
|
||||||
selects.push(inputValue)
|
selects.push(inputValue)
|
||||||
} else {
|
} else {
|
||||||
Message.error(i18n.t('assets.LabelInputFormatValidation'))
|
message.error(i18n.t('assets.LabelInputFormatValidation'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<span class="org-select">
|
<span class="org-select">
|
||||||
<span class="label">{{ $tc('common.ImportOrg') }}:</span>
|
<span class="label">{{ $tc('common.ImportOrg') }}:</span>
|
||||||
<Select2 ref="select2" v-model="select2.value" v-bind="select2" />
|
<Select2 ref="select2" v-model="select2.value" v-bind="select2" popper-class="select-org-dropdown" />
|
||||||
</span>
|
</span>
|
||||||
<el-button type="primary" size="small" :loading="dialogLdapUserImportLoginStatus" @click="importUserClick">{{ $t('common.Import') }}</el-button>
|
<el-button type="primary" size="small" :loading="dialogLdapUserImportLoginStatus" @click="importUserClick">{{ $t('common.Import') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -157,6 +157,12 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-select-dropdown.select-org-dropdown {
|
||||||
|
max-width: 300px!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.org-select {
|
.org-select {
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
Reference in New Issue
Block a user