mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export class MainThreadTasks extends Disposable implements MainThreadTasksShape
|
||||
this._proxy = extHostContext.getProxy(SqlExtHostContext.ExtHostTasks);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
this._disposables.forEach(value => value.dispose());
|
||||
this._disposables.clear();
|
||||
}
|
||||
|
||||
@@ -30,23 +30,23 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
// - MAIN THREAD AVAILABLE METHODS /////////////////////////////////////
|
||||
public $clear(handle: number, accountKey: azdata.AccountKey): Thenable<void> {
|
||||
public override $clear(handle: number, accountKey: azdata.AccountKey): Thenable<void> {
|
||||
return this._withProvider(handle, (provider: azdata.AccountProvider) => provider.clear(accountKey));
|
||||
}
|
||||
|
||||
public $initialize(handle: number, restoredAccounts: azdata.Account[]): Thenable<azdata.Account[]> {
|
||||
public override $initialize(handle: number, restoredAccounts: azdata.Account[]): Thenable<azdata.Account[]> {
|
||||
return this._withProvider(handle, (provider: azdata.AccountProvider) => provider.initialize(restoredAccounts));
|
||||
}
|
||||
|
||||
public $prompt(handle: number): Thenable<azdata.Account | azdata.PromptFailedResult> {
|
||||
public override $prompt(handle: number): Thenable<azdata.Account | azdata.PromptFailedResult> {
|
||||
return this._withProvider(handle, (provider: azdata.AccountProvider) => provider.prompt());
|
||||
}
|
||||
|
||||
public $refresh(handle: number, account: azdata.Account): Thenable<azdata.Account | azdata.PromptFailedResult> {
|
||||
public override $refresh(handle: number, account: azdata.Account): Thenable<azdata.Account | azdata.PromptFailedResult> {
|
||||
return this._withProvider(handle, (provider: azdata.AccountProvider) => provider.refresh(account));
|
||||
}
|
||||
|
||||
public $autoOAuthCancelled(handle: number): Thenable<void> {
|
||||
public override $autoOAuthCancelled(handle: number): Thenable<void> {
|
||||
return this._withProvider(handle, (provider: azdata.AccountProvider) => provider.autoOAuthCancelled());
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
|
||||
return resultProviderAndAccounts;
|
||||
}
|
||||
|
||||
public $getSecurityToken(account: azdata.Account, resource: azdata.AzureResource = AzureResource.ResourceManagement): Thenable<{}> {
|
||||
public override $getSecurityToken(account: azdata.Account, resource: azdata.AzureResource = AzureResource.ResourceManagement): Thenable<{}> {
|
||||
return this.getAllProvidersAndAccounts().then(providerAndAccounts => {
|
||||
const providerAndAccount = providerAndAccounts.find(providerAndAccount => providerAndAccount.account.key.accountId === account.key.accountId);
|
||||
if (providerAndAccount) {
|
||||
@@ -104,7 +104,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
|
||||
});
|
||||
}
|
||||
|
||||
public $getAccountSecurityToken(account: azdata.Account, tenant: string, resource: azdata.AzureResource = AzureResource.ResourceManagement): Thenable<{ token: string }> {
|
||||
public override $getAccountSecurityToken(account: azdata.Account, tenant: string, resource: azdata.AzureResource = AzureResource.ResourceManagement): Thenable<{ token: string }> {
|
||||
return this.getAllProvidersAndAccounts().then(providerAndAccounts => {
|
||||
const providerAndAccount = providerAndAccounts.find(providerAndAccount => providerAndAccount.account.key.accountId === account.key.accountId);
|
||||
if (providerAndAccount) {
|
||||
@@ -119,7 +119,7 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
|
||||
return this._onDidChangeAccounts.event;
|
||||
}
|
||||
|
||||
public $accountsChanged(handle: number, accounts: azdata.Account[]): Thenable<void> {
|
||||
public override $accountsChanged(handle: number, accounts: azdata.Account[]): Thenable<void> {
|
||||
return Promise.resolve(this._onDidChangeAccounts.fire({ accounts: accounts }));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ExtHostConnectionManagement extends ExtHostConnectionManagementShap
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadConnectionManagement);
|
||||
}
|
||||
|
||||
public $onConnectionEvent(handle: number, type: azdata.connection.ConnectionEventType, ownerUri: string, profile: azdata.IConnectionProfile): void {
|
||||
public override $onConnectionEvent(handle: number, type: azdata.connection.ConnectionEventType, ownerUri: string, profile: azdata.IConnectionProfile): void {
|
||||
let listener = this._connectionListeners[handle];
|
||||
if (listener) {
|
||||
listener.onConnectionEvent(type, ownerUri, profile);
|
||||
|
||||
@@ -78,15 +78,15 @@ export class ExtHostCredentialManagement extends ExtHostCredentialManagementShap
|
||||
);
|
||||
}
|
||||
|
||||
public $saveCredential(credentialId: string, password: string): Thenable<boolean> {
|
||||
public override $saveCredential(credentialId: string, password: string): Thenable<boolean> {
|
||||
return this._withAdapter(0, CredentialAdapter, adapter => adapter.saveCredential(credentialId, password));
|
||||
}
|
||||
|
||||
public $readCredential(credentialId: string): Thenable<azdata.Credential> {
|
||||
public override $readCredential(credentialId: string): Thenable<azdata.Credential> {
|
||||
return this._withAdapter(0, CredentialAdapter, adapter => adapter.readCredential(credentialId));
|
||||
}
|
||||
|
||||
public $deleteCredential(credentialId: string): Thenable<boolean> {
|
||||
public override $deleteCredential(credentialId: string): Thenable<boolean> {
|
||||
return this._withAdapter(0, CredentialAdapter, adapter => adapter.deleteCredential(credentialId));
|
||||
}
|
||||
|
||||
|
||||
@@ -195,39 +195,39 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
|
||||
// Capabilities Discovery handlers
|
||||
$getServerCapabilities(handle: number, client: azdata.DataProtocolClientCapabilities): Thenable<azdata.DataProtocolServerCapabilities> {
|
||||
override $getServerCapabilities(handle: number, client: azdata.DataProtocolClientCapabilities): Thenable<azdata.DataProtocolServerCapabilities> {
|
||||
return this._resolveProvider<azdata.CapabilitiesProvider>(handle).getServerCapabilities(client);
|
||||
}
|
||||
|
||||
// Connection Management handlers
|
||||
$connect(handle: number, connectionUri: string, connection: azdata.ConnectionInfo): Thenable<boolean> {
|
||||
override $connect(handle: number, connectionUri: string, connection: azdata.ConnectionInfo): Thenable<boolean> {
|
||||
if (this.uriTransformer) {
|
||||
connectionUri = this._getTransformedUri(connectionUri, this.uriTransformer.transformIncoming);
|
||||
}
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).connect(connectionUri, connection);
|
||||
}
|
||||
|
||||
$disconnect(handle: number, connectionUri: string): Thenable<boolean> {
|
||||
override $disconnect(handle: number, connectionUri: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).disconnect(connectionUri);
|
||||
}
|
||||
|
||||
$cancelConnect(handle: number, connectionUri: string): Thenable<boolean> {
|
||||
override $cancelConnect(handle: number, connectionUri: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).cancelConnect(connectionUri);
|
||||
}
|
||||
|
||||
$changeDatabase(handle: number, connectionUri: string, newDatabase: string): Thenable<boolean> {
|
||||
override $changeDatabase(handle: number, connectionUri: string, newDatabase: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).changeDatabase(connectionUri, newDatabase);
|
||||
}
|
||||
|
||||
$listDatabases(handle: number, connectionUri: string): Thenable<azdata.ListDatabasesResult> {
|
||||
override $listDatabases(handle: number, connectionUri: string): Thenable<azdata.ListDatabasesResult> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).listDatabases(connectionUri);
|
||||
}
|
||||
|
||||
$getConnectionString(handle: number, connectionUri: string, includePassword: boolean): Thenable<string> {
|
||||
override $getConnectionString(handle: number, connectionUri: string, includePassword: boolean): Thenable<string> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).getConnectionString(connectionUri, includePassword);
|
||||
}
|
||||
|
||||
$buildConnectionInfo(handle: number, connectionString: string): Thenable<azdata.ConnectionInfo> {
|
||||
override $buildConnectionInfo(handle: number, connectionString: string): Thenable<azdata.ConnectionInfo> {
|
||||
let provider = this._resolveProvider<azdata.ConnectionProvider>(handle);
|
||||
if (provider.buildConnectionInfo) {
|
||||
return provider.buildConnectionInfo(connectionString);
|
||||
@@ -236,18 +236,18 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
}
|
||||
|
||||
$rebuildIntelliSenseCache(handle: number, connectionUri: string): Thenable<void> {
|
||||
override $rebuildIntelliSenseCache(handle: number, connectionUri: string): Thenable<void> {
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).rebuildIntelliSenseCache(connectionUri);
|
||||
}
|
||||
|
||||
$onConnectComplete(handle: number, connectionInfoSummary: azdata.ConnectionInfoSummary): void {
|
||||
override $onConnectComplete(handle: number, connectionInfoSummary: azdata.ConnectionInfoSummary): void {
|
||||
if (this.uriTransformer) {
|
||||
connectionInfoSummary.ownerUri = this._getTransformedUri(connectionInfoSummary.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
this._proxy.$onConnectionComplete(handle, connectionInfoSummary);
|
||||
}
|
||||
|
||||
public $onIntelliSenseCacheComplete(handle: number, connectionUri: string): void {
|
||||
public override $onIntelliSenseCacheComplete(handle: number, connectionUri: string): void {
|
||||
this._proxy.$onIntelliSenseCacheComplete(handle, connectionUri);
|
||||
}
|
||||
|
||||
@@ -256,17 +256,17 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
|
||||
// Protocol-wide Event Handlers
|
||||
public $languageFlavorChanged(params: azdata.DidChangeLanguageFlavorParams): void {
|
||||
public override $languageFlavorChanged(params: azdata.DidChangeLanguageFlavorParams): void {
|
||||
this._onDidChangeLanguageFlavor.fire(params);
|
||||
}
|
||||
|
||||
// Query Management handlers
|
||||
|
||||
$cancelQuery(handle: number, ownerUri: string): Thenable<azdata.QueryCancelResult> {
|
||||
override $cancelQuery(handle: number, ownerUri: string): Thenable<azdata.QueryCancelResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).cancelQuery(ownerUri);
|
||||
}
|
||||
|
||||
$runQuery(handle: number, ownerUri: string, selection: azdata.ISelectionData, runOptions?: azdata.ExecutionPlanOptions): Thenable<void> {
|
||||
override $runQuery(handle: number, ownerUri: string, selection: azdata.ISelectionData, runOptions?: azdata.ExecutionPlanOptions): Thenable<void> {
|
||||
if (this.uriTransformer) {
|
||||
ownerUri = this._getTransformedUri(ownerUri, this.uriTransformer.transformIncoming);
|
||||
}
|
||||
@@ -274,19 +274,19 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).runQuery(ownerUri, selection, runOptions);
|
||||
}
|
||||
|
||||
$runQueryStatement(handle: number, ownerUri: string, line: number, column: number): Thenable<void> {
|
||||
override $runQueryStatement(handle: number, ownerUri: string, line: number, column: number): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).runQueryStatement(ownerUri, line, column);
|
||||
}
|
||||
|
||||
$runQueryString(handle: number, ownerUri: string, queryString: string): Thenable<void> {
|
||||
override $runQueryString(handle: number, ownerUri: string, queryString: string): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).runQueryString(ownerUri, queryString);
|
||||
}
|
||||
|
||||
$runQueryAndReturn(handle: number, ownerUri: string, queryString: string): Thenable<azdata.SimpleExecuteResult> {
|
||||
override $runQueryAndReturn(handle: number, ownerUri: string, queryString: string): Thenable<azdata.SimpleExecuteResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).runQueryAndReturn(ownerUri, queryString);
|
||||
}
|
||||
|
||||
$setQueryExecutionOptions(handle: number, ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
|
||||
override $setQueryExecutionOptions(handle: number, ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
|
||||
if (this._resolveProvider<azdata.QueryProvider>(handle).setQueryExecutionOptions) {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).setQueryExecutionOptions(ownerUri, options);
|
||||
} else {
|
||||
@@ -294,29 +294,29 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
}
|
||||
|
||||
$connectWithProfile(handle: number, ownerUri: string, profile: azdata.connection.ConnectionProfile): Thenable<void> {
|
||||
override $connectWithProfile(handle: number, ownerUri: string, profile: azdata.connection.ConnectionProfile): Thenable<void> {
|
||||
return new Promise((r) => r());
|
||||
}
|
||||
|
||||
$parseSyntax(handle: number, ownerUri: string, query: string): Thenable<azdata.SyntaxParseResult> {
|
||||
override $parseSyntax(handle: number, ownerUri: string, query: string): Thenable<azdata.SyntaxParseResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).parseSyntax(ownerUri, query);
|
||||
}
|
||||
|
||||
$getQueryRows(handle: number, rowData: azdata.QueryExecuteSubsetParams): Thenable<azdata.QueryExecuteSubsetResult> {
|
||||
override $getQueryRows(handle: number, rowData: azdata.QueryExecuteSubsetParams): Thenable<azdata.QueryExecuteSubsetResult> {
|
||||
if (this.uriTransformer) {
|
||||
rowData.ownerUri = this._getTransformedUri(rowData.ownerUri, this.uriTransformer.transformIncoming);
|
||||
}
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).getQueryRows(rowData);
|
||||
}
|
||||
|
||||
$disposeQuery(handle: number, ownerUri: string): Thenable<void> {
|
||||
override $disposeQuery(handle: number, ownerUri: string): Thenable<void> {
|
||||
if (this.uriTransformer) {
|
||||
ownerUri = this._getTransformedUri(ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).disposeQuery(ownerUri);
|
||||
}
|
||||
|
||||
$onQueryComplete(handle: number, result: azdata.QueryExecuteCompleteNotificationResult): void {
|
||||
override $onQueryComplete(handle: number, result: azdata.QueryExecuteCompleteNotificationResult): void {
|
||||
if (this.uriTransformer) {
|
||||
result.ownerUri = this._getTransformedUri(result.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
@@ -327,13 +327,15 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
this._proxy.$onQueryComplete(handle, result);
|
||||
}
|
||||
$onBatchStart(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
|
||||
override $onBatchStart(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
batchInfo.ownerUri = this._getTransformedUri(batchInfo.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
this._proxy.$onBatchStart(handle, batchInfo);
|
||||
}
|
||||
$onBatchComplete(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
|
||||
override $onBatchComplete(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
batchInfo.ownerUri = this._getTransformedUri(batchInfo.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
@@ -341,7 +343,8 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
this.sendMessages();
|
||||
this._proxy.$onBatchComplete(handle, batchInfo);
|
||||
}
|
||||
$onResultSetAvailable(handle: number, resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
|
||||
|
||||
override $onResultSetAvailable(handle: number, resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
resultSetInfo.ownerUri = this._getTransformedUri(resultSetInfo.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
@@ -353,7 +356,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
this._proxy.$onResultSetUpdated(handle, resultSetInfo);
|
||||
}
|
||||
$onQueryMessage(message: azdata.QueryExecuteMessageParams): void {
|
||||
override $onQueryMessage(message: azdata.QueryExecuteMessageParams): void {
|
||||
if (this.uriTransformer) {
|
||||
message.ownerUri = this._getTransformedUri(message.ownerUri, this.uriTransformer.transformOutgoing);
|
||||
}
|
||||
@@ -372,44 +375,44 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
this._proxy.$onQueryMessage(messages);
|
||||
}
|
||||
|
||||
$saveResults(handle: number, requestParams: azdata.SaveResultsRequestParams): Thenable<azdata.SaveResultRequestResult> {
|
||||
override $saveResults(handle: number, requestParams: azdata.SaveResultsRequestParams): Thenable<azdata.SaveResultRequestResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).saveResults(requestParams);
|
||||
}
|
||||
|
||||
// Edit Data handlers
|
||||
$commitEdit(handle: number, ownerUri: string): Thenable<void> {
|
||||
override $commitEdit(handle: number, ownerUri: string): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).commitEdit(ownerUri);
|
||||
}
|
||||
|
||||
$createRow(handle: number, ownerUri: string): Thenable<azdata.EditCreateRowResult> {
|
||||
override $createRow(handle: number, ownerUri: string): Thenable<azdata.EditCreateRowResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).createRow(ownerUri);
|
||||
}
|
||||
|
||||
$deleteRow(handle: number, ownerUri: string, rowId: number): Thenable<void> {
|
||||
override $deleteRow(handle: number, ownerUri: string, rowId: number): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).deleteRow(ownerUri, rowId);
|
||||
}
|
||||
|
||||
$disposeEdit(handle: number, ownerUri: string): Thenable<void> {
|
||||
override $disposeEdit(handle: number, ownerUri: string): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).disposeEdit(ownerUri);
|
||||
}
|
||||
|
||||
$initializeEdit(handle: number, ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number, queryString: string): Thenable<void> {
|
||||
override $initializeEdit(handle: number, ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number, queryString: string): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).initializeEdit(ownerUri, schemaName, objectName, objectType, rowLimit, queryString);
|
||||
}
|
||||
|
||||
$revertCell(handle: number, ownerUri: string, rowId: number, columnId: number): Thenable<azdata.EditRevertCellResult> {
|
||||
override $revertCell(handle: number, ownerUri: string, rowId: number, columnId: number): Thenable<azdata.EditRevertCellResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).revertCell(ownerUri, rowId, columnId);
|
||||
}
|
||||
|
||||
$revertRow(handle: number, ownerUri: string, rowId: number): Thenable<void> {
|
||||
override $revertRow(handle: number, ownerUri: string, rowId: number): Thenable<void> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).revertRow(ownerUri, rowId);
|
||||
}
|
||||
|
||||
$updateCell(handle: number, ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<azdata.EditUpdateCellResult> {
|
||||
override $updateCell(handle: number, ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<azdata.EditUpdateCellResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).updateCell(ownerUri, rowId, columnId, newValue);
|
||||
}
|
||||
|
||||
$getEditRows(handle: number, rowData: azdata.EditSubsetParams): Thenable<azdata.EditSubsetResult> {
|
||||
override $getEditRows(handle: number, rowData: azdata.EditSubsetParams): Thenable<azdata.EditSubsetResult> {
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).getEditRows(rowData);
|
||||
}
|
||||
|
||||
@@ -417,53 +420,53 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
this._proxy.$onEditSessionReady(handle, ownerUri, success, message);
|
||||
}
|
||||
|
||||
public $getConnectionIconId(handle: number, connection: azdata.IConnectionProfile, serverInfo: azdata.ServerInfo): Thenable<string> {
|
||||
public override $getConnectionIconId(handle: number, connection: azdata.IConnectionProfile, serverInfo: azdata.ServerInfo): Thenable<string> {
|
||||
return this._resolveProvider<azdata.IconProvider>(handle).getConnectionIconId(connection, serverInfo);
|
||||
}
|
||||
|
||||
// Metadata handlers
|
||||
public $getMetadata(handle: number, connectionUri: string): Thenable<azdata.ProviderMetadata> {
|
||||
public override $getMetadata(handle: number, connectionUri: string): Thenable<azdata.ProviderMetadata> {
|
||||
return this._resolveProvider<azdata.MetadataProvider>(handle).getMetadata(connectionUri);
|
||||
}
|
||||
|
||||
public $getDatabases(handle: number, connectionUri: string): Thenable<string[] | azdata.DatabaseInfo[]> {
|
||||
public override $getDatabases(handle: number, connectionUri: string): Thenable<string[] | azdata.DatabaseInfo[]> {
|
||||
return this._resolveProvider<azdata.MetadataProvider>(handle).getDatabases(connectionUri);
|
||||
}
|
||||
|
||||
public $getTableInfo(handle: number, connectionUri: string, metadata: azdata.ObjectMetadata): Thenable<azdata.ColumnMetadata[]> {
|
||||
public override $getTableInfo(handle: number, connectionUri: string, metadata: azdata.ObjectMetadata): Thenable<azdata.ColumnMetadata[]> {
|
||||
return this._resolveProvider<azdata.MetadataProvider>(handle).getTableInfo(connectionUri, metadata);
|
||||
}
|
||||
|
||||
public $getViewInfo(handle: number, connectionUri: string, metadata: azdata.ObjectMetadata): Thenable<azdata.ColumnMetadata[]> {
|
||||
public override $getViewInfo(handle: number, connectionUri: string, metadata: azdata.ObjectMetadata): Thenable<azdata.ColumnMetadata[]> {
|
||||
return this._resolveProvider<azdata.MetadataProvider>(handle).getViewInfo(connectionUri, metadata);
|
||||
}
|
||||
|
||||
// Object Explorer Service
|
||||
public $createObjectExplorerSession(handle: number, connInfo: azdata.ConnectionInfo): Thenable<azdata.ObjectExplorerSessionResponse> {
|
||||
public override $createObjectExplorerSession(handle: number, connInfo: azdata.ConnectionInfo): Thenable<azdata.ObjectExplorerSessionResponse> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerProvider>(handle).createNewSession(connInfo);
|
||||
}
|
||||
|
||||
public $createObjectExplorerNodeProviderSession(handle: number, session: azdata.ObjectExplorerSession): Thenable<boolean> {
|
||||
public override $createObjectExplorerNodeProviderSession(handle: number, session: azdata.ObjectExplorerSession): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerNodeProvider>(handle).handleSessionOpen(session);
|
||||
}
|
||||
|
||||
public $expandObjectExplorerNode(handle: number, nodeInfo: azdata.ExpandNodeInfo): Thenable<boolean> {
|
||||
public override $expandObjectExplorerNode(handle: number, nodeInfo: azdata.ExpandNodeInfo): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerProviderBase>(handle).expandNode(nodeInfo);
|
||||
}
|
||||
|
||||
public $refreshObjectExplorerNode(handle: number, nodeInfo: azdata.ExpandNodeInfo): Thenable<boolean> {
|
||||
public override $refreshObjectExplorerNode(handle: number, nodeInfo: azdata.ExpandNodeInfo): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerProviderBase>(handle).refreshNode(nodeInfo);
|
||||
}
|
||||
|
||||
public $closeObjectExplorerSession(handle: number, closeSessionInfo: azdata.ObjectExplorerCloseSessionInfo): Thenable<azdata.ObjectExplorerCloseSessionResponse> {
|
||||
public override $closeObjectExplorerSession(handle: number, closeSessionInfo: azdata.ObjectExplorerCloseSessionInfo): Thenable<azdata.ObjectExplorerCloseSessionResponse> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerProvider>(handle).closeSession(closeSessionInfo);
|
||||
}
|
||||
|
||||
public $handleSessionClose(handle: number, closeSessionInfo: azdata.ObjectExplorerCloseSessionInfo): void {
|
||||
public override $handleSessionClose(handle: number, closeSessionInfo: azdata.ObjectExplorerCloseSessionInfo): void {
|
||||
return this._resolveProvider<azdata.ObjectExplorerNodeProvider>(handle).handleSessionClose(closeSessionInfo);
|
||||
}
|
||||
|
||||
public $findNodes(handle: number, findNodesInfo: azdata.FindNodesInfo): Thenable<azdata.ObjectExplorerFindNodesResponse> {
|
||||
public override $findNodes(handle: number, findNodesInfo: azdata.FindNodesInfo): Thenable<azdata.ObjectExplorerFindNodesResponse> {
|
||||
return this._resolveProvider<azdata.ObjectExplorerProviderBase>(handle).findNodes(findNodesInfo);
|
||||
}
|
||||
|
||||
@@ -480,11 +483,11 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
|
||||
// Task Service
|
||||
public $getAllTasks(handle: number, listTasksParams: azdata.ListTasksParams): Thenable<azdata.ListTasksResponse> {
|
||||
public override $getAllTasks(handle: number, listTasksParams: azdata.ListTasksParams): Thenable<azdata.ListTasksResponse> {
|
||||
return this._resolveProvider<azdata.TaskServicesProvider>(handle).getAllTasks(listTasksParams);
|
||||
}
|
||||
|
||||
public $cancelTask(handle: number, cancelTaskParams: azdata.CancelTaskParams): Thenable<boolean> {
|
||||
public override $cancelTask(handle: number, cancelTaskParams: azdata.CancelTaskParams): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.TaskServicesProvider>(handle).cancelTask(cancelTaskParams);
|
||||
}
|
||||
|
||||
@@ -498,7 +501,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
|
||||
// Scripting handlers
|
||||
|
||||
public $scriptAsOperation(handle: number, connectionUri: string, operation: azdata.ScriptOperation, metadata: azdata.ObjectMetadata, paramDetails: azdata.ScriptingParamDetails): Thenable<azdata.ScriptingResult> {
|
||||
public override $scriptAsOperation(handle: number, connectionUri: string, operation: azdata.ScriptOperation, metadata: azdata.ObjectMetadata, paramDetails: azdata.ScriptingParamDetails): Thenable<azdata.ScriptingResult> {
|
||||
return this._resolveProvider<azdata.ScriptingProvider>(handle).scriptAsOperation(connectionUri, operation, metadata, paramDetails);
|
||||
}
|
||||
|
||||
@@ -509,77 +512,77 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Create a new database on the provided connection
|
||||
*/
|
||||
public $createDatabase(handle: number, connectionUri: string, database: azdata.DatabaseInfo): Thenable<azdata.CreateDatabaseResponse> {
|
||||
public override $createDatabase(handle: number, connectionUri: string, database: azdata.DatabaseInfo): Thenable<azdata.CreateDatabaseResponse> {
|
||||
return this._resolveProvider<azdata.AdminServicesProvider>(handle).createDatabase(connectionUri, database);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new database on the provided connection
|
||||
*/
|
||||
public $getDefaultDatabaseInfo(handle: number, connectionUri: string): Thenable<azdata.DatabaseInfo> {
|
||||
public override $getDefaultDatabaseInfo(handle: number, connectionUri: string): Thenable<azdata.DatabaseInfo> {
|
||||
return this._resolveProvider<azdata.AdminServicesProvider>(handle).getDefaultDatabaseInfo(connectionUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the info on a database
|
||||
*/
|
||||
public $getDatabaseInfo(handle: number, connectionUri: string): Thenable<azdata.DatabaseInfo> {
|
||||
public override $getDatabaseInfo(handle: number, connectionUri: string): Thenable<azdata.DatabaseInfo> {
|
||||
return this._resolveProvider<azdata.AdminServicesProvider>(handle).getDatabaseInfo(connectionUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new login on the provided connection
|
||||
*/
|
||||
public $createLogin(handle: number, connectionUri: string, login: azdata.LoginInfo): Thenable<azdata.CreateLoginResponse> {
|
||||
public override $createLogin(handle: number, connectionUri: string, login: azdata.LoginInfo): Thenable<azdata.CreateLoginResponse> {
|
||||
return this._resolveProvider<azdata.AdminServicesProvider>(handle).createLogin(connectionUri, login);
|
||||
}
|
||||
|
||||
/**
|
||||
* Backup a database
|
||||
*/
|
||||
public $backup(handle: number, connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.BackupResponse> {
|
||||
public override $backup(handle: number, connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.BackupResponse> {
|
||||
return this._resolveProvider<azdata.BackupProvider>(handle).backup(connectionUri, backupInfo, taskExecutionMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new database on the provided connection
|
||||
*/
|
||||
public $getBackupConfigInfo(handle: number, connectionUri: string): Thenable<azdata.BackupConfigInfo> {
|
||||
public override $getBackupConfigInfo(handle: number, connectionUri: string): Thenable<azdata.BackupConfigInfo> {
|
||||
return this._resolveProvider<azdata.BackupProvider>(handle).getBackupConfigInfo(connectionUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restores a database
|
||||
*/
|
||||
public $restore(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<azdata.RestoreResponse> {
|
||||
public override $restore(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<azdata.RestoreResponse> {
|
||||
return this._resolveProvider<azdata.RestoreProvider>(handle).restore(connectionUri, restoreInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a plan for restoring a database
|
||||
*/
|
||||
public $getRestorePlan(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<azdata.RestorePlanResponse> {
|
||||
public override $getRestorePlan(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<azdata.RestorePlanResponse> {
|
||||
return this._resolveProvider<azdata.RestoreProvider>(handle).getRestorePlan(connectionUri, restoreInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* cancels a restore plan
|
||||
*/
|
||||
public $cancelRestorePlan(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<boolean> {
|
||||
public override $cancelRestorePlan(handle: number, connectionUri: string, restoreInfo: azdata.RestoreInfo): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.RestoreProvider>(handle).cancelRestorePlan(connectionUri, restoreInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets restore config Info
|
||||
*/
|
||||
public $getRestoreConfigInfo(handle: number, connectionUri: string): Thenable<azdata.RestoreConfigInfo> {
|
||||
public override $getRestoreConfigInfo(handle: number, connectionUri: string): Thenable<azdata.RestoreConfigInfo> {
|
||||
return this._resolveProvider<azdata.RestoreProvider>(handle).getRestoreConfigInfo(connectionUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a file browser
|
||||
*/
|
||||
public $openFileBrowser(handle: number, ownerUri: string, expandPath: string, fileFilters: string[], changeFilter: boolean): Thenable<boolean> {
|
||||
public override $openFileBrowser(handle: number, ownerUri: string, expandPath: string, fileFilters: string[], changeFilter: boolean): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.FileBrowserProvider>(handle).openFileBrowser(ownerUri, expandPath, fileFilters, changeFilter);
|
||||
}
|
||||
|
||||
@@ -593,7 +596,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Expand a folder node
|
||||
*/
|
||||
public $expandFolderNode(handle: number, ownerUri: string, expandPath: string): Thenable<boolean> {
|
||||
public override $expandFolderNode(handle: number, ownerUri: string, expandPath: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.FileBrowserProvider>(handle).expandFolderNode(ownerUri, expandPath);
|
||||
}
|
||||
|
||||
@@ -607,7 +610,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Validate selected file path
|
||||
*/
|
||||
public $validateFilePaths(handle: number, ownerUri: string, serviceType: string, selectedFiles: string[]): Thenable<boolean> {
|
||||
public override $validateFilePaths(handle: number, ownerUri: string, serviceType: string, selectedFiles: string[]): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.FileBrowserProvider>(handle).validateFilePaths(ownerUri, serviceType, selectedFiles);
|
||||
}
|
||||
|
||||
@@ -621,7 +624,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Close file browser
|
||||
*/
|
||||
public $closeFileBrowser(handle: number, ownerUri: string): Thenable<azdata.FileBrowserCloseResponse> {
|
||||
public override $closeFileBrowser(handle: number, ownerUri: string): Thenable<azdata.FileBrowserCloseResponse> {
|
||||
return this._resolveProvider<azdata.FileBrowserProvider>(handle).closeFileBrowser(ownerUri);
|
||||
}
|
||||
|
||||
@@ -632,42 +635,42 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Create a new profiler session
|
||||
*/
|
||||
public $createSession(handle: number, sessionId: string, createStatement: string, template: azdata.ProfilerSessionTemplate): Thenable<boolean> {
|
||||
public override $createSession(handle: number, sessionId: string, createStatement: string, template: azdata.ProfilerSessionTemplate): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).createSession(sessionId, createStatement, template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a profiler session
|
||||
*/
|
||||
public $startSession(handle: number, sessionId: string, sessionName: string): Thenable<boolean> {
|
||||
public override $startSession(handle: number, sessionId: string, sessionName: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).startSession(sessionId, sessionName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop a profiler session
|
||||
*/
|
||||
public $stopSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
public override $stopSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).stopSession(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pause a profiler session
|
||||
*/
|
||||
public $pauseSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
public override $pauseSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).pauseSession(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect a profiler session
|
||||
*/
|
||||
public $disconnectSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
public override $disconnectSession(handle: number, sessionId: string): Thenable<boolean> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).disconnectSession(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of running XEvent sessions on the session's target server
|
||||
*/
|
||||
public $getXEventSessions(handle: number, sessionId: string): Thenable<string[]> {
|
||||
public override $getXEventSessions(handle: number, sessionId: string): Thenable<string[]> {
|
||||
return this._resolveProvider<azdata.ProfilerProvider>(handle).getXEventSessions(sessionId);
|
||||
}
|
||||
|
||||
@@ -700,140 +703,140 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Get Agent Job list
|
||||
*/
|
||||
public $getJobs(handle: number, ownerUri: string): Thenable<azdata.AgentJobsResult> {
|
||||
public override $getJobs(handle: number, ownerUri: string): Thenable<azdata.AgentJobsResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getJobs(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Agent Job's history
|
||||
*/
|
||||
public $getJobHistory(handle: number, ownerUri: string, jobID: string, jobName: string): Thenable<azdata.AgentJobHistoryResult> {
|
||||
public override $getJobHistory(handle: number, ownerUri: string, jobID: string, jobName: string): Thenable<azdata.AgentJobHistoryResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getJobHistory(ownerUri, jobID, jobName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run an action on a job
|
||||
*/
|
||||
public $jobAction(handle: number, ownerUri: string, jobName: string, action: string): Thenable<azdata.ResultStatus> {
|
||||
public override $jobAction(handle: number, ownerUri: string, jobName: string, action: string): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).jobAction(ownerUri, jobName, action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a job
|
||||
*/
|
||||
$deleteJob(handle: number, ownerUri: string, job: azdata.AgentJobInfo): Thenable<azdata.ResultStatus> {
|
||||
override $deleteJob(handle: number, ownerUri: string, job: azdata.AgentJobInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteJob(ownerUri, job);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a job step
|
||||
*/
|
||||
$deleteJobStep(handle: number, ownerUri: string, step: azdata.AgentJobStepInfo): Thenable<azdata.ResultStatus> {
|
||||
override $deleteJobStep(handle: number, ownerUri: string, step: azdata.AgentJobStepInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteJobStep(ownerUri, step);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Alerts list
|
||||
*/
|
||||
$getAlerts(handle: number, ownerUri: string): Thenable<azdata.AgentAlertsResult> {
|
||||
override $getAlerts(handle: number, ownerUri: string): Thenable<azdata.AgentAlertsResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getAlerts(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an alert
|
||||
*/
|
||||
$deleteAlert(handle: number, ownerUri: string, alert: azdata.AgentAlertInfo): Thenable<azdata.ResultStatus> {
|
||||
override $deleteAlert(handle: number, ownerUri: string, alert: azdata.AgentAlertInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteAlert(ownerUri, alert);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Notebook list
|
||||
*/
|
||||
public $getNotebooks(handle: number, ownerUri: string): Thenable<azdata.AgentNotebooksResult> {
|
||||
public override $getNotebooks(handle: number, ownerUri: string): Thenable<azdata.AgentNotebooksResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getNotebooks(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Agent Notebook's history
|
||||
*/
|
||||
public $getNotebookHistory(handle: number, ownerUri: string, jobID: string, jobName: string, targetDatabase: string): Thenable<azdata.AgentNotebookHistoryResult> {
|
||||
public override $getNotebookHistory(handle: number, ownerUri: string, jobID: string, jobName: string, targetDatabase: string): Thenable<azdata.AgentNotebookHistoryResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getNotebookHistory(ownerUri, jobID, jobName, targetDatabase);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Agent Materialized Notebook
|
||||
*/
|
||||
public $getMaterializedNotebook(handle: number, ownerUri: string, targetDatabase: string, notebookMaterializedId: number): Thenable<azdata.AgentNotebookMaterializedResult> {
|
||||
public override $getMaterializedNotebook(handle: number, ownerUri: string, targetDatabase: string, notebookMaterializedId: number): Thenable<azdata.AgentNotebookMaterializedResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getMaterializedNotebook(ownerUri, targetDatabase, notebookMaterializedId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Agent Template Notebook
|
||||
*/
|
||||
public $getTemplateNotebook(handle: number, ownerUri: string, targetDatabase: string, jobId: string): Thenable<azdata.AgentNotebookTemplateResult> {
|
||||
public override $getTemplateNotebook(handle: number, ownerUri: string, targetDatabase: string, jobId: string): Thenable<azdata.AgentNotebookTemplateResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getTemplateNotebook(ownerUri, targetDatabase, jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Agent Notebook
|
||||
*/
|
||||
public $deleteNotebook(handle: number, ownerUri: string, notebook: azdata.AgentNotebookInfo): Thenable<azdata.ResultStatus> {
|
||||
public override $deleteNotebook(handle: number, ownerUri: string, notebook: azdata.AgentNotebookInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteNotebook(ownerUri, notebook);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Agent Materialized Notebook Name
|
||||
*/
|
||||
public $updateNotebookMaterializedName(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string, name: string): Thenable<azdata.ResultStatus> {
|
||||
public override $updateNotebookMaterializedName(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string, name: string): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).updateNotebookMaterializedName(ownerUri, agentNotebookHistory, targetDatabase, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Agent Materialized Notebook
|
||||
*/
|
||||
public $deleteMaterializedNotebook(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string): Thenable<azdata.ResultStatus> {
|
||||
public override $deleteMaterializedNotebook(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteMaterializedNotebook(ownerUri, agentNotebookHistory, targetDatabase);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Agent Materialized Notebook Pin
|
||||
*/
|
||||
public $updateNotebookMaterializedPin(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string, pin: boolean): Thenable<azdata.ResultStatus> {
|
||||
public override $updateNotebookMaterializedPin(handle: number, ownerUri: string, agentNotebookHistory: azdata.AgentNotebookHistoryInfo, targetDatabase: string, pin: boolean): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).updateNotebookMaterializedPin(ownerUri, agentNotebookHistory, targetDatabase, pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Oeprators list
|
||||
*/
|
||||
$getOperators(handle: number, ownerUri: string): Thenable<azdata.AgentOperatorsResult> {
|
||||
override $getOperators(handle: number, ownerUri: string): Thenable<azdata.AgentOperatorsResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getOperators(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an operator
|
||||
*/
|
||||
$deleteOperator(handle: number, ownerUri: string, operator: azdata.AgentOperatorInfo): Thenable<azdata.ResultStatus> {
|
||||
override $deleteOperator(handle: number, ownerUri: string, operator: azdata.AgentOperatorInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteOperator(ownerUri, operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Agent Proxies list
|
||||
*/
|
||||
$getProxies(handle: number, ownerUri: string): Thenable<azdata.AgentProxiesResult> {
|
||||
override $getProxies(handle: number, ownerUri: string): Thenable<azdata.AgentProxiesResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getProxies(ownerUri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a proxy
|
||||
*/
|
||||
$deleteProxy(handle: number, ownerUri: string, proxy: azdata.AgentProxyInfo): Thenable<azdata.ResultStatus> {
|
||||
override $deleteProxy(handle: number, ownerUri: string, proxy: azdata.AgentProxyInfo): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).deleteProxy(ownerUri, proxy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Agent Credentials from server
|
||||
*/
|
||||
$getCredentials(handle: number, ownerUri: string): Thenable<azdata.GetCredentialsResult> {
|
||||
override $getCredentials(handle: number, ownerUri: string): Thenable<azdata.GetCredentialsResult> {
|
||||
return this._resolveProvider<azdata.AgentServicesProvider>(handle).getCredentials(ownerUri);
|
||||
}
|
||||
|
||||
@@ -845,32 +848,32 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
}
|
||||
|
||||
// Serialization methods
|
||||
public $startSerialization(handle: number, requestParams: azdata.SerializeDataStartRequestParams): Thenable<azdata.SerializeDataResult> {
|
||||
public override $startSerialization(handle: number, requestParams: azdata.SerializeDataStartRequestParams): Thenable<azdata.SerializeDataResult> {
|
||||
return this._resolveProvider<azdata.SerializationProvider>(handle).startSerialization(requestParams);
|
||||
}
|
||||
|
||||
public $continueSerialization(handle: number, requestParams: azdata.SerializeDataContinueRequestParams): Thenable<azdata.SerializeDataResult> {
|
||||
public override $continueSerialization(handle: number, requestParams: azdata.SerializeDataContinueRequestParams): Thenable<azdata.SerializeDataResult> {
|
||||
return this._resolveProvider<azdata.SerializationProvider>(handle).continueSerialization(requestParams);
|
||||
}
|
||||
|
||||
// Assessment methods
|
||||
public $assessmentInvoke(handle: number, ownerUri: string, targetType: number): Thenable<azdata.SqlAssessmentResult> {
|
||||
public override $assessmentInvoke(handle: number, ownerUri: string, targetType: number): Thenable<azdata.SqlAssessmentResult> {
|
||||
return this._resolveProvider<azdata.SqlAssessmentServicesProvider>(handle).assessmentInvoke(ownerUri, targetType);
|
||||
}
|
||||
|
||||
public $getAssessmentItems(handle: number, ownerUri: string, targetType: number): Thenable<azdata.SqlAssessmentResult> {
|
||||
public override $getAssessmentItems(handle: number, ownerUri: string, targetType: number): Thenable<azdata.SqlAssessmentResult> {
|
||||
return this._resolveProvider<azdata.SqlAssessmentServicesProvider>(handle).getAssessmentItems(ownerUri, targetType);
|
||||
}
|
||||
|
||||
public $generateAssessmentScript(handle: number, items: azdata.SqlAssessmentResultItem[]): Thenable<azdata.ResultStatus> {
|
||||
public override $generateAssessmentScript(handle: number, items: azdata.SqlAssessmentResultItem[]): Thenable<azdata.ResultStatus> {
|
||||
return this._resolveProvider<azdata.SqlAssessmentServicesProvider>(handle).generateAssessmentScript(items);
|
||||
}
|
||||
|
||||
public $getDataGridItems(handle: number): Thenable<azdata.DataGridItem[]> {
|
||||
public override $getDataGridItems(handle: number): Thenable<azdata.DataGridItem[]> {
|
||||
return this._resolveProvider<azdata.DataGridProvider>(handle).getDataGridItems();
|
||||
}
|
||||
|
||||
public $getDataGridColumns(handle: number): Thenable<azdata.DataGridColumn[]> {
|
||||
public override $getDataGridColumns(handle: number): Thenable<azdata.DataGridColumn[]> {
|
||||
return this._resolveProvider<azdata.DataGridProvider>(handle).getDataGridColumns();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1586,7 +1586,7 @@ class DeclarativeTableWrapper extends ComponentWrapper implements azdata.Declara
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
|
||||
protected notifyPropertyChanged(): Thenable<void> {
|
||||
protected override notifyPropertyChanged(): Thenable<void> {
|
||||
return this._proxy.$setProperties(this._handle, this._id, this.getPropertiesForMainThread());
|
||||
}
|
||||
|
||||
@@ -1610,7 +1610,7 @@ class DeclarativeTableWrapper extends ComponentWrapper implements azdata.Declara
|
||||
this.setProperty('selectedRow', v);
|
||||
}
|
||||
|
||||
public toComponentShape(): IComponentShape {
|
||||
public override toComponentShape(): IComponentShape {
|
||||
// Overridden to ensure we send the correct properties mapping.
|
||||
return <IComponentShape>{
|
||||
id: this.id,
|
||||
|
||||
@@ -198,7 +198,7 @@ class DialogImpl extends ModelViewPanelImpl implements azdata.window.Dialog {
|
||||
this._operationHandler.registerOperation(operationInfo);
|
||||
}
|
||||
|
||||
public setModelViewId(value: string) {
|
||||
public override setModelViewId(value: string) {
|
||||
super.setModelViewId(value);
|
||||
this.content = value;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ class TabImpl extends ModelViewPanelImpl implements azdata.window.DialogTab {
|
||||
public title: string;
|
||||
public content: string;
|
||||
|
||||
public setModelViewId(value: string) {
|
||||
public override setModelViewId(value: string) {
|
||||
super.setModelViewId(value);
|
||||
this.content = value;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export class ExtHostTreeView<T> extends vsTreeExt.ExtHostTreeView<T> {
|
||||
}
|
||||
}
|
||||
|
||||
reveal(element: T, options?: { select?: boolean }): Promise<void> {
|
||||
override reveal(element: T, options?: { select?: boolean }): Promise<void> {
|
||||
if (typeof this.componentDataProvider.getParent !== 'function') {
|
||||
return Promise.reject(new Error(`Required registered TreeDataProvider to implement 'getParent' method to access 'reveal' method`));
|
||||
}
|
||||
@@ -146,7 +146,7 @@ export class ExtHostTreeView<T> extends vsTreeExt.ExtHostTreeView<T> {
|
||||
}
|
||||
}
|
||||
|
||||
protected refreshHandles(itemHandles: vsTreeExt.TreeItemHandle[]): Promise<void> {
|
||||
protected override refreshHandles(itemHandles: vsTreeExt.TreeItemHandle[]): Promise<void> {
|
||||
const itemsToRefresh: { [treeItemHandle: string]: ITreeComponentItem } = {};
|
||||
return Promise.all(itemHandles.map(treeItemHandle =>
|
||||
this.refreshNode(treeItemHandle)
|
||||
@@ -158,7 +158,7 @@ export class ExtHostTreeView<T> extends vsTreeExt.ExtHostTreeView<T> {
|
||||
.then(() => Object.keys(itemsToRefresh).length ? this.modelViewProxy.$refreshDataProvider(this.handle, this.componentId, itemsToRefresh) : null);
|
||||
}
|
||||
|
||||
protected createTreeNode(element: T, extensionTreeItem: azdata.TreeComponentItem, parent?: vsTreeExt.TreeNode | vsTreeExt.Root): vsTreeExt.TreeNode {
|
||||
protected override createTreeNode(element: T, extensionTreeItem: azdata.TreeComponentItem, parent?: vsTreeExt.TreeNode | vsTreeExt.Root): vsTreeExt.TreeNode {
|
||||
let node = super.createTreeNode(element, extensionTreeItem, parent);
|
||||
if (node.item) {
|
||||
node.item = assign(node.item, { checked: extensionTreeItem.checked, enabled: extensionTreeItem.enabled });
|
||||
|
||||
@@ -25,10 +25,10 @@ export class ExtHostResourceProvider extends ExtHostResourceProviderShape {
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
// - MAIN THREAD AVAILABLE METHODS /////////////////////////////////////
|
||||
public $createFirewallRule(handle: number, account: azdata.Account, firewallRuleInfo: azdata.FirewallRuleInfo): Thenable<azdata.CreateFirewallRuleResponse> {
|
||||
public override $createFirewallRule(handle: number, account: azdata.Account, firewallRuleInfo: azdata.FirewallRuleInfo): Thenable<azdata.CreateFirewallRuleResponse> {
|
||||
return this._withProvider(handle, (provider: azdata.ResourceProvider) => provider.createFirewallRule(account, firewallRuleInfo));
|
||||
}
|
||||
public $handleFirewallRule(handle: number, errorCode: number, errorMessage: string, connectionTypeId: string): Thenable<azdata.HandleFirewallRuleResponse> {
|
||||
public override $handleFirewallRule(handle: number, errorCode: number, errorMessage: string, connectionTypeId: string): Thenable<azdata.HandleFirewallRuleResponse> {
|
||||
return this._withProvider(handle, (provider: azdata.ResourceProvider) => provider.handleFirewallRule(errorCode, errorMessage, connectionTypeId));
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export class ManageAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: ManageActionContext): Promise<void> {
|
||||
override async run(actionContext: ManageActionContext): Promise<void> {
|
||||
if (actionContext.profile) {
|
||||
await this._connectionManagementService.connect(actionContext.profile, actionContext.uri, { showDashboard: true, saveTheConnection: false, params: undefined, showConnectionDialogOnError: false, showFirewallRuleOnError: true });
|
||||
this._angularEventingService.sendAngularEvent(actionContext.uri, AngularEventType.NAV_DATABASE);
|
||||
@@ -64,7 +64,7 @@ export class InsightAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: InsightActionContext): Promise<void> {
|
||||
override async run(actionContext: InsightActionContext): Promise<void> {
|
||||
if (actionContext.profile) {
|
||||
await this._insightsDialogService.show(actionContext.insight, actionContext.profile);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export abstract class ToggleViewAction extends Action {
|
||||
super(id, label, cssClass);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
const focusedViewId = FocusedViewContext.getValue(this.contextKeyService);
|
||||
|
||||
if (focusedViewId === this.viewId) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { EditorInput, EncodingMode, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { EditorInput, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IConnectionManagementService, IConnectableInput, INewConnectionParams } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
@@ -17,6 +17,7 @@ import { IEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
|
||||
import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverService';
|
||||
import { IUntitledTextEditorModel, UntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel';
|
||||
import { EncodingMode } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
/**
|
||||
* Input for the EditDataEditor.
|
||||
@@ -112,9 +113,9 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
public get rowLimit(): number | undefined { return this._rowLimit; }
|
||||
public get objectType(): string { return this._objectType; }
|
||||
public showResultsEditor(): void { this._showResultsEditor.fire(undefined); }
|
||||
public isDirty(): boolean { return false; }
|
||||
public save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
|
||||
public getTypeId(): string { return EditDataInput.ID; }
|
||||
public override isDirty(): boolean { return false; }
|
||||
public override save(): Promise<IEditorInput | undefined> { return Promise.resolve(undefined); }
|
||||
public override get typeId(): string { return EditDataInput.ID; }
|
||||
public setBootstrappedTrue(): void { this._hasBootstrapped = true; }
|
||||
public get resource(): URI { return this._uri; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
@@ -193,7 +194,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
}
|
||||
|
||||
// Boiler Plate Functions
|
||||
public matches(otherInput: any): boolean {
|
||||
public override matches(otherInput: any): boolean {
|
||||
if (otherInput instanceof EditDataInput) {
|
||||
return this._sql.matches(otherInput.sql);
|
||||
}
|
||||
@@ -201,7 +202,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
return this._sql.matches(otherInput);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
// Dispose our edit session then disconnect our input
|
||||
this._queryModelService.disposeEdit(this.uri).then(() => {
|
||||
return this._connectionManagementService.disconnectEditor(this, true);
|
||||
@@ -217,9 +218,9 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
return this._connectionManagementService.getTabColorForUri(this.uri);
|
||||
}
|
||||
|
||||
public resolve(refresh?: boolean): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> { return this._sql.resolve(); }
|
||||
public override resolve(refresh?: boolean): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> { return this._sql.resolve(); }
|
||||
public getEncoding(): string | undefined { return this._sql.getEncoding(); }
|
||||
public getName(): string { return this._sql.getName(); }
|
||||
public override getName(): string { return this._sql.getName(); }
|
||||
public get hasAssociatedFilePath(): boolean { return this._sql.model.hasAssociatedFilePath; }
|
||||
|
||||
public setEncoding(encoding: string, mode: EncodingMode /* ignored, we only have Encode */): void {
|
||||
|
||||
@@ -45,11 +45,11 @@ export class EditDataResultsInput extends EditorInput {
|
||||
this._editDataGridPanel = gridPanel;
|
||||
}
|
||||
|
||||
getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return EditDataResultsInput.ID;
|
||||
}
|
||||
|
||||
matches(other: any): boolean {
|
||||
override matches(other: any): boolean {
|
||||
if (other instanceof EditDataResultsInput) {
|
||||
return (other._uri === this._uri);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export class EditDataResultsInput extends EditorInput {
|
||||
return false;
|
||||
}
|
||||
|
||||
resolve(refresh?: boolean): Promise<any> {
|
||||
override resolve(refresh?: boolean): Promise<any> {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export class EditDataResultsInput extends EditorInput {
|
||||
this._hasBootstrapped = true;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._disposeContainer();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export class DashboardInput extends EditorInput {
|
||||
this._uniqueSelector = uniqueSelector;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return DashboardInput.ID;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class DashboardInput extends EditorInput {
|
||||
});
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
if (!this.connectionProfile) {
|
||||
return '';
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export class DashboardInput extends EditorInput {
|
||||
return this._uri;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._disposeContainer();
|
||||
if (this._onConnectionChanged) {
|
||||
this._onConnectionChanged.dispose();
|
||||
@@ -147,7 +147,7 @@ export class DashboardInput extends EditorInput {
|
||||
return this._uniqueSelector;
|
||||
}
|
||||
|
||||
public matches(otherinput: any): boolean {
|
||||
public override matches(otherinput: any): boolean {
|
||||
return otherinput instanceof DashboardInput
|
||||
&& DashboardInput.profileMatches(this.connectionProfile, otherinput.connectionProfile);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
return this._sessionName;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return ProfilerInput.ID;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
let name: string = nls.localize('profilerInput.profiler', "Profiler");
|
||||
if (!this.connection) {
|
||||
return name;
|
||||
@@ -277,7 +277,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
this.data.clearFilter();
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
super.dispose();
|
||||
this._profilerService.disconnectSession(this.id);
|
||||
}
|
||||
|
||||
@@ -49,11 +49,11 @@ export class ResourceViewerInput extends EditorInput {
|
||||
this.refresh().catch(err => onUnexpectedError(err));
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return ResourceViewerInput.ID;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
return this._dataGridProvider.title || nls.localize('resourceViewerInput.resourceViewer', "Resource Viewer");
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ResourceViewerInput extends EditorInput {
|
||||
return this._columns;
|
||||
}
|
||||
|
||||
isDirty(): boolean {
|
||||
override isDirty(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ export abstract class CalloutDialog<T> extends Modal {
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract renderBody(container: HTMLElement): void;
|
||||
|
||||
public abstract open(): Promise<T>;
|
||||
|
||||
public cancel(): void {
|
||||
|
||||
@@ -753,7 +753,7 @@ export abstract class Modal extends Disposable implements IThemable {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
super.dispose();
|
||||
this._footerButtons = [];
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class OptionsDialog extends Modal {
|
||||
super(title, name, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, options);
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
if (this.backButton) {
|
||||
@@ -163,12 +163,12 @@ export class OptionsDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.close();
|
||||
}
|
||||
|
||||
/* Overwrite enter key behavior */
|
||||
protected onAccept() {
|
||||
protected override onAccept() {
|
||||
this.ok();
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ export class OptionsDialog extends Modal {
|
||||
protected layout(height?: number): void {
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._optionElements = {};
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
}));
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this._currentButtonType !== this.buttonType) {
|
||||
this.initButton();
|
||||
@@ -168,11 +168,11 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._button.focus();
|
||||
}
|
||||
|
||||
protected updateIcon() {
|
||||
protected override updateIcon() {
|
||||
if (this.iconPath) {
|
||||
if (!this._iconClass) {
|
||||
super.updateIcon();
|
||||
@@ -200,11 +200,11 @@ export default class ButtonComponent extends ComponentWithIconBase<azdata.Button
|
||||
}
|
||||
}
|
||||
|
||||
protected get defaultIconHeight(): number {
|
||||
protected override get defaultIconHeight(): number {
|
||||
return 15;
|
||||
}
|
||||
|
||||
protected get defaultIconWidth(): number {
|
||||
protected override get defaultIconWidth(): number {
|
||||
return 15;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
if (this.cardDiv) {
|
||||
this.cardDiv.nativeElement.focus();
|
||||
}
|
||||
@@ -136,12 +136,12 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateIcon();
|
||||
}
|
||||
|
||||
public get iconClass(): string {
|
||||
public override get iconClass(): string {
|
||||
if (this.isListItemCard) {
|
||||
return this._iconClass + ' icon' + ' list-item-icon';
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.checked = this.checked;
|
||||
this._input.label = this.label;
|
||||
@@ -124,11 +124,11 @@ export default class CheckBoxComponent extends ComponentBase<azdata.CheckBoxProp
|
||||
this.setPropertyFromUI<boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'display': this.display
|
||||
});
|
||||
|
||||
@@ -351,7 +351,7 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
this.validate().catch(onUnexpectedError);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.items.forEach(item => {
|
||||
let component = this.modelStore.getComponent(item.descriptor.id);
|
||||
@@ -362,7 +362,7 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
});
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
if (this._componentWrappers) {
|
||||
this._componentWrappers.forEach(wrapper => {
|
||||
@@ -371,8 +371,6 @@ export abstract class ContainerBase<T, TPropertyBag extends azdata.ComponentProp
|
||||
}
|
||||
}
|
||||
|
||||
abstract setLayout(layout: any): void;
|
||||
|
||||
public setItemLayout(componentDescriptor: IComponentDescriptor, config: any): void {
|
||||
if (!componentDescriptor) {
|
||||
return;
|
||||
|
||||
@@ -77,7 +77,7 @@ export abstract class ComponentWithIconBase<T extends azdata.ComponentWithIconPr
|
||||
this.setPropertyFromUI<string>((properties, title) => { properties.title = title; }, newTitle);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
if (this._iconClass) {
|
||||
removeCSSRulesContainingSelector(this._iconClass);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
}
|
||||
|
||||
private static ACCEPTABLE_VALUES = new Set<string>(['number', 'string', 'boolean']);
|
||||
public setProperties(properties: azdata.DeclarativeTableProperties): void {
|
||||
public override setProperties(properties: azdata.DeclarativeTableProperties): void {
|
||||
const basicData: any[][] = properties.data ?? [];
|
||||
const complexData: azdata.DeclarativeTableCellValue[][] = properties.dataValues ?? [];
|
||||
let finalData: azdata.DeclarativeTableCellValue[][];
|
||||
@@ -311,7 +311,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
super.setProperties(properties);
|
||||
}
|
||||
|
||||
public clearContainer(): void {
|
||||
public override clearContainer(): void {
|
||||
super.clearContainer();
|
||||
this.selectedRow = -1;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
}
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
if (action === ModelViewAction.Filter) {
|
||||
this._filteredRowIndexes = args[0];
|
||||
}
|
||||
@@ -375,7 +375,7 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
|
||||
return this._filteredRowIndexes.includes(rowIndex) ? false : true;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -121,13 +121,13 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
|
||||
return uri;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
let width: number = convertSizeToNumber(this.width);
|
||||
let height: number = convertSizeToNumber(this.height);
|
||||
if (this._isAutoResizable) {
|
||||
@@ -167,7 +167,7 @@ export default class DiffEditorComponent extends ComponentBase<azdata.DiffEditor
|
||||
// TODO allow configuring the look and feel
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.contentLeft !== this._renderedContentLeft || this.contentRight !== this._renderedContentRight) {
|
||||
this.updateModel();
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.overflowY !== this._overflowY) {
|
||||
this.updateOverflowY();
|
||||
@@ -115,11 +115,11 @@ export default class DivContainer extends ContainerBase<azdata.DivItemLayout, az
|
||||
}
|
||||
|
||||
// CSS-bound properties
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
|
||||
if (this.ariaLabel !== '') {
|
||||
@@ -263,7 +263,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
this.setPropertyFromUI<boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
if (this.editable && !this._isInAccessibilityMode) {
|
||||
this._editableDropdown.focus();
|
||||
} else {
|
||||
@@ -291,7 +291,7 @@ export default class DropDownComponent extends ComponentBase<azdata.DropDownProp
|
||||
return this.loading ? this.loadingText : this.loadingCompletedText;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth()
|
||||
});
|
||||
|
||||
@@ -106,13 +106,13 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
|
||||
return uri;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
let width: number = convertSizeToNumber(this.width);
|
||||
|
||||
let height: number = convertSizeToNumber(this.height);
|
||||
@@ -149,7 +149,7 @@ export default class EditorComponent extends ComponentBase<azdata.EditorProperti
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.content !== this._renderedContent) {
|
||||
this.updateModel();
|
||||
|
||||
@@ -91,7 +91,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
this._treeView.layout(700);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this.ownerUri) {
|
||||
this.initialize();
|
||||
@@ -122,7 +122,7 @@ export default class FileBrowserTreeComponent extends ComponentBase<azdata.FileB
|
||||
this.setPropertyFromUI<string>((props, value) => props.ownerUri = value, newValue);
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -58,7 +58,7 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -92,11 +92,11 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
return this._alignItems;
|
||||
}
|
||||
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default class FlexContainer extends ContainerBase<azdata.FlexItemLayout>
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
public get position(): string {
|
||||
public override get position(): string {
|
||||
return this._position;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
super(changeRef, el, logService);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
||||
return item && item.config && !item.config.horizontal;
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'padding': this.getFormPadding(),
|
||||
'width': this.getFormWidth(),
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout, GroupCont
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout, GroupCont
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'display': this.getContainerDisplayStyle(),
|
||||
'width': this.getContainerWidth(),
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class HyperlinkComponent extends TitledComponent<azdata.Hyperlink
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -46,13 +46,13 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateIcon();
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
protected updateIcon() {
|
||||
protected override updateIcon() {
|
||||
if (this.iconPath) {
|
||||
if (!this._iconClass) {
|
||||
super.updateIcon();
|
||||
@@ -70,7 +70,7 @@ export default class ImageComponent extends ComponentWithIconBase<azdata.ImageCo
|
||||
return `${this.getIconWidth()} ${this.getIconHeight()}`;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'background-size': this.getImageSize(),
|
||||
'width': this.getWidth(),
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class InfoBoxComponent extends ComponentBase<azdata.InfoBoxCompon
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export default class InfoBoxComponent extends ComponentBase<azdata.InfoBoxCompon
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateInfoBox();
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return this.multiline ? '' : 'none';
|
||||
}
|
||||
|
||||
public async validate(): Promise<boolean> {
|
||||
public override async validate(): Promise<boolean> {
|
||||
await super.validate();
|
||||
// Let the input validate handle showing/hiding the error message
|
||||
const valid = this.inputElement.validate() === undefined;
|
||||
@@ -174,13 +174,13 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return valid;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
super.layout();
|
||||
this.layoutInputBox();
|
||||
}
|
||||
@@ -199,7 +199,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.setInputProperties(this.inputElement);
|
||||
this.validate().catch(onUnexpectedError);
|
||||
@@ -352,7 +352,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
return this.getPropertyOrDefault<number | undefined>((props) => props.maxLength, undefined);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this.inputElement.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
this.layout();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -84,11 +84,11 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
return this.getProperties().options ?? [];
|
||||
}
|
||||
|
||||
public get width(): string | number | undefined {
|
||||
public override get width(): string | number | undefined {
|
||||
return this.getProperties().width ?? undefined;
|
||||
}
|
||||
|
||||
public get height(): string | number | undefined {
|
||||
public override get height(): string | number | undefined {
|
||||
return this.getProperties().height ?? undefined;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
return this.getProperties().selectedOptionId ?? undefined;
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any }) {
|
||||
public override setProperties(properties: { [key: string]: any }) {
|
||||
super.setProperties(properties);
|
||||
if (this.options) {
|
||||
this._optionsList!.splice(0, this._optionsList!.length, this.options);
|
||||
@@ -131,7 +131,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
});
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
super.focus();
|
||||
if (this._selectedElementIdx !== undefined) {
|
||||
this._optionsList.domFocus();
|
||||
@@ -140,7 +140,7 @@ export default class ListViewComponent extends ComponentBase<azdata.ListViewComp
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -80,7 +80,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.setOptions(this.values.map(value => { return { text: value }; }), this.selectedRow);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default class ListBoxComponent extends ComponentBase<azdata.ListBoxProper
|
||||
}
|
||||
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': '100%'
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ export default class LoadingComponent extends ComponentBase<azdata.LoadingCompon
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class LoadingComponent extends ComponentBase<azdata.LoadingCompon
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
const wasLoading = this.loading;
|
||||
super.setProperties(properties);
|
||||
if (wasLoading && !this.loading) {
|
||||
|
||||
@@ -50,7 +50,7 @@ export class ModelViewContent extends ViewBase implements OnInit, IModelView {
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
override ngOnDestroy() {
|
||||
this._onDestroy.fire();
|
||||
super.ngOnDestroy();
|
||||
}
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
|
||||
import { EditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
import { ModelViewInput } from 'sql/workbench/browser/modelComponents/modelViewInput';
|
||||
import { ModelViewEditor } from 'sql/workbench/browser/modelComponents/modelViewEditor';
|
||||
import { EditorExtensions } from 'vs/workbench/common/editor';
|
||||
|
||||
// Model View editor registration
|
||||
const viewModelEditorDescriptor = EditorDescriptor.create(
|
||||
|
||||
@@ -41,10 +41,10 @@ export class ModelViewEditor extends EditorPane {
|
||||
/**
|
||||
* Sets focus on this editor. Specifically, it sets the focus on the hosted text editor.
|
||||
*/
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
}
|
||||
|
||||
public clearInput() {
|
||||
public override clearInput() {
|
||||
this.hideOrRemoveModelViewContainer();
|
||||
super.clearInput();
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export class ModelViewEditor extends EditorPane {
|
||||
}
|
||||
}
|
||||
|
||||
async setInput(input: ModelViewInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
|
||||
override async setInput(input: ModelViewInput, options?: EditorOptions, context?: IEditorOpenContext): Promise<void> {
|
||||
if (this.input && this.input.matches(input)) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ export class ModelViewInput extends EditorInput {
|
||||
return this._model.modelViewId;
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return 'ModelViewEditorInput';
|
||||
}
|
||||
|
||||
public resolve(refresh?: boolean): Promise<IEditorModel> {
|
||||
public override resolve(refresh?: boolean): Promise<IEditorModel> {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public override getName(): string {
|
||||
return this._title;
|
||||
}
|
||||
|
||||
@@ -132,18 +132,18 @@ export class ModelViewInput extends EditorInput {
|
||||
/**
|
||||
* An editor that is dirty will be asked to be saved once it closes.
|
||||
*/
|
||||
isDirty(): boolean {
|
||||
override isDirty(): boolean {
|
||||
return this._model.isDirty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the editor if it is dirty. Subclasses return a promise with a boolean indicating the success of the operation.
|
||||
*/
|
||||
save(): Promise<IEditorInput | undefined> {
|
||||
override save(): Promise<IEditorInput | undefined> {
|
||||
return this._model.save().then(saved => saved ? this : undefined);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._dialogPane) {
|
||||
this._dialogPane.dispose();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBa
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
|
||||
import { PropertiesContainer, PropertyItem } from 'sql/base/browser/ui/propertiesContainer/propertiesContainer.component';
|
||||
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'vs/workbench/common/theme';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'sql/workbench/common/theme';
|
||||
|
||||
@Component({
|
||||
selector: `modelview-properties-container`,
|
||||
@@ -44,7 +44,7 @@ export default class PropertiesContainerComponent extends ComponentBase<azdata.P
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._propertiesContainer.propertyItems = this.propertyItems;
|
||||
}
|
||||
|
||||
@@ -44,18 +44,18 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IEditorGroupsService editorGroupService: IEditorGroupsService,
|
||||
@IEditorService protected editorService: IEditorService
|
||||
@IEditorService editorService: IEditorService
|
||||
) {
|
||||
super(
|
||||
QueryTextEditor.ID, telemetryService, instantiationService, storageService,
|
||||
configurationService, themeService, editorService, editorGroupService);
|
||||
}
|
||||
|
||||
public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
public override createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor {
|
||||
return this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, {});
|
||||
}
|
||||
|
||||
protected getConfigurationOverrides(): IEditorOptions {
|
||||
protected override getConfigurationOverrides(): IEditorOptions {
|
||||
const options = super.getConfigurationOverrides();
|
||||
if (this.input) {
|
||||
options.inDiffEditor = false;
|
||||
@@ -85,18 +85,18 @@ export class QueryTextEditor extends BaseTextEditor {
|
||||
return options;
|
||||
}
|
||||
|
||||
setInput(input: UntitledTextEditorInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
return super.setInput(input, options, context, CancellationToken.None)
|
||||
.then(() => this.input.resolve()
|
||||
.then(editorModel => editorModel.load())
|
||||
.then(editorModel => this.getControl().setModel((<ResourceEditorModel>editorModel).textEditorModel)));
|
||||
override async setInput(input: UntitledTextEditorInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
await super.setInput(input, options, context, CancellationToken.None);
|
||||
const editorModel = await this.input.resolve() as ResourceEditorModel;
|
||||
await editorModel.resolve();
|
||||
this.getControl().setModel(editorModel.textEditorModel);
|
||||
}
|
||||
|
||||
protected getAriaLabel(): string {
|
||||
return nls.localize('queryTextEditorAriaLabel', "modelview code editor for view model.");
|
||||
}
|
||||
|
||||
public layout(dimension?: DOM.Dimension) {
|
||||
public override layout(dimension?: DOM.Dimension) {
|
||||
if (dimension) {
|
||||
this._dimension = dimension;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._input.name = this.name;
|
||||
this._input.value = this.value;
|
||||
@@ -121,7 +121,7 @@ export default class RadioButtonComponent extends ComponentBase<azdata.RadioButt
|
||||
this.setPropertyFromUI<string>((properties, label) => { properties.name = label; }, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
this.layout();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
Object.keys(this.iconClasses).forEach((key) => {
|
||||
DOM.removeCSSRulesContainingSelector(this.iconClasses[key]);
|
||||
});
|
||||
@@ -162,7 +162,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
return this.iconClasses[cardId];
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any }) {
|
||||
public override setProperties(properties: { [key: string]: any }) {
|
||||
super.setProperties(properties);
|
||||
// This is the entry point for the extension to set the selectedCardId
|
||||
if (this.selectedCardId) {
|
||||
@@ -227,7 +227,7 @@ export default class RadioCardGroup extends ComponentBase<azdata.RadioCardGroupC
|
||||
this.focusedCardId = undefined;
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight()
|
||||
|
||||
@@ -67,7 +67,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
return this._slider;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.setSliderProperties(this.sliderElement);
|
||||
this.validate().catch(onUnexpectedError);
|
||||
@@ -136,7 +136,7 @@ export default class SliderComponent extends ComponentBase<azdata.SliderComponen
|
||||
this.setPropertyFromUI<boolean | undefined>((props, value) => props.showTicks = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
this.sliderElement.focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
|
||||
@Inject(ILogService) readonly logService: ILogService
|
||||
@Inject(ILogService) logService: ILogService
|
||||
) {
|
||||
super(changeRef, el, logService);
|
||||
this._flexFlow = ''; // default
|
||||
@@ -72,7 +72,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
this._orientation = Orientation.VERTICAL; // default
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -136,11 +136,11 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return this._alignItems;
|
||||
}
|
||||
|
||||
public get height(): string {
|
||||
public override get height(): string {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get width(): string {
|
||||
public override get width(): string {
|
||||
return this._width;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
public get position(): string {
|
||||
public override get position(): string {
|
||||
return this._position;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ export default class SplitViewContainerImpl extends ContainerBase<FlexItemLayout
|
||||
return item.config && item.config.CSSStyles ? item.config.CSSStyles : {};
|
||||
}
|
||||
|
||||
public get CSSStyles(): CssStyles {
|
||||
public override get CSSStyles(): CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': this.getHeight(),
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
return this._tabs;
|
||||
}
|
||||
|
||||
onItemsUpdated(): void {
|
||||
override onItemsUpdated(): void {
|
||||
if (this.items.length === 0) {
|
||||
this._itemIndexToProcess = 0;
|
||||
this._tabs = [];
|
||||
@@ -121,11 +121,11 @@ export default class TabbedPanelComponent extends ContainerBase<TabConfig> imple
|
||||
}
|
||||
}
|
||||
|
||||
onItemLayoutUpdated(item: ItemDescriptor<TabConfig>): void {
|
||||
override onItemLayoutUpdated(item: ItemDescriptor<TabConfig>): void {
|
||||
this._panel.updateTab(item.config.id, { title: item.config.title, iconClass: item.config.icon ? createIconCssClass(item.config.icon) : undefined });
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
switch (action) {
|
||||
case ModelViewAction.SelectTab:
|
||||
if (typeof args?.[0] !== 'string') {
|
||||
|
||||
@@ -285,13 +285,13 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
this.layoutTable();
|
||||
super.layout();
|
||||
}
|
||||
@@ -340,7 +340,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this._tableData.clear();
|
||||
this._tableData.push(this.transformData(this.data, this.columns));
|
||||
@@ -529,7 +529,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
this._table.registerPlugin(filterPlugin);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
if (this._table.grid.getDataLength() > 0) {
|
||||
if (!this._table.grid.getActiveCell()) {
|
||||
this._table.grid.setActiveCell(0, 0);
|
||||
@@ -604,7 +604,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
return this.getPropertyOrDefault<boolean>((props) => props.headerFilter, false);
|
||||
}
|
||||
|
||||
public doAction(action: string, ...args: any[]): void {
|
||||
public override doAction(action: string, ...args: any[]): void {
|
||||
switch (action) {
|
||||
case ModelViewAction.AppendData:
|
||||
this.appendData(args[0]);
|
||||
@@ -628,7 +628,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
|
||||
}
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': this.getWidth(),
|
||||
'height': '100%',
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
|
||||
return this.getPropertyOrDefault<boolean>((props) => props.requiredIndicator, false);
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
this.updateText();
|
||||
this._changeRef.detectChanges();
|
||||
|
||||
@@ -15,8 +15,8 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
export abstract class TitledComponent<T extends azdata.TitledComponentProperties> extends ComponentBase<T> implements ITitledComponent {
|
||||
|
||||
constructor(
|
||||
protected _changeRef: ChangeDetectorRef,
|
||||
protected _el: ElementRef,
|
||||
_changeRef: ChangeDetectorRef,
|
||||
_el: ElementRef,
|
||||
logService: ILogService) {
|
||||
super(_changeRef, _el, logService);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export default class ToolbarContainer extends ContainerBase<ToolbarItemConfig> i
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -73,16 +73,16 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.baseInit();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.baseDestroy();
|
||||
}
|
||||
|
||||
public setDataProvider(handle: number, componentId: string, context: any): any {
|
||||
public override setDataProvider(handle: number, componentId: string, context: any): any {
|
||||
this._dataProvider = new TreeViewDataProvider(handle, componentId, context, this._notificationService);
|
||||
this.createTreeControl();
|
||||
}
|
||||
|
||||
public refreshDataProvider(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeComponentItem }): void {
|
||||
public override refreshDataProvider(itemsToRefreshByHandle: { [treeItemHandle: string]: ITreeComponentItem }): void {
|
||||
if (this._dataProvider) {
|
||||
this._dataProvider.getItemsToRefresh(itemsToRefreshByHandle);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public layout(): void {
|
||||
public override layout(): void {
|
||||
if (this._tree) {
|
||||
this.layoutTree();
|
||||
this._tree.refresh();
|
||||
@@ -157,7 +157,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.layout();
|
||||
}
|
||||
|
||||
public setProperties(properties: { [key: string]: any; }): void {
|
||||
public override setProperties(properties: { [key: string]: any; }): void {
|
||||
super.setProperties(properties);
|
||||
if (this._treeRenderer) {
|
||||
this._treeRenderer.options.withCheckbox = this.withCheckbox;
|
||||
@@ -172,7 +172,7 @@ export default class TreeComponent extends ComponentBase<azdata.TreeProperties>
|
||||
this.setPropertyFromUI<boolean>((properties, value) => { properties.withCheckbox = value; }, newValue);
|
||||
}
|
||||
|
||||
public get CSSStyles(): azdata.CssStyles {
|
||||
public override get CSSStyles(): azdata.CssStyles {
|
||||
return this.mergeCss(super.CSSStyles, {
|
||||
'width': '100%',
|
||||
'height': '100%'
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
|
||||
checked?: boolean;
|
||||
enabled?: boolean;
|
||||
onCheckedChanged?: (checked: boolean) => void;
|
||||
children?: ITreeComponentItem[];
|
||||
override children?: ITreeComponentItem[];
|
||||
|
||||
constructor(treeItem: ITreeComponentItem, resolve?: (() => Promise<ITreeComponentItem | undefined>)) {
|
||||
super(treeItem, resolve);
|
||||
@@ -29,7 +29,7 @@ export class ResolvableTreeComponentItem extends ResolvableTreeItem implements I
|
||||
this.children = deepClone(treeItem.children);
|
||||
}
|
||||
|
||||
asTreeItem(): ITreeComponentItem {
|
||||
override asTreeItem(): ITreeComponentItem {
|
||||
const item = super.asTreeItem() as ITreeComponentItem;
|
||||
item.checked = this.checked;
|
||||
item.enabled = this.enabled;
|
||||
@@ -63,7 +63,7 @@ export class TreeViewDataProvider extends vsTreeView.TreeViewDataProvider implem
|
||||
* @override
|
||||
* @param elements The elements to map
|
||||
*/
|
||||
protected async postGetChildren(elements: ITreeComponentItem[]): Promise<ResolvableTreeComponentItem[]> {
|
||||
protected override async postGetChildren(elements: ITreeComponentItem[]): Promise<ResolvableTreeComponentItem[]> {
|
||||
const result: ResolvableTreeComponentItem[] = [];
|
||||
const hasResolve = await this.hasResolve;
|
||||
if (elements) {
|
||||
|
||||
@@ -10,22 +10,29 @@ import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IMenuService } from 'vs/platform/actions/common/actions';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ActivityAction, ActivityActionViewItem, ICompositeBarColors } from 'vs/workbench/browser/parts/compositeBarActions';
|
||||
import { ActivityAction, ActivityActionViewItem, IActivityHoverOptions, ICompositeBarColors } from 'vs/workbench/browser/parts/compositeBarActions';
|
||||
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
|
||||
import { IHoverService } from 'vs/workbench/services/hover/browser/hover';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
export class AccountsActionViewItem extends ActivityActionViewItem {
|
||||
constructor(
|
||||
action: ActivityAction,
|
||||
colors: (theme: IColorTheme) => ICompositeBarColors,
|
||||
hoverOptions: IActivityHoverOptions,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextMenuService protected contextMenuService: IContextMenuService,
|
||||
@IMenuService protected menuService: IMenuService,
|
||||
@IAccountManagementService private readonly accountManagementService: IAccountManagementService
|
||||
@IAccountManagementService private readonly accountManagementService: IAccountManagementService,
|
||||
@IHoverService hoverService: IHoverService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
) {
|
||||
super(action, { draggable: false, colors, icon: true }, themeService);
|
||||
super(action, { draggable: false, colors, icon: true, hoverOptions: hoverOptions }, themeService, hoverService, configurationService, keybindingService);
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
|
||||
// Context menus are triggered on mouse down so that an item can be picked
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IModeSupport, IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorInput } from 'vs/workbench/common/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { getCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
@@ -12,6 +12,7 @@ import { localize } from 'vs/nls';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
import { ILanguageAssociationRegistry, Extensions as LanguageAssociationExtensions } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
|
||||
import { IModeSupport } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
const languageAssociationRegistry = Registry.as<ILanguageAssociationRegistry>(LanguageAssociationExtensions.LanguageAssociations);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export class ScriptSelectAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await scriptSelect(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -51,7 +51,7 @@ export class ScriptExecuteAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -78,7 +78,7 @@ export class ScriptAlterAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -104,7 +104,7 @@ export class EditDataAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await scriptEditSelect(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -129,7 +129,7 @@ export class ScriptCreateAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
@@ -156,7 +156,7 @@ export class ScriptDeleteAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(actionContext: BaseActionContext): Promise<void> {
|
||||
public override async run(actionContext: BaseActionContext): Promise<void> {
|
||||
await script(
|
||||
actionContext.profile!,
|
||||
actionContext.object!,
|
||||
|
||||
@@ -177,17 +177,17 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
public get text(): AbstractTextResourceEditorInput { return this._text; }
|
||||
public get results(): QueryResultsInput { return this._results; }
|
||||
// Description is shown beside the tab name in the combobox of open editors
|
||||
public getDescription(): string | undefined { return this._description; }
|
||||
public override getDescription(): string | undefined { return this._description; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
|
||||
public override revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
|
||||
return this._text.revert(group, options);
|
||||
}
|
||||
|
||||
public isReadonly(): boolean {
|
||||
public override isReadonly(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
public matches(otherInput: any): boolean {
|
||||
public override matches(otherInput: any): boolean {
|
||||
// we want to be able to match against our underlying input as well, bascially we are our underlying input
|
||||
if (otherInput instanceof QueryEditorInput) {
|
||||
return this._text.matches(otherInput._text);
|
||||
@@ -197,10 +197,10 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
}
|
||||
|
||||
// Forwarding resource functions to the inline sql file editor
|
||||
public isDirty(): boolean { return this._text.isDirty(); }
|
||||
public override isDirty(): boolean { return this._text.isDirty(); }
|
||||
public get resource(): URI { return this._text.resource; }
|
||||
|
||||
public getName(longForm?: boolean): string {
|
||||
public override getName(longForm?: boolean): string {
|
||||
if (this.configurationService.getValue<IQueryEditorConfiguration>('queryEditor').showConnectionInfoInTitle) {
|
||||
let profile = this.connectionManagementService.getConnectionProfile(this.uri);
|
||||
let title = '';
|
||||
@@ -222,16 +222,16 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
}
|
||||
}
|
||||
|
||||
save(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
|
||||
override save(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
|
||||
return this.text.save(group, options);
|
||||
}
|
||||
|
||||
saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
|
||||
override saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<IEditorInput | undefined> {
|
||||
return this.text.saveAs(group, options);
|
||||
}
|
||||
|
||||
// Called to get the tooltip of the tab
|
||||
public getTitle(): string {
|
||||
public override getTitle(): string {
|
||||
return this.getName(true);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
return this.connectionManagementService.getTabColorForUri(this.uri);
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
super.dispose(); // we want to dispose first so that for future logic we know we are disposed
|
||||
this.queryModelService.disposeQuery(this.uri);
|
||||
this.connectionManagementService.disconnectEditor(this, true);
|
||||
|
||||
@@ -50,15 +50,15 @@ export class QueryResultsInput extends EditorInput {
|
||||
super();
|
||||
}
|
||||
|
||||
getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return QueryResultsInput.ID;
|
||||
}
|
||||
|
||||
getName(): string {
|
||||
override getName(): string {
|
||||
return localize('extensionsInputName', "Extension");
|
||||
}
|
||||
|
||||
matches(other: any): boolean {
|
||||
override matches(other: any): boolean {
|
||||
if (other instanceof QueryResultsInput) {
|
||||
return (other._uri === this._uri);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export class QueryResultsInput extends EditorInput {
|
||||
return false;
|
||||
}
|
||||
|
||||
resolve(refresh?: boolean): Promise<any> {
|
||||
override resolve(refresh?: boolean): Promise<any> {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class QueryResultsInput extends EditorInput {
|
||||
return false;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import { QueryResultsInput } from 'sql/workbench/common/editor/query/queryResult
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { IQueryModelService } from 'sql/workbench/services/query/common/queryModel';
|
||||
|
||||
import { IEncodingSupport, EncodingMode } from 'vs/workbench/common/editor';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverService';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
|
||||
import { IUntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel';
|
||||
import { EncodingMode, IEncodingSupport } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
|
||||
export class UntitledQueryEditorInput extends QueryEditorInput implements IEncodingSupport {
|
||||
|
||||
@@ -29,11 +29,11 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IEncod
|
||||
super(description, text, results, connectionManagementService, queryModelService, configurationService);
|
||||
}
|
||||
|
||||
public resolve(): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> {
|
||||
public override resolve(): Promise<IUntitledTextEditorModel & IResolvedTextEditorModel> {
|
||||
return this.text.resolve();
|
||||
}
|
||||
|
||||
public get text(): UntitledTextEditorInput {
|
||||
public override get text(): UntitledTextEditorInput {
|
||||
return this._text as UntitledTextEditorInput;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IEncod
|
||||
return this.text.getMode();
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
override get typeId(): string {
|
||||
return UntitledQueryEditorInput.ID;
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IEncod
|
||||
return this.text.getEncoding();
|
||||
}
|
||||
|
||||
public setEncoding(encoding: string, mode: EncodingMode): void {
|
||||
this.text.setEncoding(encoding, mode);
|
||||
public setEncoding(encoding: string, mode: EncodingMode): Promise<void> {
|
||||
return this.text.setEncoding(encoding, mode);
|
||||
}
|
||||
|
||||
isUntitled(): boolean {
|
||||
override isUntitled(): boolean {
|
||||
// Subclasses need to explicitly opt-in to being untitled.
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@ import { IThemable } from 'vs/base/common/styler';
|
||||
import { attachStyler, IStyleOverrides } from 'vs/platform/theme/common/styler';
|
||||
import {
|
||||
SIDE_BAR_SECTION_HEADER_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, SIDE_BAR_DRAG_AND_DROP_BACKGROUND,
|
||||
PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, VERTICAL_TAB_ACTIVE_BACKGROUND, DASHBOARD_BORDER,
|
||||
|
||||
PANEL_ACTIVE_TITLE_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND
|
||||
} from 'vs/workbench/common/theme';
|
||||
import { VERTICAL_TAB_ACTIVE_BACKGROUND, DASHBOARD_BORDER } from 'sql/workbench/common/theme';
|
||||
|
||||
export interface IModalDialogStyleOverrides extends IStyleOverrides {
|
||||
dialogForeground?: cr.ColorIdentifier,
|
||||
|
||||
51
src/sql/workbench/common/theme.ts
Normal file
51
src/sql/workbench/common/theme.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { registerColor, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { Color, RGBA } from 'vs/base/common/color';
|
||||
import { TAB_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
export const VERTICAL_TAB_ACTIVE_BACKGROUND = registerColor('tab.verticalTabActiveBackground', {
|
||||
dark: '#444444',
|
||||
light: '#e1f0fe',
|
||||
hc: TAB_ACTIVE_BACKGROUND
|
||||
}, localize('verticalTabActiveBackground', "Active tab background color for vertical tabs"));
|
||||
|
||||
export const DASHBOARD_BORDER = registerColor('dashboard.border', {
|
||||
dark: '#8A8886',
|
||||
light: '#DDDDDD',
|
||||
hc: contrastBorder
|
||||
}, localize('dashboardBorder', "Color for borders in dashboard"));
|
||||
|
||||
export const DASHBOARD_WIDGET_TITLE = registerColor('dashboardWidget.title', {
|
||||
light: '#323130',
|
||||
dark: '#FFFFFF',
|
||||
hc: '#FFFFFF'
|
||||
}, localize('dashboardWidget', 'Color of dashboard widget title'));
|
||||
|
||||
export const DASHBOARD_WIDGET_SUBTEXT = registerColor('dashboardWidget.subText', {
|
||||
light: '#484644',
|
||||
dark: '#8A8886',
|
||||
hc: '#FFFFFF'
|
||||
}, localize('dashboardWidgetSubtext', "Color for dashboard widget subtext"));
|
||||
|
||||
export const PROPERTIES_CONTAINER_PROPERTY_VALUE = registerColor('propertiesContainer.propertyValue', {
|
||||
light: '#000000',
|
||||
dark: 'FFFFFF',
|
||||
hc: 'FFFFFF'
|
||||
}, localize('propertiesContainerPropertyValue', "Color for property values displayed in the properties container component"));
|
||||
|
||||
export const PROPERTIES_CONTAINER_PROPERTY_NAME = registerColor('propertiesContainer.propertyName', {
|
||||
light: '#161616',
|
||||
dark: '#8A8886',
|
||||
hc: '#FFFFFF'
|
||||
}, localize('propertiesContainerPropertyName', "Color for property names displayed in the properties container component"));
|
||||
|
||||
export const TOOLBAR_OVERFLOW_SHADOW = registerColor('toolbar.overflowShadow', {
|
||||
light: new Color(new RGBA(0, 0, 0, .132)),
|
||||
dark: new Color(new RGBA(0, 0, 0, 0.25)),
|
||||
hc: null
|
||||
}, localize('toolbarOverflowShadow', "Toolbar overflow shadow color"));
|
||||
@@ -60,7 +60,7 @@ abstract class AsmtServerAction extends Action {
|
||||
super(id, label, TARGET_ICON_CLASS[AssessmentTargetType.Server]);
|
||||
}
|
||||
|
||||
public async run(context: IAsmtActionInfo): Promise<void> {
|
||||
public override async run(context: IAsmtActionInfo): Promise<void> {
|
||||
this._telemetryService.sendActionEvent(TelemetryView.SqlAssessment, this.id);
|
||||
if (context && context.component && !context.component.isBusy) {
|
||||
context.component.showProgress(this.asmtType);
|
||||
@@ -133,7 +133,7 @@ export class AsmtDatabaseSelectItemsAction extends Action {
|
||||
TARGET_ICON_CLASS[AssessmentTargetType.Database]);
|
||||
}
|
||||
|
||||
public async run(context: IAsmtActionInfo): Promise<void> {
|
||||
public override async run(context: IAsmtActionInfo): Promise<void> {
|
||||
this._telemetryService.sendActionEvent(TelemetryView.SqlAssessment, this.id);
|
||||
if (context && context.component && !context.component.isBusy) {
|
||||
context.component.showProgress(AssessmentType.AvailableRules);
|
||||
@@ -179,7 +179,7 @@ export class AsmtDatabaseInvokeItemsAction extends Action {
|
||||
TARGET_ICON_CLASS[AssessmentTargetType.Database]);
|
||||
}
|
||||
|
||||
public async run(context: IAsmtActionInfo): Promise<void> {
|
||||
public override async run(context: IAsmtActionInfo): Promise<void> {
|
||||
this._telemetryService.sendActionEvent(TelemetryView.SqlAssessment, this.id);
|
||||
if (context && context.component && !context.component.isBusy) {
|
||||
context.component.showProgress(AssessmentType.InvokeAssessment);
|
||||
@@ -201,7 +201,7 @@ export class AsmtExportAsScriptAction extends Action {
|
||||
super(AsmtExportAsScriptAction.ID, AsmtExportAsScriptAction.LABEL, 'exportAsScriptIcon');
|
||||
}
|
||||
|
||||
public async run(context: IAsmtActionInfo): Promise<void> {
|
||||
public override async run(context: IAsmtActionInfo): Promise<void> {
|
||||
this._telemetryService.sendActionEvent(TelemetryView.SqlAssessment, AsmtExportAsScriptAction.ID);
|
||||
const items = context?.component?.recentResult?.result.items;
|
||||
if (items) {
|
||||
@@ -224,7 +224,7 @@ export class AsmtSamplesLinkAction extends Action {
|
||||
super(AsmtSamplesLinkAction.ID, AsmtSamplesLinkAction.LABEL, AsmtSamplesLinkAction.ICON);
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
this._telemetryService.sendActionEvent(TelemetryView.SqlAssessment, AsmtSamplesLinkAction.ID);
|
||||
await this._openerService.open(URI.parse(AsmtSamplesLinkAction.configHelpUri));
|
||||
}
|
||||
@@ -252,7 +252,7 @@ export class AsmtGenerateHTMLReportAction extends Action {
|
||||
return URI.file(filePath);
|
||||
}
|
||||
|
||||
public async run(context: IAsmtActionInfo): Promise<void> {
|
||||
public override async run(context: IAsmtActionInfo): Promise<void> {
|
||||
context.component.showProgress(AssessmentType.ReportGeneration);
|
||||
const choosenPath = await this._fileDialogService.pickFileToSave(this.suggestReportFile(context.component.recentResult.dateUpdated));
|
||||
context.component.stopProgress(AssessmentType.ReportGeneration);
|
||||
|
||||
@@ -47,6 +47,7 @@ import { LocalizedStrings } from 'sql/workbench/contrib/assessment/common/string
|
||||
import { ConnectionManagementInfo } from 'sql/platform/connection/common/connectionManagementInfo';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { attachTableFilterStyler } from 'sql/platform/theme/common/styler';
|
||||
import { DASHBOARD_BORDER } from 'sql/workbench/common/theme';
|
||||
|
||||
export const ASMTRESULTSVIEW_SELECTOR: string = 'asmt-results-view-component';
|
||||
export const ROW_HEIGHT: number = 25;
|
||||
@@ -168,7 +169,7 @@ export class AsmtResultsViewComponent extends TabChild implements IAssessmentCom
|
||||
this._telemetryService.sendViewEvent(TelemetryView.SqlAssessment);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
override ngOnDestroy(): void {
|
||||
this.isVisible = false;
|
||||
this.rowDetail?.destroy();
|
||||
this.filterPlugin.destroy();
|
||||
@@ -588,7 +589,7 @@ export class AsmtResultsViewComponent extends TabChild implements IAssessmentCom
|
||||
}
|
||||
|
||||
private _updateStyles(theme: IColorTheme): void {
|
||||
this.actionBarContainer.nativeElement.style.borderTopColor = theme.getColor(themeColors.DASHBOARD_BORDER, true).toString();
|
||||
this.actionBarContainer.nativeElement.style.borderTopColor = theme.getColor(DASHBOARD_BORDER, true).toString();
|
||||
let tableStyle: ITableStyles = {
|
||||
tableHeaderBackground: theme.getColor(themeColors.PANEL_BACKGROUND)
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ export class BackupDialog extends Modal {
|
||||
this._body = append(container, $('.backup-dialog'));
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
|
||||
@@ -74,7 +74,7 @@ export class BackupDialog extends Modal {
|
||||
}
|
||||
|
||||
/* Overwrite escape key behavior */
|
||||
protected onClose() {
|
||||
protected override onClose() {
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class BackupDialog extends Modal {
|
||||
this.hide('close');
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
if (this._moduleRef) {
|
||||
this._moduleRef.destroy();
|
||||
|
||||
@@ -45,7 +45,7 @@ export class CreateInsightAction extends Action {
|
||||
super(CreateInsightAction.ID, CreateInsightAction.LABEL, CreateInsightAction.ICON);
|
||||
}
|
||||
|
||||
public async run(context: IChartActionContext): Promise<void> {
|
||||
public override async run(context: IChartActionContext): Promise<void> {
|
||||
let uriString = this.getActiveUriString();
|
||||
if (!uriString) {
|
||||
this.showError(localize('createInsightNoEditor', "Cannot create insight as the active editor is not a SQL Editor"));
|
||||
@@ -115,7 +115,7 @@ export class ConfigureChartAction extends Action {
|
||||
super(ConfigureChartAction.ID, ConfigureChartAction.LABEL, ConfigureChartAction.ICON);
|
||||
}
|
||||
|
||||
public async run(context: IChartActionContext): Promise<void> {
|
||||
public override async run(context: IChartActionContext): Promise<void> {
|
||||
if (!this.dialog) {
|
||||
this.dialog = this.instantiationService.createInstance(ConfigureChartDialog, ConfigureChartAction.LABEL, ConfigureChartAction.ID, this._chart);
|
||||
this.dialog.render();
|
||||
@@ -136,7 +136,7 @@ export class CopyAction extends Action {
|
||||
super(CopyAction.ID, CopyAction.LABEL, CopyAction.ICON);
|
||||
}
|
||||
|
||||
public async run(context: IChartActionContext): Promise<void> {
|
||||
public override async run(context: IChartActionContext): Promise<void> {
|
||||
if (context.insight instanceof Graph) {
|
||||
let data = context.insight.getCanvasData();
|
||||
if (!data) {
|
||||
@@ -170,7 +170,7 @@ export class SaveImageAction extends Action {
|
||||
super(SaveImageAction.ID, SaveImageAction.LABEL, SaveImageAction.ICON);
|
||||
}
|
||||
|
||||
public async run(context: IChartActionContext): Promise<void> {
|
||||
public override async run(context: IChartActionContext): Promise<void> {
|
||||
if (context.insight instanceof Graph) {
|
||||
let fileFilters = new Array<FileFilter>({ extensions: ['png'], name: localize('resultsSerializer.saveAsFileExtensionPNGTitle', "PNG") });
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ export class ChartView extends Disposable implements IPanelView {
|
||||
return option.map(o => altNameHash[o] || o);
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
public override dispose() {
|
||||
dispose(this.optionDisposables);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ConfigureChartDialog extends Modal {
|
||||
this.show();
|
||||
}
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
super.render();
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ export class DashboardGridContainer extends DashboardTab implements OnDestroy {
|
||||
return new Array(max).fill(0).map((x, i) => i);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
override ngOnDestroy() {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
@@ -283,6 +283,6 @@ export class DashboardGridContainer extends DashboardTab implements OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
public enableEdit(): void {
|
||||
public override enableEdit(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ import { DashboardWidgetWrapper } from 'sql/workbench/contrib/dashboard/browser/
|
||||
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
|
||||
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { DASHBOARD_BORDER } from 'vs/workbench/common/theme';
|
||||
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { DASHBOARD_BORDER } from 'sql/workbench/common/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'dashboard-home-container',
|
||||
@@ -53,7 +53,7 @@ export class DashboardHomeContainer extends DashboardWidgetContainer {
|
||||
super(_cd);
|
||||
}
|
||||
|
||||
ngAfterContentInit() {
|
||||
override ngAfterContentInit() {
|
||||
this.updateTheme(this.themeService.getColorTheme());
|
||||
this._register(this.themeService.onDidColorThemeChange((event: IColorTheme) => {
|
||||
this.updateTheme(event);
|
||||
@@ -90,7 +90,7 @@ export class DashboardHomeContainer extends DashboardWidgetContainer {
|
||||
}
|
||||
}
|
||||
|
||||
public refresh(): void {
|
||||
public override refresh(): void {
|
||||
super.refresh();
|
||||
this._propertiesClass.refresh();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class DashboardNavSection extends DashboardTab implements OnDestroy, OnCh
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
override ngOnDestroy() {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export class DashboardNavSection extends DashboardTab implements OnDestroy, OnCh
|
||||
}
|
||||
}
|
||||
|
||||
public enableEdit(): void {
|
||||
public override enableEdit(): void {
|
||||
if (this._tabs) {
|
||||
this._tabs.forEach(tabContent => {
|
||||
tabContent.enableEdit();
|
||||
|
||||
@@ -66,7 +66,7 @@ export class DashboardWidgetContainer extends DashboardTab implements AfterConte
|
||||
this._widgetContent.refresh();
|
||||
}
|
||||
|
||||
public enableEdit(): void {
|
||||
public override enableEdit(): void {
|
||||
this._widgetContent.enableEdit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { values } from 'vs/base/common/collections';
|
||||
import { IColorTheme } from 'vs/platform/theme/common/themeService';
|
||||
import { DASHBOARD_BORDER } from 'sql/workbench/common/theme';
|
||||
|
||||
const componentMap: { [x: string]: Type<IDashboardWidget> } = {
|
||||
'properties-widget': PropertiesWidgetComponent,
|
||||
@@ -257,7 +258,7 @@ export class DashboardWidgetWrapper extends AngularDisposable implements OnInit
|
||||
if (!this._config.hideHeader) {
|
||||
const el = <HTMLElement>this._ref.nativeElement;
|
||||
const headerEl: HTMLElement = this.header.nativeElement;
|
||||
let borderColor = theme.getColor(themeColors.DASHBOARD_BORDER);
|
||||
let borderColor = theme.getColor(DASHBOARD_BORDER);
|
||||
let backgroundColor = theme.getColor(colors.editorBackground, true);
|
||||
const foregroundColor = theme.getColor(themeColors.SIDE_BAR_FOREGROUND, true);
|
||||
const border = theme.getColor(colors.contrastBorder, true);
|
||||
|
||||
@@ -107,7 +107,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
this._webview.mountTo(this._el.nativeElement);
|
||||
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
this._onMessage.fire(e.message);
|
||||
});
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
|
||||
@@ -30,7 +30,7 @@ export class EditDashboardAction extends Action {
|
||||
super(EditDashboardAction.ID, EditDashboardAction.EDITLABEL, EditDashboardAction.ICON);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
this.editFn.apply(this.context);
|
||||
this.toggleLabel();
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export class RefreshWidgetAction extends Action {
|
||||
super(RefreshWidgetAction.ID, RefreshWidgetAction.LABEL, RefreshWidgetAction.ICON);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
this.refreshFn.apply(this.context);
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ export class ToolbarAction extends Action {
|
||||
super(id, label, cssClass);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
try {
|
||||
this.runFn.apply(this.context, [this.id]);
|
||||
} catch (e) {
|
||||
@@ -99,7 +99,7 @@ export class ToggleMoreWidgetAction extends Action {
|
||||
super(ToggleMoreWidgetAction.ID, ToggleMoreWidgetAction.LABEL, ToggleMoreWidgetAction.ICON);
|
||||
}
|
||||
|
||||
async run(context: StandardKeyboardEvent): Promise<void> {
|
||||
override async run(context: StandardKeyboardEvent): Promise<void> {
|
||||
this._contextMenuService.showContextMenu({
|
||||
getAnchor: () => context.target,
|
||||
getActions: () => this._actions,
|
||||
@@ -121,7 +121,7 @@ export class DeleteWidgetAction extends Action {
|
||||
super(DeleteWidgetAction.ID, DeleteWidgetAction.LABEL, DeleteWidgetAction.ICON);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
this.angularEventService.sendAngularEvent(this._uri, AngularEventType.DELETE_WIDGET, { id: this._widgetId });
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ export class PinUnpinTabAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
public override async run(): Promise<void> {
|
||||
this._isPinned = !this._isPinned;
|
||||
this.updatePinStatus();
|
||||
this.angularEventService.sendAngularEvent(this._uri, AngularEventType.PINUNPIN_TAB, { tabId: this._tabId, isPinned: this._isPinned });
|
||||
@@ -176,7 +176,7 @@ export class AddFeatureTabAction extends Action {
|
||||
this._register(this._angularEventService.onAngularEvent(this._uri)(event => this.handleDashboardEvent(event)));
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
this._newDashboardTabService.showDialog(this._dashboardTabs, this._openedTabs, this._uri);
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ export class CollapseWidgetAction extends Action {
|
||||
this.expanded = !this.collpasedState;
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
override async run(): Promise<void> {
|
||||
this._toggleState();
|
||||
this._angularEventService.sendAngularEvent(this._uri, AngularEventType.COLLAPSE_WIDGET, this._widgetUuid);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { Action, IAction, IActionViewItem } from 'vs/base/common/actions';
|
||||
import { Action, IAction, SubmenuAction } from 'vs/base/common/actions';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
@@ -47,11 +47,13 @@ import { fillInActions } from 'vs/platform/actions/browser/menuEntryActionViewIt
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { NAV_SECTION } from 'sql/workbench/contrib/dashboard/browser/containers/dashboardNavSection.contribution';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { DASHBOARD_BORDER, EDITOR_PANE_BACKGROUND, TOOLBAR_OVERFLOW_SHADOW } from 'vs/workbench/common/theme';
|
||||
import { EDITOR_PANE_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IColorTheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { attachTabbedPanelStyler } from 'sql/workbench/common/styler';
|
||||
import { focusBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { LabeledMenuItemActionItem } from 'sql/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { DASHBOARD_BORDER, TOOLBAR_OVERFLOW_SHADOW } from 'sql/workbench/common/theme';
|
||||
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
|
||||
const dashboardRegistry = Registry.as<IDashboardRegistry>(DashboardExtensions.DashboardContributions);
|
||||
const homeTabGroupId = 'home';
|
||||
@@ -179,7 +181,7 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
|
||||
let secondary: IAction[] = [];
|
||||
const menu = this.menuService.createMenu(MenuId.DashboardToolbar, this.contextKeyService);
|
||||
let groups = menu.getActions({ arg: this.connectionManagementService.connectionInfo.connectionProfile.toIConnectionProfile(), shouldForwardArgs: true });
|
||||
fillInActions(groups, { primary, secondary }, false, (group: string) => group === undefined || group === '');
|
||||
fillInActions(groups, { primary, secondary }, false, '', Number.MAX_SAFE_INTEGER, (action: SubmenuAction, group: string, groupSize: number) => group === undefined || group === '');
|
||||
|
||||
primary.forEach(a => {
|
||||
if (a instanceof MenuItemAction) {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { DASHBOARD_WIDGET_TITLE, DASHBOARD_WIDGET_SUBTEXT } from 'sql/workbench/common/theme';
|
||||
import 'vs/css!./dashboardPanel';
|
||||
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { DASHBOARD_WIDGET_SUBTEXT, DASHBOARD_WIDGET_TITLE } from 'vs/workbench/common/theme';
|
||||
|
||||
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
|
||||
// widget title
|
||||
|
||||
@@ -10,7 +10,6 @@ import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
import { SingleConnectionManagementService } from 'sql/workbench/services/bootstrap/browser/commonServiceInterface.service';
|
||||
|
||||
export abstract class DashboardTab extends TabChild {
|
||||
public abstract layout(): void;
|
||||
public abstract readonly id: string;
|
||||
public abstract readonly editable: boolean;
|
||||
public abstract refresh(): void;
|
||||
|
||||
@@ -7,7 +7,8 @@ import { DashboardEditor } from 'sql/workbench/contrib/dashboard/browser/dashboa
|
||||
import { DashboardInput } from 'sql/workbench/browser/editor/profiler/dashboardInput';
|
||||
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
|
||||
import { EditorDescriptor, IEditorRegistry } from 'vs/workbench/browser/editor';
|
||||
import { EditorExtensions } from 'vs/workbench/common/editor';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IConfigurationNode, IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
|
||||
@@ -72,7 +72,7 @@ export class OEManageConnectionAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
async run(actionContext: ObjectExplorerActionsContext): Promise<void> {
|
||||
override async run(actionContext: ObjectExplorerActionsContext): Promise<void> {
|
||||
this._treeSelectionHandler = this._instantiationService.createInstance(TreeSelectionHandler);
|
||||
this._treeSelectionHandler.onTreeActionStateChange(true);
|
||||
try {
|
||||
@@ -124,7 +124,7 @@ export class OEManageConnectionAction extends Action {
|
||||
this._treeSelectionHandler.onTreeActionStateChange(false);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class DashboardEditor extends EditorPane {
|
||||
|
||||
public static ID: string = 'workbench.editor.connectiondashboard';
|
||||
private _dashboardContainer: HTMLElement;
|
||||
protected _input: DashboardInput;
|
||||
protected override _input: DashboardInput;
|
||||
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@@ -44,7 +44,7 @@ export class DashboardEditor extends EditorPane {
|
||||
super(DashboardEditor.ID, telemetryService, themeService, storageService);
|
||||
}
|
||||
|
||||
public get input(): DashboardInput {
|
||||
public override get input(): DashboardInput {
|
||||
return this._input;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class DashboardEditor extends EditorPane {
|
||||
/**
|
||||
* Sets focus on this editor. Specifically, it sets the focus on the hosted text editor.
|
||||
*/
|
||||
public focus(): void {
|
||||
public override focus(): void {
|
||||
|
||||
let profile: IConnectionProfile;
|
||||
if (this.input.connectionProfile instanceof ConnectionProfile) {
|
||||
@@ -77,7 +77,7 @@ export class DashboardEditor extends EditorPane {
|
||||
this._dashboardService.layout(dimension);
|
||||
}
|
||||
|
||||
public async setInput(input: DashboardInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
public override async setInput(input: DashboardInput, options: EditorOptions, context: IEditorOpenContext): Promise<void> {
|
||||
if (this.input && this.input.matches(input)) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ export class DashboardEditor extends EditorPane {
|
||||
input.setUniqueSelector(uniqueSelector);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { IAngularEventingService } from 'sql/platform/angularEventing/browser/an
|
||||
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
||||
|
||||
export class ExplorerManageAction extends ManageAction {
|
||||
public static readonly ID = 'explorerwidget.manage';
|
||||
public static override readonly ID = 'explorerwidget.manage';
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@@ -18,13 +18,13 @@ export class ExplorerManageAction extends ManageAction {
|
||||
super(id, label, connectionManagementService, angularEventingService);
|
||||
}
|
||||
|
||||
public async run(actionContext: ManageActionContext): Promise<void> {
|
||||
public override async run(actionContext: ManageActionContext): Promise<void> {
|
||||
await super.run(actionContext);
|
||||
}
|
||||
}
|
||||
|
||||
export class CustomExecuteCommandAction extends ExecuteCommandAction {
|
||||
run(context: ManageActionContext): Promise<any> {
|
||||
override run(context: ManageActionContext): Promise<any> {
|
||||
return super.run(context.profile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ export class ExplorerTable extends Disposable {
|
||||
const primary: IAction[] = [];
|
||||
const secondary: IAction[] = [];
|
||||
const result = { primary, secondary };
|
||||
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, result, g => g === 'inline');
|
||||
createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, result, 'inline');
|
||||
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => anchor,
|
||||
|
||||
@@ -46,7 +46,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private readonly _bootstrap: CommonServiceInterface,
|
||||
@Inject(forwardRef(() => Router)) private readonly _router: Router,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(WIDGET_CONFIG) _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ElementRef)) private readonly _el: ElementRef,
|
||||
@Inject(IWorkbenchThemeService) private readonly themeService: IWorkbenchThemeService,
|
||||
@Inject(IContextViewService) private readonly contextViewService: IContextViewService,
|
||||
@@ -60,6 +60,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef
|
||||
) {
|
||||
super(changeRef);
|
||||
this._config = _config;
|
||||
this._loadingMessage = this._config.context === 'database' ? nls.localize('loadingObjects', "loading objects") : nls.localize('loadingDatabases', "loading databases");
|
||||
this._loadingCompletedMessage = this._config.context === 'database' ? nls.localize('loadingObjectsCompleted', "loading objects completed.") : nls.localize('loadingDatabasesCompleted', "loading databases completed.");
|
||||
this.init();
|
||||
|
||||
@@ -24,7 +24,7 @@ export class RunInsightQueryAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
public async run(context: InsightActionContext): Promise<void> {
|
||||
public override async run(context: InsightActionContext): Promise<void> {
|
||||
let queryString: string = undefined;
|
||||
let eol: string = this._textResourcePropertiesService.getEOL(undefined);
|
||||
if (context.insight && context.insight.query) {
|
||||
|
||||
@@ -71,7 +71,7 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ComponentFactoryResolver)) private _componentFactoryResolver: ComponentFactoryResolver,
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private dashboardService: CommonServiceInterface,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(WIDGET_CONFIG) _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(forwardRef(() => Injector)) private _injector: Injector,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||
@@ -164,7 +164,7 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
get actions(): Array<Action> {
|
||||
override get actions(): Array<Action> {
|
||||
const actions: Array<Action> = [];
|
||||
if (this.insightConfig.details && (this.insightConfig.details.query || this.insightConfig.details.queryFile)) {
|
||||
actions.push(this.instantiationService.createInstance(InsightAction, InsightAction.ID, InsightAction.LABEL));
|
||||
|
||||
@@ -35,7 +35,7 @@ export default class BarChart extends ChartInsight {
|
||||
super(_changeRef, themeService, telemetryService);
|
||||
}
|
||||
|
||||
public setConfig(config: IBarChartConfig): void {
|
||||
public override setConfig(config: IBarChartConfig): void {
|
||||
let options = {};
|
||||
if (config.xAxisMax) {
|
||||
const opts = {
|
||||
@@ -127,7 +127,7 @@ export default class BarChart extends ChartInsight {
|
||||
super.setConfig(config);
|
||||
}
|
||||
|
||||
protected updateTheme(e: IColorTheme): void {
|
||||
protected override updateTheme(e: IColorTheme): void {
|
||||
super.updateTheme(e);
|
||||
const foregroundColor = e.getColor(colors.editorForeground);
|
||||
const foreground = foregroundColor ? foregroundColor.toString() : null;
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ChartType } from 'sql/workbench/contrib/charts/common/interfaces';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
|
||||
export default class DoughnutChart extends PieChart {
|
||||
protected readonly chartType: ChartType = ChartType.Doughnut;
|
||||
protected override readonly chartType: ChartType = ChartType.Doughnut;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) _changeRef: ChangeDetectorRef,
|
||||
|
||||
@@ -10,7 +10,7 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { ChartType } from 'sql/workbench/contrib/charts/common/interfaces';
|
||||
|
||||
export default class HorizontalBarChart extends BarChart {
|
||||
protected readonly chartType: ChartType = ChartType.HorizontalBar;
|
||||
protected override readonly chartType: ChartType = ChartType.HorizontalBar;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) _changeRef: ChangeDetectorRef,
|
||||
|
||||
@@ -21,9 +21,9 @@ export interface ILineConfig extends IBarChartConfig {
|
||||
const defaultLineConfig = mixin(deepClone(defaultChartConfig), { dataType: 'number' }) as ILineConfig;
|
||||
|
||||
export default class LineChart extends BarChart {
|
||||
protected readonly chartType: ChartType = ChartType.Line;
|
||||
protected _config: ILineConfig;
|
||||
protected _defaultConfig = defaultLineConfig;
|
||||
protected override readonly chartType: ChartType = ChartType.Line;
|
||||
protected override _config: ILineConfig;
|
||||
protected override _defaultConfig = defaultLineConfig;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) _changeRef: ChangeDetectorRef,
|
||||
@@ -33,14 +33,14 @@ export default class LineChart extends BarChart {
|
||||
super(_changeRef, themeService, telemetryService);
|
||||
}
|
||||
|
||||
public init() {
|
||||
public override init() {
|
||||
if (this._config.dataType === DataType.Point) {
|
||||
this.addAxisLabels();
|
||||
}
|
||||
super.init();
|
||||
}
|
||||
|
||||
public get chartData(): Array<IDataSet | IPointDataSet> {
|
||||
public override get chartData(): Array<IDataSet | IPointDataSet> {
|
||||
if (this._config.dataType === DataType.Number) {
|
||||
return super.getChartData();
|
||||
} else {
|
||||
@@ -48,7 +48,7 @@ export default class LineChart extends BarChart {
|
||||
}
|
||||
}
|
||||
|
||||
protected clearMemoize() {
|
||||
protected override clearMemoize() {
|
||||
super.clearMemoize();
|
||||
LineChart.MEMOIZER.clear();
|
||||
}
|
||||
@@ -68,7 +68,7 @@ export default class LineChart extends BarChart {
|
||||
return values(dataSetMap);
|
||||
}
|
||||
|
||||
public get labels(): Array<string> {
|
||||
public override get labels(): Array<string> {
|
||||
if (this._config.dataType === DataType.Number) {
|
||||
return super.getLabels();
|
||||
} else {
|
||||
|
||||
@@ -15,8 +15,8 @@ import { ChartType } from 'sql/workbench/contrib/charts/common/interfaces';
|
||||
const defaultScatterConfig = mixin(deepClone(defaultChartConfig), { dataType: 'point', dataDirection: 'horizontal' }) as ILineConfig;
|
||||
|
||||
export default class ScatterChart extends LineChart {
|
||||
protected readonly chartType: ChartType = ChartType.Scatter;
|
||||
protected _defaultConfig = defaultScatterConfig;
|
||||
protected override readonly chartType: ChartType = ChartType.Scatter;
|
||||
protected override _defaultConfig = defaultScatterConfig;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) _changeRef: ChangeDetectorRef,
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
const defaultTimeSeriesConfig = mixin(deepClone(defaultChartConfig), { dataType: 'point', dataDirection: 'horizontal' }) as ILineConfig;
|
||||
|
||||
export default class TimeSeriesChart extends LineChart {
|
||||
protected _defaultConfig = defaultTimeSeriesConfig;
|
||||
protected override _defaultConfig = defaultTimeSeriesConfig;
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) _changeRef: ChangeDetectorRef,
|
||||
@@ -28,7 +28,7 @@ export default class TimeSeriesChart extends LineChart {
|
||||
super(_changeRef, themeService, telemetryService);
|
||||
}
|
||||
|
||||
protected addAxisLabels(): void {
|
||||
protected override addAxisLabels(): void {
|
||||
const xLabel = this._config.xAxisLabel || this.getLabels()[1] || 'x';
|
||||
const yLabel = this._config.yAxisLabel || this.getLabels()[2] || 'y';
|
||||
|
||||
@@ -61,7 +61,7 @@ export default class TimeSeriesChart extends LineChart {
|
||||
this.options = assign({}, mixin(this.options, options));
|
||||
}
|
||||
|
||||
protected getDataAsPoint(): Array<IPointDataSet> {
|
||||
protected override getDataAsPoint(): Array<IPointDataSet> {
|
||||
const dataSetMap: { [label: string]: IPointDataSet } = {};
|
||||
this._data.rows.map(row => {
|
||||
if (row && row.length >= 3) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { subscriptionToDisposable } from 'sql/base/browser/lifecycle';
|
||||
import { PropertiesContainer, PropertyItem } from 'sql/base/browser/ui/propertiesContainer/propertiesContainer.component';
|
||||
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'vs/workbench/common/theme';
|
||||
import { PROPERTIES_CONTAINER_PROPERTY_NAME, PROPERTIES_CONTAINER_PROPERTY_VALUE } from 'sql/workbench/common/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'properties-widget',
|
||||
@@ -34,10 +34,11 @@ export class PropertiesWidgetComponent extends DashboardWidget implements IDashb
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _bootstrap: CommonServiceInterface,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(WIDGET_CONFIG) _config: WidgetConfig,
|
||||
@Inject(ILogService) private logService: ILogService
|
||||
) {
|
||||
super(changeRef);
|
||||
this._config = _config;
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,13 +38,14 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private readonly _dashboardService: DashboardServiceInterface,
|
||||
@Inject(WIDGET_CONFIG) protected readonly _config: WidgetConfig,
|
||||
@Inject(WIDGET_CONFIG) _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ElementRef)) private readonly _el: ElementRef,
|
||||
@Inject(IDashboardViewService) private readonly dashboardViewService: IDashboardViewService,
|
||||
@Inject(IWebviewService) private readonly webviewService: IWebviewService,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef
|
||||
) {
|
||||
super(changeRef);
|
||||
this._config = _config;
|
||||
this._id = (_config.widget[selector] as IWebviewWidgetConfig).id;
|
||||
}
|
||||
|
||||
@@ -106,7 +107,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
|
||||
this._webview.mountTo(this._el.nativeElement);
|
||||
this._onMessageDisposable = this._webview.onMessage(e => {
|
||||
this._onMessage.fire(e);
|
||||
this._onMessage.fire(e.message);
|
||||
});
|
||||
if (this._html) {
|
||||
this._webview.html = this._html;
|
||||
|
||||
@@ -94,7 +94,7 @@ suite('Dashboard Properties Widget Tests', () => {
|
||||
dashboardService.setup(x => x.connectionManagementService).returns(() => singleConnectionService.object);
|
||||
|
||||
const testLogService = new class extends NullLogService {
|
||||
error() {
|
||||
override error() {
|
||||
assert.fail('Called console Error unexpectedly');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -38,12 +38,12 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
@IObjectExplorerService private readonly objectExplorerService: IObjectExplorerService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
|
||||
@IOpenerService protected openerService: IOpenerService,
|
||||
@IThemeService protected themeService: IThemeService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, opener, themeService, telemetryService);
|
||||
super({ ...(options as IViewPaneOptions) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
||||
this._serverTreeView = this.objectExplorerService.getServerTreeView() as ServerTreeView;
|
||||
if (!this._serverTreeView) {
|
||||
this._serverTreeView = this.instantiationService.createInstance(ServerTreeView);
|
||||
@@ -51,15 +51,15 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
}
|
||||
}
|
||||
|
||||
protected renderHeader(container: HTMLElement): void {
|
||||
protected override renderHeader(container: HTMLElement): void {
|
||||
super.renderHeader(container);
|
||||
}
|
||||
|
||||
renderHeaderTitle(container: HTMLElement): void {
|
||||
override renderHeaderTitle(container: HTMLElement): void {
|
||||
super.renderHeaderTitle(container, this.options.title);
|
||||
}
|
||||
|
||||
renderBody(container: HTMLElement): void {
|
||||
override renderBody(container: HTMLElement): void {
|
||||
const viewletContainer = DOM.append(container, DOM.$('div.server-explorer-viewlet'));
|
||||
const viewContainer = DOM.append(viewletContainer, DOM.$('div.object-explorer-view'));
|
||||
this._serverTreeView.renderBody(viewContainer).then(undefined, error => {
|
||||
@@ -72,7 +72,7 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
return this._serverTreeView.tree;
|
||||
}
|
||||
|
||||
layoutBody(size: number): void {
|
||||
override layoutBody(size: number): void {
|
||||
this._serverTreeView.layout(size);
|
||||
DOM.toggleClass(this._root!, 'narrow', this._root!.clientWidth < 300);
|
||||
}
|
||||
@@ -111,11 +111,11 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
super.focus();
|
||||
this._serverTreeView.tree.domFocus();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { SqlIconId } from 'sql/base/common/codicons';
|
||||
|
||||
@@ -55,22 +54,6 @@ export class DataExplorerViewletViewsContribution implements IWorkbenchContribut
|
||||
}
|
||||
}
|
||||
|
||||
export class DataExplorerViewlet extends Viewlet {
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IStorageService protected storageService: IStorageService,
|
||||
@IInstantiationService protected instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextMenuService protected contextMenuService: IContextMenuService,
|
||||
@IExtensionService protected extensionService: IExtensionService,
|
||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
||||
@IWorkbenchLayoutService protected layoutService: IWorkbenchLayoutService,
|
||||
@IConfigurationService protected configurationService: IConfigurationService
|
||||
) {
|
||||
super(VIEWLET_ID, instantiationService.createInstance(DataExplorerViewPaneContainer), telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService, layoutService, configurationService);
|
||||
}
|
||||
}
|
||||
|
||||
export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
private root?: HTMLElement;
|
||||
|
||||
@@ -91,26 +74,22 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
|
||||
}
|
||||
|
||||
create(parent: HTMLElement): void {
|
||||
override create(parent: HTMLElement): void {
|
||||
this.root = parent;
|
||||
|
||||
super.create(parent);
|
||||
parent.classList.add('dataExplorer-viewlet');
|
||||
}
|
||||
|
||||
public updateStyles(): void {
|
||||
super.updateStyles();
|
||||
override focus(): void {
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void {
|
||||
override layout(dimension: Dimension): void {
|
||||
toggleClass(this.root!, 'narrow', dimension.width <= 300);
|
||||
super.layout(new Dimension(dimension.width, dimension.height));
|
||||
}
|
||||
|
||||
getOptimalWidth(): number {
|
||||
override getOptimalWidth(): number {
|
||||
return 400;
|
||||
}
|
||||
|
||||
@@ -126,7 +105,7 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
return actions;
|
||||
}
|
||||
|
||||
protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
|
||||
protected override createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane {
|
||||
let viewletPanel = this.instantiationService.createInstance(viewDescriptor.ctorDescriptor.ctor, options) as ViewPane;
|
||||
this._register(viewletPanel);
|
||||
return viewletPanel;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user