mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
Agent - committer work (#4758)
* fix delete job * added the ability to change and retrieve jobowner * fixed UX for delete step * improved operator actions * fixed operators and proxies * added errors for failures
This commit is contained in:
@@ -202,7 +202,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
await view.initializeModel(formModel);
|
||||
|
||||
this.nameTextBox.value = this.model.name;
|
||||
this.ownerTextBox.value = this.model.defaultOwner;
|
||||
this.ownerTextBox.value = this.model.owner;
|
||||
this.categoryDropdown.values = this.model.jobCategories;
|
||||
|
||||
let idx: number = undefined;
|
||||
@@ -349,13 +349,13 @@ export class JobDialog extends AgentDialog<JobData> {
|
||||
}
|
||||
});
|
||||
|
||||
this.deleteStepButton.onDidClick(() => {
|
||||
this.deleteStepButton.onDidClick(async() => {
|
||||
if (this.stepsTable.selectedRows.length === 1) {
|
||||
let rowNumber = this.stepsTable.selectedRows[0];
|
||||
AgentUtils.getAgentService().then((agentService) => {
|
||||
AgentUtils.getAgentService().then(async (agentService) => {
|
||||
let stepData = this.steps[rowNumber];
|
||||
if (stepData.jobId) {
|
||||
agentService.deleteJobStep(this.ownerUri, stepData).then((result) => {
|
||||
await agentService.deleteJobStep(this.ownerUri, stepData).then((result) => {
|
||||
if (result && result.success) {
|
||||
this.steps.splice(rowNumber, 1);
|
||||
let data = this.convertStepsToData(this.steps);
|
||||
|
||||
@@ -97,20 +97,18 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
||||
this.generalTab.registerContent(async view => {
|
||||
|
||||
this.nameTextBox = view.modelBuilder.inputBox().component();
|
||||
|
||||
this.enabledCheckBox = view.modelBuilder.checkBox()
|
||||
.withProperties({
|
||||
label: OperatorDialog.EnabledCheckboxLabel
|
||||
}).component();
|
||||
this.enabledCheckBox.checked = true;
|
||||
this.nameTextBox.value = this.model.name;
|
||||
this.emailNameTextBox = view.modelBuilder.inputBox().component();
|
||||
this.emailNameTextBox.value = this.model.emailAddress;
|
||||
|
||||
this.pagerEmailNameTextBox = view.modelBuilder.inputBox().component();
|
||||
this.pagerEmailNameTextBox.value = this.model.pagerAddress;
|
||||
|
||||
this.enabledCheckBox = view.modelBuilder.checkBox()
|
||||
.withProperties({
|
||||
label: OperatorDialog.EnabledCheckboxLabel
|
||||
}).component();
|
||||
this.enabledCheckBox.checked = this.model.enabled;
|
||||
|
||||
this.pagerMondayCheckBox = view.modelBuilder.checkBox()
|
||||
.withProperties({
|
||||
@@ -367,7 +365,6 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
||||
}] ,
|
||||
title: OperatorDialog.PagerDutyScheduleLabel
|
||||
}]).withLayout({ width: '100%' }).component();
|
||||
|
||||
await view.initializeModel(formModel);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user