From d6de7cce249a9b607809ba0bd9ffff46c67dca40 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 10:33:04 +0800 Subject: [PATCH 1/9] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8F=B0=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/components/ProgressChart.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/components/ProgressChart.vue b/src/views/dashboard/components/ProgressChart.vue index 2597c56c3..cdfe46cd3 100644 --- a/src/views/dashboard/components/ProgressChart.vue +++ b/src/views/dashboard/components/ProgressChart.vue @@ -45,7 +45,8 @@ export default { const total = _.sumBy(this.data, function(i) { return i.total }) for (let i = 0, len = this.data.length; i < len; i++) { const current = this.data[i] - const num = (current.total / total) * 100 + let num = (current.total / total) * 100 + num = _.floor(num, 2) const color = '#' + Math.floor(Math.random() * (256 * 256 * 256 - 1)).toString(16) seriesList.push({ type: 'bar', @@ -132,7 +133,7 @@ export default { grid: { top: '60%', containLabel: true, - bottom: '0', + bottom: '-10', left: '0%', right: 1 }, From 15e650ef280084f85445de0cc9ea697ad7b68843 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 10 Feb 2023 11:00:30 +0800 Subject: [PATCH 2/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=20push=5Fnow=20=E6=9D=83=E9=99=90=E7=9A=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9C=A8=E5=88=9B=E5=BB=BA=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E3=80=81=E5=88=9B=E5=BB=BA=E8=B4=A6=E5=8F=B7=E4=B8=AD=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AccountCreateUpdateForm/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AccountCreateUpdateForm/index.vue b/src/components/AccountCreateUpdateForm/index.vue index 71c1894d4..85ad07d02 100644 --- a/src/components/AccountCreateUpdateForm/index.vue +++ b/src/components/AccountCreateUpdateForm/index.vue @@ -154,7 +154,7 @@ export default { push_now: { hidden: () => { const automation = this.iPlatform.automation || {} - return !automation.push_account_enabled || !automation.ansible_enabled + return !automation.push_account_enabled || !automation.ansible_enabled || !this.$hasPerm('assets.push_assetaccount') } } }, From b54952855b55066d2e4ff02e786aa016434a2a83 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 14:35:29 +0800 Subject: [PATCH 3/9] =?UTF-8?q?perf:=20=E5=91=BD=E4=BB=A4=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=AF=A6=E6=83=85=E5=88=97=E8=A1=A8=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sessions/SessionDetail/SessionCommands.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/sessions/SessionDetail/SessionCommands.vue b/src/views/sessions/SessionDetail/SessionCommands.vue index badd937eb..0521fe59e 100644 --- a/src/views/sessions/SessionDetail/SessionCommands.vue +++ b/src/views/sessions/SessionDetail/SessionCommands.vue @@ -44,8 +44,10 @@ export default { formatter: function(row) { return toSafeLocalDateStr(row.timestamp * 1000) } + }, + actions: { + has: false } - } }, headerActions: { From 0e576754bb0f757341850c9a9b4a8789a2eb961e Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Fri, 10 Feb 2023 15:46:17 +0800 Subject: [PATCH 4/9] =?UTF-8?q?perf:=20cloud=20url=20=E4=B8=8E=20=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=20=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CloudsPlatformCreateUpdate.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/views/assets/Asset/AssetCreateUpdate/CloudsPlatformCreateUpdate.vue b/src/views/assets/Asset/AssetCreateUpdate/CloudsPlatformCreateUpdate.vue index aee9006e5..802a2a4d1 100644 --- a/src/views/assets/Asset/AssetCreateUpdate/CloudsPlatformCreateUpdate.vue +++ b/src/views/assets/Asset/AssetCreateUpdate/CloudsPlatformCreateUpdate.vue @@ -10,7 +10,24 @@ export default { components: { BaseAssetCreateUpdate }, data() { return { - url: '/api/v1/assets/clouds/' + 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 + } + } + } } } } From 7e5fcfe8d5e683d4b537969323cc2d3802203508 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 16:04:11 +0800 Subject: [PATCH 5/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E4=BB=80=E4=B9=88=E6=8C=87=E5=AE=9A=E8=B4=A6=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../perms/AssetPermission/components/AccountFormatter.vue | 3 +++ src/views/tickets/components/Steps.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/perms/AssetPermission/components/AccountFormatter.vue b/src/views/perms/AssetPermission/components/AccountFormatter.vue index 40142d40e..6bf6889af 100644 --- a/src/views/perms/AssetPermission/components/AccountFormatter.vue +++ b/src/views/perms/AssetPermission/components/AccountFormatter.vue @@ -73,6 +73,9 @@ export default { choicesSelected.push(this.SPEC) this.showSpecAccounts = true } + if (this.value.indexOf(this.SPEC) > -1) { + this.showSpecAccounts = true + } this.choicesSelected = choicesSelected this.specAccountsInput = specAccountsInput }, diff --git a/src/views/tickets/components/Steps.vue b/src/views/tickets/components/Steps.vue index 01d9494e6..da446bcb2 100644 --- a/src/views/tickets/components/Steps.vue +++ b/src/views/tickets/components/Steps.vue @@ -1,6 +1,6 @@