This commit is contained in:
me 2015-03-22 21:25:38 +04:00
commit c5c005c502
26 changed files with 215909 additions and 53 deletions

View file

@ -5548,18 +5548,32 @@ CREATE TABLE [dbo].[RDSCertificates](
GO
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'F' AND name = 'FK_RDSCollectionUsers_RDSCollectionId')
BEGIN
ALTER TABLE [dbo].[RDSCollectionUsers]
DROP CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId]
END
ELSE
PRINT 'FK_RDSCollectionUsers_RDSCollectionId not EXISTS'
GO
ALTER TABLE [dbo].[RDSCollectionUsers]
DROP CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId]
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'F' AND name = 'FK_RDSCollectionUsers_UserId')
BEGIN
ALTER TABLE [dbo].[RDSCollectionUsers]
DROP CONSTRAINT [FK_RDSCollectionUsers_UserId]
END
ELSE
PRINT 'FK_RDSCollectionUsers_UserId not EXISTS'
GO
ALTER TABLE [dbo].[RDSCollectionUsers]
DROP CONSTRAINT [FK_RDSCollectionUsers_UserId]
GO
ALTER TABLE [dbo].[RDSServers]
DROP CONSTRAINT [FK_RDSServers_RDSCollectionId]
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'F' AND name = 'FK_RDSServers_RDSCollectionId')
BEGIN
ALTER TABLE [dbo].[RDSServers]
DROP CONSTRAINT [FK_RDSServers_RDSCollectionId]
END
ELSE
PRINT 'FK_RDSServers_RDSCollectionId not EXISTS'
GO
ALTER TABLE [dbo].[RDSCollectionUsers] WITH CHECK ADD CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId] FOREIGN KEY([RDSCollectionId])
@ -8994,4 +9008,15 @@ SELECT
FROM EnterpriseFoldersOwaPermissions AS EFOP
LEFT JOIN [dbo].[EnterpriseFolders] AS EF ON EF.EnterpriseFolderID = EFOP.FolderID
WHERE EFOP.ItemID = @ItemID AND EFOP.AccountID = @AccountID
GO
GO
-- CRM2015 Provider
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted MS CRM 2015')
BEGIN
INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery])
VALUES(1205, 24, N'CRM', N'Hosted MS CRM 2015', N'WebsitePanel.Providers.HostedSolution.CRMProvider2015, WebsitePanel.Providers.HostedSolution.Crm2015', N'CRM2011', NULL)
END
GO

View file

@ -41,7 +41,7 @@ namespace WebsitePanel.EnterpriseServer
public const int LIMITED = 2;
public const int ESS = 22;
// CRM 2013
// CRM 2013/2015
public const int PROFESSIONAL = 0;
public const int BASIC = 2;
public const int ESSENTIAL = 5;

View file

@ -48,7 +48,7 @@ namespace WebsitePanel.EnterpriseServer
public const string Exchange = "Exchange";
public const string HostedOrganizations = "Hosted Organizations";
public const string HostedCRM = "Hosted CRM";
public const string HostedCRM2013 = "Hosted CRM2013";
public const string HostedCRM2013 = "Hosted CRM2013"; // CRM 2013/2015
public const string VPS = "VPS";
public const string BlackBerry = "BlackBerry";
public const string OCS = "OCS";

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,46 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.HostedSolution
{
public class CRMProvider2015 : CRMBase
{
public override bool IsInstalled()
{
return CRMServerVersion.StartsWith("7.");
}
}
}

View file

@ -0,0 +1,152 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.Common;
using WebsitePanel.Server.Utils;
using System.Text;
using System.Management.Automation.Runspaces;
namespace WebsitePanel.Providers.HostedSolution
{
public class HostedSolutionLog
{
public static string LogPrefix = "HostedSolution";
public static void LogStart(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteStart("{0} {1}", LogPrefix, text);
}
public static void LogEnd(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteEnd("{0} {1}", LogPrefix, text);
}
public static void LogInfo(string message)
{
Log.WriteInfo("{0} {1}", LogPrefix, message);
}
public static void LogInfo(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteInfo("{0} {1}", LogPrefix, text);
}
public static void LogWarning(string message)
{
Log.WriteWarning("{0} {1}", LogPrefix, message);
}
public static void LogWarning(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteWarning("{0} {1}", LogPrefix, text);
}
public static void LogError(Exception ex)
{
Log.WriteError(LogPrefix, ex);
}
public static void LogError(string message, Exception ex)
{
string text = String.Format("{0} {1}", LogPrefix, message);
Log.WriteError(text, ex);
}
public static void DebugInfo(string message, params object[] args)
{
string text = String.Format(message, args);
Log.WriteInfo("{0} {1}", LogPrefix, text);
}
public static void EndLog(string message, ResultObject res, string errorCode, Exception ex)
{
if (res != null)
{
res.IsSuccess = false;
if (!string.IsNullOrEmpty(errorCode))
res.ErrorCodes.Add(errorCode);
}
if (ex != null)
LogError(ex);
//LogRecord.
LogEnd(message);
}
public static void EndLog(string message, ResultObject res, string errorCode)
{
EndLog(message, res, errorCode, null);
}
public static void EndLog(string message, ResultObject res)
{
EndLog(message, res, null);
}
public static void EndLog(string message)
{
EndLog(message, null);
}
internal static T StartLog<T>(string message) where T : ResultObject, new()
{
LogStart(message);
T res = new T();
res.IsSuccess = true;
return res;
}
public static void DebugCommand(Command cmd)
{
StringBuilder sb = new StringBuilder(cmd.CommandText);
foreach (CommandParameter parameter in cmd.Parameters)
{
string formatString = " -{0} {1}";
if (parameter.Value is string)
formatString = " -{0} '{1}'";
else if (parameter.Value is bool)
formatString = " -{0} ${1}";
sb.AppendFormat(formatString, parameter.Name, parameter.Value);
}
Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString());
}
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WebsitePanel.Providers.HostedSolution.Crm2013")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WebsitePanel.Providers.HostedSolution.Crm2013")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("111E4961-46B0-4323-9EEB-8FE1DD1D48F6")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{96EC3A56-5598-4B2D-A1F2-2E0DB6BA2AB6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.HostedSolution.Crm2015</RootNamespace>
<AssemblyName>WebsitePanel.Providers.HostedSolution.Crm2015</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\Crm2015\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\Crm2015\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Crm.Sdk.Proxy, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Crm.Sdk.Proxy.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Client">
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Client.CodeGeneration">
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Client.CodeGeneration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Portal">
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Portal.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Portal.Files">
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Portal.Files.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Sdk.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk.Deployment, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Sdk.Deployment.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xrm.Sdk.Workflow">
<HintPath>..\..\Lib\References\Microsoft\CRM2015\Microsoft.Xrm.Sdk.Workflow.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\System.Management.Automation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CRMBase.cs" />
<Compile Include="CRMProvider2015.cs" />
<Compile Include="HostedSolutionLog.cs" />
<Compile Include="MyOrganizationCrmSdkTypes.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
<Name>WebsitePanel.Server.Utils</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -5444,7 +5444,7 @@
<value>ESS licenses per organization</value>
</data>
<data name="ResourceGroup.Hosted CRM2013" xml:space="preserve">
<value>Hosted CRM 2013</value>
<value>Hosted CRM 2013/2015</value>
</data>
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_0" xml:space="preserve">
<value>CRM users quota (Professional license) has been reached.</value>

View file

@ -54,9 +54,9 @@ legend {font-weight:700; color:#428bca; padding:0 4px;}
legend span.NormalBold {display:inline;}
.Tabs {width:100%;}
.Separator {display:none;}
.Tabs span {display:table; table-layout:fixed; width:100%; table-layout:fixed;}
.Tabs span {display:table; table-layout:fixed; min-width:100%; table-layout:fixed;}
.Tabs span span {display:table-cell; width:15%; text-align:center; padding:0;}
.Tabs a {display:block; padding:10px 0; text-decoration:none; border-bottom:1px solid #ddd;}
.Tabs a {display:block; padding:10px 5px; text-decoration:none; border-bottom:1px solid #ddd;}
.Tabs a:Hover {background:#eee; text-decoration:none;}
.Tabs a.ActiveTab {border:1px solid #ddd; border-bottom:none; color:#555; margin-bottom:-1px;}
.Tabs a.ActiveTab:hover {background:none;}

View file

@ -220,7 +220,7 @@
<value>Organization Home</value>
</data>
<data name="Text.CRM2013Group" xml:space="preserve">
<value>CRM 2013</value>
<value>CRM 2013/2015</value>
</data>
<data name="Text.RetentionPolicy" xml:space="preserve">
<value>Retention Policy</value>

View file

@ -151,7 +151,7 @@
<value>Contacts</value>
</data>
<data name="Text.CRM2013Group" xml:space="preserve">
<value>Hosted Organization - CRM 2013</value>
<value>Hosted Organization - CRM 2013/2015</value>
</data>
<data name="Text.CRMGroup" xml:space="preserve">
<value>Hosted Organization - CRM</value>

View file

@ -20,8 +20,10 @@
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanLeft">
<div>
<div>
<table>
<tr height="23">
<td class="FormLabel150"><asp:Localize runat="server" ID="locDisplayName" meta:resourcekey="locDisplayName" /></td>
@ -55,8 +57,7 @@
<br />
</div>
<div class="FormButtonsBarCleanRight">
<div>
<asp:GridView ID="gvRoles" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" CssSelectorClass="NormalGridView"
AllowPaging="False" AllowSorting="False" DataKeyNames="RoleID" >
@ -74,6 +75,7 @@
</asp:GridView>
</div>
<br />
<asp:Button runat="server" ID="btnUpdate" Text="Save Changes" meta:resourcekey="btnUpdate" CssClass="Button1" onclick="btnUpdate_Click" />
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" CssClass="Button1"
meta:resourcekey="btnSaveExit" OnClick="btnSaveExit_Click"></asp:Button>

View file

@ -280,7 +280,7 @@
<tr >
<td class="OrgStatsGroup" width="100%" colspan="2">
<asp:Localize ID="locCRM2013" runat="server" meta:resourcekey="locCRM2013"
Text="CRM 2013"></asp:Localize>
Text="CRM 2013/2015"></asp:Localize>
</td>
</tr>
<tr class="OrgStatsRow">

View file

@ -66,7 +66,7 @@
</asp:DropDownList>
</div>
</fieldset>
</asp:PlaceHolder>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="ChooseDatabaseUserPanel">
<fieldset>
<legend>
@ -120,6 +120,7 @@
<td>
<asp:Panel ID="sharedIP" runat="server">
<asp:Localize ID="locSharedIPAddress" runat="server" meta:resourcekey="locSharedIPAddress" Text="IP address: Shared" />
<asp:Label ID="lblSharedIP" runat="server"/>
&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="cmdSwitchToDedicatedIP" meta:resourcekey="cmdSwitchToDedicatedIP" runat="server" Text="Switch to dedicated IP" OnClick="cmdSwitchToDedicatedIP_Click"></asp:LinkButton>
</asp:Panel>

View file

@ -69,7 +69,7 @@ namespace WebsitePanel.Portal
new Tab { Id = "webman", ResourceKey = "Tab.WebManagement", Quota = Quotas.WEB_REMOTEMANAGEMENT, ViewId = "tabWebManagement" },
new Tab { Id = "SSL", ResourceKey = "Tab.SSL", Quota = Quotas.WEB_SSL, ViewId = "SSL" },
};
protected string SharedIdAddres { get; set; }
private int PackageId
{
get { return (int)ViewState["PackageId"]; }
@ -198,6 +198,16 @@ namespace WebsitePanel.Portal
{
litIPAddress.Text = site.SiteIPAddress;
}
else
{
IPAddressInfo[] ipsGeneral = ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId);
bool generalIPExists = ipsGeneral.Any() && !string.IsNullOrEmpty(ipsGeneral[0].ExternalIP);
if (generalIPExists)
{
lblSharedIP.Text = string.Format("({0})", ipsGeneral[0].ExternalIP);
}
lblSharedIP.Visible = generalIPExists;
}
dedicatedIP.Visible = site.IsDedicatedIP;
sharedIP.Visible = !site.IsDedicatedIP;
@ -312,7 +322,7 @@ namespace WebsitePanel.Portal
// AppPool
AppPoolState appPoolState = ES.Services.WebServers.GetAppPoolState(PanelRequest.ItemID);
BindAppPoolState(appPoolState);
// bind pointers
BindPointers();

View file

@ -1,37 +1,9 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -238,6 +210,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locSharedIPAddress;
/// <summary>
/// lblSharedIP 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 lblSharedIP;
/// <summary>
/// cmdSwitchToDedicatedIP control.
/// </summary>