mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Fix Agent actions for docker servers (#1489)
This commit is contained in:
@@ -1141,7 +1141,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
|||||||
CreateJobData(ownerUri, schedule.JobName, out dataContainer, out jobData);
|
CreateJobData(ownerUri, schedule.JobName, out dataContainer, out jobData);
|
||||||
}
|
}
|
||||||
|
|
||||||
const string UrnFormatStr = "Server[@Name='{0}']/JobServer[@Name='{0}']/Job[@Name='{1}']/Schedule[@Name='{2}']";
|
const string UrnFormatStr = "Server/JobServer[@Name='{0}']/Job[@Name='{1}']/Schedule[@Name='{2}']";
|
||||||
string serverName = dataContainer.Server.Name.ToUpper();
|
string serverName = dataContainer.Server.Name.ToUpper();
|
||||||
string scheduleUrn = string.Format(UrnFormatStr, serverName, jobData.Job.Name, schedule.Name);
|
string scheduleUrn = string.Format(UrnFormatStr, serverName, jobData.Job.Name, schedule.Name);
|
||||||
|
|
||||||
@@ -1192,7 +1192,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
|||||||
const string XmlParamsElementName = "params";
|
const string XmlParamsElementName = "params";
|
||||||
const string XmlJobElementName = "job";
|
const string XmlJobElementName = "job";
|
||||||
const string XmlUrnElementName = "urn";
|
const string XmlUrnElementName = "urn";
|
||||||
const string UrnFormatStr = "Server[@Name='{0}']/JobServer[@Name='{0}']/Job[@Name='{1}']";
|
const string UrnFormatStr = "Server/JobServer[@Name='{0}']/Job[@Name='{1}']";
|
||||||
|
|
||||||
// Write out XML.
|
// Write out XML.
|
||||||
StringWriter textWriter = new StringWriter();
|
StringWriter textWriter = new StringWriter();
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
|
|||||||
JobStep jobStep = null;
|
JobStep jobStep = null;
|
||||||
if (jobData.Job != null)
|
if (jobData.Job != null)
|
||||||
{
|
{
|
||||||
const string UrnFormatStr = "Server[@Name='{0}']/JobServer[@Name='{0}']/Job[@Name='{1}']/Step[@Name='{2}']";
|
const string UrnFormatStr = "Server/JobServer[@Name='{0}']/Job[@Name='{1}']/Step[@Name='{2}']";
|
||||||
string serverName = this.DataContainer.Server.Name.ToUpper();
|
string serverName = this.DataContainer.Server.Name.ToUpper();
|
||||||
string urn = string.Format(UrnFormatStr, serverName, jobData.Job.Name, stepName);
|
string urn = string.Format(UrnFormatStr, serverName, jobData.Job.Name, stepName);
|
||||||
jobStep = jobData.Job.Parent.Parent.GetSmoObject(urn) as JobStep;
|
jobStep = jobData.Job.Parent.Parent.GetSmoObject(urn) as JobStep;
|
||||||
|
|||||||
Reference in New Issue
Block a user