From 5112af8ba1a0b5a3208fbb4e3837b7d505e191e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 7 Feb 2023 10:38:04 +0800 Subject: [PATCH 01/68] =?UTF-8?q?perf:=20=E6=89=B9=E9=87=8F=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=B5=84=E4=BA=A7=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 1 + src/i18n/langs/ja.json | 1 + src/i18n/langs/zh.json | 1 + .../components/GenericUpdateFormDialog/index.vue | 10 ++++++++++ .../AssetList/components/AssetBulkUpdateDialog.vue | 2 ++ 5 files changed, 15 insertions(+) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 25334e4b7..ef959f6a1 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -197,6 +197,7 @@ }, "assets": { "Secure": "Secure", + "AssetBulkUpdateTips": "device、cloud、web,Batch update of domain is not supported", "LabelInputFormatValidation": "Format error, correct format is:name:value", "IP/Host": "IP/Host", "OrganizationAsset": "Organization asset", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index aac444a7f..07e1e0698 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -197,6 +197,7 @@ }, "assets": { "Secure": "安全である", + "AssetBulkUpdateTips": "ネットワークデバイス、クラウドサービス、Web、一括更新ネットワークドメインはサポートされていません", "LabelInputFormatValidation": "フォーマットが正しくありません:name:value", "IP/Host": "IP/ノア", "OrganizationAsset": "組織資産", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 1e7db7339..1f9e99154 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -197,6 +197,7 @@ }, "assets": { "Secure": "安全", + "AssetBulkUpdateTips": "网络设备、云服务、web,不支持批量更新网域", "LabelInputFormatValidation": "标签格式错误,正确格式为:name:value", "GatewayList": "网关列表", "AccessKey": "访问密钥", diff --git a/src/layout/components/GenericUpdateFormDialog/index.vue b/src/layout/components/GenericUpdateFormDialog/index.vue index 4f567b95e..c619ca2a5 100644 --- a/src/layout/components/GenericUpdateFormDialog/index.vue +++ b/src/layout/components/GenericUpdateFormDialog/index.vue @@ -7,6 +7,9 @@ top="1vh" width="70%" > + + {{ tips }} +
@@ -56,6 +59,10 @@ export default { type: Object, default: () => ({}) }, + tips: { + type: String, + default: '' + }, visible: { type: Boolean, default: false @@ -152,4 +159,7 @@ export default { padding-right: 30px; } + .tips { + margin-bottom: 10px; + } diff --git a/src/views/assets/Asset/AssetList/components/AssetBulkUpdateDialog.vue b/src/views/assets/Asset/AssetList/components/AssetBulkUpdateDialog.vue index be3aa9c77..2dd4d142e 100644 --- a/src/views/assets/Asset/AssetList/components/AssetBulkUpdateDialog.vue +++ b/src/views/assets/Asset/AssetList/components/AssetBulkUpdateDialog.vue @@ -3,6 +3,7 @@ v-if="visible" :form-setting="formSetting" :selected-rows="selectedRows" + :tips="tips" :visible="visible" v-on="$listeners" /> @@ -30,6 +31,7 @@ export default { data() { const meta = assetFieldsMeta(this) return { + tips: this.$t('assets.AssetBulkUpdateTips'), formSetting: { url: '/api/v1/assets/assets/', hasSaveContinue: false, From 8f5df65f0e60c47a33fd38ae87f2f90a81eb85a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 7 Feb 2023 11:29:59 +0800 Subject: [PATCH 02/68] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96tree=E7=BB=84?= =?UTF-8?q?=E4=BB=B6url=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AssetSelect/dialog.vue | 1 + src/components/AssetSelect/index.vue | 5 +++++ src/components/AssetTreeTable/index.vue | 18 +++++++++++++++++- src/views/assets/Domain/DomainCreateUpdate.vue | 5 ++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/components/AssetSelect/dialog.vue b/src/components/AssetSelect/dialog.vue index 8d1523c2e..fe57222df 100644 --- a/src/components/AssetSelect/dialog.vue +++ b/src/components/AssetSelect/dialog.vue @@ -12,6 +12,7 @@ > {} + }, value: { type: Array, default: () => [] diff --git a/src/components/AssetTreeTable/index.vue b/src/components/AssetTreeTable/index.vue index eebdee81c..508a6066a 100644 --- a/src/components/AssetTreeTable/index.vue +++ b/src/components/AssetTreeTable/index.vue @@ -39,6 +39,10 @@ export default { type: String, default: '/api/v1/assets/nodes/children/tree/' }, + treeUrlQuery: { + type: Object, + default: () => ({}) + }, treeSetting: { type: Object, default: () => ({}) @@ -54,6 +58,9 @@ export default { }, data() { const showAssets = this.treeSetting?.showAssets || this.showAssets + const treeUrlQuery = this.setTreeUrlQuery() + const assetTreeUrl = `${this.treeUrl}?assets=${showAssets ? '1' : '0'}&${treeUrlQuery}` + return { treeTabConfig: { activeMenu: 'CustomTree', @@ -72,7 +79,7 @@ export default { showSearch: true, url: this.url, nodeUrl: this.nodeUrl, - treeUrl: `${this.treeUrl}?assets=${showAssets ? '1' : '0'}`, + treeUrl: assetTreeUrl, callback: { onSelected: (event, treeNode) => this.getAssetsUrl(treeNode) }, @@ -117,6 +124,15 @@ export default { treeSetting.showDelete = this.$hasPerm('assets.delete_node') }, methods: { + setTreeUrlQuery() { + let str = '' + for (const key in this.treeUrlQuery) { + str += `${key}=${this.treeUrlQuery[key]}&` + } + str = str.substr(0, str.length - 1) + + return str + }, decorateRMenu() { const show_current_asset = this.$cookie.get('show_current_asset') || '0' if (show_current_asset === '1') { diff --git a/src/views/assets/Domain/DomainCreateUpdate.vue b/src/views/assets/Domain/DomainCreateUpdate.vue index 8e298aae5..73ae66649 100644 --- a/src/views/assets/Domain/DomainCreateUpdate.vue +++ b/src/views/assets/Domain/DomainCreateUpdate.vue @@ -24,7 +24,10 @@ export default { label: this.$t('assets.Assets'), el: { value: [], - baseUrl: '/api/v1/assets/assets/?domain_enabled=true' + baseUrl: '/api/v1/assets/assets/?domain_enabled=true', + treeUrlQuery: { + domain_enabled: true + } } } }, From 6661583a0f90654ff3405003f0b4de1ea50a5ccb Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Mon, 6 Feb 2023 19:12:11 +0800 Subject: [PATCH 03/68] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=86=8D=E6=AC=A1=E6=89=A7=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/zh.json | 1 + .../ops/Template/Playbook/UploadDialog.vue | 2 +- src/views/tasks/TaskDetail/TaskHistory.vue | 20 +++++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 1f9e99154..51462ce46 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -814,6 +814,7 @@ "Weekly": "按周" }, "ops": { + "RunAgain": "再次执行", "AdhocUpdate": "更新命令", "Add": "新增", "Modify": "修改", diff --git a/src/views/ops/Template/Playbook/UploadDialog.vue b/src/views/ops/Template/Playbook/UploadDialog.vue index 401b25011..1673b63ec 100644 --- a/src/views/ops/Template/Playbook/UploadDialog.vue +++ b/src/views/ops/Template/Playbook/UploadDialog.vue @@ -79,7 +79,7 @@ export default { this.$emit('completed') this.$message.success('terminal.UploadSucceed') }).catch(err => { - console.log(err) + this.$message.error(err) }) } } diff --git a/src/views/tasks/TaskDetail/TaskHistory.vue b/src/views/tasks/TaskDetail/TaskHistory.vue index adc7d0e33..63a8b5096 100644 --- a/src/views/tasks/TaskDetail/TaskHistory.vue +++ b/src/views/tasks/TaskDetail/TaskHistory.vue @@ -1,5 +1,5 @@ From 288afeeb1f72e0d6464c3bbb49eacd0bc14c6b68 Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Tue, 7 Feb 2023 11:49:02 +0800 Subject: [PATCH 04/68] =?UTF-8?q?feat:=20=E8=A1=A5=E5=85=85=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 3 ++- src/i18n/langs/ja.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index ef959f6a1..7b6b50e01 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -819,6 +819,7 @@ "Weekly": "Weekly" }, "ops": { + "RunAgain": "Run again", "ManualInput": "Manual input", "Execute": "Execute", "ID": "ID", @@ -2025,4 +2026,4 @@ "PublishStatus": "Publish status", "NoPublished": "Unpublished" } -} \ No newline at end of file +} diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 07e1e0698..365920d36 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -818,6 +818,7 @@ "Weekly": "週ごと" }, "ops": { + "RunAgain": "再実行", "ManualInput": "手動入力", "Execute": "実行", "ID": "ID", @@ -2016,4 +2017,4 @@ "PublishStatus": "投稿ステータス", "NoPublished": "未発表" } -} \ No newline at end of file +} From 049bc928ce45771b281c9a1e5a04deef192dd1c0 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 7 Feb 2023 14:18:02 +0800 Subject: [PATCH 05/68] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BB=88?= =?UTF-8?q?=E7=AB=AF=E5=88=97=E8=A1=A8=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Terminal/Component/TerminalList.vue | 82 ++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/src/views/settings/Terminal/Component/TerminalList.vue b/src/views/settings/Terminal/Component/TerminalList.vue index 9067023f3..8891de092 100644 --- a/src/views/settings/Terminal/Component/TerminalList.vue +++ b/src/views/settings/Terminal/Component/TerminalList.vue @@ -1,19 +1,99 @@ + + diff --git a/src/views/accounts/AccountGather/index.vue b/src/views/accounts/AccountGather/index.vue index 6bc4791c1..869ba2add 100644 --- a/src/views/accounts/AccountGather/index.vue +++ b/src/views/accounts/AccountGather/index.vue @@ -16,6 +16,12 @@ export default { submenu: [ { title: this.$t('accounts.AccountGather.AccountGatherTaskList'), + name: 'AccountGatherList', + hidden: !this.$hasPerm('accounts.view_gatheredaccount'), + component: () => import('@/views/accounts/AccountGather/AccountGatherList.vue') + }, + { + title: this.$t('accounts.AccountGather.AccountGatherList'), name: 'AccountGatherTaskList', hidden: !this.$hasPerm('accounts.view_gatheraccountsautomation'), component: () => import('@/views/accounts/AccountGather/AccountGatherTaskList.vue') From b0b2954311bdbbc492223e7fa4e4fee76481a3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 7 Feb 2023 19:55:52 +0800 Subject: [PATCH 16/68] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=91?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=9B=E5=BB=BA=E5=AE=9E=E4=BE=8B=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=B2=A1=E6=9C=89=E5=8D=8F=E8=AE=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormFields/ProtocolSelector/index.vue | 4 ++-- src/views/assets/Cloud/index.vue | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/FormFields/ProtocolSelector/index.vue b/src/components/FormFields/ProtocolSelector/index.vue index c5f5504f2..29685369c 100644 --- a/src/components/FormFields/ProtocolSelector/index.vue +++ b/src/components/FormFields/ProtocolSelector/index.vue @@ -56,7 +56,7 @@ export default { }, props: { value: { - type: [Array], + type: [String, Array], default: () => [] }, title: { @@ -147,7 +147,7 @@ export default { item.port = selected.port }, setDefaultItems(choices) { - if (this.value.length > 0) { + if (this.value instanceof Array && this.value.length > 0) { const protocols = [] this.value.forEach(item => { // 有默认值的情况下,设置为只读或者有id、有setting是平台 diff --git a/src/views/assets/Cloud/index.vue b/src/views/assets/Cloud/index.vue index 61c25fbdb..f8d122096 100644 --- a/src/views/assets/Cloud/index.vue +++ b/src/views/assets/Cloud/index.vue @@ -1,5 +1,5 @@ + + diff --git a/src/layout/components/NavHeader/Help.vue b/src/layout/components/NavHeader/Help.vue index d0cab80f0..4f670f98e 100644 --- a/src/layout/components/NavHeader/Help.vue +++ b/src/layout/components/NavHeader/Help.vue @@ -1,23 +1,31 @@ From de0e824b3003105dc7859b49520b32f260926f9b Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 8 Feb 2023 19:52:30 +0800 Subject: [PATCH 57/68] perf: auth backends --- src/views/settings/Auth/index.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/views/settings/Auth/index.vue b/src/views/settings/Auth/index.vue index 20c521940..d039743de 100644 --- a/src/views/settings/Auth/index.vue +++ b/src/views/settings/Auth/index.vue @@ -38,19 +38,16 @@ export default { OAuth2 }, data() { - const hasLicense = this.$store.getters.hasValidLicense let extraBackends = [] - if (!this.$store.getters.hasValidLicense) { + if (this.$store.getters.hasValidLicense) { extraBackends = [ { title: this.$t('setting.OIDC'), - name: 'OIDC', - hidden: () => !hasLicense + name: 'OIDC' }, { title: this.$t('setting.SAML2'), - name: 'SAML2', - hidden: () => !hasLicense + name: 'SAML2' }, { title: this.$t('setting.OAuth2'), @@ -92,8 +89,7 @@ export default { }, { title: this.$t('setting.CAS'), - name: 'CAS', - hidden: () => !hasLicense + name: 'CAS' }, ...extraBackends ] From 7c5b9e128c2d8a14f258e4585fd61e345980e159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 17:04:47 +0800 Subject: [PATCH 58/68] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E5=AE=A1=E6=89=B9=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.json | 2 +- src/i18n/langs/ja.json | 2 +- src/i18n/langs/zh.json | 2 +- .../perms/AssetPermission/components/AccountFormatter.vue | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 74d784e7a..e697ae877 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -591,7 +591,7 @@ "bulkRemoveErrorMsg": "Bulk remove failed: ", "bulkRemoveSuccessMsg": "Bulk remove success", "SelectAtLeastOneAssetOrNodeErrMsg": "Select at least one asset or node", - "RequiredSystemUserErrMsg": "Required systemuser", + "RequiredSystemUserErrMsg": "Required account", "createBy": "Create by", "cloneFrom": "Clone from", "createErrorMsg": "Create error", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index d2bd09bf1..fccd768e1 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -591,7 +591,7 @@ "bulkDeleteSuccessMsg": "一括削除に成功しました", "bulkRemoveErrorMsg": "一括削除に失敗しました:", "SelectAtLeastOneAssetOrNodeErrMsg": "資産またはノードは少なくとも1つを選択します", - "RequiredSystemUserErrMsg": "先にシステムユーザーを選択してください", + "RequiredSystemUserErrMsg": "必要なアカウント", "bulkRemoveSuccessMsg": "一括削除に成功しました", "createBy": "作成者", "cloneFrom": "クローン", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 204d76cf2..26fff634e 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -603,7 +603,7 @@ "bulkDeleteSuccessMsg": "批量删除成功", "bulkRemoveErrorMsg": "批量移除失败: ", "SelectAtLeastOneAssetOrNodeErrMsg": "资产或者节点至少选择一项", - "RequiredSystemUserErrMsg": "请先选择系统用户", + "RequiredSystemUserErrMsg": "请选择账号", "bulkRemoveSuccessMsg": "批量移除成功", "createBy": "创建者", "cloneFrom": "克隆自", diff --git a/src/views/perms/AssetPermission/components/AccountFormatter.vue b/src/views/perms/AssetPermission/components/AccountFormatter.vue index 6bf6889af..d2c8af27d 100644 --- a/src/views/perms/AssetPermission/components/AccountFormatter.vue +++ b/src/views/perms/AssetPermission/components/AccountFormatter.vue @@ -98,11 +98,12 @@ export default { this.outputValue() }, outputValue() { + let choicesSelected = this.choicesSelected if (this.showSpecAccounts) { - this.$emit('change', [...this.choicesSelected, ...this.specAccountsInput]) - } else { - this.$emit('change', this.choicesSelected) + choicesSelected = [...this.choicesSelected, ...this.specAccountsInput] } + this.$emit('input', choicesSelected) + this.$emit('change', choicesSelected) } } } From 70f76fd592dad41c69cf790fb77c9e53531c6a27 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Fri, 10 Feb 2023 18:01:09 +0800 Subject: [PATCH 59/68] perf: ticket type filter --- src/i18n/langs/en.json | 6 +++++- src/i18n/langs/ja.json | 6 +++++- src/i18n/langs/zh.json | 4 ++++ src/views/tickets/BaseTicketList.vue | 25 ++++++++++++++++++++++++- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 74d784e7a..2c7ab443f 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1559,6 +1559,10 @@ "basicTools": "Basic tool" }, "tickets": { + "ApplyAsset": "Apply asset", + "LoginConfirm": "User login confirm", + "CommandConfirm": "Command confirm", + "LoginAssetConfirm": "Asset login confirm", "PermissionName": "Permission name", "Accept": "Accept", "AssignedMe": "Assigned me", @@ -2029,4 +2033,4 @@ "PublishStatus": "Publish status", "NoPublished": "Unpublished" } -} \ No newline at end of file +} diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index d2bd09bf1..f9009753b 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -1551,6 +1551,10 @@ "Applets": "リモート アプリケーション" }, "tickets": { + "ApplyAsset": "リソースの適用", + "LoginConfirm": "ユーザーログインの確認", + "CommandConfirm": "コマンドの確認", + "LoginAssetConfirm": "資産ログインの確認", "OneAssigneeType": "一次受付者タイプ", "OneAssignee": "一級受付者", "TwoAssigneeType": "二級受付者タイプ", @@ -2020,4 +2024,4 @@ "PublishStatus": "投稿ステータス", "NoPublished": "未発表" } -} \ No newline at end of file +} diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 204d76cf2..84ff460b8 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1545,6 +1545,10 @@ "testHelpText": "请输入目的地址进行测试" }, "tickets": { + "ApplyAsset": "申请资产", + "LoginConfirm": "用户登录复合", + "CommandConfirm": "命令复合", + "LoginAssetConfirm": "资产登录复合", "RelevantAssignees": "相关受理人", "OneAssigneeType": "一级受理人类型", "OneAssignee": "一级受理人", diff --git a/src/views/tickets/BaseTicketList.vue b/src/views/tickets/BaseTicketList.vue index 478f7ccf2..d4eb28d1d 100644 --- a/src/views/tickets/BaseTicketList.vue +++ b/src/views/tickets/BaseTicketList.vue @@ -141,7 +141,7 @@ export default { valueLabel: this.$t('tickets.Pending') } }, - exclude: ['state', 'id', 'title'], + exclude: ['state', 'id', 'title', 'type'], options: [ { value: 'state', @@ -163,6 +163,29 @@ export default { } ] }, + { + value: 'type', + label: this.$t('assets.Type'), + type: 'choice', + children: [ + { + value: 'apply_asset', + label: this.$t('tickets.ApplyAsset') + }, + { + value: 'login_confirm', + label: this.$t('tickets.LoginConfirm') + }, + { + value: 'command_confirm', + label: this.$t('tickets.CommandConfirm') + }, + { + value: 'login_asset_confirm', + label: this.$t('tickets.LoginAssetConfirm') + } + ] + }, { value: 'id', label: 'ID' From c39b5a5d7946b82640a0691225fc030066b00dc2 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 10 Feb 2023 18:13:40 +0800 Subject: [PATCH 60/68] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=91?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=BB=E5=8A=A1=E5=88=9B=E5=BB=BA=20protoc?= =?UTF-8?q?ols=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SyncInstanceTaskCreateUpdate.vue | 4 ++++ .../SyncInstanceTaskDetail/detail.vue | 13 +------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskCreateUpdate.vue b/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskCreateUpdate.vue index 7b4d3287b..054f42b96 100644 --- a/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskCreateUpdate.vue +++ b/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskCreateUpdate.vue @@ -119,6 +119,10 @@ export default { updateSuccessNextRoute: { name: 'CloudCenter' }, createSuccessNextRoute: { name: 'CloudCenter' }, afterGetFormValue(formValue) { + formValue.protocols = formValue.protocols?.split(' ').map(i => { + const [name, port] = i.split('/') + return { name, port } + }) formValue.ip_network_segment_group = formValue.ip_network_segment_group.toString() return formValue }, diff --git a/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskDetail/detail.vue b/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskDetail/detail.vue index 4a50d77c3..4607fc686 100644 --- a/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskDetail/detail.vue +++ b/src/views/assets/Cloud/SyncInstanceTask/SyncInstanceTaskDetail/detail.vue @@ -52,20 +52,9 @@ export default { url: `/api/v1/xpack/cloud/accounts/${this.object.id}`, detailFields: [ 'name', 'account_display', 'node_display', - { - key: this.$t('xpack.Cloud.LinuxAdminUser'), - value: this.object.unix_admin_user?.name - }, - { - key: this.$t('xpack.Cloud.WindowsAdminUser'), - value: this.object.windows_admin_user?.name - }, { key: this.$t('assets.Protocols'), - value: this.object.protocols, - formatter: (item, val) => { - return
{val?.map((v) => {v['name']}/{v['port']})}
- } + value: this.object.protocols }, { key: this.$t('xpack.Cloud.IPNetworkSegment'), From 48aac68248c98faa877d74ae671420f9f1521cb1 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Fri, 10 Feb 2023 16:55:16 +0800 Subject: [PATCH 61/68] perf: perms actions --- .../AssetPermission/components/PermBulkUpdateDialog.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/perms/AssetPermission/components/PermBulkUpdateDialog.vue b/src/views/perms/AssetPermission/components/PermBulkUpdateDialog.vue index e1a84f801..758849f33 100644 --- a/src/views/perms/AssetPermission/components/PermBulkUpdateDialog.vue +++ b/src/views/perms/AssetPermission/components/PermBulkUpdateDialog.vue @@ -59,7 +59,10 @@ export default { accounts: fieldsManager.accounts, date_start: fieldsManager.date_start, date_expired: fieldsManager.date_expired, - is_active: fieldsManager.is_active + is_active: fieldsManager.is_active, + actions: { + label: this.$t('common.Action') + } } if (this.permType !== 'asset') { url = '/api/v1/perms/application-permissions/' From 2457a88778f3b8755f042534cbc0f52ea3a9178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 18:37:39 +0800 Subject: [PATCH 62/68] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E5=AE=A1=E6=89=B9=E6=97=B6=E8=B5=84=E4=BA=A7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue index 08eb8f208..ce4787037 100644 --- a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue @@ -73,7 +73,7 @@ export default { statusMap: this.object.status.value === 'open' ? STATUS_MAP['pending'] : STATUS_MAP[this.object.state.value], requestForm: { nodes: this.object.apply_nodes, - assets: this.object.apply_assets, + assets: this.object.apply_assets?.map(i => i.id), accounts: this.object.apply_accounts, actions: this.object.apply_actions, apply_date_expired: this.object.apply_date_expired, From 0ba28e14c87d26b39da882070ad40aefdef75d25 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Fri, 10 Feb 2023 18:58:50 +0800 Subject: [PATCH 63/68] perf: ticket node --- src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue index ce4787037..f70c7a9a7 100644 --- a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue @@ -72,7 +72,7 @@ export default { treeNodes, statusMap: this.object.status.value === 'open' ? STATUS_MAP['pending'] : STATUS_MAP[this.object.state.value], requestForm: { - nodes: this.object.apply_nodes, + nodes: this.object.apply_nodes?.map(i => i.id), assets: this.object.apply_assets?.map(i => i.id), accounts: this.object.apply_accounts, actions: this.object.apply_actions, From b709333b1b13e64348faee495abf6195284d11b3 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 10 Feb 2023 19:02:44 +0800 Subject: [PATCH 64/68] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=20write=5Fonly=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailCard/auto.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/DetailCard/auto.vue b/src/components/DetailCard/auto.vue index c64e5bf06..828aba1d4 100644 --- a/src/components/DetailCard/auto.vue +++ b/src/components/DetailCard/auto.vue @@ -59,6 +59,9 @@ export default { if (!fieldMeta) { continue } + if (fieldMeta['write_only']) { + continue + } let value = this.object[name] From f86af9c8b8ce528d26af7e2a3f80acceed198f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 19:38:01 +0800 Subject: [PATCH 65/68] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E8=AE=B0=E5=BD=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sessions/SessionDetail/SessionDetailInfo.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/sessions/SessionDetail/SessionDetailInfo.vue b/src/views/sessions/SessionDetail/SessionDetailInfo.vue index d64575c75..d1c6d04f9 100644 --- a/src/views/sessions/SessionDetail/SessionDetailInfo.vue +++ b/src/views/sessions/SessionDetail/SessionDetailInfo.vue @@ -116,8 +116,9 @@ export default { value: this.session.asset }, { - key: this.$t('sessions.systemUser'), - value: this.session.system_user + key: this.$t('assets.Account'), + value: this.session.account + }, { key: this.$t('sessions.protocol'), @@ -125,7 +126,7 @@ export default { }, { key: this.$t('sessions.loginFrom'), - value: this.session.login_from + value: this.session.login_from?.label || '-' }, { key: this.$t('sessions.remoteAddr'), From 49c8b24f6c4fa5985503ed562f4d43f814855ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 19:08:37 +0800 Subject: [PATCH 66/68] =?UTF-8?q?perf:=20=E6=93=8D=E4=BD=9C=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=BC=B9=E7=AA=97=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E3=80=81=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/audits/OperateLogList.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/audits/OperateLogList.vue b/src/views/audits/OperateLogList.vue index c2473024a..09cc81765 100644 --- a/src/views/audits/OperateLogList.vue +++ b/src/views/audits/OperateLogList.vue @@ -9,6 +9,8 @@ v-if="logDetailVisible" :title="this.$tc('route.OperateLog')" :visible.sync="logDetailVisible" + :show-cancel="false" + :show-confirm="false" > From 51c6f4321c75426d4a36d6320d72470148b2755e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Fri, 10 Feb 2023 19:51:47 +0800 Subject: [PATCH 67/68] =?UTF-8?q?perf:=20=E5=B7=A5=E5=8D=95=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E7=BD=AE-=E5=AE=A1=E6=89=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=98=BE=E7=A4=BA=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tickets/TicketFlow/FlowRuleField.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/tickets/TicketFlow/FlowRuleField.vue b/src/views/tickets/TicketFlow/FlowRuleField.vue index 90002926e..fcc8204b2 100644 --- a/src/views/tickets/TicketFlow/FlowRuleField.vue +++ b/src/views/tickets/TicketFlow/FlowRuleField.vue @@ -6,14 +6,14 @@
{{ i + 1 + ' ' + vm.$t('tickets.LevelApproval') }}
- + {{ vm.$t('tickets.SuperAdmin') }} {{ vm.$t('tickets.OrgAdmin') }} {{ vm.$t('tickets.SuperOrgAdmin') }} {{ vm.$t('tickets.CustomUser') }}
- +
From 13a135609372a0b9262e6d4829a0ddb79ddb4a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 13 Feb 2023 10:30:13 +0800 Subject: [PATCH 68/68] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/AccountTemplate/AccountTemplateDetail/Detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/accounts/AccountTemplate/AccountTemplateDetail/Detail.vue b/src/views/accounts/AccountTemplate/AccountTemplateDetail/Detail.vue index c622cb769..fd4081054 100644 --- a/src/views/accounts/AccountTemplate/AccountTemplateDetail/Detail.vue +++ b/src/views/accounts/AccountTemplate/AccountTemplateDetail/Detail.vue @@ -50,7 +50,7 @@ export default { } ], url: `/api/v1/accounts/account-templates/${this.object.id}/`, - excludes: ['privileged', 'secret', 'passphrase', 'specific'] + excludes: ['privileged', 'secret', 'passphrase', 'spec_info'] } }, computed: {