This commit is contained in:
Virtuworks 2014-12-20 07:50:13 -05:00
commit b7db9f30cb
8 changed files with 265 additions and 204 deletions

View file

@ -6195,6 +6195,12 @@ INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [D
END END
GO GO
IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'PAUSE_BETWEEN_QUERIES' )
BEGIN
INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_DOMAIN_LOOKUP', N'PAUSE_BETWEEN_QUERIES', N'String', N'100', 4)
END
GO
IF EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'SERVER_NAME' ) IF EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'SERVER_NAME' )
BEGIN BEGIN
UPDATE [dbo].[ScheduleTaskParameters] SET [DefaultValue] = N'' WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'SERVER_NAME' UPDATE [dbo].[ScheduleTaskParameters] SET [DefaultValue] = N'' WHERE [TaskID] = N'SCHEDULE_TASK_DOMAIN_LOOKUP' AND [ParameterID]= N'SERVER_NAME'
@ -6306,91 +6312,91 @@ END
GO GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'HtmlBody' ) IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainExpirationLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml"> INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainExpirationLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>Domain Expiration Information</title> <title>Domain Expiration Information</title>
<style type="text/css"> <style type="text/css">
.Summary { background-color: ##ffffff; padding: 5px; } .Summary { background-color: ##ffffff; padding: 5px; }
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; } .Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
.Summary A { color: ##0153A4; } .Summary A { color: ##0153A4; }
.Summary { font-family: Tahoma; font-size: 9pt; } .Summary { font-family: Tahoma; font-size: 9pt; }
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; } .Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
.Summary H2 { font-size: 1.3em; color: ##1F4978; } .Summary H2 { font-size: 1.3em; color: ##1F4978; }
.Summary TABLE { border: solid 1px ##e5e5e5; } .Summary TABLE { border: solid 1px ##e5e5e5; }
.Summary TH, .Summary TH,
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; } .Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
.Summary TD { padding: 8px; font-size: 9pt; } .Summary TD { padding: 8px; font-size: 9pt; }
.Summary UL LI { font-size: 1.1em; font-weight: bold; } .Summary UL LI { font-size: 1.1em; font-weight: bold; }
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; } .Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
</style> </style>
</head> </head>
<body> <body>
<div class="Summary"> <div class="Summary">
<a name="top"></a> <a name="top"></a>
<div class="Header"> <div class="Header">
Domain Expiration Information Domain Expiration Information
</div> </div>
<ad:if test="#user#"> <ad:if test="#user#">
<p> <p>
Hello #user.FirstName#, Hello #user.FirstName#,
</p> </p>
</ad:if> </ad:if>
<p> <p>
Please, find below details of your domain expiration information. Please, find below details of your domain expiration information.
</p> </p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Domain</th> <th>Domain</th>
<th>Customer</th> <th>Customer</th>
<th>Expiration Date</th> <th>Expiration Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<ad:foreach collection="#Domains#" var="Domain" index="i"> <ad:foreach collection="#Domains#" var="Domain" index="i">
<tr> <tr>
<td>#Domain.DomainName#</td> <td>#Domain.DomainName#</td>
<td>#Domain.Customer#</td> <td>#Domain.Customer#</td>
<td>#Domain.ExpirationDate#</td> <td>#Domain.ExpirationDate#</td>
</tr> </tr>
</ad:foreach> </ad:foreach>
</tbody> </tbody>
</table> </table>
<ad:if test="#IncludeNonExistenDomains#"> <ad:if test="#IncludeNonExistenDomains#">
<p> <p>
Please, find below details of your non-existen domains. Please, find below details of your non-existen domains.
</p> </p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Domain</th> <th>Domain</th>
<th>Customer</th> <th>Customer</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<ad:foreach collection="#NonExistenDomains#" var="Domain" index="i"> <ad:foreach collection="#NonExistenDomains#" var="Domain" index="i">
<tr> <tr>
<td>#Domain.DomainName#</td> <td>#Domain.DomainName#</td>
<td>#Domain.Customer#</td> <td>#Domain.Customer#</td>
</tr> </tr>
</ad:foreach> </ad:foreach>
</tbody> </tbody>
</table> </table>
</ad:if> </ad:if>
<p> <p>
If you have any questions regarding your hosting account, feel free to contact our support department at any time. If you have any questions regarding your hosting account, feel free to contact our support department at any time.
</p> </p>
<p> <p>
Best regards Best regards
</p>') </p>')
END END
GO GO
@ -6454,76 +6460,76 @@ END
GO GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'HtmlBody' ) IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml"> INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'HtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>MX and NS Changes Information</title> <title>MX and NS Changes Information</title>
<style type="text/css"> <style type="text/css">
.Summary { background-color: ##ffffff; padding: 5px; } .Summary { background-color: ##ffffff; padding: 5px; }
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; } .Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
.Summary A { color: ##0153A4; } .Summary A { color: ##0153A4; }
.Summary { font-family: Tahoma; font-size: 9pt; } .Summary { font-family: Tahoma; font-size: 9pt; }
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; } .Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
.Summary H2 { font-size: 1.3em; color: ##1F4978; } .Summary H2 { font-size: 1.3em; color: ##1F4978; }
.Summary TABLE { border: solid 1px ##e5e5e5; } .Summary TABLE { border: solid 1px ##e5e5e5; }
.Summary TH, .Summary TH,
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; } .Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
.Summary TD { padding: 8px; font-size: 9pt; } .Summary TD { padding: 8px; font-size: 9pt; }
.Summary UL LI { font-size: 1.1em; font-weight: bold; } .Summary UL LI { font-size: 1.1em; font-weight: bold; }
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; } .Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
</style> </style>
</head> </head>
<body> <body>
<div class="Summary"> <div class="Summary">
<a name="top"></a> <a name="top"></a>
<div class="Header"> <div class="Header">
MX and NS Changes Information MX and NS Changes Information
</div> </div>
<ad:if test="#user#"> <ad:if test="#user#">
<p> <p>
Hello #user.FirstName#, Hello #user.FirstName#,
</p> </p>
</ad:if> </ad:if>
<p> <p>
Please, find below details of MX and NS changes. Please, find below details of MX and NS changes.
</p> </p>
<ad:foreach collection="#Domains#" var="Domain" index="i"> <ad:foreach collection="#Domains#" var="Domain" index="i">
<h2>#Domain.DomainName# - #DomainUsers[Domain.PackageId].FirstName# #DomainUsers[Domain.PackageId].LastName#</h2> <h2>#Domain.DomainName# - #DomainUsers[Domain.PackageId].FirstName# #DomainUsers[Domain.PackageId].LastName#</h2>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>DNS</th> <th>DNS</th>
<th>Type</th> <th>Type</th>
<th>Status</th> <th>Status</th>
<th>Old Value</th> <th>Old Value</th>
<th>New Value</th> <th>New Value</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<ad:foreach collection="#Domain.DnsChanges#" var="DnsChange" index="j"> <ad:foreach collection="#Domain.DnsChanges#" var="DnsChange" index="j">
<tr> <tr>
<td>#DnsChange.DnsServer#</td> <td>#DnsChange.DnsServer#</td>
<td>#DnsChange.Type#</td> <td>#DnsChange.Type#</td>
<td>#DnsChange.Status#</td> <td>#DnsChange.Status#</td>
<td>#DnsChange.OldRecord.Value#</td> <td>#DnsChange.OldRecord.Value#</td>
<td>#DnsChange.NewRecord.Value#</td> <td>#DnsChange.NewRecord.Value#</td>
</tr> </tr>
</ad:foreach> </ad:foreach>
</tbody> </tbody>
</table> </table>
</ad:foreach> </ad:foreach>
<p> <p>
If you have any questions regarding your hosting account, feel free to contact our support department at any time. If you have any questions regarding your hosting account, feel free to contact our support department at any time.
</p> </p>
<p> <p>
Best regards Best regards
</p>') </p>')
END END
GO GO
@ -6573,48 +6579,48 @@ END
GO GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'NoChangesHtmlBody' ) IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'DomainLookupLetter' AND [PropertyName]= N'NoChangesHtmlBody' )
BEGIN BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'NoChangesHtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml"> INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'DomainLookupLetter', N'NoChangesHtmlBody', N'<html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>MX and NS Changes Information</title> <title>MX and NS Changes Information</title>
<style type="text/css"> <style type="text/css">
.Summary { background-color: ##ffffff; padding: 5px; } .Summary { background-color: ##ffffff; padding: 5px; }
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; } .Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
.Summary A { color: ##0153A4; } .Summary A { color: ##0153A4; }
.Summary { font-family: Tahoma; font-size: 9pt; } .Summary { font-family: Tahoma; font-size: 9pt; }
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; } .Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
.Summary H2 { font-size: 1.3em; color: ##1F4978; } .Summary H2 { font-size: 1.3em; color: ##1F4978; }
.Summary TABLE { border: solid 1px ##e5e5e5; } .Summary TABLE { border: solid 1px ##e5e5e5; }
.Summary TH, .Summary TH,
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; } .Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
.Summary TD { padding: 8px; font-size: 9pt; } .Summary TD { padding: 8px; font-size: 9pt; }
.Summary UL LI { font-size: 1.1em; font-weight: bold; } .Summary UL LI { font-size: 1.1em; font-weight: bold; }
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; } .Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
</style> </style>
</head> </head>
<body> <body>
<div class="Summary"> <div class="Summary">
<a name="top"></a> <a name="top"></a>
<div class="Header"> <div class="Header">
MX and NS Changes Information MX and NS Changes Information
</div> </div>
<ad:if test="#user#"> <ad:if test="#user#">
<p> <p>
Hello #user.FirstName#, Hello #user.FirstName#,
</p> </p>
</ad:if> </ad:if>
<p> <p>
No MX and NS changes have been found. No MX and NS changes have been found.
</p> </p>
<p> <p>
If you have any questions regarding your hosting account, feel free to contact our support department at any time. If you have any questions regarding your hosting account, feel free to contact our support department at any time.
</p> </p>
<p> <p>
Best regards Best regards
</p>') </p>')
END END
GO GO

View file

@ -181,9 +181,11 @@ namespace WebsitePanel.EnterpriseServer
Hashtable items = new Hashtable(); Hashtable items = new Hashtable();
items["user"] = user; items["user"] = user;
items["Domains"] = domains.Select(x => new { DomainName = x.DomainName, items["Domains"] = domains.Select(x => new { DomainName = x.DomainName,
ExpirationDate = x.ExpirationDate, ExpirationDate = x.ExpirationDate,
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName) }); Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName) })
.OrderBy(x => x.ExpirationDate).ThenBy(x => x.Customer).ThenBy(x => x.DomainName);
items["IncludeNonExistenDomains"] = includeNonExistenDomains; items["IncludeNonExistenDomains"] = includeNonExistenDomains;
@ -191,7 +193,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
DomainName = x.DomainName, DomainName = x.DomainName,
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName) Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName)
}); }).OrderBy(x => x.Customer).ThenBy(x => x.DomainName);
body = PackageController.EvaluateTemplate(body, items); body = PackageController.EvaluateTemplate(body, items);

View file

@ -23,6 +23,7 @@ namespace WebsitePanel.EnterpriseServer
private static readonly string MailBodyTemplateParameter = "MAIL_BODY"; private static readonly string MailBodyTemplateParameter = "MAIL_BODY";
private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD"; private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD";
private static readonly string ServerNameParameter = "SERVER_NAME"; private static readonly string ServerNameParameter = "SERVER_NAME";
private static readonly string PauseBetweenQueriesParameter = "PAUSE_BETWEEN_QUERIES";
private const string MxRecordPattern = @"mail exchanger = (.+)"; private const string MxRecordPattern = @"mail exchanger = (.+)";
private const string NsRecordPattern = @"nameserver = (.+)"; private const string NsRecordPattern = @"nameserver = (.+)";
@ -40,7 +41,9 @@ namespace WebsitePanel.EnterpriseServer
string dnsServersString = (string)topTask.GetParamValue(DnsServersParameter); string dnsServersString = (string)topTask.GetParamValue(DnsServersParameter);
string serverName = (string)topTask.GetParamValue(ServerNameParameter); string serverName = (string)topTask.GetParamValue(ServerNameParameter);
// check input parameters int pause;
// check input parameters
if (String.IsNullOrEmpty(dnsServersString)) if (String.IsNullOrEmpty(dnsServersString))
{ {
TaskManager.WriteWarning("Specify 'DNS' task parameter."); TaskManager.WriteWarning("Specify 'DNS' task parameter.");
@ -53,6 +56,13 @@ namespace WebsitePanel.EnterpriseServer
return; return;
} }
if (!int.TryParse((string)topTask.GetParamValue(PauseBetweenQueriesParameter), out pause))
{
TaskManager.WriteWarning("The 'pause between queries' parameter is not valid.");
return;
}
// find server by name // find server by name
ServerInfo server = ServerController.GetServerByName(serverName); ServerInfo server = ServerController.GetServerByName(serverName);
if (server == null) if (server == null)
@ -102,8 +112,8 @@ namespace WebsitePanel.EnterpriseServer
//execute server //execute server
foreach (var dnsServer in dnsServers) foreach (var dnsServer in dnsServers)
{ {
var dnsMxRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.MX) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.MX).ToList(); var dnsMxRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.MX, pause) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.MX).ToList();
var dnsNsRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.NS) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.NS).ToList(); var dnsNsRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.NS, pause) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.NS).ToList();
FillRecordData(dnsMxRecords, domain, dnsServer); FillRecordData(dnsMxRecords, domain, dnsServer);
FillRecordData(dnsNsRecords, domain, dnsServer); FillRecordData(dnsNsRecords, domain, dnsServer);
@ -306,8 +316,10 @@ namespace WebsitePanel.EnterpriseServer
MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml); MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml);
} }
public List<DnsRecordInfo> GetDomainDnsRecords(WindowsServer winServer, string domain, string dnsServer, DnsRecordType recordType) public List<DnsRecordInfo> GetDomainDnsRecords(WindowsServer winServer, string domain, string dnsServer, DnsRecordType recordType, int pause)
{ {
Thread.Sleep(pause);
//nslookup -type=mx google.com 195.46.39.39 //nslookup -type=mx google.com 195.46.39.39
var command = "nslookup"; var command = "nslookup";
var args = string.Format("-type={0} {1} {2}", recordType, domain, dnsServer); var args = string.Format("-type={0} {1} {2}", recordType, domain, dnsServer);

View file

@ -79,6 +79,15 @@ namespace WebsitePanel.Portal.ScheduleTaskControls.App_LocalResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Pause between queries (ms):.
/// </summary>
internal static string lblPause {
get {
return ResourceManager.GetString("lblPause", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Server Name:. /// Looks up a localized string similar to Server Name:.
/// </summary> /// </summary>

View file

@ -123,6 +123,9 @@
<data name="lblDnsServersHint" xml:space="preserve"> <data name="lblDnsServersHint" xml:space="preserve">
<value>Please enter dns servers to check.</value> <value>Please enter dns servers to check.</value>
</data> </data>
<data name="lblPause" xml:space="preserve">
<value>Pause between queries (ms):</value>
</data>
<data name="lblServerName" xml:space="preserve"> <data name="lblServerName" xml:space="preserve">
<value>Server Name:</value> <value>Server Name:</value>
</data> </data>

View file

@ -25,4 +25,12 @@
<asp:TextBox ID="txtMailTo" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox> <asp:TextBox ID="txtMailTo" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
</td> </td>
</tr> </tr>
<tr>
<td class="SubHead" nowrap>
<asp:Label ID="lblPause" runat="server" meta:resourcekey="lblPause" Text="Pause between queries (ms):"></asp:Label>
</td>
<td class="Normal" width="100%">
<asp:TextBox ID="txtPause" runat="server" Width="95%" CssClass="NormalTextBox" MaxLength="1000"></asp:TextBox>
</td>
</tr>
</table> </table>

View file

@ -14,6 +14,7 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
private static readonly string DnsServersParameter = "DNS_SERVERS"; private static readonly string DnsServersParameter = "DNS_SERVERS";
private static readonly string MailToParameter = "MAIL_TO"; private static readonly string MailToParameter = "MAIL_TO";
private static readonly string ServerNameParameter = "SERVER_NAME"; private static readonly string ServerNameParameter = "SERVER_NAME";
private static readonly string PauseBetweenQueriesParameter = "PAUSE_BETWEEN_QUERIES";
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@ -30,6 +31,7 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
this.SetParameter(this.txtDnsServers, DnsServersParameter); this.SetParameter(this.txtDnsServers, DnsServersParameter);
this.SetParameter(this.txtMailTo, MailToParameter); this.SetParameter(this.txtMailTo, MailToParameter);
this.SetParameter(this.txtPause, PauseBetweenQueriesParameter);
this.SetParameter(this.ddlServers, ServerNameParameter); this.SetParameter(this.ddlServers, ServerNameParameter);
var servers = ES.Services.Servers.GetAllServers(); var servers = ES.Services.Servers.GetAllServers();
@ -68,8 +70,9 @@ namespace WebsitePanel.Portal.ScheduleTaskControls
ScheduleTaskParameterInfo dnsServers = this.GetParameter(this.txtDnsServers, DnsServersParameter); ScheduleTaskParameterInfo dnsServers = this.GetParameter(this.txtDnsServers, DnsServersParameter);
ScheduleTaskParameterInfo mailTo = this.GetParameter(this.txtMailTo, MailToParameter); ScheduleTaskParameterInfo mailTo = this.GetParameter(this.txtMailTo, MailToParameter);
ScheduleTaskParameterInfo serverName = this.GetParameter(this.ddlServers, ServerNameParameter); ScheduleTaskParameterInfo serverName = this.GetParameter(this.ddlServers, ServerNameParameter);
ScheduleTaskParameterInfo pause = this.GetParameter(this.txtPause, PauseBetweenQueriesParameter);
return new ScheduleTaskParameterInfo[3] { dnsServers, mailTo, serverName }; return new ScheduleTaskParameterInfo[4] { dnsServers, mailTo, serverName, pause };
} }
} }
} }

View file

@ -65,5 +65,23 @@ namespace WebsitePanel.Portal.ScheduleTaskControls {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtMailTo; protected global::System.Web.UI.WebControls.TextBox txtMailTo;
/// <summary>
/// lblPause control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPause;
/// <summary>
/// txtPause control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPause;
} }
} }