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'
|
UPDATE [dbo].[Providers] SET [EditorControl] = 'Windows2012' WHERE [ProviderName] = 'Windows2012'
|
||||||
END
|
END
|
||||||
GO
|
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["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 < DateTime.Now ? "Expired" : x.ExpirationDate.ToString(),
|
||||||
|
ExpirationDateOrdering = 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);
|
.OrderBy(x => x.ExpirationDateOrdering).ThenBy(x => x.Customer).ThenBy(x => x.DomainName);
|
||||||
|
|
||||||
items["IncludeNonExistenDomains"] = includeNonExistenDomains;
|
items["IncludeNonExistenDomains"] = includeNonExistenDomains;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<%# GetDomainExpirationDate(Eval("ExpirationDate"), Eval("LastUpdateDate"))%>
|
<%# 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")) %>">
|
<img style="border-width: 0px;" src="App_Themes/Default/Images/information_icon_small.gif" title="<%# GetDomainDnsRecords((int)Eval("DomainId")) %>">
|
||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|
|
@ -45,8 +45,12 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class Domains : WebsitePanelModuleBase
|
public partial class Domains : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
public Dictionary<int, string> dnsRecords;
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
dnsRecords = new Dictionary<int, string>();
|
||||||
|
|
||||||
gvDomains.PageSize = UsersHelper.GetDisplayItemsPerPage();
|
gvDomains.PageSize = UsersHelper.GetDisplayItemsPerPage();
|
||||||
|
|
||||||
// visibility
|
// visibility
|
||||||
|
@ -154,11 +158,18 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
public string GetDomainDnsRecords(int domainId)
|
public string GetDomainDnsRecords(int domainId)
|
||||||
{
|
{
|
||||||
|
if(dnsRecords.ContainsKey(domainId))
|
||||||
|
{
|
||||||
|
return dnsRecords[domainId];
|
||||||
|
}
|
||||||
|
|
||||||
var records = ES.Services.Servers.GetDomainDnsRecords(domainId);
|
var records = ES.Services.Servers.GetDomainDnsRecords(domainId);
|
||||||
|
|
||||||
if (!records.Any())
|
if (!records.Any())
|
||||||
{
|
{
|
||||||
return "No Dns Records";
|
dnsRecords.Add(domainId, string.Empty);
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
var header = GetLocalizedString("DomainLookup.TooltipHeader");
|
var header = GetLocalizedString("DomainLookup.TooltipHeader");
|
||||||
|
@ -169,7 +180,9 @@ namespace WebsitePanel.Portal
|
||||||
tooltipLines.Add(" ");
|
tooltipLines.Add(" ");
|
||||||
tooltipLines.AddRange( records.Select(x=>string.Format("{0}: {1}", x.RecordType, x.Value)));
|
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)
|
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<ItemStyle Width="50%"></ItemStyle>
|
<ItemStyle Width="50%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:hyperlink id="lnkEditZone" runat="server" EnableViewState="false"
|
<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") %>
|
<%# Eval("DomainName") %>
|
||||||
</asp:hyperlink>
|
</asp:hyperlink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<ItemStyle Width="50%"></ItemStyle>
|
<ItemStyle Width="50%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:hyperlink id="lnkEditZone" runat="server" EnableViewState="false"
|
<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") %>
|
<%# Eval("DomainName") %>
|
||||||
</asp:hyperlink>
|
</asp:hyperlink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue