From dc105633d34491a25af82978b845edd97e50e472 Mon Sep 17 00:00:00 2001 From: yeka Date: Mon, 18 Dec 2023 14:37:35 +0800 Subject: [PATCH 1/2] feat(applicationInstance): one-click finops optimization Signed-off-by: yeka --- .../instances/Pods/components/ButtonBar.tsx | 15 +++++++++++++-- .../instances/Pods/components/ButtonBarV2.tsx | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/pages/instances/Pods/components/ButtonBar.tsx b/src/pages/instances/Pods/components/ButtonBar.tsx index 3e57c56c..6b8171e2 100644 --- a/src/pages/instances/Pods/components/ButtonBar.tsx +++ b/src/pages/instances/Pods/components/ButtonBar.tsx @@ -13,6 +13,7 @@ import { isRestrictedStatus } from '@/components/State'; import { ClusterStatus, PublishType } from '@/const'; import { createPipelineRun, deleteCluster, freeCluster } from '@/services/clusters/clusters'; import { DangerText, WarningText } from '@/components/Widget'; +import { MicroApp } from '@/components/Widget'; interface ButtonBarProps { clusterStatus: CLUSTER.ClusterStatusV2, @@ -22,10 +23,12 @@ interface ButtonBarProps { function ButtonBar(props: ButtonBarProps) { const { clusterStatus, cluster, manualPaused } = props; - const { id, fullPath } = cluster; + const { + id, fullPath, name, template, + } = cluster; const { status } = clusterStatus; const intl = useIntl(); - const { successAlert } = useModel('alert'); + const { successAlert, errorAlert } = useModel('alert'); const [enableRebuilddeployModal, setEnableRebuilddeployModal] = useState(false); const { run: runRestart } = useRequest(() => createPipelineRun(id!, { action: 'restart' }), { @@ -147,6 +150,14 @@ function ButtonBar(props: ButtonBarProps) { return (
+