Put 'loading' text while loading the saved controllers in Big Data Cluster extension (#6375)

This commit is contained in:
Gene Lee
2019-07-12 18:34:13 -06:00
committed by GitHub
parent 76ebe8e84d
commit f720ec642f
4 changed files with 98 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------------------------
* 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 * as nls from 'vscode-nls';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { TreeNode } from './treeNode';
import { BdcItemType } from '../constants';
const localize = nls.loadMessageBundle();
export class LoadingControllerNode extends TreeNode {
private readonly nodeType: string;
constructor() {
super(localize('textLoadingWithDots', "Loading..."));
this.nodeType = BdcItemType.loadingController;
}
public async getChildren(): Promise<TreeNode[]> {
return [];
}
public getTreeItem(): vscode.TreeItem {
let item = new vscode.TreeItem(this.label, vscode.TreeItemCollapsibleState.None);
item.contextValue = this.nodeType;
return item;
}
public getNodeInfo(): azdata.NodeInfo {
return {
label: this.label,
isLeaf: this.isLeaf,
errorMessage: undefined,
metadata: undefined,
nodePath: this.nodePath,
nodeStatus: undefined,
nodeType: this.nodeType,
iconType: this.nodeType,
nodeSubType: undefined
};
}
}