diff --git a/src/panels/KaitoPanel.ts b/src/panels/KaitoPanel.ts index 43d5214f7..f57e598ec 100644 --- a/src/panels/KaitoPanel.ts +++ b/src/panels/KaitoPanel.ts @@ -224,7 +224,7 @@ export class KaitoPanelDataProvider implements PanelDataProvider<"kaito"> { }; try { - const poller = await longRunning(`Configuring the KAITO for ${this.clusterName} cluster.`, () => { + const poller = await longRunning("", () => { return this.containerServiceClient.managedClusters.beginCreateOrUpdate( this.resourceGroupName, this.clusterName, diff --git a/webview-ui/src/Kaito/Kaito.tsx b/webview-ui/src/Kaito/Kaito.tsx index 7f326f74e..622aa67fa 100644 --- a/webview-ui/src/Kaito/Kaito.tsx +++ b/webview-ui/src/Kaito/Kaito.tsx @@ -3,11 +3,18 @@ import { InitialState, ProgressEventType } from "../../../src/webview-contract/w import { useStateManagement } from "../utilities/state"; import styles from "./Kaito.module.css"; import kaitoimage from "./kaitoimage.png"; +import { useState } from "react"; // import { KaitoModels } from "./KaitoModels"; import { stateUpdater, vscode } from "./state"; export function Kaito(initialState: InitialState) { const { state } = useStateManagement(stateUpdater, initialState, vscode); + const [isDisabled, setIsDisabled] = useState(false); + + const handleClick = () => { + onClickKaitoInstall(); + setIsDisabled(true); // Disable the button after click + }; function onClickKaitoInstall() { vscode.postInstallKaitoRequest(); @@ -51,7 +58,9 @@ export function Kaito(initialState: InitialState) {
{state.kaitoInstallStatus === ProgressEventType.NotStarted && ( - Install + + Install + )} {state.kaitoInstallStatus === ProgressEventType.InProgress && state.operationDescription.includes("Installing Kaito") && (