-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vscode): Move extension tab to resources tab (#2107)
* Add report issue command * Initial commit changing commands to look for rg tree and initialize rg tree * Add resolver for logic apps resources and update commands view * Remove ProductionSlotTreeItem * Update slot tree item * Remove slot tree item base * Remove refresh command * Add unwrapping for registered commands and remove open in portal and view properties declarations * Fix notify complete * Remove azure icon and update when in commands * Fix Open Overview command * Add icon to overview panel and update azuretreeview * Fix commands * Fix rest of commands * Fix refresh for folders * Move get credentials to a separate file * Add suppressCreatePick: false
- Loading branch information
1 parent
b201440
commit 2a92423
Showing
59 changed files
with
1,091 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { LogicAppResourceTree } from './app/tree/LogicAppResourceTree'; | ||
import { logicAppFilter } from './constants'; | ||
import { createWebSiteClient } from '@microsoft/vscode-azext-azureappservice'; | ||
import { getResourceGroupFromId } from '@microsoft/vscode-azext-azureutils'; | ||
import type { IActionContext, ISubscriptionContext } from '@microsoft/vscode-azext-utils'; | ||
import { callWithTelemetryAndErrorHandling, nonNullProp } from '@microsoft/vscode-azext-utils'; | ||
import type { AppResource, AppResourceResolver } from '@microsoft/vscode-azext-utils/hostapi'; | ||
|
||
export class LogicAppResolver implements AppResourceResolver { | ||
public async resolveResource(subContext: ISubscriptionContext, resource: AppResource): Promise<LogicAppResourceTree | undefined> { | ||
return await callWithTelemetryAndErrorHandling('resolveResource', async (context: IActionContext) => { | ||
const client = await createWebSiteClient({ ...context, ...subContext }); | ||
const rg = getResourceGroupFromId(nonNullProp(resource, 'id')); | ||
const name = nonNullProp(resource, 'name'); | ||
|
||
const site = await client.webApps.get(rg, name); | ||
return LogicAppResourceTree.createLogicAppResourceTree(context, subContext, site); | ||
}); | ||
} | ||
|
||
public matchesResource(resource: AppResource): boolean { | ||
return resource.type.toLowerCase() === logicAppFilter.type && resource.kind?.toLowerCase() === logicAppFilter.kind; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
apps/vs-code-designer/src/app/commands/createLogicApp/showSiteCreated.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { viewOutput } from '../../../constants'; | ||
import { ext } from '../../../extensionVariables'; | ||
import { localize } from '../../../localize'; | ||
import type { ParsedSite } from '@microsoft/vscode-azext-azureappservice'; | ||
import type { IActionContext } from '@microsoft/vscode-azext-utils'; | ||
import { window } from 'vscode'; | ||
|
||
export interface ISiteCreatedOptions extends IActionContext { | ||
showCreatedNotification?: boolean; | ||
} | ||
|
||
export function showSiteCreated(site: ParsedSite, context: ISiteCreatedOptions): void { | ||
const message: string = site.isSlot | ||
? localize('createdNewSlot', 'Successfully created slot "{0}": {1}', site.slotName, site.defaultHostUrl) | ||
: localize('createdNewApp', 'Successfully created logic app "{0}": {1}', site.fullName, site.defaultHostUrl); | ||
|
||
ext.outputChannel.appendLog(message); | ||
|
||
if (context.showCreatedNotification) { | ||
// don't wait | ||
void window.showInformationMessage(message, viewOutput).then((result) => { | ||
if (result === viewOutput) { | ||
ext.outputChannel.show(); | ||
} | ||
}); | ||
} | ||
} |
Oops, something went wrong.