mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-30 05:42:19 +00:00
Merge branch 'dev' of https://github.com/jumpserver/lina into pr@dev@perf_remoteapp_view
This commit is contained in:
@@ -14,6 +14,19 @@ export const EmailCheck = {
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
export const IpCheck = {
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
value = value.trim()
|
||||
if (/^[\w://.?]+$/.test(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(i18n.t('common.FormatError')))
|
||||
}
|
||||
},
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
export const specialEmojiCheck = {
|
||||
validator: (rule, value, callback) => {
|
||||
value = value.trim()
|
||||
@@ -27,6 +40,7 @@ export const specialEmojiCheck = {
|
||||
}
|
||||
|
||||
export default {
|
||||
IpCheck,
|
||||
Required,
|
||||
RequiredChange,
|
||||
EmailCheck,
|
||||
|
||||
@@ -28,6 +28,6 @@ const getters = {
|
||||
currentUserIsSuperAdmin: state => state.users.isSuperAdmin,
|
||||
currentUserIsAdmin: state => state.users.isAdmin,
|
||||
hasValidLicense: state => state.settings.hasValidLicense,
|
||||
isSystemAdmin: state => state.users.profile.system_roles.includes('00000000-0000-0000-0000-000000000001')
|
||||
isSystemAdmin: state => state.users.profile.system_roles.some(i => (i?.id === '00000000-0000-0000-0000-000000000001'))
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
length: 30
|
||||
},
|
||||
interval: 24,
|
||||
accounts: [],
|
||||
secret_type: 'password',
|
||||
secret_strategy: 'specific'
|
||||
},
|
||||
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
connectivity: connectivityMeta,
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
updateRoute: 'GatewayUpdate',
|
||||
updateRoute: { name: 'GatewayUpdate', query: { domain: this.object.id }},
|
||||
performDelete: ({ row }) => {
|
||||
const id = row.id
|
||||
const url = `/api/v1/assets/gateways/${id}/`
|
||||
|
||||
@@ -30,7 +30,9 @@ export const assetFieldsMeta = (vm) => {
|
||||
const platformProtocols = []
|
||||
const secretTypes = []
|
||||
return {
|
||||
address: {},
|
||||
address: {
|
||||
rules: [rules.IpCheck, rules.specialEmojiCheck]
|
||||
},
|
||||
protocols: {
|
||||
component: ProtocolSelector,
|
||||
el: {
|
||||
|
||||
@@ -66,10 +66,11 @@ export default {
|
||||
}
|
||||
},
|
||||
need_update_password: {
|
||||
label: this.$t('users.needUpdatePasswordNextLogin'),
|
||||
type: 'checkbox-group',
|
||||
component: null, // 覆盖默认生成的 component
|
||||
el: {
|
||||
style: 'margin-top: -20px;margin-bottom: -10px'
|
||||
style: 'margin-bottom: -10px'
|
||||
},
|
||||
options: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user