Skip to content
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

Implement activity log to create and delete virtual machines #421

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nturinski
Copy link
Member

Relies on microsoft/vscode-azuretools#1767

This is just an idea of how we could implement this across other extensions. We could move the step I made or leave it to the extension to figure out how they want to implement all of this activity log shenanigans.

Let me know if you have any thoughts on other ways we could make it easier to implement, whether it's shared in the npm package or if there's something I did weird/stupid in this PR.

An example of what it looks like in action:
image

@nturinski nturinski requested a review from a team as a code owner August 13, 2024 23:25
const iconPath = options.activityStatus === 'Success' ? activitySuccessIcon : options.activityStatus === 'Fail' ? activityFailIcon : activityProgressIcon;

return {
item: new GenericTreeItem(undefined, {
Copy link
Contributor

@MicroFish91 MicroFish91 Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit, but for fail items, I would pass back a GenericParentTreeItem by default since we have logic that will automatically tack on error items as children if thrown in that step 🤓


import { activityFailContext, activityFailIcon, activityProgressContext, activityProgressIcon, activitySuccessContext, activitySuccessIcon, AzureWizardExecuteStep, createUniversallyUniqueContextValue, GenericTreeItem, type ExecuteActivityOutput, type IActionContext } from "@microsoft/vscode-azext-utils";

export abstract class AzureWizardActivityOutputExecuteStep<T extends IActionContext> extends AzureWizardExecuteStep<T> {
Copy link
Contributor

@MicroFish91 MicroFish91 Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. For most cases it will simplify quickly hooking up new steps. For more custom cases, we can implement the execute step manually or overwrite the existing methods here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, my thoughts exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants