diff --git a/webview-ui/src/AttachAcrToCluster/AttachAcrToCluster.tsx b/webview-ui/src/AttachAcrToCluster/AttachAcrToCluster.tsx index 759c05e8b..3c446f9b9 100644 --- a/webview-ui/src/AttachAcrToCluster/AttachAcrToCluster.tsx +++ b/webview-ui/src/AttachAcrToCluster/AttachAcrToCluster.tsx @@ -18,7 +18,6 @@ import { import { AttachAcrToClusterState, stateUpdater, vscode } from "./state/state"; import { distinct } from "../utilities/array"; import { ResourceSelector } from "../components/ResourceSelector"; -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"; import { faLink, faLinkSlash } from "@fortawesome/free-solid-svg-icons"; import { AcrRoleState } from "./state/stateTypes"; import { InlineAction, InlineActionProps, makeFixAction, makeInlineActionProps } from "../components/InlineAction"; @@ -96,16 +95,16 @@ export function AttachAcrToCluster(initialState: InitialState) {

Select a cluster and Azure Container Registry (ACR) to attach. For more information on attaching an ACR to a cluster, see{" "} - + Configure ACR integration for an existing AKS cluster - + .

This operation assigns the{" "} - + AcrPull - {" "} + {" "} role to the Microsoft Entra ID managed identity associated with your AKS cluster.

diff --git a/webview-ui/src/AutomatedDeployments/AutomatedDeployments.tsx b/webview-ui/src/AutomatedDeployments/AutomatedDeployments.tsx index c03d69ceb..269a1667c 100644 --- a/webview-ui/src/AutomatedDeployments/AutomatedDeployments.tsx +++ b/webview-ui/src/AutomatedDeployments/AutomatedDeployments.tsx @@ -1,6 +1,5 @@ //import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { InitialState } from "../../../src/webview-contract/webviewDefinitions/automatedDeployments"; -//import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; //import { faFolder } from "@fortawesome/free-regular-svg-icons"; import { @@ -26,16 +25,6 @@ import { valid, } from "../utilities/validation"; import { ResourceSelector } from "../components/ResourceSelector"; -import { - VSCodeButton, - //VSCodeButton, - //VSCodeLink, - //VSCodeRadio, - //VSCodeRadioGroup, - VSCodeTextField, - //VSCodeDropdown, - //VSCodeOption, -} from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { @@ -152,7 +141,8 @@ export function AutomatedDeployments(initialState: InitialState) { Workflow name * - console.log("Selected Resource Group:", g)} /> - eventHandlers.onSetIsNewResourceGroupDialogShown(true)} > Create New Resource Group - + {state.isNewResourceGroupDialogShown && (
- +
); diff --git a/webview-ui/src/AzureServiceOperator/AzureServiceOperator.tsx b/webview-ui/src/AzureServiceOperator/AzureServiceOperator.tsx index 347a4791d..621650290 100644 --- a/webview-ui/src/AzureServiceOperator/AzureServiceOperator.tsx +++ b/webview-ui/src/AzureServiceOperator/AzureServiceOperator.tsx @@ -1,4 +1,3 @@ -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"; import styles from "./AzureServiceOperator.module.css"; import { InitialState } from "../../../src/webview-contract/webviewDefinitions/azureServiceOperator"; import { useEffect } from "react"; @@ -64,7 +63,7 @@ export function AzureServiceOperator(initialState: InitialState) {

The Azure Service Operator helps you provision Azure resources and connect your applications to them from within Kubernetes. -  Learn more +  Learn more

diff --git a/webview-ui/src/AzureServiceOperator/Inputs.tsx b/webview-ui/src/AzureServiceOperator/Inputs.tsx index 3a9529e2f..ca80c1dcf 100644 --- a/webview-ui/src/AzureServiceOperator/Inputs.tsx +++ b/webview-ui/src/AzureServiceOperator/Inputs.tsx @@ -1,10 +1,4 @@ -import { - VSCodeButton, - VSCodeDropdown, - VSCodeLink, - VSCodeOption, - VSCodeTextField, -} from "@vscode/webview-ui-toolkit/react"; +import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"; import styles from "./AzureServiceOperator.module.css"; import { ASOState, EventDef, InstallStepStatus } from "./helpers/state"; import { EventHandlers } from "../utilities/state"; @@ -74,15 +68,16 @@ export function Inputs(props: InputsProps) { Provide the App ID and password of a Service Principal with Contributor permissions for your subscription. This allows ASO to create resources in your subscription on your behalf. - +   Learn more - +

- - - +
{canViewSubscriptions && (
@@ -121,9 +115,7 @@ export function Inputs(props: InputsProps) { The supplied service principal has some role assignments on the following subscriptions. Please ensure these are adequate for the Azure resources that ASO will be creating in your selected subscription. - -   Learn more - +   Learn more

)} diff --git a/webview-ui/src/ClusterProperties/AgentPoolDisplay.tsx b/webview-ui/src/ClusterProperties/AgentPoolDisplay.tsx index 5b6c46500..946387c8f 100644 --- a/webview-ui/src/ClusterProperties/AgentPoolDisplay.tsx +++ b/webview-ui/src/ClusterProperties/AgentPoolDisplay.tsx @@ -1,6 +1,5 @@ import styles from "./ClusterProperties.module.css"; import { AgentPoolProfileInfo, ClusterInfo } from "../../../src/webview-contract/webviewDefinitions/clusterProperties"; -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"; import { EventDef, vscode } from "./state"; import { EventHandlers } from "../utilities/state"; @@ -32,13 +31,13 @@ export function AgentPoolDisplay(props: AgentPoolDisplayProps) { {showAbortButton && ( <>   - handleAbortClick(props.profileInfo.name)} - appearance="secondary" + className="secondary-button" > Abort - + )} diff --git a/webview-ui/src/ClusterProperties/ClusterDisplay.tsx b/webview-ui/src/ClusterProperties/ClusterDisplay.tsx index 1e557182d..6ae328b0f 100644 --- a/webview-ui/src/ClusterProperties/ClusterDisplay.tsx +++ b/webview-ui/src/ClusterProperties/ClusterDisplay.tsx @@ -1,4 +1,3 @@ -import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"; import { ClusterInfo } from "../../../src/webview-contract/webviewDefinitions/clusterProperties"; import { EventHandlers } from "../utilities/state"; import styles from "./ClusterProperties.module.css"; @@ -73,25 +72,25 @@ export function ClusterDisplay(props: ClusterDisplayProps) { {showAbortButton && ( <>   - handleAbortClick()} - appearance="secondary" + className="secondary-button" > Abort - + )} {showReconcileButton && ( <>   - handleReconcileClick()} - appearance="secondary" + className="secondary-button" > Reconcile - + )}
@@ -111,31 +110,29 @@ export function ClusterDisplay(props: ClusterDisplayProps) { It is important that you don't repeatedly start/stop your cluster. Repeatedly starting/stopping your cluster may result in errors. Once your cluster is stopped, you should wait 15-30 minutes before starting it up again.   - + Learn more - +
{startStopState === "Started" && ( - Stop Cluster - + )} {startStopState === "Stopped" && ( - Start Cluster - + )} {(startStopState === "Starting" || startStopState === "Stopping") && ( {`Cluster is in ${startStopState} state`} diff --git a/webview-ui/src/ClusterProperties/ClusterDisplayToolTip.tsx b/webview-ui/src/ClusterProperties/ClusterDisplayToolTip.tsx index 8da6ac810..138c0b68d 100644 --- a/webview-ui/src/ClusterProperties/ClusterDisplayToolTip.tsx +++ b/webview-ui/src/ClusterProperties/ClusterDisplayToolTip.tsx @@ -1,4 +1,3 @@ -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"; import { ClusterInfo } from "../../../src/webview-contract/webviewDefinitions/clusterProperties"; import styles from "./ClusterProperties.module.css"; @@ -42,9 +41,9 @@ export function ClusterDisplayToolTip(props: ClusterDisplayToolTipProps) { - + Learn more - + diff --git a/webview-ui/src/CreateCluster/CreateCluster.tsx b/webview-ui/src/CreateCluster/CreateCluster.tsx index 0c2fa4d26..539611294 100644 --- a/webview-ui/src/CreateCluster/CreateCluster.tsx +++ b/webview-ui/src/CreateCluster/CreateCluster.tsx @@ -3,7 +3,7 @@ import { CreateClusterInput } from "./CreateClusterInput"; import { Success } from "./Success"; import { InitialState } from "../../../src/webview-contract/webviewDefinitions/createCluster"; import { Stage, stateUpdater, vscode } from "./helpers/state"; -import { VSCodeLink, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; import { useStateManagement } from "../utilities/state"; export function CreateCluster(initialState: InitialState) { @@ -45,8 +45,8 @@ export function CreateCluster(initialState: InitialState) { {state.deploymentPortalUrl && (

- Click here to view the - deployment in the Azure Portal. + Click here to view the deployment in the Azure + Portal.

)} diff --git a/webview-ui/src/CreateCluster/CreateClusterInput.tsx b/webview-ui/src/CreateCluster/CreateClusterInput.tsx index f5d232e10..7fee7a644 100644 --- a/webview-ui/src/CreateCluster/CreateClusterInput.tsx +++ b/webview-ui/src/CreateCluster/CreateClusterInput.tsx @@ -1,6 +1,6 @@ import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { VSCodeButton, VSCodeDropdown, VSCodeOption, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"; import { FormEvent, useState } from "react"; import { MessageSink } from "../../../src/webview-contract/messaging"; import { @@ -164,9 +164,9 @@ export function CreateClusterInput(props: CreateClusterInputProps) { )} - setIsNewResourceGroupDialogShown(true)}> + {hasMessage(existingResourceGroup) && ( @@ -177,7 +177,8 @@ export function CreateClusterInput(props: CreateClusterInputProps) { -
- Create +
diff --git a/webview-ui/src/CreateCluster/CreateResourceGroup.tsx b/webview-ui/src/CreateCluster/CreateResourceGroup.tsx index 0d4a99443..f7d36f25b 100644 --- a/webview-ui/src/CreateCluster/CreateResourceGroup.tsx +++ b/webview-ui/src/CreateCluster/CreateResourceGroup.tsx @@ -1,6 +1,5 @@ import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { FormEvent, useState } from "react"; import { Dialog } from "../components/Dialog"; import { Validatable, hasMessage, invalid, isValid, isValueSet, unset, valid } from "../utilities/validation"; @@ -54,7 +53,8 @@ export function CreateResourceGroupDialog(props: CreateResourceGroupDialogProps) -
- Create - Cancel + +
diff --git a/webview-ui/src/CreateCluster/Success.tsx b/webview-ui/src/CreateCluster/Success.tsx index dd5f7bc71..5d84887bf 100644 --- a/webview-ui/src/CreateCluster/Success.tsx +++ b/webview-ui/src/CreateCluster/Success.tsx @@ -1,5 +1,3 @@ -import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"; - interface SuccessProps { portalClusterUrl: string; name: string; @@ -10,8 +8,7 @@ export function Success(props: SuccessProps) { <>

Cluster {props.name} was created successfully

- Click here to view your cluster in the Azure - Portal. + Click here to view your cluster in the Azure Portal.

); diff --git a/webview-ui/src/CreateFleet/CreateFleet.tsx b/webview-ui/src/CreateFleet/CreateFleet.tsx index a2164c4f2..c3c211473 100644 --- a/webview-ui/src/CreateFleet/CreateFleet.tsx +++ b/webview-ui/src/CreateFleet/CreateFleet.tsx @@ -3,7 +3,7 @@ import { InitialState } from "../../../src/webview-contract/webviewDefinitions/c import { CreateFleetInput } from "./CreateFleetInput"; import { useStateManagement } from "../utilities/state"; import { Stage, stateUpdater, vscode } from "./helpers/state"; -import { VSCodeLink, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; export function CreateFleet(initialState: InitialState) { const { state, eventHandlers } = useStateManagement(stateUpdater, initialState, vscode); @@ -60,8 +60,8 @@ export function CreateFleet(initialState: InitialState) { <>

Fleet {state.createParams!.name} was created successfully

- Click here to view your fleet - in the Azure Portal. + Click here to view your fleet in the Azure + Portal.

); diff --git a/webview-ui/src/CreateFleet/CreateFleetInput.tsx b/webview-ui/src/CreateFleet/CreateFleetInput.tsx index 862688425..c74442bb3 100644 --- a/webview-ui/src/CreateFleet/CreateFleetInput.tsx +++ b/webview-ui/src/CreateFleet/CreateFleetInput.tsx @@ -5,7 +5,7 @@ import { ResourceGroup, ToVsCodeMsgDef, } from "../../../src/webview-contract/webviewDefinitions/createFleet"; -import { VSCodeButton, VSCodeDropdown, VSCodeOption, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"; import { hasMessage, invalid, @@ -133,7 +133,8 @@ export function CreateFleetInput(props: CreateFleetInputProps) { -
- Create +
); diff --git a/webview-ui/src/CreateFleet/CreateFleetModeInput.tsx b/webview-ui/src/CreateFleet/CreateFleetModeInput.tsx index cf731cb72..aed3ccf83 100644 --- a/webview-ui/src/CreateFleet/CreateFleetModeInput.tsx +++ b/webview-ui/src/CreateFleet/CreateFleetModeInput.tsx @@ -1,7 +1,6 @@ import { FormEvent } from "react"; import { HubMode } from "../../../src/webview-contract/webviewDefinitions/createFleet"; import { hasMessage, invalid, isValueSet, valid, Validatable } from "../utilities/validation"; -import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import styles from "./CreateFleet.module.css"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; @@ -79,7 +78,8 @@ export function CreateFleetModeInput(props: CreateFleetInputProps) { {props.hubMode === HubMode.With && (
-

{state.name}

{state.description && state.description !== "test" &&

{state.description}

} - To perform more checks on your cluster, visit{" "} - AKS Diagnostics. - + To perform more checks on your cluster, visit AKS Diagnostics. +
{state.detectors.map((detector) => ( ))} diff --git a/webview-ui/src/Draft/Draft.module.css b/webview-ui/src/Draft/Draft.module.css index 6f4396519..a5fd24d61 100644 --- a/webview-ui/src/Draft/Draft.module.css +++ b/webview-ui/src/Draft/Draft.module.css @@ -47,6 +47,10 @@ color: var(--vscode-textLink-foreground); } +.linkColor { + color: var(--vscode-textLink-foreground); +} + .buttonContainer { margin-top: 1rem; margin-bottom: 1rem; @@ -102,3 +106,11 @@ ul.existingFileList > li.removable { .nextStepsContainer h3 { margin-top: 0; } + +.radioLabel { + margin-left: 0.62rem; +} + +.radioLine { + margin-bottom: 0.5rem; +} diff --git a/webview-ui/src/Draft/DraftDeployment/DraftDeployment.tsx b/webview-ui/src/Draft/DraftDeployment/DraftDeployment.tsx index 3a7737020..2616da960 100644 --- a/webview-ui/src/Draft/DraftDeployment/DraftDeployment.tsx +++ b/webview-ui/src/Draft/DraftDeployment/DraftDeployment.tsx @@ -32,13 +32,6 @@ import { Lazy, map as lazyMap } from "../../utilities/lazy"; import { ResourceSelector } from "../../components/ResourceSelector"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; -import { - VSCodeButton, - VSCodeLink, - VSCodeRadio, - VSCodeRadioGroup, - VSCodeTextField, -} from "@vscode/webview-ui-toolkit/react"; import { faFolder } from "@fortawesome/free-regular-svg-icons"; import { distinct } from "../../utilities/array"; import { TextWithDropdown } from "../../components/TextWithDropdown"; @@ -231,7 +224,6 @@ export function DraftDeployment(initialState: InitialState) { }); } - const [manifests, helm, kustomize]: DeploymentSpecType[] = ["manifests", "helm", "kustomize"]; const existingFiles = getExistingPaths(state.selectedDeploymentSpecType, state.existingFiles); const acrImageTooltipMessage = @@ -372,7 +364,8 @@ export function DraftDeployment(initialState: InitialState) { )} {state.selectedAcrRepository.value.isNew && ( - Location * -
- +
{hasMessage(state.selectedLocation) && ( @@ -460,22 +454,45 @@ export function DraftDeployment(initialState: InitialState) { - - Manifests - Helm - Kustomize - +
+
+ + + +
+
+ + +
+
+ + +
+
-
- +
{existingFiles.length > 0 && ( @@ -565,7 +582,7 @@ export function DraftDeployment(initialState: InitialState) {
    {existingFiles.map((path, i) => (
  • - { e.preventDefault(); @@ -573,7 +590,7 @@ export function DraftDeployment(initialState: InitialState) { }} > {path} - +
  • ))}
@@ -588,9 +605,9 @@ export function DraftDeployment(initialState: InitialState) {

To generate a GitHub Action, you can run{" "} - + Automated Deployments: Create a GitHub workflow - + .

diff --git a/webview-ui/src/Draft/DraftDockerfile/DraftDockerfile.tsx b/webview-ui/src/Draft/DraftDockerfile/DraftDockerfile.tsx index 100cc808b..dec15fc5b 100644 --- a/webview-ui/src/Draft/DraftDockerfile/DraftDockerfile.tsx +++ b/webview-ui/src/Draft/DraftDockerfile/DraftDockerfile.tsx @@ -4,7 +4,6 @@ import { ResourceSelector } from "../../components/ResourceSelector"; import { useStateManagement } from "../../utilities/state"; import styles from "../Draft.module.css"; import { stateUpdater, vscode } from "./state"; -import { VSCodeButton, VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faFolder } from "@fortawesome/free-regular-svg-icons"; import { faTimesCircle } from "@fortawesome/free-solid-svg-icons"; @@ -146,19 +145,20 @@ export function DraftDockerfile(initialState: InitialState) {
-
- +
{hasMessage(state.selectedLocation) && ( @@ -243,15 +243,15 @@ export function DraftDockerfile(initialState: InitialState) {
{state.status !== "Created" && ( - + )} {state.existingFiles.map((path, i) => ( - vscode.postOpenFileRequest(path)}> + ))}
@@ -263,18 +263,18 @@ export function DraftDockerfile(initialState: InitialState) {

If you still need to generate the appropriate deployment files, you can run{" "} - + Automated Deployments: Create a deployment - {" "} + {" "} to easily create the appropriate files.

If you already have all the files you need to deploy and would like to generate a GitHub Action, you can run{" "} - + Automated Deployments: Create a GitHub workflow - + .

diff --git a/webview-ui/src/Draft/DraftWorkflow/DraftWorkflow.tsx b/webview-ui/src/Draft/DraftWorkflow/DraftWorkflow.tsx index aa13f33d1..4744b846d 100644 --- a/webview-ui/src/Draft/DraftWorkflow/DraftWorkflow.tsx +++ b/webview-ui/src/Draft/DraftWorkflow/DraftWorkflow.tsx @@ -40,13 +40,6 @@ import { useStateManagement } from "../../utilities/state"; import styles from "../Draft.module.css"; import { Maybe, isNothing, just, nothing } from "../../utilities/maybe"; import { ResourceSelector } from "../../components/ResourceSelector"; -import { - VSCodeButton, - VSCodeLink, - VSCodeRadio, - VSCodeRadioGroup, - VSCodeTextField, -} from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faPlus, faTimesCircle, faTrash } from "@fortawesome/free-solid-svg-icons"; import { faFolder } from "@fortawesome/free-regular-svg-icons"; @@ -385,7 +378,6 @@ export function DraftWorkflow(initialState: InitialState) { vscode.postCreateWorkflowRequest(createParams.value); } - const [manifests, helm]: DeploymentSpecType[] = ["manifests", "helm"]; const existingFile = getExistingFile(state, state.selectedWorkflowName); const gitHubRepoTooltipMessage = @@ -401,13 +393,13 @@ export function DraftWorkflow(initialState: InitialState) {

Generate a workflow to deploy to Azure Kubernetes Service (AKS). Before running this command, make sure you have created a Dockerfile and Deployment. You can do this using the{" "} - + Automated Deployments: Create a Dockerfile - {" "} + {" "} and{" "} - + Automated Deployments: Create a Deployment - {" "} + {" "} commands.

@@ -416,7 +408,8 @@ export function DraftWorkflow(initialState: InitialState) { - Dockerfile * -
- +
{hasMessage(state.selectedDockerfilePath) && ( @@ -521,19 +515,20 @@ export function DraftWorkflow(initialState: InitialState) { -
- +
{isValid(state.selectedSubscription) && ( @@ -685,16 +680,30 @@ export function DraftWorkflow(initialState: InitialState) { - - Manifests - Helm - + +
+
+ + + +
+
+ + +
+
{state.selectedDeploymentSpecType === "manifests" && ( <> @@ -702,18 +711,18 @@ export function DraftWorkflow(initialState: InitialState) { Manifest file paths *
- +
{isValid(state.manifestsParamsState.selectedManifestPaths) && (
    {state.manifestsParamsState.selectedManifestPaths.value.map((path, i) => (
  • - { e.preventDefault(); @@ -721,17 +730,15 @@ export function DraftWorkflow(initialState: InitialState) { }} > {path} - - +
  • ))}
@@ -750,7 +757,8 @@ export function DraftWorkflow(initialState: InitialState) { -
- +
{hasMessage(state.helmParamsState.selectedChartPath) && ( @@ -778,7 +786,8 @@ export function DraftWorkflow(initialState: InitialState) { -
- +
{hasMessage(state.helmParamsState.selectedValuesYamlPath) && ( @@ -807,7 +816,8 @@ export function DraftWorkflow(initialState: InitialState) { {state.helmParamsState.selectedOverrides.map((o, i) => ( <>
- handleOverrideKeyChange(e, o)} @@ -815,23 +825,22 @@ export function DraftWorkflow(initialState: InitialState) { value={orDefault(o.key, "")} /> = - handleOverrideValueChange(e, o)} onInput={(e) => handleOverrideValueChange(e, o)} value={orDefault(o.value, "")} /> - handleDeleteOverrideClick(o)} aria-label="Remove" title="Remove" > - - - - + +
{hasMessage(o.key) && ( @@ -854,12 +863,12 @@ export function DraftWorkflow(initialState: InitialState) { : styles.controlSupplement } > - + )} @@ -867,15 +876,15 @@ export function DraftWorkflow(initialState: InitialState) {
{state.status !== "Created" && ( - + )} {existingFile && ( - vscode.postOpenFileRequest(existingFile)}> + )}
@@ -890,9 +899,9 @@ export function DraftWorkflow(initialState: InitialState) {
  • The ACR {isValueSet(state.selectedAcr) ? `(${state.selectedAcr.value})` : ""}{" "} - + is attached - {" "} + {" "} to the cluster{" "} {isValueSet(state.selectedCluster) ? `(${state.selectedCluster.value})` : ""}. You can follow for guidance. @@ -902,9 +911,9 @@ export function DraftWorkflow(initialState: InitialState) { {isValueSet(state.selectedGitHubRepo) ? `(${state.selectedGitHubRepo.value.gitHubRepoOwner}/${state.selectedGitHubRepo.value.gitHubRepoName})` : ""}{" "} - + is configured - {" "} + {" "} to access the ACR and cluster.
diff --git a/webview-ui/src/InspektorGadget/InspektorGadget.module.css b/webview-ui/src/InspektorGadget/InspektorGadget.module.css index 10671784b..00b729b8d 100644 --- a/webview-ui/src/InspektorGadget/InspektorGadget.module.css +++ b/webview-ui/src/InspektorGadget/InspektorGadget.module.css @@ -33,6 +33,7 @@ table.tracelist th { table.tracelist td { padding: 5px; + text-align: left; } table.tracelist td > * { @@ -127,3 +128,31 @@ ul.hierarchyList li * { .panelContent .main { grid-column: 2 / 3; } + +.displayCheckbox { + display: inline; +} + +.displayLabel { + display: inline; + position: relative; + top: -0.3rem; + margin-left: 0.1rem; +} + +.tableData { + text-align: left; +} + +.checkBoxLabel { + position: relative; + top: -0.05rem; +} + +.radioLabel { + margin-left: 0.62rem; +} + +.radioLine { + margin-bottom: 0.3rem; +} diff --git a/webview-ui/src/InspektorGadget/InspektorGadget.tsx b/webview-ui/src/InspektorGadget/InspektorGadget.tsx index 4a95cdd4d..9ef7a2087 100644 --- a/webview-ui/src/InspektorGadget/InspektorGadget.tsx +++ b/webview-ui/src/InspektorGadget/InspektorGadget.tsx @@ -1,4 +1,4 @@ -import { VSCodeLink, VSCodePanelTab, VSCodePanelView, VSCodePanels } from "@vscode/webview-ui-toolkit/react"; +import { VSCodePanelTab, VSCodePanelView, VSCodePanels } from "@vscode/webview-ui-toolkit/react"; import { Overview } from "./Overview"; import { Traces, TracesProps } from "./Traces"; import styles from "./InspektorGadget.module.css"; @@ -53,7 +53,7 @@ export function InspektorGadget(initialState: InitialState) {

Inspektor Gadget

Inspektor Gadget provides a wide selection of BPF tools to dig deep into your Kubernetes cluster. -  Learn more +  Learn more

diff --git a/webview-ui/src/InspektorGadget/NewTraceDialog.tsx b/webview-ui/src/InspektorGadget/NewTraceDialog.tsx index 0a212c4d7..27c3d8232 100644 --- a/webview-ui/src/InspektorGadget/NewTraceDialog.tsx +++ b/webview-ui/src/InspektorGadget/NewTraceDialog.tsx @@ -1,4 +1,4 @@ -import { VSCodeButton, VSCodeCheckbox, VSCodeDivider, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; import styles from "./InspektorGadget.module.css"; import { Dialog } from "../components/Dialog"; import { FormEvent, useEffect, useState, ChangeEvent as InputChangeEvent } from "react"; @@ -146,7 +146,7 @@ export function NewTraceDialog(props: NewTraceDialogProps) {

New Trace

- +
- +
- + +
diff --git a/webview-ui/src/InspektorGadget/Overview.tsx b/webview-ui/src/InspektorGadget/Overview.tsx index 4cd430b9b..915c2fffe 100644 --- a/webview-ui/src/InspektorGadget/Overview.tsx +++ b/webview-ui/src/InspektorGadget/Overview.tsx @@ -1,4 +1,3 @@ -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faEraser, faRocket } from "@fortawesome/free-solid-svg-icons"; import styles from "./InspektorGadget.module.css"; @@ -35,17 +34,17 @@ export function Overview(props: OverviewProps) {
{props.version.server}

- + )} {props.version && !props.version.server && ( - + )} ); diff --git a/webview-ui/src/InspektorGadget/ResourceSelector.tsx b/webview-ui/src/InspektorGadget/ResourceSelector.tsx index af36fbc7a..7de74cea3 100644 --- a/webview-ui/src/InspektorGadget/ResourceSelector.tsx +++ b/webview-ui/src/InspektorGadget/ResourceSelector.tsx @@ -4,7 +4,7 @@ import { faChevronDown, faChevronRight } from "@fortawesome/free-solid-svg-icons import styles from "./InspektorGadget.module.css"; import { NamespaceResources, PodResources } from "./helpers/clusterResources"; import { Lazy, isLoaded, isNotLoaded, map as lazyMap, orDefault } from "../utilities/lazy"; -import { VSCodeProgressRing, VSCodeRadio } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; import { Lookup, asLookup, exclude, intersection } from "../utilities/array"; import { EventHandlers } from "../utilities/state"; import { EventDef, vscode } from "./helpers/state"; @@ -109,9 +109,14 @@ export function ResourceSelector(props: ResourceSelectorProps) { className={props.className ? `${props.className} ${styles.hierarchyList}` : styles.hierarchyList} >
  • - - All - +
    + + +
  • {renderNamespaceItems(props.resources, updatedStatus)} @@ -125,13 +130,15 @@ export function ResourceSelector(props: ResourceSelectorProps) { onClick={() => toggleNamespaceExpanded(item.name)} icon={status[item.name].isExpanded ? faChevronDown : faChevronRight} /> - handleNamespaceChange(e, item.name)} - checked={isNamespaceResource(selectedResource) && selectedResource.namespace === item.name} - > - {item.name} - +
    + handleNamespaceChange(e, item.name)} + checked={isNamespaceResource(selectedResource) && selectedResource.namespace === item.name} + > + +
    {status[item.name].isExpanded && (
      {isLoaded(item.children) ? ( @@ -153,16 +160,19 @@ export function ResourceSelector(props: ResourceSelectorProps) { onClick={() => togglePodExpanded(namespace, item.name)} icon={status[item.name].isExpanded ? faChevronDown : faChevronRight} /> - handlePodChange(e, namespace, item.name)} - checked={ - isPodResource(selectedResource) && - selectedResource.namespace === namespace && - selectedResource.podName === item.name - } - > - {item.name} - +
      + handlePodChange(e, namespace, item.name)} + checked={ + isPodResource(selectedResource) && + selectedResource.namespace === namespace && + selectedResource.podName === item.name + } + > + + +
      {status[item.name].isExpanded && (
        {isLoaded(item.children) ? ( @@ -179,17 +189,19 @@ export function ResourceSelector(props: ResourceSelectorProps) { function renderContainerItems(namespace: string, podName: string, containerNames: string[]) { return containerNames.map((c) => (
      • - handleContainerChange(e, namespace, podName, c)} - checked={ - isContainerResource(selectedResource) && - selectedResource.namespace === namespace && - selectedResource.podName === podName && - selectedResource.container === c - } - > - {c} - +
        + handleContainerChange(e, namespace, podName, c)} + checked={ + isContainerResource(selectedResource) && + selectedResource.namespace === namespace && + selectedResource.podName === podName && + selectedResource.container === c + } + > + +
      • )); } diff --git a/webview-ui/src/InspektorGadget/TraceItemSortSelector.tsx b/webview-ui/src/InspektorGadget/TraceItemSortSelector.tsx index 4afc954d9..c2a7ba943 100644 --- a/webview-ui/src/InspektorGadget/TraceItemSortSelector.tsx +++ b/webview-ui/src/InspektorGadget/TraceItemSortSelector.tsx @@ -1,4 +1,3 @@ -import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { FormEvent } from "react"; import { ItemProperty, SortSpecifier, fromSortString, toSortString } from "./helpers/gadgets/types"; @@ -24,13 +23,14 @@ export function TraceItemSortSelector(props: TraceItemSortSelectorProps) { const allowedIdentifiers = props.allProperties.map((p) => p.identifier).sort(); const title = `Allowed properties:\n${allowedIdentifiers.join("\n")}`; return ( - + > ); } diff --git a/webview-ui/src/InspektorGadget/Traces.tsx b/webview-ui/src/InspektorGadget/Traces.tsx index aad1ad84f..083dd71bd 100644 --- a/webview-ui/src/InspektorGadget/Traces.tsx +++ b/webview-ui/src/InspektorGadget/Traces.tsx @@ -1,4 +1,3 @@ -import { VSCodeButton, VSCodeCheckbox, VSCodeDivider } from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faPlus, faTrashCan, faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons"; import styles from "./InspektorGadget.module.css"; @@ -35,7 +34,6 @@ export function Traces(props: TracesProps) { } function ignoreClick(e: Event | FormEvent) { - e.preventDefault(); e.stopPropagation(); } @@ -140,13 +138,15 @@ export function Traces(props: TracesProps) { className={getTraceRowClassNames(trace.traceId)} > - toggleCheckedTraceId(trace.traceId)} - style={{ margin: "0", paddingRight: "0.5rem" }} + style={{ margin: "0 0.5rem 0 0" }} /> - {getGadgetMetadata(trace.category, trace.resource)?.name} + + {getGadgetMetadata(trace.category, trace.resource)?.name} + {getNamespaceText(trace.filters.namespace)} {trace.filters.nodeName} @@ -159,19 +159,19 @@ export function Traces(props: TracesProps) { )}
        - + {checkedTraceIds.length > 0 && ( - + )}
        - +
        {selectedTrace && ( <> diff --git a/webview-ui/src/Kubectl/CommandInput.tsx b/webview-ui/src/Kubectl/CommandInput.tsx index a85e5de4b..d1b10541e 100644 --- a/webview-ui/src/Kubectl/CommandInput.tsx +++ b/webview-ui/src/Kubectl/CommandInput.tsx @@ -1,4 +1,3 @@ -import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import styles from "./Kubectl.module.css"; import { FormEvent } from "react"; @@ -32,7 +31,8 @@ export function CommandInput(props: CommandInputProps) { -
        - props.onRunCommand(props.command)}> + + {!props.matchesExisting && }
        ); diff --git a/webview-ui/src/Kubectl/Kubectl.tsx b/webview-ui/src/Kubectl/Kubectl.tsx index e2a81e586..847ddb5c2 100644 --- a/webview-ui/src/Kubectl/Kubectl.tsx +++ b/webview-ui/src/Kubectl/Kubectl.tsx @@ -1,4 +1,3 @@ -import { VSCodeDivider } from "@vscode/webview-ui-toolkit/react"; import { CommandCategory, InitialState, PresetCommand } from "../../../src/webview-contract/webviewDefinitions/kubectl"; import styles from "./Kubectl.module.css"; import { CommandList } from "./CommandList"; @@ -75,7 +74,7 @@ export function Kubectl(initialState: InitialState) {

        Kubectl Command Run for {state.clusterName}

        - +
        - Yes - No + +
        diff --git a/webview-ui/src/RetinaCapture/RetinaCapture.tsx b/webview-ui/src/RetinaCapture/RetinaCapture.tsx index 0648365e5..208d408fc 100644 --- a/webview-ui/src/RetinaCapture/RetinaCapture.tsx +++ b/webview-ui/src/RetinaCapture/RetinaCapture.tsx @@ -1,6 +1,5 @@ import { faInfoCircle, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { VSCodeButton, VSCodeCheckbox, VSCodeDivider } from "@vscode/webview-ui-toolkit/react"; import { FormEvent, useState } from "react"; import { InitialState } from "../../../src/webview-contract/webviewDefinitions/retinaCapture"; import { useStateManagement } from "../utilities/state"; @@ -43,44 +42,52 @@ export function RetinaCapture(initialState: InitialState) {

        Retina Distributed Capture for {state.clusterName}

        - +
        Retina capture command allows the user to capture network traffic and metadata for the capture target, and then send the capture file to the location by Output Configuration. More info:{" "} Retina Capture Command
        - +

        Retina Output

        {state.retinaOutput}
        - +

        Retina Distributed Capture is Successfully Completed for this Cluster

        {state.allNodes.map((node) => (
        - onSelectNode(e, node)} checked={isNodeSelected(node)}> - {node} - + onSelectNode(e, node)} + checked={isNodeSelected(node)} + type="checkbox" + style={{ + margin: "0rem 0.5rem 0.5rem 0", + position: "relative", + top: ".125rem", + }} + /> + {node}
        ))} -
        - + {state.isNodeExplorerPodExists && ( - handleDeleteExplorerPod()}> - + <> + + )}
        diff --git a/webview-ui/src/TCPDump/CaptureFilters.tsx b/webview-ui/src/TCPDump/CaptureFilters.tsx index 8f25c27c9..b8aee0235 100644 --- a/webview-ui/src/TCPDump/CaptureFilters.tsx +++ b/webview-ui/src/TCPDump/CaptureFilters.tsx @@ -8,7 +8,6 @@ import { SpecificPodFilters } from "./filterScenarios/SpecificPodFilters"; import { TwoPodsFilters } from "./filterScenarios/TwoPodsFilters"; import { CaptureScenario, EventDef, NodeState, ReferenceData } from "./state"; import { EventHandlerFunc, loadCaptureInterfaces } from "./state/dataLoading"; -import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { ApplicationLayerProtocol, TransportLayerProtocol, @@ -178,7 +177,8 @@ export function CaptureFilters(props: CaptureFiltersProps) { - TCP Capture on {state.clusterName} - +
        - +

        Completed Captures

        {hasStatus( NodeStatus.DebugPodRunning, @@ -239,10 +238,10 @@ export function TcpDump(initialState: InitialState) { {c.sizeInKB} {!c.downloadedFilePath && ( - handleStartDownload(c.name)} disabled={c.status !== CaptureStatus.Completed} - appearance="secondary" + className="secondary-button" > {c.status === CaptureStatus.Downloading && ( @@ -255,27 +254,27 @@ export function TcpDump(initialState: InitialState) { )} Download - + )} {c.downloadedFilePath && (
        {c.downloadedFilePath}   - + +
        )} diff --git a/webview-ui/src/components/InlineAction.tsx b/webview-ui/src/components/InlineAction.tsx index 0210dbf88..ff3463ea4 100644 --- a/webview-ui/src/components/InlineAction.tsx +++ b/webview-ui/src/components/InlineAction.tsx @@ -1,7 +1,6 @@ import { IconDefinition, faCheckCircle, faClock } from "@fortawesome/free-solid-svg-icons"; import styles from "./InlineAction.module.css"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"; export function makeFixAction( icon: IconDefinition, @@ -60,9 +59,9 @@ export function InlineAction(props: InlineActionProps) {
        {props.actions.map((action, i) => ( - @@ -70,7 +69,7 @@ export function InlineAction(props: InlineActionProps) { {" "} {action.name} - + ))}
        diff --git a/webview-ui/src/components/TextWithDropdown.module.css b/webview-ui/src/components/TextWithDropdown.module.css index dbad0529e..ac5bbf359 100644 --- a/webview-ui/src/components/TextWithDropdown.module.css +++ b/webview-ui/src/components/TextWithDropdown.module.css @@ -1,8 +1,3 @@ -.selectedValue { - display: inline; /* Prevents a small gap between text input and listbox options */ - width: 100%; -} - .indicator { cursor: pointer; margin-right: -2px; @@ -42,3 +37,40 @@ .listboxItem.selected { background: var(--vscode-list-activeSelectionBackground); } + +/* .inputField { + position: absolute; +} + +.dropDownButton { + position: relative; +} + +.selectedValue { + width: 100%; + position: relative; +} */ + +.inputField { + position: relative; /* Container becomes the reference for absolute positioning */ + width: 100%; /* Adjust as needed */ +} + +.selectedValue { + width: 100%; + padding-right: 1.8rem !important; /* Space for the icon so text doesn't overlap */ + box-sizing: border-box; +} +.selectedValue:hover { + cursor: pointer; +} + +.dropDownButton { + position: absolute; + right: 8px; /* Distance from the right edge (adjust as needed) */ + top: 50%; /* Vertically center the icon */ + transform: translateY(-50%); + pointer-events: none; /* Allows clicks to pass through to the input if needed */ + /* background-color: var(--input-background); */ + /* background-color: red; */ +} diff --git a/webview-ui/src/components/TextWithDropdown.tsx b/webview-ui/src/components/TextWithDropdown.tsx index b0b9b2f07..297097c34 100644 --- a/webview-ui/src/components/TextWithDropdown.tsx +++ b/webview-ui/src/components/TextWithDropdown.tsx @@ -1,6 +1,6 @@ import { FormEvent, HTMLAttributes, useEffect, useRef, useState } from "react"; import styles from "./TextWithDropdown.module.css"; -import { VSCodeProgressRing, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; +import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; import { Lazy, asLazy, isLoaded, isLoading, isNotLoaded, orDefault } from "../utilities/lazy"; type AvailableHtmlAttributes = Pick, "className" | "id">; @@ -59,7 +59,9 @@ function TextOnly(props: TextOnlyProps) { props.onSelect(newText, true); } - return ; + return ( + + ); } type NonLazyTextWithDropdownProps = Omit & { items: string[] }; @@ -100,13 +102,6 @@ function NonLazyTextWithDropdown(props: NonLazyTextWithDropdownProps) { setIsExpanded(!isExpanded); } - function handleDropDownButtonClick(e: React.MouseEvent) { - // Don't propagate because the containing element (the text field) has its own click handler - // which will itself toggle the expanded state. - e.stopPropagation(); - setIsExpanded(!isExpanded); - } - function handleFocus() { // Work around the fact that focus events are fired before click events. // If we don't delay the expansion, the dropdown will be expanded and then immediately collapsed @@ -204,32 +199,29 @@ function NonLazyTextWithDropdown(props: NonLazyTextWithDropdownProps) { onBlur={handleBlur} onKeyDown={handleKeyDown} > - - - {/* - See: - https://github.com/microsoft/vscode-webview-ui-toolkit/blob/a1f078e963969ad3f6d5932f96874f1a41cda919/src/dropdown/index.ts#L43-L57 - */} - - - - - +
        + + + + +
          li > .item:hover { flex-direction: row; column-gap: 0.5rem; } + +.title { + margin: 0rem 0 0.5rem 0; +} + +.itemSpan { + position: relative; + top: -0.1rem; +} diff --git a/webview-ui/src/manualTest/components/FilePicker.tsx b/webview-ui/src/manualTest/components/FilePicker.tsx index 59335611c..db16d46b0 100644 --- a/webview-ui/src/manualTest/components/FilePicker.tsx +++ b/webview-ui/src/manualTest/components/FilePicker.tsx @@ -1,6 +1,5 @@ import { FormEvent, useState } from "react"; import { Dialog } from "../../components/Dialog"; -import { VSCodeButton, VSCodeCheckbox, VSCodeDivider, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faChevronDown, faChevronRight } from "@fortawesome/free-solid-svg-icons"; import styles from "./FilePicker.module.css"; @@ -113,10 +112,10 @@ export function FilePicker(props: FilePickerProps) { return ( props.closeRequested(null)}> -

          {props.options.title}

          +

          {props.options.title}

          - +
          {(!canSelectMany || selectedItems.length <= 1) && ( -
          - + +
          @@ -235,12 +235,10 @@ function FileSystemNode(props: FileSystemNodeProps) { } function ignoreClick(e: Event | FormEvent) { - e.preventDefault(); e.stopPropagation(); } const isSelected = props.selectedItems.includes(props.item); - const itemClassNames = [styles.item, isSelected ? styles.selected : ""].filter((n) => !!n).join(" "); return ( <> @@ -253,14 +251,20 @@ function FileSystemNode(props: FileSystemNodeProps) { /> )} {props.canSelectMany && !isDirectory(props.item) && ( - props.handleItemSelectionChange(props.item)} - style={{ margin: "0", paddingRight: "0.5rem" }} + style={{ + margin: "0rem 0.5rem 0rem .5rem", + position: "relative", + top: ".125rem", + display: "inline", + }} /> )} - props.handleItemSelectionChange(props.item)} className={itemClassNames}> + props.handleItemSelectionChange(props.item)} className={styles.itemSpan}> {props.item.name} {expanded && isDirectory(props.item) && (