Hook up MIAA dashboard overview (#10890)

* Hook up MIAA dashboard overview

* Fix merge conflicts

* Fix links

* Remove extra &
This commit is contained in:
Charles Gagnon
2020-06-15 11:25:31 -07:00
committed by GitHub
parent ff8b03aa5e
commit d9e70731f4
16 changed files with 335 additions and 126 deletions

View File

@@ -3,6 +3,8 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as azurecore from '../../../azurecore/src/azurecore';
import * as loc from '../localizedConstants';
export enum ResourceType {
@@ -35,3 +37,15 @@ export function parseEndpoint(endpoint?: string): { ip: string, port: string } {
port: endpoint.substr(separatorIndex + 1)
};
}
let azurecoreApi: azurecore.IExtension;
export async function getAzurecoreApi(): Promise<azurecore.IExtension> {
if (!azurecoreApi) {
azurecoreApi = await vscode.extensions.getExtension(azurecore.extension.name)?.activate();
if (!azurecoreApi) {
throw new Error('Unable to retrieve azurecore API');
}
}
return azurecoreApi;
}