mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-13 23:14:39 +00:00
commit
cfb7f2be43
@ -320,4 +320,8 @@ export default {
|
|||||||
.select2 {
|
.select2 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.select2 >>> .el-tag.el-tag--info {
|
||||||
|
height: auto;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="filter-field">
|
<div class="filter-field">
|
||||||
<el-cascader ref="Cascade" :options="options" :props="config" @change="handleMenuItemChange" />
|
<el-cascader
|
||||||
|
v-show="options.length > 0"
|
||||||
|
ref="Cascade"
|
||||||
|
:options="options"
|
||||||
|
:props="config"
|
||||||
|
@change="handleMenuItemChange"
|
||||||
|
/>
|
||||||
<el-tag
|
<el-tag
|
||||||
v-for="(v, k) in filterTags"
|
v-for="(v, k) in filterTags"
|
||||||
:key="k"
|
:key="k"
|
||||||
@ -24,6 +30,7 @@
|
|||||||
v-model="filterValue"
|
v-model="filterValue"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
|
:class="options.length < 1 ? 'search-input2': ''"
|
||||||
@blur="focus = false"
|
@blur="focus = false"
|
||||||
@focus="focus = true"
|
@focus="focus = true"
|
||||||
@change="handleConfirm"
|
@change="handleConfirm"
|
||||||
@ -182,10 +189,14 @@ export default {
|
|||||||
.filter-field {
|
.filter-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
min-width: 198px;
|
||||||
border: 1px solid #dcdee2;
|
border: 1px solid #dcdee2;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
}
|
}
|
||||||
|
.search-input2 >>> .el-input__inner {
|
||||||
|
text-indent: 5px;
|
||||||
|
}
|
||||||
.search-input >>> .el-input__inner {
|
.search-input >>> .el-input__inner {
|
||||||
/*max-width:inherit !important;*/
|
/*max-width:inherit !important;*/
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
@ -51,6 +51,10 @@ export default {
|
|||||||
type: Function,
|
type: Function,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
|
hasReset: {
|
||||||
|
type: Boolean,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
// 如何提交数据
|
// 如何提交数据
|
||||||
performSubmit: {
|
performSubmit: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
@ -32,11 +32,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initHelpURL() {
|
initHelpURL() {
|
||||||
const url = '/api/v1/settings/setting/?category=other'
|
this.URLSite.HELP_DOCUMENT_URL = this.$store.getters.publicSettings.HELP_DOCUMENT_URL
|
||||||
this.$axios.get(url).then(resp => {
|
this.URLSite.HELP_SUPPORT_URL = this.$store.getters.publicSettings.HELP_SUPPORT_URL
|
||||||
this.URLSite.HELP_DOCUMENT_URL = resp.HELP_DOCUMENT_URL
|
|
||||||
this.URLSite.HELP_SUPPORT_URL = resp.HELP_SUPPORT_URL
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleCommand(command) {
|
handleCommand(command) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
|
@ -27,6 +27,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: '/api/v1/acls/login-acls/',
|
url: '/api/v1/acls/login-acls/',
|
||||||
|
hasDetailInMsg: false,
|
||||||
fields: [
|
fields: [
|
||||||
[this.$t('common.Basic'), ['name', 'priority']],
|
[this.$t('common.Basic'), ['name', 'priority']],
|
||||||
[this.$t('acl.users'), ['user']],
|
[this.$t('acl.users'), ['user']],
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
import { REMOTE_APP_TYPE_FIELDS_MAP, REMOTE_APP_TYPE_META_MAP, REMOTE_APP_PATH_DEFAULT_MAP } from './const'
|
import { REMOTE_APP_TYPE_FIELDS_MAP, REMOTE_APP_TYPE_META_MAP, REMOTE_APP_PATH_DEFAULT_MAP } from './const'
|
||||||
import rules from '@/components/DataForm/rules'
|
import rules from '@/components/DataForm/rules'
|
||||||
|
import { UpdateToken } from '@/components/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -52,6 +53,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
[`${appType === 'vmware_client' ? 'vmware' : appType}_password`]: {
|
||||||
|
component: UpdateToken
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,8 @@ export default {
|
|||||||
},
|
},
|
||||||
url: '/api/v1/assets/assets/',
|
url: '/api/v1/assets/assets/',
|
||||||
updateSuccessNextRoute: { name: 'AssetList' },
|
updateSuccessNextRoute: { name: 'AssetList' },
|
||||||
createSuccessNextRoute: { name: 'AssetList' }
|
createSuccessNextRoute: { name: 'AssetList' },
|
||||||
|
objectDetailRoute: { name: 'AssetDetail' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -128,7 +128,7 @@ export default {
|
|||||||
this.$axios.put(
|
this.$axios.put(
|
||||||
url, { assets: assetsSelected }
|
url, { assets: assetsSelected }
|
||||||
).then(res => {
|
).then(res => {
|
||||||
this.dialogVisible = false
|
this.iVisible = false
|
||||||
this.assetsSelected = []
|
this.assetsSelected = []
|
||||||
$('#tree-refresh').trigger('click')
|
$('#tree-refresh').trigger('click')
|
||||||
this.$message.success(this.$t('common.updateSuccessMsg'))
|
this.$message.success(this.$t('common.updateSuccessMsg'))
|
||||||
@ -137,7 +137,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
assetTreeTableDialogHandleCancel() {
|
assetTreeTableDialogHandleCancel() {
|
||||||
this.dialogVisible = false
|
this.iVisible = false
|
||||||
this.assetsSelected = []
|
this.assetsSelected = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,9 +112,8 @@ export default {
|
|||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
const objectId = this.object.id
|
const objectId = this.object.id
|
||||||
const relationUrl = `/api/v1/perms/application-permissions/${objectId}/`
|
const relationUrl = `/api/v1/perms/application-permissions/${objectId}/`
|
||||||
const objectOldRelationUserGroups = this.object.user_groups
|
this.object.user_groups = this.object.user_groups.filter(v => v !== item.value)
|
||||||
const objectNewRelationUserGroups = objectOldRelationUserGroups.filter(v => v !== item.value)
|
const data = { user_groups: this.object.user_groups }
|
||||||
const data = { user_groups: objectNewRelationUserGroups }
|
|
||||||
return this.$axios.patch(relationUrl, data)
|
return this.$axios.patch(relationUrl, data)
|
||||||
},
|
},
|
||||||
onDeleteSuccess: (obj, that) => {
|
onDeleteSuccess: (obj, that) => {
|
||||||
|
@ -203,7 +203,6 @@ export default {
|
|||||||
const queryStr = (url.indexOf('?') > -1 ? '&' : '?') + queryUtil.stringify(_query, '=', '&')
|
const queryStr = (url.indexOf('?') > -1 ? '&' : '?') + queryUtil.stringify(_query, '=', '&')
|
||||||
const treeUrl = url + queryStr
|
const treeUrl = url + queryStr
|
||||||
this.$set(this.treeSetting, 'treeUrl', treeUrl)
|
this.$set(this.treeSetting, 'treeUrl', treeUrl)
|
||||||
this.treeTable.forceRerenderTree()
|
|
||||||
},
|
},
|
||||||
handleFilterChange(query) {
|
handleFilterChange(query) {
|
||||||
const _query = this.cleanUrl(query)
|
const _query = this.cleanUrl(query)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
||||||
import { STORAGE_TYPE_META_MAP } from './const'
|
import { STORAGE_TYPE_META_MAP } from './const'
|
||||||
|
import { UpdateToken } from '@/components/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReplayStorageUpdate',
|
name: 'ReplayStorageUpdate',
|
||||||
@ -45,7 +46,12 @@ export default {
|
|||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
fields: storageTypeMeta.meta
|
fields: storageTypeMeta.meta,
|
||||||
|
fieldsMeta: {
|
||||||
|
ACCESS_KEY: {
|
||||||
|
component: UpdateToken
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
is_default: {
|
is_default: {
|
||||||
helpText: this.$t('sessions.SetToDefaultStorage')
|
helpText: this.$t('sessions.SetToDefaultStorage')
|
||||||
|
@ -17,6 +17,12 @@
|
|||||||
import { GenericListPage, GenericCreateUpdateForm } from '@/layout/components'
|
import { GenericListPage, GenericCreateUpdateForm } from '@/layout/components'
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog'
|
||||||
import Select2 from '@/components/FormFields/Select2'
|
import Select2 from '@/components/FormFields/Select2'
|
||||||
|
|
||||||
|
const numTotFixed = (row) => {
|
||||||
|
if (row && row.stat) {
|
||||||
|
return row.stat?.memory_used.toFixed(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GenericListPage,
|
GenericListPage,
|
||||||
@ -102,15 +108,18 @@ export default {
|
|||||||
},
|
},
|
||||||
'stat.cpu_load': {
|
'stat.cpu_load': {
|
||||||
label: this.$t('sessions.systemCpuLoad'),
|
label: this.$t('sessions.systemCpuLoad'),
|
||||||
width: '120px'
|
width: '120px',
|
||||||
|
formatter: numTotFixed
|
||||||
},
|
},
|
||||||
'stat.disk_used': {
|
'stat.disk_used': {
|
||||||
label: this.$t('sessions.systemDiskUsedPercent'),
|
label: this.$t('sessions.systemDiskUsedPercent'),
|
||||||
width: '120px'
|
width: '120px',
|
||||||
|
formatter: numTotFixed
|
||||||
},
|
},
|
||||||
'stat.memory_used': {
|
'stat.memory_used': {
|
||||||
label: this.$t('sessions.systemMemoryUsedPercent'),
|
label: this.$t('sessions.systemMemoryUsedPercent'),
|
||||||
width: '120px'
|
width: '120px',
|
||||||
|
formatter: numTotFixed
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: this.$t('xpack.LoadStatus'),
|
label: this.$t('xpack.LoadStatus'),
|
||||||
|
@ -56,6 +56,7 @@ export default {
|
|||||||
},
|
},
|
||||||
successUrl: { name: 'Settings', params: { activeMenu: 'Basic' }},
|
successUrl: { name: 'Settings', params: { activeMenu: 'Basic' }},
|
||||||
url: '/api/v1/settings/setting/?category=basic',
|
url: '/api/v1/settings/setting/?category=basic',
|
||||||
|
hasReset: false,
|
||||||
submitMethod() {
|
submitMethod() {
|
||||||
return 'patch'
|
return 'patch'
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export default {
|
|||||||
this.$t('common.Logging'),
|
this.$t('common.Logging'),
|
||||||
[
|
[
|
||||||
'LOGIN_LOG_KEEP_DAYS', 'TASK_LOG_KEEP_DAYS', 'OPERATE_LOG_KEEP_DAYS',
|
'LOGIN_LOG_KEEP_DAYS', 'TASK_LOG_KEEP_DAYS', 'OPERATE_LOG_KEEP_DAYS',
|
||||||
'FTP_LOG_KEEP_DAYS'
|
'FTP_LOG_KEEP_DAYS', 'TERMINAL_SESSION_KEEP_DURATION'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base'
|
||||||
|
import { UpdateToken } from '@/components/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SMSTencent',
|
name: 'SMSTencent',
|
||||||
@ -56,6 +57,9 @@ export default {
|
|||||||
fields: ['SIGN_NAME', 'TEMPLATE_CODE'],
|
fields: ['SIGN_NAME', 'TEMPLATE_CODE'],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
TENCENT_SECRET_KEY: {
|
||||||
|
component: UpdateToken
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitMethod() {
|
submitMethod() {
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
@confirm="onConfirm()"
|
@confirm="onConfirm()"
|
||||||
>
|
>
|
||||||
<GenericCreateUpdateForm
|
<GenericCreateUpdateForm
|
||||||
|
v-bind="$data"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
:url="url"
|
:url="url"
|
||||||
:fields-meta="fieldsMeta"
|
:fields-meta="fieldsMeta"
|
||||||
@ -37,15 +38,29 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
initial: {
|
||||||
|
SECURITY_LOGIN_IP_BLACK_LIST: []
|
||||||
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
fields: [
|
fields: [
|
||||||
'SECURITY_LOGIN_LIMIT_COUNT', 'SECURITY_LOGIN_LIMIT_TIME',
|
'SECURITY_LOGIN_LIMIT_COUNT', 'SECURITY_LOGIN_LIMIT_TIME', 'SECURITY_LOGIN_IP_BLACK_LIST',
|
||||||
'USER_LOGIN_SINGLE_MACHINE_ENABLED', 'ONLY_ALLOW_EXIST_USER_AUTH',
|
'USER_LOGIN_SINGLE_MACHINE_ENABLED', 'ONLY_ALLOW_EXIST_USER_AUTH',
|
||||||
'ONLY_ALLOW_AUTH_FROM_SOURCE'
|
'ONLY_ALLOW_AUTH_FROM_SOURCE'
|
||||||
],
|
],
|
||||||
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
},
|
},
|
||||||
|
afterGetFormValue(validValues) {
|
||||||
|
validValues.SECURITY_LOGIN_IP_BLACK_LIST = validValues.SECURITY_LOGIN_IP_BLACK_LIST.toString()
|
||||||
|
return validValues
|
||||||
|
},
|
||||||
|
cleanFormValue(value) {
|
||||||
|
const ipBlackList = value.SECURITY_LOGIN_IP_BLACK_LIST
|
||||||
|
if (!Array.isArray(ipBlackList)) {
|
||||||
|
value.SECURITY_LOGIN_IP_BLACK_LIST = ipBlackList ? ipBlackList.split(',') : []
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
url: '/api/v1/settings/setting/?category=security'
|
url: '/api/v1/settings/setting/?category=security'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -28,12 +28,6 @@ export default {
|
|||||||
[
|
[
|
||||||
'XRDP_ENABLED', 'TERMINAL_RDP_ADDR'
|
'XRDP_ENABLED', 'TERMINAL_RDP_ADDR'
|
||||||
]
|
]
|
||||||
],
|
|
||||||
[
|
|
||||||
this.$t('common.Other'),
|
|
||||||
[
|
|
||||||
'TERMINAL_SESSION_KEEP_DURATION'
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
fieldsMeta: {
|
fieldsMeta: {
|
||||||
|
@ -53,7 +53,7 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
specialCardItems() {
|
specialCardItems() {
|
||||||
return [
|
return this.object.type === 'login_confirm' ? [] : [
|
||||||
// apply_login_asset: "114.118.2.76(114.118.2.76)"
|
// apply_login_asset: "114.118.2.76(114.118.2.76)"
|
||||||
// apply_login_system_user: "root()"
|
// apply_login_system_user: "root()"
|
||||||
// apply_login_user: "Administrator(admin)"
|
// apply_login_user: "Administrator(admin)"
|
||||||
|
@ -199,6 +199,17 @@ export default {
|
|||||||
url: '/api/v1/tickets/tickets/?type=apply_application&action=open',
|
url: '/api/v1/tickets/tickets/?type=apply_application&action=open',
|
||||||
createSuccessNextRoute: {
|
createSuccessNextRoute: {
|
||||||
name: 'TicketList'
|
name: 'TicketList'
|
||||||
|
},
|
||||||
|
cleanFormValue(value) {
|
||||||
|
const applications = value.meta.apply_applications
|
||||||
|
const systemUsers = value.meta.apply_system_users
|
||||||
|
if (applications && Array.isArray(applications) && applications.length < 1) {
|
||||||
|
delete value.meta.apply_applications
|
||||||
|
}
|
||||||
|
if (systemUsers && Array.isArray(systemUsers) && systemUsers.length < 1) {
|
||||||
|
delete value.meta.apply_system_users
|
||||||
|
}
|
||||||
|
return value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -52,7 +52,8 @@ export default {
|
|||||||
'apply_asset': 'AssetsTicketDetail',
|
'apply_asset': 'AssetsTicketDetail',
|
||||||
'apply_application': 'AppsTicketDetail',
|
'apply_application': 'AppsTicketDetail',
|
||||||
'login_confirm': 'LoginAssetTicketDetail',
|
'login_confirm': 'LoginAssetTicketDetail',
|
||||||
'login_asset_confirm': 'CommandConfirmDetail'
|
'login_asset_confirm': 'LoginAssetTicketDetail',
|
||||||
|
'command_confirm': 'CommandConfirmDetail'
|
||||||
}
|
}
|
||||||
const routeName = ticketRouteMapper[ticket.type]
|
const routeName = ticketRouteMapper[ticket.type]
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -68,7 +68,9 @@ export default {
|
|||||||
delete rule.assignees_read_only
|
delete rule.assignees_read_only
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return rules.sort((a, b) => a.level - b.level)
|
rules = rules.sort((a, b) => a.level - b.level)
|
||||||
|
this.$emit('input', rules)
|
||||||
|
return rules
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -36,7 +36,7 @@ export default {
|
|||||||
return 'AssetsTicketDetail'
|
return 'AssetsTicketDetail'
|
||||||
} else if (row.type === 'apply_application') {
|
} else if (row.type === 'apply_application') {
|
||||||
return 'AppsTicketDetail'
|
return 'AppsTicketDetail'
|
||||||
} else if (row.type === 'login_asset_confirm') {
|
} else if (row.type === 'login_asset_confirm' || row.type === 'login_confirm') {
|
||||||
return 'LoginAssetTicketDetail'
|
return 'LoginAssetTicketDetail'
|
||||||
} else if (row.type === 'command_confirm') {
|
} else if (row.type === 'command_confirm') {
|
||||||
return 'CommandConfirmDetail'
|
return 'CommandConfirmDetail'
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col v-for="item in detailCardItems" :key="'card-' + item.key" :span="12">
|
<el-col v-for="item in detailCardItems" :key="'card-' + item.key" :span="12">
|
||||||
<el-row class="item">
|
<el-row class="item">
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<div :style="{ 'text-align': 'align' }" class="item-label">
|
<div :style="{ 'text-align': 'align' }" class="item-label">
|
||||||
<label>{{ item.key }}: </label>
|
<label>{{ item.key }}: </label>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="18">
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<ItemValue v-bind="item" />
|
<ItemValue v-bind="item" />
|
||||||
</div>
|
</div>
|
||||||
@ -24,12 +24,12 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col v-for="item in specialCardItems" :key="'card-' + item.key" :span="12">
|
<el-col v-for="item in specialCardItems" :key="'card-' + item.key" :span="12">
|
||||||
<el-row class="item">
|
<el-row class="item">
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<div :style="{ 'text-align': 'align' }" class="item-label">
|
<div :style="{ 'text-align': 'align' }" class="item-label">
|
||||||
<label>{{ item.key }}: </label>
|
<label>{{ item.key }}: </label>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="18">
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<ItemValue v-bind="item" />
|
<ItemValue v-bind="item" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,14 +57,14 @@ export default {
|
|||||||
title: this.$t('users.quickUpdate.resetMFA'),
|
title: this.$t('users.quickUpdate.resetMFA'),
|
||||||
attrs: {
|
attrs: {
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: !this.object.mfa_enabled || this.object.id === this.$store.state.users.profile.id,
|
// disabled: !this.object.mfa_enabled || this.object.id === this.$store.state.users.profile.id,
|
||||||
label: this.$t('common.Reset')
|
label: this.$t('common.Reset')
|
||||||
},
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
click: function() {
|
click: function() {
|
||||||
const warnMsg = vm.$t('users.quickUpdate.resetMFAWarningMsg')
|
const warnMsg = vm.$t('users.quickUpdate.resetMFAWarningMsg')
|
||||||
const warnTitle = vm.$t('common.Info')
|
const warnTitle = vm.$t('common.Info')
|
||||||
const url = `/api/v1/users/users/${vm.object.id}/otp/reset/`
|
const url = `/api/v1/users/users/${vm.object.id}/mfa/reset/`
|
||||||
const successMsg = vm.$t('users.quickUpdate.resetMFAdSuccessMsg')
|
const successMsg = vm.$t('users.quickUpdate.resetMFAdSuccessMsg')
|
||||||
vm.$confirm(warnMsg, warnTitle, {
|
vm.$confirm(warnMsg, warnTitle, {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -121,6 +121,7 @@ export default {
|
|||||||
title: this.$t('users.quickUpdate.resetSSHKey'),
|
title: this.$t('users.quickUpdate.resetSSHKey'),
|
||||||
attrs: {
|
attrs: {
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
|
disabled: !this.$store.state.users.profile.can_public_key_auth,
|
||||||
label: this.$t('users.quickUpdate.send')
|
label: this.$t('users.quickUpdate.send')
|
||||||
},
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
|
Loading…
Reference in New Issue
Block a user