Compare commits

...

7 Commits

14 changed files with 64 additions and 61 deletions

View File

@@ -2,13 +2,13 @@
<DataZTree ref="dataztree" :setting="treeSetting" class="data-z-tree" v-on="$listeners">
<slot v-if="treeSetting.hasRightMenu" slot="rMenu">
<li v-if="treeSetting.showCreate" id="m_create" class="rmenu" tabindex="-1" @click="createTreeNode">
<i class="fa fa-plus-square-o" /> {{ this.$t('tree.CreateNode') }}
<i class="fa fa-plus-square-o" /> {{ this.$t('tree.CreateNode') }}
</li>
<li v-if="treeSetting.showUpdate" id="m_edit" class="rmenu" tabindex="-1" @click="editTreeNode">
<i class="fa fa-pencil-square-o" /> {{ this.$t('tree.RenameNode') }}
<i class="fa fa-pencil-square-o" /> {{ this.$t('tree.RenameNode') }}
</li>
<li v-if="treeSetting.showDelete" id="m_del" class="rmenu" tabindex="-1" @click="removeTreeNode">
<i class="fa fa-minus-square" /> {{ this.$t('tree.DeleteNode') }}
<i class="fa fa-minus-square" /> {{ this.$t('tree.DeleteNode') }}
</li>
<slot name="rMenu" />
</slot>
@@ -42,7 +42,9 @@ export default {
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}`),
url: (process.env.VUE_APP_ENV === 'production')
? (`${this.setting.treeUrl}`)
: (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`),
autoParam: ['id=key', 'name=n', 'level=lv'],
type: 'get',
headers: {
@@ -206,7 +208,9 @@ export default {
this.showRMenu('root', event.clientX, event.clientY)
} else if (treeNode && !treeNode.noR) {
this.zTree.selectNode(treeNode)
this.currentNodeId = treeNode.meta.data.id
if (treeNode.meta?.data?.id) {
this.currentNodeId = treeNode.meta.data.id
}
this.showRMenu('node', event.clientX, event.clientY)
}
},
@@ -284,32 +288,32 @@ export default {
</script>
<style scoped>
.rmenu {
font-size: 12px;
padding: 0 16px;
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #606266;
height: 24px;
line-height: 24px;
box-sizing: border-box;
cursor: pointer;
}
.rmenu {
font-size: 12px;
padding: 0 16px;
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #606266;
height: 24px;
line-height: 24px;
box-sizing: border-box;
cursor: pointer;
}
.rmenu > a:hover, .dropdown-menu > a:focus {
color: #262626;
text-decoration: none;
background-color: #f5f5f5;
}
.rmenu > a:hover, .dropdown-menu > a:focus {
color: #262626;
text-decoration: none;
background-color: #f5f5f5;
}
.rmenu:hover {
background-color: #f5f7fa;
}
.rmenu:hover {
background-color: #f5f7fa;
}
.data-z-tree >>> .fa {
width: 10px;
margin-right: 3px;
}
.data-z-tree >>> .fa {
width: 10px;
margin-right: 3px;
}
</style>

View File

@@ -57,7 +57,7 @@ export default {
if (!this.rawValue.phone) {
return ''
}
return `${this.rawValue.code} ${this.rawValue.phone}`
return `${this.rawValue.code}${this.rawValue.phone}`
}
},
mounted() {

View File

@@ -10,7 +10,7 @@
width="70%"
v-on="$listeners"
>
<el-alert v-if="disabled && platformDetail" type="success">
<el-alert v-if="disabled && platformDetail" type="success" style="margin-bottom: 10px">
{{ $t('assets.InheritPlatformConfig') }}
<el-link :href="platformDetail" class="link-more" target="_blank">
{{ $t('common.View') }}
@@ -214,7 +214,6 @@ export default {
.link-more {
font-size: 10px;
margin-left: 10px;
border-bottom: solid 1px;
color: inherit;
}

View File

@@ -3,6 +3,9 @@
"accounts": {
"GenerateSuccessMsg": "Accounts generated successfully",
"GenerateAccounts": "Regenerate accounts",
"AccountTemplateUpdateSecretHelpText": "The account list displays accounts created through templates. When updating ciphertext, the ciphertext of the account created through the template will be updated.",
"Accounts": "Accounts",
"SelectAccount": "Select account",
"UpdateSecret": "Update secret",
"AccountPolicy": "Account policy",
"BulkCreateStrategy": "When creating accounts that do not meet the requirements, such as key type non-compliance and unique key constraints, the above policies can be selected.",
@@ -354,7 +357,7 @@
"PasswordSelector": "Password Input Box Selector",
"SubmitSelector": "Submit Button Selector",
"PlatformProtocolConfig": "Platform protocol config",
"InheritPlatformConfig": "The account list displays accounts created through templates. When updating ciphertext, the ciphertext of the account created through the template will be updated.",
"InheritPlatformConfig": "Inherited from the platform configuration. If you need to change, please change the configuration in the platform.",
"CollectHardwareInfo": "Enable collection of hardware information",
"DomainEnabled": "Enable domain",
"ProtocolsEnabled": "Enable protocol",

View File

@@ -1,6 +1,9 @@
{
"": "",
"accounts": {
"Accounts": "アカウント",
"AccountTemplateUpdateSecretHelpText": "アカウントリストには、テンプレートで作成されたアカウントが表示されます。暗号文を更新すると、テンプレートで作成されたアカウントの暗号文が更新されます。",
"SelectAccount": "アカウントを選択",
"GenerateSuccessMsg": "アカウントの生成に成功しました",
"GenerateAccounts": "アカウントを再生成する",
"UpdateSecret": "機密の更新",
@@ -347,7 +350,7 @@
"PasswordSelector": "パスワード入力ボックスセレクタ",
"SubmitSelector": "コミットボタンセレクタ",
"PlatformProtocolConfig": "プラットフォームプロトコルの構成",
"InheritPlatformConfig": "アカウントリストには、テンプレートで作成されたアカウントが表示されます。暗号文を更新すると、テンプレートで作成されたアカウントの暗号文が更新されます。",
"InheritPlatformConfig": "プラットフォーム構成から継承します。変更する場合は、プラットフォームの構成を変更してください。",
"CollectHardwareInfo": "ハードウェア情報の収集を有効にする",
"DomainEnabled": "ドメインを有効化",
"ProtocolsEnabled": "プロトコルの有効化",

View File

@@ -1,6 +1,9 @@
{
"": "",
"accounts": {
"Accounts": "账号",
"SelectAccount": "选择账号",
"AccountTemplateUpdateSecretHelpText": "账号列表展示通过模版创建的账号。更新密文时,会更新通过模版所创建账号的密文。",
"GenerateSuccessMsg": "账号生成成功",
"GenerateAccounts": "重新生成账号",
"UpdateSecret": "更新密文",
@@ -365,7 +368,7 @@
"PasswordSelector": "密码输入框选择器",
"SubmitSelector": "提交按钮选择器",
"PlatformProtocolConfig": "平台协议配置",
"InheritPlatformConfig": "账号列表展示通过模版创建的账号。更新密文时,会更新通过模版所创建账号的密文。",
"InheritPlatformConfig": "继承自平台配置,如需更改,请更改平台中的配置。",
"CollectHardwareInfo": "启用收集硬件信息",
"DomainEnabled": "启用网域",
"ProtocolsEnabled": "启用协议",

View File

@@ -43,6 +43,7 @@ const mutations = {
state.profile = profile
state.username = profile.username
state.perms = profile.perms
state.isSuperAdmin = profile['is_superuser']
state.consoleOrgs = profile['console_orgs']
state.workbenchOrgs = profile['workbench_orgs']
state.noRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => {

View File

@@ -14,7 +14,7 @@ import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 60 * 1000 // request timeout
timeout: 2 * 60 * 1000 // request timeout
})
function beforeRequestAddToken(config) {

View File

@@ -3,7 +3,7 @@
<el-row :gutter="20">
<el-col :md="24" :sm="24">
<el-alert type="success">
{{ $t('assets.InheritPlatformConfig') }}
{{ $t('accounts.AccountTemplateUpdateSecretHelpText') }}
</el-alert>
</el-col>
</el-row>

View File

@@ -10,24 +10,7 @@ export default {
components: { BaseAssetCreateUpdate },
data() {
return {
url: '/api/v1/assets/clouds/',
addFieldsMeta: {
protocols: {
hidden: (formValue) => {
const address = formValue['address']
if (!address) return
let port = address.startsWith('https://') ? 443 : 80
try {
const url = new URL(address)
if (url.port) { port = url.port }
} catch (e) {
// pass
}
const protocols = formValue['protocols']?.[0] || {}
protocols.port = port
}
}
}
url: '/api/v1/assets/clouds/'
}
}
}

View File

@@ -61,14 +61,14 @@ export default {
quickActions: [],
url: `/api/v1/assets/platforms/${this.object.id}`,
detailFields: [
'name', 'charset', 'internal',
'id', 'name', 'charset', 'internal',
{
key: this.$t('assets.Type'),
value: `${this.object.category?.label}/${this.object.type?.label}`
},
'su_method',
'comment'
'su_method', 'comment'
],
protocolChoices: null,
constraints: {}
}

View File

@@ -93,7 +93,8 @@ export default {
core: 'Core',
celery: 'Celery',
magnus: 'Magnus',
tinker: 'Tinker'
tinker: 'Tinker',
video_worker: 'Video-Worker'
}
return nameMapper[this.componentMetric.type]
}

View File

@@ -181,7 +181,7 @@ export default {
key: this.$t('users.Phone'),
formatter: () => {
const phoneObj = this.object.phone
return <div>{phoneObj?.code} {phoneObj?.phone}</div>
return <div>{phoneObj?.code}{phoneObj?.phone}</div>
}
},
'wecom_id', 'dingtalk_id', 'feishu_id',

View File

@@ -82,6 +82,12 @@ export default {
return this.$store.getters.hasValidLicense && !this.currentOrgIsRoot
}
},
phone: {
formatter: (row) => {
const phoneObj = row.phone
return <div>{phoneObj?.code}{phoneObj?.phone}</div>
}
},
login_blocked: {
width: '90px',
formatterArgs: {