From 21cccd7eaabd401c7512789b4393ad6abc3a206a Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Thu, 5 Jul 2018 10:29:33 -0700 Subject: [PATCH] Fix a couple bugs in proxy and alert handlers (#650) --- .../Agent/AgentService.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Agent/AgentService.cs b/src/Microsoft.SqlTools.ServiceLayer/Agent/AgentService.cs index be8c557e..64bd854f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Agent/AgentService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Agent/AgentService.cs @@ -645,13 +645,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent var proxy = dataContainer.Server.JobServer.ProxyAccounts[i]; proxies[i] = new AgentProxyInfo { - Id = proxy.ID, AccountName = proxy.Name, Description = proxy.Description, - CredentialName = proxy.CredentialName, - CredentialIdentity = proxy.CredentialIdentity, - CredentialId = proxy.CredentialID, - IsEnabled = proxy.IsEnabled, + CredentialName = proxy.CredentialName }; } result.Proxies = proxies; @@ -897,9 +893,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent ConnectionServiceInstance.TryFindConnection(ownerUri, out connInfo); CDataContainer dataContainer = CDataContainer.CreateDataContainer(connInfo, databaseExists: true); STParameters param = new STParameters(dataContainer.Document); - param.SetParam("alert", alert.JobName); + param.SetParam("alert", alert.Name); - if (alert != null && !string.IsNullOrWhiteSpace(alert.JobName)) + if (alert != null) { using (AgentAlertActions agentAlert = new AgentAlertActions(dataContainer, alert, configAction)) {