-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Fleet: panel implementation #1161
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setup of everything LGTM !👍, would say some descriptive comments for some functions could help (Like for the validation criteria being used). I'm assuming the ProgressEventTypes are placeholders for now & could be modified in further PR's.
}; | ||
} | ||
|
||
getTelemetryDefinition(): TelemetryDefinition<typeof contentId> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is typeof contentId going to work?
I don't know typescript well enough to answer that, but syntax wise, typeof contentId looks like it would return a string type, and not the value "createFleet". is that a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering that too, but I think it does make sense with typeof
. When you look at how the generic type is used, it's matched up to the keys of this AllWebviewDefinitions
object, which are themselves strings. You can in Typescript define a type which is just a union of string values (e.g. for an enum):
type colorEnum = "Red" | "Blue" | "Green"
So this is doing effectively the same thing as that, just with only a single legal value.
Description
This pull request introduces the basic panel implementation and required webview definitions for creating fleets in the VSCode extension.
Key Changes
Added Fleet Management Capabilities:
ContainerServiceFleetClient
to manage AKS fleets.getAksFleetClient
function inarm.ts
to create a fleet client.CreateFleetPanel
andCreateFleetDataProvider
classes inCreateFleetPanel.ts
for handling fleet creation UI and logic.New Webview Definitions:
createFleet.ts
underwebviewDefinitions
to define interfaces and message types related to fleet creation.webviewTypes.ts
to includeCreateFleetDefinition
.UI Enhancements:
createFleet
inmain.tsx
andmanualTest/main.tsx
to ensure compilation and future implementation. The code inmain.tsx
is hardcoded to satisfy dependencies for the project to compile.Changes
src/commands/utils/arm.ts
: AddedContainerServiceFleetClient
andgetAksFleetClient
.src/panels/CreateFleetPanel.ts
: Created new panel and data provider for fleet creation.src/webview-contract/webviewDefinitions/createFleet.ts
: Defined types for fleet creation webview.src/webview-contract/webviewTypes.ts
: AddedCreateFleetDefinition
.webview-ui/src/main.tsx
: Added placeholder for fleet creation with hardcoded code to satisfy dependencies.webview-ui/src/manualTest/main.tsx
: Added placeholder for fleet creation test scenarios with hardcoded code to satisfy dependencies.Testing
Notes
createFleet
is not yet visible to users to avoid incomplete experience.