From d725e5497dac19e711bcde60e9bca7d2c044a70d Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 21 May 2024 15:20:57 +0800 Subject: [PATCH 01/14] perf: console dashboard api --- src/views/dashboard/components/RealTimeSummary.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/dashboard/components/RealTimeSummary.vue b/src/views/dashboard/components/RealTimeSummary.vue index ae2ca5c02..4c76174b7 100644 --- a/src/views/dashboard/components/RealTimeSummary.vue +++ b/src/views/dashboard/components/RealTimeSummary.vue @@ -66,7 +66,16 @@ export default { }, methods: { async getResourcesCount() { - return this.$axios.get('/api/v1/index/?total_count=1') + return this.$axios.get( + '/api/v1/index/', + { + params: { + total_count_online_sessions: 1, + total_count_online_users: 1, + total_count_today_failed_sessions: 1 + } + } + ) } } } From ca40cb34da8e8d1a3a8404448eecebe0e855fd15 Mon Sep 17 00:00:00 2001 From: "Gerry.tan" Date: Tue, 14 May 2024 21:40:34 +0800 Subject: [PATCH 02/14] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20dameng=20?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/icons/dameng.png | Bin 0 -> 1045 bytes src/styles/ztree_icon.scss | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 src/styles/icons/dameng.png diff --git a/src/styles/icons/dameng.png b/src/styles/icons/dameng.png new file mode 100644 index 0000000000000000000000000000000000000000..2ca0995a8ffd16b77bce017f0688cf8cb3a01878 GIT binary patch literal 1045 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}3dtTpz6=ai zY77hwEes65fIz8sVAd>&u`8WOFdEG72#; z16hnf$iOJYzzSwFFnBRa!`VTM8c;P%3=Hj=3@lJJQ9v35Jb)Oe8%i@TU__X>fC;Xe zX8|*U4bt|&YQ&?x zfOIj~R9FF-xv3?I3Kh9IdBs*0wn|_XRzNmLSYJs2tfVB{Rw=?aK*2e`C{@8s&p^*W z$&O1wLBXadCCw_x#SN+*$g@?-C@Cqh($_C9FV`zK*2^zS*Eh7ZwA42+(l;{F1**_3 zuFNY*tkBIXR)!b?Gsh*hIJqdZpd>RtPXT0ZVp4u-iLH_n$Rap^xU(cP4PjGWG1OZ? z59)(t^bPe4^xlB`8&&F-6wzY-rbih*dC!boqyKZG%nNq=RBCC8QNP4WWEQk4P*6snYl1vhY-uc zrhT_xf9?5MQ`i1)vHi5YE)|<}<{wSk7=7par=Nd3ZRF0MOEWf?>Seq3+Vti3-;rDf zsSn&17tZuhk!w1*pdtUhiErt~hzS82A_rbFI2(MtG5^BLl6AVLwVE3HU6j^6wvbba zIGJ)u(DfsSi|b*7d&N8Fcq}yJag#jS?W4xLCfTWtPts-vzo=`aZ2$37Sz9MH#1_9T z`)xDV&wls1*9Ucs^Zk}zo_;VP!MJio`@y>4)mL|&(T>%duDnNO!l7EFgph`hQ*v*M zxNUt{u!Gfj{gx0dUK8Kd4xgnz9Lq47^?KL8C97WjO)*+|<@MKfDxPnS8^k%?nDJiv y;mt`mHks|L{}a0`{>b8Z=` Date: Mon, 3 Jun 2024 17:50:47 +0800 Subject: [PATCH 03/14] =?UTF-8?q?perf:=20action=20=E6=B7=BB=E5=8A=A0=20tok?= =?UTF-8?q?en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/jms-generic-action-handler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jms-generic-action-handler.yml b/.github/workflows/jms-generic-action-handler.yml index 3f499cfb9..450891696 100644 --- a/.github/workflows/jms-generic-action-handler.yml +++ b/.github/workflows/jms-generic-action-handler.yml @@ -10,3 +10,4 @@ jobs: - uses: jumpserver/action-generic-handler@master env: GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }} + I18N_TOKEN: ${{ secrets.I18N_TOKEN }} From 67a2a9be6a6229830329471fb90b6b12bdb5fbf8 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 5 Jun 2024 15:44:43 +0800 Subject: [PATCH 04/14] If non-existent values are entered into the select component, won't trigger a search request. --- src/components/Form/FormFields/Select2.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/Form/FormFields/Select2.vue b/src/components/Form/FormFields/Select2.vue index 25f9c53bf..859387128 100644 --- a/src/components/Form/FormFields/Select2.vue +++ b/src/components/Form/FormFields/Select2.vue @@ -225,9 +225,6 @@ export default { handler(newValue, oldValue) { }, deep: true - }, - iOptions(val) { - this.remote = val.length !== 0 } }, async mounted() { From 4cd0071054e01d9bb99306c393c6c3cfe3ddb869 Mon Sep 17 00:00:00 2001 From: halo Date: Fri, 7 Jun 2024 10:44:29 +0800 Subject: [PATCH 05/14] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=B5=8B=E8=AF=95=E8=B5=84=E4=BA=A7=E5=8F=AF=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=80=A7?= 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 + src/i18n/langs/zh_Hant.json | 1 + .../Asset/AssetList/components/BaseList.vue | 24 +++++++++++++++++++ 5 files changed, 28 insertions(+) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index a0cd067f7..8fbe7ab65 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -721,6 +721,7 @@ "BatchActivate": "Batch activate", "SyncSelected": "Sync selected", "bulkDeploy": "Bulk deploy", + "BulkVerify": "Bulk verify", "bulkDeleteErrorMsg": "Bulk delete failed: ", "bulkDeleteSuccessMsg": "Bulk delete success", "bulkRemoveErrorMsg": "Bulk remove failed: ", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 5881ce540..7780045cd 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -717,6 +717,7 @@ "SyncSuccessMsg": "同期に成功しました", "SyncSelected": "選択した同期", "bulkDeploy": "一括デプロイ", + "BulkVerify": "一括テスト", "bulkSyncErrorMsg": "一括同期に失敗しました:", "bulkDeleteErrorMsg": "一括削除に失敗しました:", "bulkDeleteSuccessMsg": "一括削除に成功しました", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 6c2162730..a694ca2e5 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -771,6 +771,7 @@ "BatchActivate": "批量激活", "SyncSelected": "同步所选", "bulkDeploy": "批量部署", + "BulkVerify": "批量测试", "bulkDeleteErrorMsg": "批量删除失败: ", "bulkDeleteSuccessMsg": "批量删除成功", "bulkRemoveErrorMsg": "批量移除失败: ", diff --git a/src/i18n/langs/zh_Hant.json b/src/i18n/langs/zh_Hant.json index 359881b47..c28e13728 100644 --- a/src/i18n/langs/zh_Hant.json +++ b/src/i18n/langs/zh_Hant.json @@ -771,6 +771,7 @@ "BatchActivate": "批次啟用", "SyncSelected": "同步所選", "bulkDeploy": "批次部署", + "BulkVerify": "批次測試", "bulkDeleteErrorMsg": "批次刪除失敗: ", "bulkDeleteSuccessMsg": "批次刪除成功", "bulkRemoveErrorMsg": "批次移除失敗: ", diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index 67fc28621..d011fda66 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -222,6 +222,30 @@ export default { getUrlQuery: false }, extraMoreActions: [ + { + name: 'BulkVerify', + title: this.$t('common.BulkVerify'), + type: 'primary', + icon: 'fa fa-handshake-o', + can: ({ selectedRows }) => + this.$hasPerm('assets.test_assetconnectivity') && + !this.$store.getters.currentOrgIsRoot && + selectedRows.length > 0 && + selectedRows[0].auto_config?.ansible_enabled && + selectedRows[0].auto_config?.ping_enabled, + callback: function({ selectedRows }) { + const ids = selectedRows.map(v => { + return v.id + }) + this.$axios.post( + '/api/v1/assets/assets/tasks/', + { action: 'test', assets: ids }).then(res => { + openTaskPage(res['task']) + }).catch(err => { + this.$message.error(this.$tc('common.bulkVerifyErrorMsg' + ' ' + err)) + }) + }.bind(this) + }, { name: 'DeactiveSelected', title: this.$t('common.BatchDisable'), From 4eda83f83db0f2e1891b94e9607a2b68176c2f86 Mon Sep 17 00:00:00 2001 From: halo Date: Fri, 7 Jun 2024 15:23:05 +0800 Subject: [PATCH 06/14] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E4=B8=8D=E5=AF=B9=E9=BD=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Apps/AccountListTable/AccountList.vue | 2 +- src/views/assets/Asset/AssetList/components/BaseList.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue index 6ba913d48..205779cdd 100644 --- a/src/components/Apps/AccountListTable/AccountList.vue +++ b/src/components/Apps/AccountListTable/AccountList.vue @@ -353,7 +353,7 @@ export default { name: 'BulkVerify', title: this.$t('accounts.BulkVerify'), type: 'primary', - fa: 'fa-handshake-o', + fa: 'fa-link', can: ({ selectedRows }) => { return selectedRows.length > 0 && ['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(selectedRows[0].asset.type.value) === -1 && diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index d011fda66..1fa963454 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -226,7 +226,7 @@ export default { name: 'BulkVerify', title: this.$t('common.BulkVerify'), type: 'primary', - icon: 'fa fa-handshake-o', + icon: 'fa fa-link', can: ({ selectedRows }) => this.$hasPerm('assets.test_assetconnectivity') && !this.$store.getters.currentOrgIsRoot && From 128b9c79ba40385b4703bc2552f8fe33c14cd539 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 11 Jun 2024 17:17:49 +0800 Subject: [PATCH 07/14] =?UTF-8?q?fix:=20=E5=B7=A5=E5=8D=95-=E5=BE=85?= =?UTF-8?q?=E6=88=91=E5=AE=A1=E6=89=B9=E9=BB=98=E8=AE=A4=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=9A=84=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tickets/BaseTicketList.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/tickets/BaseTicketList.vue b/src/views/tickets/BaseTicketList.vue index 7e0711821..9bee748de 100644 --- a/src/views/tickets/BaseTicketList.vue +++ b/src/views/tickets/BaseTicketList.vue @@ -137,6 +137,14 @@ export default { canCreate: this.$hasPerm('tickets.view_ticket'), hasBulkDelete: false, searchConfig: { + default: { + state: { + key: 'state', + label: this.$t('tickets.action'), + value: 'pending', + valueLabel: this.$t('common.Open') + } + }, exclude: ['id', 'title', 'type', 'applicant'], options: [ { @@ -180,7 +188,7 @@ export default { }, { value: 'relevant_command', - label: this.$t('tickets.RelevantSystemUser') + label: this.$t('tickets.ApplyRunCommand') } ] }, From 95b58f3c96167281d1fd766739eac41ea9663435 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 11 Jun 2024 12:42:23 +0800 Subject: [PATCH 08/14] perf: Complete asset hardware information --- src/components/Table/TableFormatters/HostInfoFormatter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/TableFormatters/HostInfoFormatter.vue b/src/components/Table/TableFormatters/HostInfoFormatter.vue index c3e2b918b..749629206 100644 --- a/src/components/Table/TableFormatters/HostInfoFormatter.vue +++ b/src/components/Table/TableFormatters/HostInfoFormatter.vue @@ -64,7 +64,7 @@ export default { } return text } - return '-' + return this.items?.distribution || '-' } } } From 0b3a9844f78da1d84bab05315cc296e9dd7038fc Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 13 Jun 2024 10:39:07 +0800 Subject: [PATCH 09/14] fix: Crontab - Failed to set minute range --- .../Form/CronTab/components/Crontab-Min.vue | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/components/Form/CronTab/components/Crontab-Min.vue b/src/components/Form/CronTab/components/Crontab-Min.vue index 7d241b6a5..394b2dd0f 100644 --- a/src/components/Form/CronTab/components/Crontab-Min.vue +++ b/src/components/Form/CronTab/components/Crontab-Min.vue @@ -7,18 +7,11 @@ - - - {{ this.$t('common.CronTab.from') }} - - - {{ this.$t('common.CronTab.min') }} - - - {{ this.$t('common.CronTab.from') }} - {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }} + + {{ this.$t('common.CronTab.min') }}{{ this.$t('common.CronTab.executeOnce') }} @@ -33,7 +26,7 @@ size="small" style="width:100%" > - {{ item-1 }} + {{ item - 1 }} @@ -158,7 +151,7 @@ export default { From 91c44d05009f8659c1bb48650a278b6f72004d52 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 13 Jun 2024 15:28:22 +0800 Subject: [PATCH 10/14] =?UTF-8?q?fix:=20=E5=BE=85=E6=88=91=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=87=BA=E8=BF=98=E6=9C=AA=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/TagSearch/index.vue | 1 + src/views/tickets/BaseTicketList.vue | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/components/Table/TagSearch/index.vue b/src/components/Table/TagSearch/index.vue index 570ec9648..e1c5b613b 100644 --- a/src/components/Table/TagSearch/index.vue +++ b/src/components/Table/TagSearch/index.vue @@ -126,6 +126,7 @@ export default { filterTags: { handler() { this.$emit('tag-search', this.filterMaps) + this.$eventBus.$emit('TagSearch', this.filterMaps) }, deep: true }, diff --git a/src/views/tickets/BaseTicketList.vue b/src/views/tickets/BaseTicketList.vue index 9bee748de..f9cca50b5 100644 --- a/src/views/tickets/BaseTicketList.vue +++ b/src/views/tickets/BaseTicketList.vue @@ -201,6 +201,9 @@ export default { return Object.assign({}, this.defaultTicketActions, this.extraTicketAction) } }, + created() { + this.$eventBus.$on('TagSearch', this.handleTagSearchEvent) + }, mounted() { setTimeout(() => { this.loading = false @@ -209,6 +212,14 @@ export default { methods: { reloadTable() { this.$refs.ListPage.$refs.ListTable.$refs.ListTable.reloadTable() + }, + handleTagSearchEvent(tags) { + if (tags.hasOwnProperty('state')) { + const delimiter = this.url.indexOf('?') === -1 ? '?' : '&' + this.ticketTableConfig.url = `${this.url}${delimiter}state=${tags.state}` + } else { + this.ticketTableConfig.url = this.url + } } } } From 1ff49ca16dc4cd02b66304f50c280d7d21a0bb6f Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Mon, 17 Jun 2024 10:03:05 +0800 Subject: [PATCH 11/14] =?UTF-8?q?perf:=20=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE-=E7=BB=84=E7=BB=87=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E5=88=9B=E5=BB=BA=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=97=E8=A1=A8=E6=9C=AA=E6=8C=89=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/settings/Org/OrganizationCreateUpdate.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/settings/Org/OrganizationCreateUpdate.vue b/src/views/settings/Org/OrganizationCreateUpdate.vue index 8bb144668..3ca8eafbe 100644 --- a/src/views/settings/Org/OrganizationCreateUpdate.vue +++ b/src/views/settings/Org/OrganizationCreateUpdate.vue @@ -12,25 +12,24 @@ export default { data() { return { config: { - initial: { - }, + initial: {}, url: '/api/v1/orgs/orgs/', fields: [ ['', ['name', 'comment']] ], hasSaveContinue: false, - fieldsMeta: { - }, + fieldsMeta: {}, onPerformSuccess(res, method) { + const order_params = { params: { order: '-date_created' }} switch (method) { case 'post': this.$store.dispatch('users/addAdminOrg', { id: res.id, name: res.name }) this.$message.success(this.$tc('common.createSuccessMsg')) - return this.$router.push({ name: 'OrganizationList' }) + return this.$router.push({ name: 'OrganizationList', ...order_params }) case 'put': this.$store.dispatch('users/modifyOrg', { id: res.id, name: res.name }) this.$message.success(this.$tc('common.updateSuccessMsg')) - return this.$router.push({ name: 'OrganizationList' }) + return this.$router.push({ name: 'OrganizationList', ...order_params }) } } } From 4e95c883186dda5f93041fa208941a77f4431ac8 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 18 Jun 2024 14:52:50 +0800 Subject: [PATCH 12/14] fix: Account tempalte update secret failed --- src/components/Apps/AccountListTable/ViewSecret.vue | 7 ++++++- src/views/accounts/AccountTemplate/AccountTemplateList.vue | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Apps/AccountListTable/ViewSecret.vue b/src/components/Apps/AccountListTable/ViewSecret.vue index 517e42a34..031cbdb78 100644 --- a/src/components/Apps/AccountListTable/ViewSecret.vue +++ b/src/components/Apps/AccountListTable/ViewSecret.vue @@ -83,6 +83,10 @@ export default { type: String, default: '' }, + type: { + type: String, + default: 'account' + }, title: { type: String, default: function() { @@ -136,7 +140,8 @@ export default { name: this.secretInfo.name, secret: encryptPassword(this.modifiedSecret) } - this.$axios.patch(`/api/v1/accounts/accounts/${this.account.id}/`, params).then(() => { + const url = this.type === 'account' ? `/api/v1/accounts/accounts` : `/api/v1/accounts/account-templates` + this.$axios.patch(`${url}/${this.account.id}/`, params).then(() => { this.$message.success(this.$tc('common.updateSuccessMsg')) }) }, diff --git a/src/views/accounts/AccountTemplate/AccountTemplateList.vue b/src/views/accounts/AccountTemplate/AccountTemplateList.vue index 1487ae57f..2fbdbae61 100644 --- a/src/views/accounts/AccountTemplate/AccountTemplateList.vue +++ b/src/views/accounts/AccountTemplate/AccountTemplateList.vue @@ -6,6 +6,7 @@ :account="account" :show-password-record="false" :url="secretUrl" + type="template" :visible.sync="showViewSecretDialog" /> From ccd7b319c82b207b26cfab089be4bcce399ce737 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 18 Jun 2024 17:57:40 +0800 Subject: [PATCH 13/14] =?UTF-8?q?fix:=20=E5=AE=A1=E8=AE=A1=E5=8F=B0?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E4=BB=8A=E6=97=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/Audit/RightSummary.vue | 2 +- src/views/dashboard/Console/UserAssetActivity.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/dashboard/Audit/RightSummary.vue b/src/views/dashboard/Audit/RightSummary.vue index 8b1f48edb..e16ef5e99 100644 --- a/src/views/dashboard/Audit/RightSummary.vue +++ b/src/views/dashboard/Audit/RightSummary.vue @@ -100,7 +100,7 @@ export default { this.data.total_count_job_logs = data?.total_count_job_logs this.data.total_count_job_logs_running = data?.total_count_job_logs_running this.data.total_count_job_logs_failed = data?.total_count_job_logs_failed - if (totalCountSession.length > 1) { + if (totalCountSession.length > 0) { this.chartConfig.secondaryData = totalCountSession } } diff --git a/src/views/dashboard/Console/UserAssetActivity.vue b/src/views/dashboard/Console/UserAssetActivity.vue index c1662ca32..1f98e10f2 100644 --- a/src/views/dashboard/Console/UserAssetActivity.vue +++ b/src/views/dashboard/Console/UserAssetActivity.vue @@ -16,8 +16,7 @@ export default { Title, LineChart }, - props: { - }, + props: {}, data() { return { loading: false, @@ -48,10 +47,10 @@ export default { const activeUsers = data?.dates_metrics_total_count_active_users const activeAssets = data?.dates_metrics_total_count_active_assets this.lineChartConfig.datesMetrics = data.dates_metrics_date - if (activeUsers.length > 1) { + if (activeUsers.length > 0) { this.lineChartConfig.primaryData = activeUsers } - if (activeAssets.length > 1) { + if (activeAssets.length > 0) { this.lineChartConfig.secondaryData = activeAssets } } @@ -64,6 +63,7 @@ export default { margin-top: 16px; padding: 20px; background: #fff; + .head { display: flex; justify-content: space-between; From 9c8ceb04f0f999d94b5371f8ff434f4997a6d19b Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 19 Jun 2024 15:10:16 +0800 Subject: [PATCH 14/14] perf: Disable editing labels for the root organization --- src/components/Table/TableFormatters/LabelsFormatter.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Table/TableFormatters/LabelsFormatter.vue b/src/components/Table/TableFormatters/LabelsFormatter.vue index 85f0353b6..c5a965a52 100644 --- a/src/components/Table/TableFormatters/LabelsFormatter.vue +++ b/src/components/Table/TableFormatters/LabelsFormatter.vue @@ -27,7 +27,7 @@ @@ -269,4 +269,11 @@ export default { .tag-tip { margin-top: 10px; } + +.disabled-link { + pointer-events: none; + color: grey; + cursor: default; + text-decoration: none; +}