From 13ac7f521e7d35a0d982d322f3af5fa2d897017d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E6=9C=88?= Date: Tue, 18 Jul 2023 17:11:05 +0800 Subject: [PATCH 01/42] fix: Filter cd deployment location clusters options by host cluster name (#4164) fix: filter cd deployment location clusters options Signed-off-by: yazhou --- .../Forms/CD/Advance/Placement/index.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Forms/CD/Advance/Placement/index.jsx b/src/components/Forms/CD/Advance/Placement/index.jsx index 2a921347d3e..d40ee16bd91 100644 --- a/src/components/Forms/CD/Advance/Placement/index.jsx +++ b/src/components/Forms/CD/Advance/Placement/index.jsx @@ -66,13 +66,15 @@ export default class Placement extends Component { @computed get clusters() { - return this.cdStore.clustersList.map(item => { - return { - label: showNameAndAlias(inCluster2Default(item.name), 'cluster'), - value: item.name, - server: item.server, - } - }) + return this.cdStore.clustersList + .map(item => { + return { + label: showNameAndAlias(inCluster2Default(item.name), 'cluster'), + value: item.name, + server: item.server, + } + }) + .filter(i => i.value === 'in-cluster') } @computed From 1ddf7b96c44bb0435dc71477f0cee759983e1614 Mon Sep 17 00:00:00 2001 From: KubeSphere CI Bot <47586280+ks-ci-bot@users.noreply.github.com> Date: Tue, 18 Jul 2023 17:27:05 +0800 Subject: [PATCH 02/42] New Crowdin updates (#4154) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Portuguese) * New translations l10n-technicalSupport.js (Portuguese) * New translations l10n-devopsProjects-pipeline-details.js (Turkish) * New translations l10n-devopsProjects-pipeline-list.js (Turkish) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Turkish) * New translations l10n-technicalSupport.js (Turkish) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-list.js (Chinese Simplified) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-technicalSupport.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-list.js (Chinese Traditional) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Chinese Traditional) * New translations l10n-technicalSupport.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-details.js (Hindi) * New translations l10n-devopsProjects-pipeline-list.js (Hindi) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Hindi) * New translations l10n-technicalSupport.js (Hindi) * New translations l10n-devopsProjects-continuousDeployments-list.js (French) * New translations l10n-devopsProjects-pipeline-details.js (French) * New translations l10n-devopsProjects-continuousDeployments-list.js (Spanish) * New translations l10n-devopsProjects-pipeline-details.js (Spanish) * New translations l10n-devopsProjects-continuousDeployments-list.js (Arabic) * New translations l10n-devopsProjects-pipeline-details.js (Arabic) * New translations l10n-devopsProjects-continuousDeployments-list.js (German) * New translations l10n-devopsProjects-pipeline-details.js (German) * New translations l10n-devopsProjects-continuousDeployments-list.js (Korean) * New translations l10n-devopsProjects-pipeline-details.js (Korean) * New translations l10n-devopsProjects-continuousDeployments-list.js (Lithuanian) * New translations l10n-devopsProjects-pipeline-details.js (Lithuanian) * New translations l10n-devopsProjects-continuousDeployments-list.js (Polish) * New translations l10n-devopsProjects-pipeline-details.js (Polish) * New translations l10n-devopsProjects-continuousDeployments-list.js (Portuguese) * New translations l10n-devopsProjects-pipeline-details.js (Portuguese) * New translations l10n-devopsProjects-continuousDeployments-list.js (Turkish) * New translations l10n-devopsProjects-pipeline-details.js (Turkish) * New translations l10n-devopsProjects-continuousDeployments-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-devopsProjects-continuousDeployments-list.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Traditional) * New translations l10n-devopsProjects-continuousDeployments-list.js (Hindi) * New translations l10n-devopsProjects-pipeline-details.js (Hindi) * New translations l10n-devopsProjects-continuousDeployments-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-list.js (Chinese Simplified) * New translations l10n-projects-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (French) * New translations l10n-devopsProjects-pipeline-details.js (Spanish) * New translations l10n-devopsProjects-pipeline-details.js (Arabic) * New translations l10n-devopsProjects-pipeline-details.js (German) * New translations l10n-devopsProjects-pipeline-details.js (Korean) * New translations l10n-devopsProjects-pipeline-details.js (Lithuanian) * New translations l10n-devopsProjects-pipeline-details.js (Polish) * New translations l10n-devopsProjects-pipeline-details.js (Portuguese) * New translations l10n-devopsProjects-pipeline-details.js (Turkish) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-details.js (Hindi) * New translations l10n-devopsProjects-pipeline-details.js (French) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (French) * New translations l10n-devopsProjects-pipeline-details.js (Spanish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Spanish) * New translations l10n-devopsProjects-pipeline-details.js (Arabic) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Arabic) * New translations l10n-devopsProjects-pipeline-details.js (German) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (German) * New translations l10n-devopsProjects-pipeline-details.js (Korean) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Korean) * New translations l10n-devopsProjects-pipeline-details.js (Lithuanian) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Lithuanian) * New translations l10n-devopsProjects-pipeline-details.js (Polish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Polish) * New translations l10n-devopsProjects-pipeline-details.js (Portuguese) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Portuguese) * New translations l10n-devopsProjects-pipeline-details.js (Turkish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Turkish) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Traditional) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-details.js (Hindi) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Hindi) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (French) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Spanish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Arabic) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (German) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Korean) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Lithuanian) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Polish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Portuguese) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Turkish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Traditional) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Hindi) * New translations l10n-clusterManagement-baseicInformation.js (French) * New translations l10n-clusterManagement-baseicInformation.js (Spanish) * New translations l10n-clusterManagement-baseicInformation.js (Arabic) * New translations l10n-clusterManagement-baseicInformation.js (German) * New translations l10n-clusterManagement-baseicInformation.js (Korean) * New translations l10n-clusterManagement-baseicInformation.js (Lithuanian) * New translations l10n-clusterManagement-baseicInformation.js (Polish) * New translations l10n-clusterManagement-baseicInformation.js (Portuguese) * New translations l10n-clusterManagement-baseicInformation.js (Turkish) * New translations l10n-clusterManagement-baseicInformation.js (Chinese Simplified) * New translations l10n-clusterManagement-baseicInformation.js (Chinese Traditional) * New translations l10n-clusterManagement-baseicInformation.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Hindi) * New translations l10n-clusterManagement-baseicInformation.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-accessControl-users-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-applicationResources.js (Chinese Simplified) * New translations l10n-clusterManagement-systemComponents-list.js (Chinese Simplified) * New translations l10n-projects-applicationWorkloads-daemonsets-list.js (Chinese Simplified) * New translations l10n-projects-configuration-serviceAccounts-details.js (Chinese Simplified) * New translations l10n-projects-configuration-serviceAccounts-list.js (Chinese Simplified) * New translations l10n-projects-projectSettings-projectRoles-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (French) * New translations l10n-devopsProjects-pipeline-details.js (French) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Spanish) * New translations l10n-devopsProjects-pipeline-details.js (Spanish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Arabic) * New translations l10n-devopsProjects-pipeline-details.js (Arabic) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (German) * New translations l10n-devopsProjects-pipeline-details.js (German) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Korean) * New translations l10n-devopsProjects-pipeline-details.js (Korean) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Lithuanian) * New translations l10n-devopsProjects-pipeline-details.js (Lithuanian) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Polish) * New translations l10n-devopsProjects-pipeline-details.js (Polish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Portuguese) * New translations l10n-devopsProjects-pipeline-details.js (Portuguese) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Turkish) * New translations l10n-devopsProjects-pipeline-details.js (Turkish) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Traditional) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Traditional) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Hindi) * New translations l10n-devopsProjects-pipeline-details.js (Hindi) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-devopsProjects-pipeline-details.js (Chinese Simplified) * New translations l10n-multiclusterProjects-applicationWorkloads-deployments-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (French) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Spanish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Arabic) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (German) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Korean) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Lithuanian) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Polish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Portuguese) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Turkish) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Traditional) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Hindi) * New translations l10n-clusterManagement-baseicInformation.js (French) * New translations l10n-clusterManagement-baseicInformation.js (Spanish) * New translations l10n-clusterManagement-baseicInformation.js (Arabic) * New translations l10n-clusterManagement-baseicInformation.js (German) * New translations l10n-clusterManagement-baseicInformation.js (Korean) * New translations l10n-clusterManagement-baseicInformation.js (Lithuanian) * New translations l10n-clusterManagement-baseicInformation.js (Polish) * New translations l10n-clusterManagement-baseicInformation.js (Portuguese) * New translations l10n-clusterManagement-baseicInformation.js (Turkish) * New translations l10n-clusterManagement-baseicInformation.js (Chinese Simplified) * New translations l10n-clusterManagement-baseicInformation.js (Chinese Traditional) * New translations l10n-clusterManagement-baseicInformation.js (Hindi) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-details.js (Chinese Simplified) * New translations l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js (Chinese Simplified) --------- Co-authored-by: Liu Xin --- ...usterManagement-monitoring&Alerting-alertingPolicies-list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/zh/l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js b/locales/zh/l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js index 3a59295f14d..df9797425aa 100644 --- a/locales/zh/l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js +++ b/locales/zh/l10n-clusterManagement-monitoring&Alerting-alertingPolicies-list.js @@ -112,5 +112,5 @@ module.exports = { ALERTING_POLICY_LOW: '规则组', // List > reset RESET_ALERTING_POLICY: '重置规则组', - RESET_ALERTING_POLICY_DESC: '您确定重置规则组吗?', + RESET_ALERTING_POLICY_DESC: '您确定重置规则组吗?' }; \ No newline at end of file From fb632cee5280130b5a2012b429038400372393d6 Mon Sep 17 00:00:00 2001 From: fcl <63338728+fuchunlan@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:03:53 +0800 Subject: [PATCH 03/42] fix: Update monitors charts style to fix TinyArea not show bug (#4182) Signed-off-by: lannyfu --- src/components/Cards/Pods/index.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Cards/Pods/index.scss b/src/components/Cards/Pods/index.scss index eaf83142e1c..b7d24a3a00d 100644 --- a/src/components/Cards/Pods/index.scss +++ b/src/components/Cards/Pods/index.scss @@ -167,6 +167,7 @@ & > div { margin: 0 10px; + width: calc(50% - 20px); } } } From c51224ea89d5f626e4c8580ecd4d18d225d3c4d7 Mon Sep 17 00:00:00 2001 From: fcl <63338728+fuchunlan@users.noreply.github.com> Date: Fri, 18 Aug 2023 09:47:53 +0800 Subject: [PATCH 04/42] fix: Update the apiVersion of notification config and receiver (#4183) Signed-off-by: lannyfu --- src/stores/notification/config.js | 4 ++++ src/stores/notification/receiver.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/stores/notification/config.js b/src/stores/notification/config.js index 4f8621089c3..be9875f6ff3 100644 --- a/src/stores/notification/config.js +++ b/src/stores/notification/config.js @@ -20,4 +20,8 @@ import Base from './base' export default class ConfigStore extends Base { module = 'configs' + + get apiVersion() { + return 'kapis/notification.kubesphere.io/v2beta2' + } } diff --git a/src/stores/notification/receiver.js b/src/stores/notification/receiver.js index ceba0e27db0..646891b59bd 100644 --- a/src/stores/notification/receiver.js +++ b/src/stores/notification/receiver.js @@ -20,4 +20,8 @@ import Base from './base' export default class ReceiverStore extends Base { module = 'receivers' + + get apiVersion() { + return 'kapis/notification.kubesphere.io/v2beta2' + } } From ed6d8889535d71c685d3abe85bb3055e35bd5ecf Mon Sep 17 00:00:00 2001 From: fcl <63338728+fuchunlan@users.noreply.github.com> Date: Fri, 18 Aug 2023 09:57:53 +0800 Subject: [PATCH 05/42] fix: Update opensearch field (#4184) Signed-off-by: lannyfu --- src/assets/opensearch.svg | 12 ++++ .../Forms/Opensearch/Settings/index.jsx | 58 +++++++++++++++++++ .../Forms/Opensearch/Settings/index.scss | 11 ++++ .../Modals/LogCollectionCreate/config.js | 11 ++++ .../containers/LogCollections/config.js | 11 ++++ src/utils/object.mapper.js | 2 +- 6 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 src/assets/opensearch.svg create mode 100644 src/components/Forms/Opensearch/Settings/index.jsx create mode 100644 src/components/Forms/Opensearch/Settings/index.scss diff --git a/src/assets/opensearch.svg b/src/assets/opensearch.svg new file mode 100644 index 00000000000..fed8cbf8cfc --- /dev/null +++ b/src/assets/opensearch.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/components/Forms/Opensearch/Settings/index.jsx b/src/components/Forms/Opensearch/Settings/index.jsx new file mode 100644 index 00000000000..11f3a375a99 --- /dev/null +++ b/src/components/Forms/Opensearch/Settings/index.jsx @@ -0,0 +1,58 @@ +/* + * This file is part of KubeSphere Console. + * Copyright (C) 2022 The KubeSphere Console Authors. + * + * KubeSphere Console is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * KubeSphere Console is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with KubeSphere Console. If not, see . + */ + +import React from 'react' + +import { Form, Input } from '@kube-design/components' +import { UrlInput } from 'components/Inputs' + +import styles from './index.scss' + +export default class BaseInfo extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + +
+ ) + } +} diff --git a/src/components/Forms/Opensearch/Settings/index.scss b/src/components/Forms/Opensearch/Settings/index.scss new file mode 100644 index 00000000000..0ed2f14cfff --- /dev/null +++ b/src/components/Forms/Opensearch/Settings/index.scss @@ -0,0 +1,11 @@ +.path { + max-width: 455px; +} + +.columns { + margin-bottom: -12px; +} + +.desc { + margin-top: -12px; +} diff --git a/src/components/Modals/LogCollectionCreate/config.js b/src/components/Modals/LogCollectionCreate/config.js index 4b56d6c35cb..7601c0e5053 100644 --- a/src/components/Modals/LogCollectionCreate/config.js +++ b/src/components/Modals/LogCollectionCreate/config.js @@ -20,8 +20,10 @@ import { get } from 'lodash' import { ReactComponent as ESICON } from 'assets/es.svg' import { ReactComponent as KaFkaICON } from 'assets/kafka.svg' import { ReactComponent as FluentdICON } from 'assets/fluentd.svg' +import { ReactComponent as OSICON } from 'assets/opensearch.svg' import ESForm from 'components/Forms/Elasticsearch/Settings' +import OSForm from 'components/Forms/Opensearch/Settings' import KafkaForm from 'components/Forms/KafkaForm/Settings' import FluentdForm from 'components/Forms/Fluentd/Settings' @@ -39,6 +41,15 @@ export default { return t('ES_DESC') }, }, + os: { + ICON: OSICON, + title: 'OpenSearch', + pathGetter, + Form: OSForm, + get description() { + return t('OPENSEARCH_DESC') + }, + }, kafka: { ICON: KaFkaICON, title: 'Kafka', diff --git a/src/pages/clusters/containers/LogCollections/config.js b/src/pages/clusters/containers/LogCollections/config.js index 4b56d6c35cb..2d2ef378475 100644 --- a/src/pages/clusters/containers/LogCollections/config.js +++ b/src/pages/clusters/containers/LogCollections/config.js @@ -20,8 +20,10 @@ import { get } from 'lodash' import { ReactComponent as ESICON } from 'assets/es.svg' import { ReactComponent as KaFkaICON } from 'assets/kafka.svg' import { ReactComponent as FluentdICON } from 'assets/fluentd.svg' +import { ReactComponent as OSICON } from 'assets/opensearch.svg' import ESForm from 'components/Forms/Elasticsearch/Settings' +import OSForm from 'components/Forms/Opensearch/Settings' import KafkaForm from 'components/Forms/KafkaForm/Settings' import FluentdForm from 'components/Forms/Fluentd/Settings' @@ -39,6 +41,15 @@ export default { return t('ES_DESC') }, }, + opensearch: { + ICON: OSICON, + title: 'Opensearch', + pathGetter, + Form: OSForm, + get description() { + return t('OPENSEARCH_DESC') + }, + }, kafka: { ICON: KaFkaICON, title: 'Kafka', diff --git a/src/utils/object.mapper.js b/src/utils/object.mapper.js index 4a560951f27..6033b8e283f 100644 --- a/src/utils/object.mapper.js +++ b/src/utils/object.mapper.js @@ -967,7 +967,7 @@ const findCodeDetail = (messures, key, path, defaultValue) => { const LogOutPutMapper = item => { const { metadata, spec } = item - const rules = pick(spec, ['es', 'kafka', 'forward']) + const rules = pick(spec, ['es', 'kafka', 'forward', 'opensearch']) const type = get(Object.keys(rules), '[0]', '') const address = type === 'kafka' From 68ac5b2732a8547510f0aabb5eeb2b5a5c8efc9e Mon Sep 17 00:00:00 2001 From: fcl <63338728+fuchunlan@users.noreply.github.com> Date: Mon, 4 Sep 2023 18:16:55 +0800 Subject: [PATCH 06/42] feat: Cherry pick LADP (#4187) * feat: LDAP login page optimization (#841) Signed-off-by: miaqiang Co-authored-by: miaqiang feat: Cherry pick LADP Signed-off-by: lannyfu * style: Cherry pick login page style Signed-off-by: lannyfu * fix: Delete replace paltform logo commit Signed-off-by: lannyfu --------- Signed-off-by: miaqiang Signed-off-by: lannyfu Co-authored-by: miaqiang <758477879@qq.com> Co-authored-by: miaqiang --- locales/en/l10n-logIn.js | 2 + locales/zh/l10n-logIn.js | 2 + server/controllers/session.js | 106 ++++++++++++++++++ server/routes.js | 2 + server/services/session.js | 19 +++- src/core/containers/Login/index.jsx | 124 +++++++++++++++------ src/core/containers/Login/index.scss | 155 ++++++++++++++------------- src/stores/root.js | 5 + 8 files changed, 309 insertions(+), 106 deletions(-) diff --git a/locales/en/l10n-logIn.js b/locales/en/l10n-logIn.js index 88edc7686f3..dbe4bb18349 100644 --- a/locales/en/l10n-logIn.js +++ b/locales/en/l10n-logIn.js @@ -22,6 +22,8 @@ module.exports = { INPUT_USERNAME_OR_EMAIL_TIP: 'Please enter your username or email.', LOG_IN: 'Log In', LOG_IN_WITH_TITLE: 'Log in with {title}', + TITLE_USERNAME: '{title} Username', + TITLE_LOG_IN: '{title} Log In', LOG_OUT: 'Log Out', ABOUT: 'About', USERNAME_OR_EMAIL: 'Username or Email', diff --git a/locales/zh/l10n-logIn.js b/locales/zh/l10n-logIn.js index 5809b240f2c..4347ac87f5b 100644 --- a/locales/zh/l10n-logIn.js +++ b/locales/zh/l10n-logIn.js @@ -21,6 +21,8 @@ module.exports = { INPUT_USERNAME_OR_EMAIL_TIP: '请输入用户名或邮箱。', LOG_IN: '登录', LOG_IN_WITH_TITLE: '通过 {title} 登录', + TITLE_USERNAME: '{title} 用户名', + TITLE_LOG_IN: '{title} 登录', LOG_OUT: '登出', ABOUT: '关于', USERNAME_OR_EMAIL: '用户名或邮箱', diff --git a/server/controllers/session.js b/server/controllers/session.js index deaac45e493..76bdd32bcfe 100644 --- a/server/controllers/session.js +++ b/server/controllers/session.js @@ -26,6 +26,7 @@ const { client: clientConfig } = getServerConfig() const { login, + loginThird, oAuthLogin, getNewToken, createUser, @@ -147,6 +148,110 @@ const handleLogin = async ctx => { ctx.redirect(isValidReferer(referer) ? referer : '/') } +const handleThirdLogin = async ctx => { + const params = ctx.request.body + + let referer = ctx.cookies.get('referer') + referer = referer ? decodeURIComponent(referer) : '' + + const error = {} + let user = null + + if (!params.username || !params.password) { + Object.assign(error, { + status: 400, + reason: 'Invalid Login Params', + message: 'invalid login params', + }) + } + + if (isEmpty(error)) { + try { + user = await loginThird(params, { 'x-client-ip': ctx.request.ip }) + + if (!user) { + Object.assign(error, { + status: 401, + reason: 'Unauthorized', + message: 'INCORRECT_USERNAME_OR_PASSWORD', + }) + } + } catch (err) { + ctx.app.emit('error', err) + + switch (err.code) { + case 400: + case 401: + Object.assign(error, { + status: err.code, + reason: 'Unauthorized', + message: 'INCORRECT_USERNAME_OR_PASSWORD', + }) + break + case 429: + Object.assign(error, { + status: err.code, + reason: 'Too Many Failures', + message: 'TOO_MANY_FAILURES', + }) + break + case 502: + Object.assign(error, { + status: err.code, + reason: 'Bad Gateway', + message: 'FAILED_TO_ACCESS_BACKEND', + }) + break + case 'ETIMEDOUT': + Object.assign(error, { + status: 500, + reason: 'Internal Server Error', + message: 'FAILED_TO_ACCESS_API_SERVER', + }) + break + default: + Object.assign(error, { + status: 500, + reason: err.statusText, + message: err.message, + }) + } + } + } + + if (!isEmpty(error) || !user) { + ctx.body = error + return + } + + const lastToken = ctx.cookies.get('token') + + ctx.cookies.set('token', user.token) + ctx.cookies.set('expire', user.expire) + ctx.cookies.set('refreshToken', user.refreshToken) + ctx.cookies.set('referer', null) + + if (user.username === 'system:pre-registration') { + const extraname = safeBase64.safeBtoa(user.extraname) + ctx.cookies.set('defaultUser', extraname) + ctx.cookies.set('defaultEmail', user.email) + return ctx.redirect('/login/confirm') + } + + if (!user.initialized) { + return ctx.redirect('/password/confirm') + } + + if (lastToken) { + const { username } = jwtDecode(lastToken) + if (username && username !== user.username) { + return ctx.redirect('/') + } + } + + ctx.redirect(isValidReferer(referer) ? referer : '/') +} + const handleLogout = async ctx => { const oAuthLoginInfo = safeParseJSON( decodeURIComponent(ctx.cookies.get('oAuthLoginInfo')) @@ -269,6 +374,7 @@ const handleLoginConfirm = async ctx => { module.exports = { handleLogin, + handleThirdLogin, handleLogout, handleOAuthLogin, handleLoginConfirm, diff --git a/server/routes.js b/server/routes.js index 7f4c8831f81..f5b26ee994e 100644 --- a/server/routes.js +++ b/server/routes.js @@ -38,6 +38,7 @@ const { const { handleLogin, + handleThirdLogin, handleLogout, handleOAuthLogin, handleLoginConfirm, @@ -75,6 +76,7 @@ router // session .post('/login', parseBody, handleLogin) + .post('/oauth/login/:title', parseBody, handleThirdLogin) .get('/login', renderLogin) .post('/login/confirm', parseBody, handleLoginConfirm) .get('/login/confirm', renderLoginConfirm) diff --git a/server/services/session.js b/server/services/session.js index 71df2264138..522b791516c 100644 --- a/server/services/session.js +++ b/server/services/session.js @@ -82,6 +82,19 @@ const login = async (data, headers) => { return handleLoginResp(resp) } +const loginThird = async ({ title, ...params }) => { + const resp = await send_gateway_request({ + method: 'POST', + url: `/oauth/login/${title}`, + headers: { + 'content-type': 'application/x-www-form-urlencoded', + }, + params, + }) + + return handleLoginResp(resp) +} + const getNewToken = async ctx => { const refreshToken = ctx.cookies.get('refreshToken') let newToken = {} @@ -412,7 +425,8 @@ const getOAuthInfo = async () => { if (item && item.provider) { let url let params = {} - let type + const title = item.name + let type = item.type let endSessionURL const authURL = get(item, 'provider.endpoint.authURL') @@ -449,8 +463,8 @@ const getOAuthInfo = async () => { `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}` ) .join('&')}` - servers.push({ title: item.name, url, type, endSessionURL }) } + servers.push({ title, type, url, endSessionURL }) } }) } @@ -478,6 +492,7 @@ const createUser = (params, token) => { module.exports = { login, + loginThird, oAuthLogin, getCurrentUser, getOAuthInfo, diff --git a/src/core/containers/Login/index.jsx b/src/core/containers/Login/index.jsx index 5103cb16a71..c174443985c 100644 --- a/src/core/containers/Login/index.jsx +++ b/src/core/containers/Login/index.jsx @@ -60,6 +60,8 @@ export default class Login extends Component { formData: {}, isSubmmiting: false, errorCount: 0, + showKS: true, + currentServer: {}, } handleOAuthLogin = server => e => { @@ -69,54 +71,101 @@ export default class Login extends Component { endSessionURL: server.endSessionURL, } cookie('oAuthLoginInfo', JSON.stringify(info)) - window.location.href = e.currentTarget.dataset.url + if (server.type === 'LDAPIdentityProvider') { + this.setState({ + showKS: false, + currentServer: server, + }) + } else { + window.location.href = e.currentTarget.dataset.url + } } handleSubmit = data => { const { username, password, ...rest } = data + const { showKS, currentServer } = this.state this.setState({ isSubmmiting: true }) cookie('oAuthLoginInfo', '') const encryptKey = get(globals, 'config.encryptKey', 'kubesphere') - this.props.rootStore - .login({ - username, - encrypt: encrypt(encryptKey, password), - ...rest, - }) - .then(resp => { - this.setState({ isSubmmiting: false }) - if (resp.status !== 200) { - this.setState({ - errorMessage: resp.message, - errorCount: resp.errorCount, - }) - } - }) + if (!showKS) { + this.props.rootStore + .loginIdentityProviders({ + username, + password, + title: currentServer.title, + }) + .then(resp => { + this.setState({ isSubmmiting: false }) + if (resp.status !== 200) { + this.setState({ + errorMessage: resp.message, + errorCount: resp.errorCount, + }) + } + }) + } else { + this.props.rootStore + .login({ + username, + encrypt: encrypt(encryptKey, password), + ...rest, + }) + .then(resp => { + this.setState({ isSubmmiting: false }) + if (resp.status !== 200) { + this.setState({ + errorMessage: resp.message, + errorCount: resp.errorCount, + }) + } + }) + } + } + + handleBack = () => { + this.setState({ + showKS: true, + currentServer: {}, + errorMessage: '', + errorCount: 0, + }) } render() { - const { formData, isSubmmiting, errorMessage } = this.state + const { + formData, + isSubmmiting, + errorMessage, + showKS, + currentServer, + } = this.state + return ( -
+
-
{t('WELCOME')}
+
+ {showKS + ? t('WELCOME') + : t('TITLE_USERNAME', { title: currentServer.title })} +
- {get(globals, 'oauthServers', []).map(server => ( -
- {t('LOG_IN_WITH_TITLE', { title: server.title })} -
- ))} + {showKS && + get(globals, 'oauthServers', []).map(server => ( +
+ {t('LOG_IN_WITH_TITLE', { title: server.title })} +
+ ))} {errorMessage && ( - +
+ {!showKS && ( +

+ {t('BACK')} +

+ )}
diff --git a/src/core/containers/Login/index.scss b/src/core/containers/Login/index.scss index 4123b913e5a..864a29b04da 100644 --- a/src/core/containers/Login/index.scss +++ b/src/core/containers/Login/index.scss @@ -1,92 +1,101 @@ @import '~scss/variables'; @import '~scss/mixins'; -.logo { - position: absolute; - top: 80px; - left: 50%; - transform: translateX(-50%); -} - -.logo img { - width: 180px; - height: 40px; -} +.loginContainer { + width: 320px; -.login { position: relative; - width: 320px; - margin: 140px auto 40px; - padding: 20px; - background-color: #fff; - border-radius: 4px; - box-shadow: $base-shadow; - box-sizing: border-box; + top: 76px; + margin: 0 auto; - :global { - .form-item-label { - @include TypographySymbolText; - } + .logo { + margin-bottom: 10px; + display: block; + text-align: center; - input.input { - height: 36px; + img { + width: 185px; + height: 48px; } } -} -.header { - position: relative; - font-weight: 600; - font-size: 12px; - color: $text-color; - line-height: 20px; - text-align: center; -} + .login { + position: relative; + width: 320px; + padding: 20px; + background-color: #fff; + border-radius: 4px; + box-shadow: $base-shadow; + box-sizing: border-box; -.divider { - width: 100%; - height: 0; - margin-top: 12px; - margin-bottom: 20px; - opacity: 0.6; - border-bottom: 1px solid; - border-image-source: radial-gradient(circle at 50% 0, #abb4be, #ffffff 100%); - border-image-slice: 1; -} + :global { + .form-item-label { + @include TypographySymbolText; + } -.footer { - margin-top: 24px; - button[type='submit'] { - width: 100%; - } -} + input.input { + height: 36px; + } + } + .header { + position: relative; + font-weight: 600; + font-size: 12px; + color: $text-color; + line-height: 20px; + text-align: center; + } -.oauth { - padding: 6px; - border-radius: 2px; - background-color: #eff4f9; - color: #36435c; - font-size: 12px; - font-weight: 500; - line-height: 20px; - text-decoration: none; - text-align: center; - cursor: pointer; - transition: all 0.3s ease-in-out; + .divider { + width: 100%; + height: 0; + margin-top: 12px; + margin-bottom: 20px; + opacity: 0.6; + border-bottom: 1px solid; + border-image-source: radial-gradient( + circle at 50% 0, + #abb4be, + #ffffff 100% + ); + border-image-slice: 1; + } - &:hover { - background-color: #d8dee5; - } + .footer { + margin-top: 24px; + button[type='submit'] { + width: 100%; + } + } - &:active { - background-color: #d1d7df; - } + .oauth { + padding: 6px; + border-radius: 2px; + background-color: #eff4f9; + color: #36435c; + font-size: 12px; + font-weight: 500; + line-height: 20px; + text-decoration: none; + text-align: center; + cursor: pointer; + transition: all 0.3s ease-in-out; - & + .oauth { - margin-top: 8px; - } + &:hover { + background-color: #d8dee5; + } + + &:active { + background-color: #d1d7df; + } - & + form { - padding-top: 20px; + & + .oauth { + margin-top: 8px; + } + + & + form { + padding-top: 20px; + } + } } } diff --git a/src/stores/root.js b/src/stores/root.js index 07675b1a75c..bce6c07f7d9 100644 --- a/src/stores/root.js +++ b/src/stores/root.js @@ -85,6 +85,11 @@ export default class RootStore { return request.post('login', params) } + loginIdentityProviders(params) { + const url = `/oauth/login/${params.title}` + return request.post(url, { ...params }) + } + @action async logout() { const res = await request.post('logout') From 3324c1c587cdcae6a4dde7ed1d73e40947054b9b Mon Sep 17 00:00:00 2001 From: Harris Date: Mon, 4 Sep 2023 18:26:54 +0800 Subject: [PATCH 07/42] fix: Fix error in applications template page (#5873) (#4188) Signed-off-by: Harris --- src/stores/openpitrix/base.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stores/openpitrix/base.js b/src/stores/openpitrix/base.js index 821ff691394..a347b1ae681 100644 --- a/src/stores/openpitrix/base.js +++ b/src/stores/openpitrix/base.js @@ -83,8 +83,9 @@ export default class Base { } if (app_id) { - const suffix = this.resourceName === 'apps' ? '' : this.resourceName - return `${prefix}/apps/${app_id}/${name || suffix}` + const suffix1 = this.resourceName === 'apps' ? '' : this.resourceName + const suffix2 = `${name || suffix1}` === '' ? '' : `/${name || suffix1}` + return `${prefix}/apps/${app_id}${suffix2}` } return `${prefix}/${name || this.resourceName}` From 8fb5136dca8af794403f095babed4491fd617350 Mon Sep 17 00:00:00 2001 From: Liu Xin Date: Mon, 4 Sep 2023 18:59:54 +0800 Subject: [PATCH 08/42] fix: Update k8s api version (#4190) Signed-off-by: harrisonliu5 --- src/utils/constants.js | 4 ++-- src/utils/form.templates.js | 4 ++-- src/utils/workload.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/constants.js b/src/utils/constants.js index 1235e019b47..2d6c2ef66ef 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -961,7 +961,7 @@ export const API_VERSIONS = { statefulsets: 'apis/apps/v1', daemonsets: 'apis/apps/v1', jobs: 'apis/batch/v1', - cronjobs: 'apis/batch/v1beta1', + cronjobs: 'apis/batch/v1', pods: 'api/v1', namespaces: 'api/v1', services: 'api/v1', @@ -984,7 +984,7 @@ export const API_VERSIONS = { applications: 'apis/app.k8s.io/v1beta1', strategies: 'apis/servicemesh.kubesphere.io/v1alpha2', servicepolicies: 'apis/servicemesh.kubesphere.io/v1alpha2', - horizontalpodautoscalers: 'apis/autoscaling/v2beta2', + horizontalpodautoscalers: 'apis/autoscaling/v2', customresourcedefinitions: 'apis/apiextensions.k8s.io/v1', clusters: 'apis/cluster.kubesphere.io/v1alpha1', workspaces: 'apis/tenant.kubesphere.io/v1alpha2', diff --git a/src/utils/form.templates.js b/src/utils/form.templates.js index 745f99c96af..21600132982 100644 --- a/src/utils/form.templates.js +++ b/src/utils/form.templates.js @@ -184,7 +184,7 @@ const getJobTemplate = ({ namespace }) => ({ }) const getCronJobTemplate = ({ namespace }) => ({ - apiVersion: 'batch/v1beta1', + apiVersion: 'batch/v1', kind: 'CronJob', metadata: { namespace, @@ -287,7 +287,7 @@ const getSecretTemplate = ({ namespace }) => ({ }) const getHorizontalPodAutoscalerTemplate = ({ name, namespace, target }) => ({ - apiVersion: 'autoscaling/v2beta2', + apiVersion: 'autoscaling/v2', kind: 'HorizontalPodAutoscaler', metadata: { name, diff --git a/src/utils/workload.js b/src/utils/workload.js index 6d65f5fec45..cd6b2c00b98 100644 --- a/src/utils/workload.js +++ b/src/utils/workload.js @@ -73,7 +73,7 @@ export const getHpaFormattedData = (formData = {}) => { : [] const data = merge(formData, { - apiVersion: 'autoscaling/v2beta2', + apiVersion: 'autoscaling/v2', kind: 'HorizontalPodAutoscaler', metadata: { annotations: { From cd0fc5bbbcc828d221e6095cd11b2103053d5a61 Mon Sep 17 00:00:00 2001 From: Jona Apelbaum Date: Mon, 11 Sep 2023 11:52:11 +0200 Subject: [PATCH 09/42] Fix Api Documentation Link (#4192) * Fix Api Documentation Signed-off-by: Jona * Add DCO Signed-off-by: Jona * Add DCO Signed-off-by: Jona --------- Signed-off-by: Jona --- locales/ar/l10n-help.js | 2 +- locales/en/l10n-help.js | 2 +- locales/es/l10n-help.js | 2 +- locales/fr/l10n-help.js | 2 +- locales/hi/l10n-help.js | 2 +- locales/lt/l10n-help.js | 2 +- locales/pl/l10n-help.js | 2 +- locales/pt/l10n-help.js | 2 +- locales/tc/l10n-help.js | 2 +- locales/tr/l10n-help.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/locales/ar/l10n-help.js b/locales/ar/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/ar/l10n-help.js +++ b/locales/ar/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/en/l10n-help.js b/locales/en/l10n-help.js index 3fe2826fd18..37c507aac20 100644 --- a/locales/en/l10n-help.js +++ b/locales/en/l10n-help.js @@ -19,5 +19,5 @@ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement', + API_DOCUMENT: 'API Documentation', } diff --git a/locales/es/l10n-help.js b/locales/es/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/es/l10n-help.js +++ b/locales/es/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/fr/l10n-help.js b/locales/fr/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/fr/l10n-help.js +++ b/locales/fr/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/hi/l10n-help.js b/locales/hi/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/hi/l10n-help.js +++ b/locales/hi/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/lt/l10n-help.js b/locales/lt/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/lt/l10n-help.js +++ b/locales/lt/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/pl/l10n-help.js b/locales/pl/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/pl/l10n-help.js +++ b/locales/pl/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/pt/l10n-help.js b/locales/pt/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/pt/l10n-help.js +++ b/locales/pt/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/tc/l10n-help.js b/locales/tc/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/tc/l10n-help.js +++ b/locales/tc/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file diff --git a/locales/tr/l10n-help.js b/locales/tr/l10n-help.js index 429cb3ff245..61183fa8f44 100644 --- a/locales/tr/l10n-help.js +++ b/locales/tr/l10n-help.js @@ -18,5 +18,5 @@ */ module.exports = { USER_GUIDE: 'User Guide', - API_DOCUMENT: 'API Docuement' + API_DOCUMENT: 'API Documentation' }; \ No newline at end of file From bcfec101026e8e178bb9ca3068473a2062a980f6 Mon Sep 17 00:00:00 2001 From: Liu Xin Date: Thu, 21 Sep 2023 15:34:26 +0800 Subject: [PATCH 10/42] doc: fix the poc description (#4195) Signed-off-by: harrisonliu5 --- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 3 ++- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- ...-multiclusterProjects-persistentVolumeClaims-details.js | 7 ++++--- 8 files changed, 30 insertions(+), 22 deletions(-) diff --git a/locales/ar/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/ar/l10n-multiclusterProjects-persistentVolumeClaims-details.js index f7f55f86d31..d388c8ec373 100644 --- a/locales/ar/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/ar/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Mount Information' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Mount Information', +} diff --git a/locales/en/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/en/l10n-multiclusterProjects-persistentVolumeClaims-details.js index 772b00efa72..e5287df7258 100644 --- a/locales/en/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/en/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -24,7 +24,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information MOUNT_INFORMATION: 'Mount Information', // Metadata diff --git a/locales/es/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/es/l10n-multiclusterProjects-persistentVolumeClaims-details.js index 93940acc634..33c91bd467a 100644 --- a/locales/es/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/es/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'KubeSphere collects volume usage data, excluding data from unmounted volumes. For path-based volumes such as OpenEBS/Local PV and NFS, the data collected may be different from the actual amount. For detailed information, see volume monitoring data analysis.', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Información de montaje' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Información de montaje', +} diff --git a/locales/fr/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/fr/l10n-multiclusterProjects-persistentVolumeClaims-details.js index f7f55f86d31..d388c8ec373 100644 --- a/locales/fr/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/fr/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Mount Information' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Mount Information', +} diff --git a/locales/hi/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/hi/l10n-multiclusterProjects-persistentVolumeClaims-details.js index f7f55f86d31..d388c8ec373 100644 --- a/locales/hi/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/hi/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Mount Information' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Mount Information', +} diff --git a/locales/pl/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/pl/l10n-multiclusterProjects-persistentVolumeClaims-details.js index f7f55f86d31..d388c8ec373 100644 --- a/locales/pl/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/pl/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Mount Information' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Mount Information', +} diff --git a/locales/pt/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/pt/l10n-multiclusterProjects-persistentVolumeClaims-details.js index f7f55f86d31..d388c8ec373 100644 --- a/locales/pt/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/pt/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: 'Currently, only usage data of mounted volumes can be collected. Usage data of path-based volumes such as OpenEBS, Local PV, and NFS volumes may be inaccurate. Learn More', + VOLUME_MONITORING_TIP: + 'The storage system needs to have real volume quota control capabilities to output real and accurate data. Storage systems built based on host path, local pv, and open source nfs server usually do not have this capability. Daha Fazla Bilgi Edinin', // Mount Information - MOUNT_INFORMATION: 'Mount Information' -}; \ No newline at end of file + MOUNT_INFORMATION: 'Mount Information', +} diff --git a/locales/zh/l10n-multiclusterProjects-persistentVolumeClaims-details.js b/locales/zh/l10n-multiclusterProjects-persistentVolumeClaims-details.js index 1940ebab3c0..a3f04a45c36 100644 --- a/locales/zh/l10n-multiclusterProjects-persistentVolumeClaims-details.js +++ b/locales/zh/l10n-multiclusterProjects-persistentVolumeClaims-details.js @@ -23,7 +23,8 @@ module.exports = { // More > Edit YAML // More > Delete // Resource Status - VOLUME_MONITORING_TIP: '目前仅支持采集已挂载卷的用量数据,并且 OpenEBS、Local PV、NFS 等路径型卷的用量数据通常与实际值有一定出入。了解更多', + VOLUME_MONITORING_TIP: + '存储系统需要具备真实的 volume quota 控制能力才可以输出真实准确的数据,基于 host path, local pv, 开源 nfs server 构建的存储系统通常不具备该能力。了解更多', // Mount Information - MOUNT_INFORMATION: '挂载信息' -}; \ No newline at end of file + MOUNT_INFORMATION: '挂载信息', +} From 6122855bf0ef50c9a9792ac66746477702a0c561 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Thu, 21 Sep 2023 15:44:26 +0800 Subject: [PATCH 11/42] style: fix incorrect style for IsolateInfo and RuleInfo of Network Policy panel (#4180) Signed-off-by: Neko Ayaka --- .../Network/Policies/IsolateInfo/index.scss | 7 ++++++- .../Network/Policies/RuleInfo/index.scss | 21 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/pages/projects/containers/Network/Policies/IsolateInfo/index.scss b/src/pages/projects/containers/Network/Policies/IsolateInfo/index.scss index f6b152dc21d..2764f429a93 100644 --- a/src/pages/projects/containers/Network/Policies/IsolateInfo/index.scss +++ b/src/pages/projects/containers/Network/Policies/IsolateInfo/index.scss @@ -1,23 +1,28 @@ @import '~scss/variables'; + .wrapper { display: flex; align-items: center; margin-bottom: 12px; + padding: 0px 12px; } + .left { flex: 1; display: flex; - padding: 0px 12px; + :global { .icon { margin-left: 8px; } } } + .isolate { margin-left: 15px; color: $dark-color01; } + .isolatetitle { font-weight: 600; color: $dark-color07; diff --git a/src/pages/projects/containers/Network/Policies/RuleInfo/index.scss b/src/pages/projects/containers/Network/Policies/RuleInfo/index.scss index 300c3d9fe0e..b52a3d055ea 100644 --- a/src/pages/projects/containers/Network/Policies/RuleInfo/index.scss +++ b/src/pages/projects/containers/Network/Policies/RuleInfo/index.scss @@ -1,18 +1,22 @@ @import '~scss/variables'; + .wrapper { box-shadow: 0 -1px 0 0 $light-color04; } + .tabs { display: flex; - padding-left: 20px; background-color: $light-color02; } + .tab { display: flex; align-items: center; padding: 12px; cursor: pointer; + flex: 1; } + .on { background-color: #fff; } @@ -21,6 +25,7 @@ margin-left: 12px; color: $dark-color01; } + .dictitle { color: $dark-color07; font-weight: 600; @@ -36,9 +41,11 @@ padding: 0 12px; background-color: $light-color01; } + .rulebody { padding: 20px; } + .rulegroup { &:first-child { margin-bottom: 12px; @@ -50,10 +57,12 @@ line-height: 1.67; font-weight: 600; } + .disp { color: $dark-color01; line-height: 1.67; } + .row { display: flex; background-color: $light-color02; @@ -62,24 +71,30 @@ margin-top: 8px; justify-content: space-between; align-items: center; + & > :last-child { flex: none; margin: 0 20px; cursor: pointer; } } + .prow { display: flex; flex-wrap: wrap; align-items: center; } + .cell { margin: 12px 20px; + & > :first-child { margin-right: 8px; } + b { margin-right: 8px; + span { padding: 0 2px; } @@ -91,17 +106,21 @@ } } } + .pcell { margin: 12px 20px 12px 40px; + & > :first-child { margin-right: 8px; } + :global { label { color: $dark-color01; } } } + .port { margin: 12px 12px 12px 10px; } From 46eecf63731034ff7b3e60a407d45fa795198eff Mon Sep 17 00:00:00 2001 From: yuyu Date: Wed, 18 Oct 2023 10:14:15 +0800 Subject: [PATCH 12/42] fix:Updating crd resource on ks-console page loses status information (#3866) Signed-off-by: yaozhenxiu <946666800@qq.com> --- src/stores/crd.resource.js | 2 +- src/utils/object.mapper.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/stores/crd.resource.js b/src/stores/crd.resource.js index 74ed0c7a9e7..ae0ae0ea5c3 100644 --- a/src/stores/crd.resource.js +++ b/src/stores/crd.resource.js @@ -38,7 +38,7 @@ export default class CRDResourceStore { } get mapper() { - return ObjectMapper.default + return ObjectMapper.customresourcedefinitionsedit } getPath({ cluster, namespace } = {}) { diff --git a/src/utils/object.mapper.js b/src/utils/object.mapper.js index 6033b8e283f..31914c54c0b 100644 --- a/src/utils/object.mapper.js +++ b/src/utils/object.mapper.js @@ -96,6 +96,23 @@ const DefaultMapper = item => ({ _originData: getOriginData(item), }) +const CRDEditMapper = item => { + return { + ...getBaseInfo(item), + namespace: get(item, 'metadata.namespace'), + spec: get(item, 'spec'), + _originData: omit(item, [ + 'metadata.uid', + 'metadata.selfLink', + 'metadata.generation', + 'metadata.ownerReferences', + 'metadata.resourceVersion', + 'metadata.creationTimestamp', + 'metadata.managedFields', + ]), + } +} + const WorkspaceMapper = item => { const overrides = get(item, 'spec.overrides', []) const template = get(item, 'spec.template', {}) @@ -1504,6 +1521,7 @@ export default { dashboards: DashboardMapper, clusterdashboards: DashboardMapper, customresourcedefinitions: CRDMapper, + customresourcedefinitionsedit: CRDEditMapper, pipelines: PipelinesMapper, networkpolicies: NetworkPoliciesMapper, namespacenetworkpolicies: NetworkPoliciesMapper, From 694bb99100c62018545719edda9f3162fd41eaaf Mon Sep 17 00:00:00 2001 From: SongJXin Date: Wed, 18 Oct 2023 10:25:17 +0800 Subject: [PATCH 13/42] fix: Appdeploy schemaform support select (#3415) appdeploy schemaform support select Co-authored-by: Liu Xin --- .../Forms/AppDeploy/AppConfig/SchemaForm/index.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Forms/AppDeploy/AppConfig/SchemaForm/index.jsx b/src/components/Forms/AppDeploy/AppConfig/SchemaForm/index.jsx index d157af551d9..ffa8e7e54a1 100644 --- a/src/components/Forms/AppDeploy/AppConfig/SchemaForm/index.jsx +++ b/src/components/Forms/AppDeploy/AppConfig/SchemaForm/index.jsx @@ -19,7 +19,7 @@ import React from 'react' import PropTypes from 'prop-types' import { map, get, set, every, has, debounce, isEmpty, isNaN } from 'lodash' -import { Form, Input, Slider, TextArea, Toggle } from '@kube-design/components' +import { Form, Input, Slider, TextArea, Toggle, Select } from '@kube-design/components' import { Text } from 'components/Base' import { NumberInput } from 'components/Inputs' @@ -89,6 +89,13 @@ export default class SchemaForm extends React.Component { ) } else if (propObj.render === 'textArea') { content =