Skip to content

Commit 75f429f

Browse files
authored
Convert activity log tree items to v2 (#867)
1 parent 312127f commit 75f429f

File tree

47 files changed

+506
-635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+506
-635
lines changed

package-lock.json

Lines changed: 93 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,9 +848,9 @@
848848
"@azure/container-registry": "1.0.0-beta.5",
849849
"@azure/core-rest-pipeline": "1.10.3",
850850
"@azure/storage-blob": "^12.4.1",
851-
"@microsoft/vscode-azext-azureutils": "^3.1.1",
851+
"@microsoft/vscode-azext-azureutils": "^3.2.0",
852852
"@microsoft/vscode-azext-github": "^1.0.2",
853-
"@microsoft/vscode-azext-utils": "^2.6.3",
853+
"@microsoft/vscode-azext-utils": "^3.0.1",
854854
"@microsoft/vscode-azureresources-api": "^2.0.2",
855855
"buffer": "^6.0.3",
856856
"dayjs": "^1.11.3",

src/commands/AzureWizardActivityOutputExecuteStep.ts

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/commands/EXECUTE_PRIORITY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ When creating or updating resources, execute steps should occupy certain priorit
2929
#### Steps
3030
##### Managed Identity Registry Credential
3131
- ManagedEnvironmentIdentityEnableStep: 450
32-
- AcrPullVerifyStep: 460
33-
- AcrPullEnableStep: 461
32+
- AcrPullEnableStep: 460
3433
- ManagedIdentityRegistryCredentialAddConfigurationStep: 470
3534

3635
##### Admin User Registry Credential

src/commands/StartingResourcesLogStep.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { type ContainerApp, type ManagedEnvironment } from "@azure/arm-appcontainers";
77
import { type ResourceGroup } from "@azure/arm-resources";
88
import { LocationListStep, type ILocationWizardContext } from "@microsoft/vscode-azext-azureutils";
9-
import { activityInfoIcon, AzureWizardPromptStep, createUniversallyUniqueContextValue, GenericTreeItem, type ExecuteActivityContext, type IActionContext } from "@microsoft/vscode-azext-utils";
9+
import { ActivityChildItem, ActivityChildType, activityInfoIcon, AzureWizardPromptStep, createContextValue, type ExecuteActivityContext, type IActionContext } from "@microsoft/vscode-azext-utils";
1010
import { activityInfoContext } from "../constants";
1111
import { ext } from "../extensionVariables";
1212
import { localize } from "../utils/localize";
@@ -17,6 +17,8 @@ type StartingResourcesLogContext = IActionContext & Partial<ExecuteActivityConte
1717
containerApp?: ContainerApp
1818
};
1919

20+
const startingResourcesContext: string = 'startingResourcesLogStepItem';
21+
2022
/**
2123
* Use to display primary Azure resource data to the output and activity log
2224
* i.e. resource group, managed environment, container app, location
@@ -49,9 +51,10 @@ export class StartingResourcesLogStep<T extends StartingResourcesLogContext> ext
4951
protected async logStartingResources(context: T): Promise<void> {
5052
if (context.resourceGroup) {
5153
context.activityChildren?.push(
52-
new GenericTreeItem(undefined, {
53-
contextValue: createUniversallyUniqueContextValue(['useExistingResourceGroupInfoItem', activityInfoContext]),
54-
label: localize('useResourceGroup', 'Using resource group "{0}"', context.resourceGroup.name),
54+
new ActivityChildItem({
55+
contextValue: createContextValue([startingResourcesContext, activityInfoContext]),
56+
label: localize('useResourceGroup', 'Use resource group "{0}"', context.resourceGroup.name),
57+
activityType: ActivityChildType.Info,
5558
iconPath: activityInfoIcon
5659
})
5760
);
@@ -60,22 +63,24 @@ export class StartingResourcesLogStep<T extends StartingResourcesLogContext> ext
6063

6164
if (context.managedEnvironment) {
6265
context.activityChildren?.push(
63-
new GenericTreeItem(undefined, {
64-
contextValue: createUniversallyUniqueContextValue(['useExistingManagedEnvironmentInfoItem', activityInfoContext]),
65-
label: localize('useManagedEnvironment', 'Using managed environment "{0}"', context.managedEnvironment.name),
66+
new ActivityChildItem({
67+
label: localize('useManagedEnvironment', 'Use managed environment "{0}"', context.managedEnvironment.name),
68+
contextValue: createContextValue([startingResourcesContext, activityInfoContext]),
69+
activityType: ActivityChildType.Info,
6670
iconPath: activityInfoIcon
67-
})
71+
}),
6872
);
6973
ext.outputChannel.appendLog(localize('usingManagedEnvironment', 'Using managed environment "{0}".', context.managedEnvironment.name));
7074
}
7175

7276
if (context.containerApp) {
7377
context.activityChildren?.push(
74-
new GenericTreeItem(undefined, {
75-
contextValue: createUniversallyUniqueContextValue(['useExistingContainerAppInfoItem', activityInfoContext]),
76-
label: localize('useContainerApp', 'Using container app "{0}"', context.containerApp.name),
77-
iconPath: activityInfoIcon
78-
})
78+
new ActivityChildItem({
79+
label: localize('useContainerApp', 'Use container app "{0}"', context.containerApp.name),
80+
contextValue: createContextValue([startingResourcesContext, activityInfoContext]),
81+
activityType: ActivityChildType.Info,
82+
iconPath: activityInfoIcon,
83+
}),
7984
);
8085
ext.outputChannel.appendLog(localize('usingContainerApp', 'Using container app "{0}".', context.containerApp.name));
8186
}

0 commit comments

Comments
 (0)