Edit Agent Alert updates (#1872)

* Set database name and severity when editing alert

* Add Operator and Proxy edit

* Add edit job hookup

* Edit WIP

* Additional edit alert updates

* Remove unused method
This commit is contained in:
Karl Burtram
2018-07-09 10:47:50 -07:00
committed by GitHub
parent bdc391d376
commit fbd5e819a2
14 changed files with 201 additions and 48 deletions

View File

@@ -14,7 +14,8 @@ export class JobDialog extends AgentDialog<JobData> {
// TODO: localize
// Top level
private static readonly DialogTitle: string = 'New Job';
private static readonly CreateDialogTitle: string = 'New Job';
private static readonly EditDialogTitle: string = 'Edit Job';
private readonly GeneralTabText: string = 'General';
private readonly StepsTabText: string = 'Steps';
private readonly SchedulesTabText: string = 'Schedules';
@@ -97,8 +98,11 @@ export class JobDialog extends AgentDialog<JobData> {
private alertsTable: sqlops.TableComponent;
private newAlertButton: sqlops.ButtonComponent;
constructor(ownerUri: string) {
super(ownerUri, new JobData(ownerUri), JobDialog.DialogTitle);
constructor(ownerUri: string, jobInfo: sqlops.AgentJobInfo = undefined) {
super(
ownerUri,
new JobData(ownerUri),
jobInfo ? JobDialog.EditDialogTitle : JobDialog.CreateDialogTitle);
}
protected async initializeDialog() {
@@ -159,6 +163,7 @@ export class JobDialog extends AgentDialog<JobData> {
await view.initializeModel(formModel);
this.nameTextBox.value = this.model.name;
this.ownerTextBox.value = this.model.defaultOwner;
this.categoryDropdown.values = this.model.jobCategories;
this.categoryDropdown.value = this.model.jobCategories[0];