mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Agent improvements and fixes (#4077)
* fixed new/edit job break when no start step given * bump agent version * agent version bump
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "agent",
|
"name": "agent",
|
||||||
"displayName": "SQL Server Agent",
|
"displayName": "SQL Server Agent",
|
||||||
"description": "Manage and troubleshoot SQL Server Agent jobs",
|
"description": "Manage and troubleshoot SQL Server Agent jobs",
|
||||||
"version": "0.36.0",
|
"version": "0.36.1",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.startStepDropdown = view.modelBuilder.dropDown().withProperties({ width: 180 }).component();
|
this.startStepDropdown = view.modelBuilder.dropDown().withProperties({ width: 180 }).component();
|
||||||
this.startStepDropdown.enabled = this.steps.length > 1 ? true : false;
|
this.startStepDropdown.enabled = this.steps.length >= 1;
|
||||||
this.steps.forEach((step) => {
|
this.steps.forEach((step) => {
|
||||||
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
||||||
});
|
});
|
||||||
@@ -259,19 +259,21 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
width: 140
|
width: 140
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
let stepDialog = new JobStepDialog(this.model.ownerUri, '' , this.model, null, true);
|
|
||||||
stepDialog.onSuccess((step) => {
|
|
||||||
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
|
||||||
this.steps.push(stepInfo);
|
|
||||||
this.stepsTable.data = this.convertStepsToData(this.steps);
|
|
||||||
this.startStepDropdownValues = [];
|
|
||||||
this.steps.forEach((step) => {
|
|
||||||
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
|
||||||
});
|
|
||||||
this.startStepDropdown.values = this.startStepDropdownValues;
|
|
||||||
});
|
|
||||||
this.newStepButton.onDidClick((e)=>{
|
this.newStepButton.onDidClick((e)=>{
|
||||||
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
||||||
|
let stepDialog = new JobStepDialog(this.model.ownerUri, '' , this.model, null, true);
|
||||||
|
stepDialog.onSuccess((step) => {
|
||||||
|
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
||||||
|
this.steps.push(stepInfo);
|
||||||
|
this.stepsTable.data = this.convertStepsToData(this.steps);
|
||||||
|
this.startStepDropdownValues = [];
|
||||||
|
this.steps.forEach((step) => {
|
||||||
|
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
||||||
|
});
|
||||||
|
this.startStepDropdown.values = this.startStepDropdownValues;
|
||||||
|
this.startStepDropdown.enabled = true;
|
||||||
|
this.model.jobSteps = this.steps;
|
||||||
|
});
|
||||||
stepDialog.jobName = this.nameTextBox.value;
|
stepDialog.jobName = this.nameTextBox.value;
|
||||||
stepDialog.openDialog();
|
stepDialog.openDialog();
|
||||||
} else {
|
} else {
|
||||||
@@ -341,7 +343,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
||||||
});
|
});
|
||||||
this.startStepDropdown.values = this.startStepDropdownValues;
|
this.startStepDropdown.values = this.startStepDropdownValues;
|
||||||
|
this.model.jobSteps = this.steps;
|
||||||
});
|
});
|
||||||
editStepDialog.openDialog();
|
editStepDialog.openDialog();
|
||||||
}
|
}
|
||||||
@@ -374,7 +376,9 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
this.startStepDropdownValues.push({ displayName: step.id + ': ' + step.stepName, name: step.id.toString() });
|
||||||
});
|
});
|
||||||
this.startStepDropdown.values = this.startStepDropdownValues;
|
this.startStepDropdown.values = this.startStepDropdownValues;
|
||||||
|
this.startStepDropdown.enabled = this.steps.length >= 1;
|
||||||
}
|
}
|
||||||
|
this.model.jobSteps = this.steps;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -690,7 +694,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.model.pageLevel = this.getActualConditionValue(this.pagerCheckBox, this.pagerConditionDropdown);
|
this.model.pageLevel = this.getActualConditionValue(this.pagerCheckBox, this.pagerConditionDropdown);
|
||||||
this.model.eventLogLevel = this.getActualConditionValue(this.eventLogCheckBox, this.eventLogConditionDropdown);
|
this.model.eventLogLevel = this.getActualConditionValue(this.eventLogCheckBox, this.eventLogConditionDropdown);
|
||||||
this.model.deleteLevel = this.getActualConditionValue(this.deleteJobCheckBox, this.deleteJobConditionDropdown);
|
this.model.deleteLevel = this.getActualConditionValue(this.deleteJobCheckBox, this.deleteJobConditionDropdown);
|
||||||
this.model.startStepId = +this.getDropdownValue(this.startStepDropdown);
|
this.model.startStepId = this.startStepDropdown.enabled ? +this.getDropdownValue(this.startStepDropdown) : 1;
|
||||||
if (!this.model.jobSteps) {
|
if (!this.model.jobSteps) {
|
||||||
this.model.jobSteps = [];
|
this.model.jobSteps = [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user