mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
* first set of changes to experiment the registration of cms related apis * Adding cms service entry to workbench * Adding basic functionality for add remove reg servers and group * Returning relative path as part of RegServerResult as string * initial extension * cleaned building with connecting to server * get list of registered servers * progress with registered servers tree * cms base node with server selection * removed unused services * replaced azure stuff with cms * removed cmsResourceService * list servers progress * Removing the cms apis from core. Having mssql extension expose them for cms extension * create server working fine * initial expansion and nodes * Propogating the backend name changes to apis * initial cms extension working * cached connection needs change in api * connect without dashboard in proposed * Fixing some missing sqlops references * add registered server bug found * added refresh context menu option * added payload * server description not disabled after reject connection * added more context actions and action icons * added empty resource and error when same name server is added * fixed connection issues with cms and normal connections * added initial tests * added cms icons * removed azure readme * test script revert * fix build tests * added more cms tests * fixed test script * fixed silent error when expanding servers * added more cms tests * removed cmsdialog from api * cms dialog without object * fixed theming issues * initial connection dialog done * can make connections * PM asks for strings and icons * removed search * removed unused code and fixed 1 test * fix connection management tests * changed icons * format file * fixed hygiene * initial cr comments * refactored cms connection dialog * fixed bug when switching dialogs * localized connection provider options * fixed cms provider name * code review comments * localized options in cms and mssql * localized more options
61 lines
1.7 KiB
TypeScript
61 lines
1.7 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
import { TreeItem, TreeItemCollapsibleState } from 'vscode';
|
|
import { NodeInfo } from 'azdata';
|
|
|
|
import { TreeNode } from './treeNode';
|
|
import { CmsResourceItemType } from './constants';
|
|
|
|
export class CmsResourceMessageTreeNode extends TreeNode {
|
|
public constructor(
|
|
public readonly message: string,
|
|
parent: TreeNode
|
|
) {
|
|
super();
|
|
|
|
this.parent = parent;
|
|
this._id = `message_${CmsResourceMessageTreeNode._messageNum++}`;
|
|
}
|
|
|
|
public static create(message: string, parent: TreeNode): CmsResourceMessageTreeNode {
|
|
return new CmsResourceMessageTreeNode(message, parent);
|
|
}
|
|
|
|
public getChildren(): TreeNode[] | Promise<TreeNode[]> {
|
|
return [];
|
|
}
|
|
|
|
public getTreeItem(): TreeItem | Promise<TreeItem> {
|
|
let item = new TreeItem(this.message, TreeItemCollapsibleState.None);
|
|
item.contextValue = CmsResourceItemType.cmsMessageNodeContainer;
|
|
return item;
|
|
}
|
|
|
|
public getNodeInfo(): NodeInfo {
|
|
return {
|
|
label: this.message,
|
|
isLeaf: true,
|
|
errorMessage: undefined,
|
|
metadata: undefined,
|
|
nodePath: this.generateNodePath(),
|
|
nodeStatus: undefined,
|
|
nodeType: CmsResourceItemType.cmsMessageNodeContainer,
|
|
nodeSubType: undefined,
|
|
iconType: CmsResourceItemType.cmsMessageNodeContainer
|
|
};
|
|
}
|
|
|
|
public get nodePathValue(): string {
|
|
return this._id;
|
|
}
|
|
|
|
private _id: string;
|
|
|
|
private static _messageNum: number = 0;
|
|
}
|