ST Fixes
This commit is contained in:
parent
6e716c311d
commit
69e8644419
3 changed files with 19 additions and 5 deletions
|
@ -183,9 +183,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
items["user"] = user;
|
||||
|
||||
items["Domains"] = domains.Select(x => new { DomainName = x.DomainName,
|
||||
ExpirationDate = x.ExpirationDate,
|
||||
ExpirationDate = x.ExpirationDate < DateTime.Now ? "Expired" : x.ExpirationDate.ToString(),
|
||||
ExpirationDateOrdering = x.ExpirationDate,
|
||||
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);
|
||||
.OrderBy(x => x.ExpirationDateOrdering).ThenBy(x => x.Customer).ThenBy(x => x.DomainName);
|
||||
|
||||
items["IncludeNonExistenDomains"] = includeNonExistenDomains;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<ItemTemplate>
|
||||
<%# GetDomainExpirationDate(Eval("ExpirationDate"), Eval("LastUpdateDate"))%>
|
||||
|
||||
<div style="display:inline-block" runat="server" Visible='<%# ShowDomainDnsInfo(Eval("ExpirationDate"), Eval("LastUpdateDate"), !(bool)Eval("IsSubDomain") && !(bool)Eval("IsInstantAlias") && !(bool)Eval("IsDomainPointer")) %>'>
|
||||
<div style="display:inline-block" runat="server" Visible='<%# ShowDomainDnsInfo(Eval("ExpirationDate"), Eval("LastUpdateDate"), !(bool)Eval("IsSubDomain") && !(bool)Eval("IsInstantAlias") && !(bool)Eval("IsDomainPointer")) && !string.IsNullOrEmpty(GetDomainDnsRecords((int)Eval("DomainId"))) %>'>
|
||||
<img style="border-width: 0px;" src="App_Themes/Default/Images/information_icon_small.gif" title="<%# GetDomainDnsRecords((int)Eval("DomainId")) %>">
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
|
|
|
@ -45,8 +45,12 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
public partial class Domains : WebsitePanelModuleBase
|
||||
{
|
||||
public Dictionary<int, string> dnsRecords;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
dnsRecords = new Dictionary<int, string>();
|
||||
|
||||
gvDomains.PageSize = UsersHelper.GetDisplayItemsPerPage();
|
||||
|
||||
// visibility
|
||||
|
@ -154,11 +158,18 @@ namespace WebsitePanel.Portal
|
|||
|
||||
public string GetDomainDnsRecords(int domainId)
|
||||
{
|
||||
if(dnsRecords.ContainsKey(domainId))
|
||||
{
|
||||
return dnsRecords[domainId];
|
||||
}
|
||||
|
||||
var records = ES.Services.Servers.GetDomainDnsRecords(domainId);
|
||||
|
||||
if (!records.Any())
|
||||
{
|
||||
return "No Dns Records";
|
||||
dnsRecords.Add(domainId, string.Empty);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var header = GetLocalizedString("DomainLookup.TooltipHeader");
|
||||
|
@ -169,7 +180,9 @@ namespace WebsitePanel.Portal
|
|||
tooltipLines.Add(" ");
|
||||
tooltipLines.AddRange( records.Select(x=>string.Format("{0}: {1}", x.RecordType, x.Value)));
|
||||
|
||||
return string.Join("\r\n", tooltipLines);
|
||||
dnsRecords.Add(domainId, string.Join("\r\n", tooltipLines));
|
||||
|
||||
return dnsRecords[domainId];
|
||||
}
|
||||
|
||||
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue