Merge
This commit is contained in:
commit
8cc464668a
6 changed files with 46 additions and 7 deletions
|
@ -7070,3 +7070,28 @@ BEGIN
|
|||
UPDATE [dbo].[Providers] SET [EditorControl] = 'Windows2012' WHERE [ProviderName] = 'Windows2012'
|
||||
END
|
||||
GO
|
||||
|
||||
-- fix check domain used by HostedOrganization
|
||||
|
||||
ALTER PROCEDURE [dbo].[CheckDomainUsedByHostedOrganization]
|
||||
@DomainName nvarchar(100),
|
||||
@Result int OUTPUT
|
||||
AS
|
||||
SET @Result = 0
|
||||
IF EXISTS(SELECT 1 FROM ExchangeAccounts WHERE UserPrincipalName LIKE '%@'+ @DomainName AND AccountType!=2)
|
||||
BEGIN
|
||||
SET @Result = 1
|
||||
END
|
||||
ELSE
|
||||
IF EXISTS(SELECT 1 FROM ExchangeAccountEmailAddresses WHERE EmailAddress LIKE '%@'+ @DomainName)
|
||||
BEGIN
|
||||
SET @Result = 1
|
||||
END
|
||||
ELSE
|
||||
IF EXISTS(SELECT 1 FROM LyncUsers WHERE SipAddress LIKE '%@'+ @DomainName)
|
||||
BEGIN
|
||||
SET @Result = 1
|
||||
END
|
||||
|
||||
RETURN @Result
|
||||
GO
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id="lnkEditZone" runat="server" EnableViewState="false"
|
||||
NavigateUrl='<%# GetDomainRecordsEditUrl(Eval("DomainID").ToString()) %>' Enabled='<%# !(bool)Eval("IsHost") %>'>
|
||||
NavigateUrl='<%# GetDomainRecordsEditUrl(Eval("DomainID").ToString()) %>' Enabled="true">
|
||||
<%# Eval("DomainName") %>
|
||||
</asp:hyperlink>
|
||||
</ItemTemplate>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<ItemStyle Width="50%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id="lnkEditZone" runat="server" EnableViewState="false"
|
||||
NavigateUrl='<%# GetDomainRecordsEditUrl(Eval("DomainID").ToString()) %>' Enabled='<%# !(bool)Eval("IsHost") %>'>
|
||||
NavigateUrl='<%# GetDomainRecordsEditUrl(Eval("DomainID").ToString()) %>' Enabled="true">
|
||||
<%# Eval("DomainName") %>
|
||||
</asp:hyperlink>
|
||||
</ItemTemplate>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue