mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 17:23:19 -05:00
Maddy/prompt password when different (#4537)
* Prompt for password once when the sql instance password doesn't work for hdfs. If the user provides the correct password, connect and continue, else show Unauthorized node. * Removed the hardcoded bad password * Added check for empty folder scenarios * Added ErrorStatusCode as property of TreeNode. Checking for the error code instead of the error string to avoid localization issues * type fixed * implemented hasExpansionError
This commit is contained in:
@@ -8,11 +8,15 @@
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { ITreeNode } from './types';
|
||||
import { IFileSource } from './fileSources';
|
||||
import { SqlClusterConnection } from './connection';
|
||||
|
||||
type TreeNodePredicate = (node: TreeNode) => boolean;
|
||||
|
||||
export abstract class TreeNode implements ITreeNode {
|
||||
private _parent: TreeNode = undefined;
|
||||
protected fileSource: IFileSource;
|
||||
private _errorStatusCode: number;
|
||||
|
||||
public get parent(): TreeNode {
|
||||
return this._parent;
|
||||
@@ -22,6 +26,14 @@ export abstract class TreeNode implements ITreeNode {
|
||||
this._parent = node;
|
||||
}
|
||||
|
||||
public get errorStatusCode(): number {
|
||||
return this._errorStatusCode;
|
||||
}
|
||||
|
||||
public set errorStatusCode(error: number) {
|
||||
this._errorStatusCode = error;
|
||||
}
|
||||
|
||||
public generateNodePath(): string {
|
||||
let path = undefined;
|
||||
if (this.parent) {
|
||||
@@ -66,6 +78,9 @@ export abstract class TreeNode implements ITreeNode {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public updateFileSource(connection: SqlClusterConnection): void{
|
||||
this.fileSource = connection.createHdfsFileSource();
|
||||
}
|
||||
/**
|
||||
* The value to use for this node in the node path
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user