mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
Refresh agent dashboard panel after create\update\delete operations (#1861)
* Edit alert WIP * A couple alert edit bugs * Hook up dashboard refresh notification * Hook onchange event to other agent service calls * Switch update handler to scalar value * Add null check on handler callback
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as vscode from 'vscode';
|
||||
import { IAgentDialogData } from '../interfaces';
|
||||
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
|
||||
private static readonly OkButtonText: string = localize('createAlert.OK', 'OK');
|
||||
private static readonly CancelButtonText: string = localize('createAlert.Cancel', 'Cancel');
|
||||
private static readonly OkButtonText: string = localize('agentDialog.OK', 'OK');
|
||||
private static readonly CancelButtonText: string = localize('agentDialog.Cancel', 'Cancel');
|
||||
|
||||
protected _onSuccess: vscode.EventEmitter<T> = new vscode.EventEmitter<T>();
|
||||
public readonly onSuccess: vscode.Event<T> = this._onSuccess.event;
|
||||
@@ -23,6 +23,10 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
||||
constructor(public ownerUri: string, public model: T, public title: string) {
|
||||
}
|
||||
|
||||
public get dialogMode(): AgentDialogMode {
|
||||
return this.model.dialogMode;
|
||||
}
|
||||
|
||||
protected abstract async updateModel();
|
||||
|
||||
protected abstract async initializeDialog(dialog: sqlops.window.modelviewdialog.Dialog);
|
||||
|
||||
Reference in New Issue
Block a user