MX + Domain expiration tasks fixes

This commit is contained in:
vfedosevich 2014-12-11 05:58:59 -08:00
parent 9ddd934ff5
commit f3ceabf4cc
13 changed files with 617 additions and 329 deletions

View file

@ -135,6 +135,12 @@
<data name="lblHtmlBody.Text" xml:space="preserve">
<value>HTML Body:</value>
</data>
<data name="lblNoChangesHtmlBody" xml:space="preserve">
<value>No Changes HTML Body:</value>
</data>
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
<value>No Changes Text Body:</value>
</data>
<data name="lblPriority.Text" xml:space="preserve">
<value>Priority:</value>
</data>

View file

@ -41,6 +41,10 @@
<ItemStyle Width="15%"></ItemStyle>
<ItemTemplate>
<%# GetDomainExpirationDate(Eval("ExpirationDate"), Eval("LastUpdateDate"))%>
<div style="display:inline-block" runat="server" Visible='<%# !(bool)Eval("IsSubDomain") && !(bool)Eval("IsInstantAlias") && !(bool)Eval("IsDomainPointer") %>'>
<img style="border-width: 0px;" src="App_Themes/Default/Images/information_icon_small.gif" title="<%# GetDomainDnsRecords((int)Eval("DomainId")) %>">
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvDomainsType">

View file

@ -36,6 +36,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Linq;
using WebsitePanel.EnterpriseServer;
@ -123,6 +124,18 @@ namespace WebsitePanel.Portal
}
}
public string GetDomainDnsRecords(int domainId)
{
var records = ES.Services.Servers.GetDomainDnsRecords(domainId);
if (!records.Any())
{
return "No Dns Records";
}
return string.Join("\r\n", records.Select(x=>string.Format("{0}: {1}", x.RecordType, x.Value)));
}
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)

View file

@ -39,4 +39,20 @@
<td class="Normal" colspan="2">
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="Label1" runat="server" meta:resourcekey="lblNoChangesHtmlBody" Text="No Changes HTML Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtNoChangesHtmlBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="Label2" runat="server" meta:resourcekey="lblNoChangesTextBody" Text="No Changes Text Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtNoChangesTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -18,6 +18,9 @@ namespace WebsitePanel.Portal
Utils.SelectListItem(ddlPriority, settings["Priority"]);
txtHtmlBody.Text = settings["HtmlBody"];
txtTextBody.Text = settings["TextBody"];
txtNoChangesHtmlBody.Text = settings["NoChangesHtmlBody"];
txtNoChangesTextBody.Text = settings["NoChangesTextBody"];
}
public void SaveSettings(UserSettings settings)
@ -28,6 +31,9 @@ namespace WebsitePanel.Portal
settings["Priority"] = ddlPriority.SelectedValue;
settings["HtmlBody"] = txtHtmlBody.Text;
settings["TextBody"] = txtTextBody.Text;
settings["NoChangesHtmlBody"] = txtNoChangesHtmlBody.Text;
settings["NoChangesTextBody"] = txtNoChangesTextBody.Text;
}
}
}

View file

@ -119,5 +119,41 @@ namespace WebsitePanel.Portal {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
/// <summary>
/// Label1 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 Label1;
/// <summary>
/// txtNoChangesHtmlBody 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 txtNoChangesHtmlBody;
/// <summary>
/// Label2 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 Label2;
/// <summary>
/// txtNoChangesTextBody 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 txtNoChangesTextBody;
}
}