mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 09:35:41 -05:00
Initial work on Arc tree view (#11008)
* Initial work on Arc tree view * finish my thoughts
This commit is contained in:
28
extensions/arc/src/ui/tree/miaaTreeNode.ts
Normal file
28
extensions/arc/src/ui/tree/miaaTreeNode.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { ResourceType } from '../../constants';
|
||||
import { TreeNode } from './treeNode';
|
||||
import { MiaaModel } from '../../models/miaaModel';
|
||||
import { ControllerModel } from '../../models/controllerModel';
|
||||
import { MiaaDashboard } from '../dashboards/miaa/miaaDashboard';
|
||||
|
||||
/**
|
||||
* The TreeNode for displaying a SQL Managed Instance on Azure Arc
|
||||
*/
|
||||
export class MiaaTreeNode extends TreeNode {
|
||||
|
||||
constructor(private _model: MiaaModel, private _controllerModel: ControllerModel) {
|
||||
super(_model.name, vscode.TreeItemCollapsibleState.None, ResourceType.sqlManagedInstances);
|
||||
}
|
||||
|
||||
public async openDashboard(): Promise<void> {
|
||||
const miaaDashboard = new MiaaDashboard(this._controllerModel, this._model);
|
||||
await Promise.all([
|
||||
miaaDashboard.showDashboard(),
|
||||
this._model.refresh()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user