merge commit

This commit is contained in:
robvde 2013-01-04 17:04:17 +04:00
commit 2af7c5a820
25 changed files with 564 additions and 178 deletions

View file

@ -163,10 +163,10 @@
<value>Provisioning Options</value>
</data>
<data name="PointMailDomain.Text" xml:space="preserve">
<value>Point to existing Mail Domain</value>
<value>Assign to existing Mail Domain</value>
</data>
<data name="PointWebSite.Text" xml:space="preserve">
<value>Point to existing Web Site</value>
<value>Assign to existing Web Site</value>
</data>
<data name="SubDomainFormatValidator.ErrorMessage" xml:space="preserve">
<value>Please, enter correct sub-domain name, for example "subdomain" or "sub.subdomain".</value>

View file

@ -121,13 +121,13 @@
<value>Cancel</value>
</data>
<data name="DomainDescription.Text" xml:space="preserve">
<value>Create a Top-Level Domain (TLD).</value>
<value>Create a Top-Level Domain (TLD). You can create a new web site for domain or assign it to an existing web site.</value>
</data>
<data name="DomainLink.Text" xml:space="preserve">
<value>Domain</value>
</data>
<data name="DomainPointerDescription.Text" xml:space="preserve">
<value>Create a Top-Level Domain (TLD) or sub-domain that could point to the existing web site only.</value>
<value>Create a Top-Level Domain (TLD) or sub-domain that can point to the existing web site only.</value>
</data>
<data name="DomainPointerLink.Text" xml:space="preserve">
<value>Domain Alias</value>
@ -136,13 +136,13 @@
<value>Please choose what type of domain you would like to add:</value>
</data>
<data name="ProviderSubDomainDescription.Text" xml:space="preserve">
<value>Create a sub-domain under domains allowed by your hosting provider. You could create a new web site for sub-domain or point it to existing one.</value>
<value>Create a sub-domain under domains allowed by your hosting provider. You can create a new web site for sub-domain or assign it to an existing web site.</value>
</data>
<data name="ProviderSubDomainLink.Text" xml:space="preserve">
<value>Provider Sub-domain</value>
</data>
<data name="SubDomainDescription.Text" xml:space="preserve">
<value>Create a sub-domain for already added top-level domain. You could create a new web site for sub-domain.</value>
<value>Create a sub-domain for already added top-level domain. You can create a new web site for sub-domain or assign it to an existing web site.</value>
</data>
<data name="SubDomainLink.Text" xml:space="preserve">
<value>Sub-domain</value>

View file

@ -252,4 +252,7 @@
<data name="ServerNameValidator.Text" xml:space="preserve">
<value>*</value>
</data>
<data name="lnkPlatformInstaller.Text">
<value xml:space="preserve">Web Platform Installer</value>
</data>
</root>

View file

@ -132,6 +132,9 @@
<data name="EnableHeliconApe.Text" xml:space="preserve">
<value>Enable Helicon Ape</value>
</data>
<data name="EnableHeliconApeTrial.Text" xml:space="preserve">
<value>Enable Helicon Ape (45 days trial)</value>
</data>
<data name="gvHeliconApeFolders.Empty" xml:space="preserve">
<value>Click "Add Folder" button to add .htaccess folder</value>
</data>

View file

@ -47,7 +47,7 @@
</asp:Panel>
<asp:Panel id="PointWebSitePanel" runat="server" style="padding-bottom: 15px;">
<asp:CheckBox ID="PointWebSite" runat="server" meta:resourcekey="PointWebSite" Text="Point to Web Site" CssClass="Checkbox Bold"
<asp:CheckBox ID="PointWebSite" runat="server" meta:resourcekey="PointWebSite" Text="Assign to Web Site" CssClass="Checkbox Bold"
AutoPostBack="true" /><br />
<div style="padding-left: 20px;">
<asp:DropDownList ID="WebSitesList" Runat="server" CssClass="NormalTextBox" DataTextField="Name" DataValueField="ID"></asp:DropDownList>
@ -55,7 +55,7 @@
</asp:Panel>
<asp:Panel id="PointMailDomainPanel" runat="server" style="padding-bottom: 15px;">
<asp:CheckBox ID="PointMailDomain" runat="server" meta:resourcekey="PointMailDomain" Text="Point to Mail Domain" CssClass="Checkbox Bold"
<asp:CheckBox ID="PointMailDomain" runat="server" meta:resourcekey="PointMailDomain" Text="Assign to Mail Domain" CssClass="Checkbox Bold"
AutoPostBack="true" /><br />
<div style="padding-left: 20px;">
<asp:DropDownList ID="MailDomainsList" Runat="server" CssClass="NormalTextBox" DataTextField="Name" DataValueField="ID"></asp:DropDownList>

View file

@ -99,14 +99,14 @@ namespace WebsitePanel.Portal
// load package context
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if ((type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) && !IsPostBack)
if ((type == DomainType.DomainPointer || (type == DomainType.Domain)) && !IsPostBack)
{
// bind web sites
WebSitesList.DataSource = ES.Services.WebServers.GetWebSites(PanelSecurity.PackageId, false);
WebSitesList.DataBind();
}
if ((type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) && !IsPostBack)
if ((type == DomainType.DomainPointer || (type == DomainType.Domain)) && !IsPostBack)
{
// bind mail domains
MailDomainsList.DataSource = ES.Services.MailServers.GetMailDomains(PanelSecurity.PackageId, false);
@ -130,12 +130,12 @@ namespace WebsitePanel.Portal
}
// point Web site
PointWebSitePanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
PointWebSitePanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain))
&& cntx.Groups.ContainsKey(ResourceGroups.Web) && WebSitesList.Items.Count > 0;
WebSitesList.Enabled = PointWebSite.Checked;
// point mail domain
PointMailDomainPanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
PointMailDomainPanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain))
&& cntx.Groups.ContainsKey(ResourceGroups.Mail) && MailDomainsList.Items.Count > 0;
MailDomainsList.Enabled = PointMailDomain.Checked;
@ -205,14 +205,14 @@ namespace WebsitePanel.Portal
// load package context
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
if (type == DomainType.DomainPointer || (type == DomainType.Domain))
{
if (PointWebSite.Checked && WebSitesList.Items.Count > 0)
pointWebSiteId = Utils.ParseInt(WebSitesList.SelectedValue, 0);
}
if (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
if (type == DomainType.DomainPointer || (type == DomainType.Domain))
{
if (PointMailDomain.Checked && MailDomainsList.Items.Count > 0)
pointMailDomainId = Utils.ParseInt(MailDomainsList.SelectedValue, 0);

View file

@ -1,4 +1,4 @@
// Copyright (c) 2011, Outercurve Foundation.
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,

View file

@ -151,6 +151,9 @@ namespace WebsitePanel.Portal
ddlTheme.Visible = false;
lblTheme.Visible = false;
}
// set focus on username field
txtUsername.Focus();
}
protected void cmdForgotPassword_Click(object sender, EventArgs e)

View file

@ -202,7 +202,11 @@
<value>.htaccess</value>
</data>
<data name="lclHeliconApeInstallNote.Text" xml:space="preserve">
<value>Helicon Ape product provides .htaccess and .htpasswd files support on IIS 7+ and includes all major Apache modules. Note that Helicon Ape is not yet installed on the server. &lt;br/&gt;&lt;br/&gt;Please &lt;a href="http://www.helicontech.com/ape/doc/wsp_install.htm" target="_blank"&gt;download and install&lt;/a&gt; Helicon Ape to activate this feature.</value>
<value>Helicon Ape provides .htaccess and .htpasswd files support and includes all major Apache modules.
This is essential tool to fine-tune IIS web sites, improve performance, security,
search engines rankings and for compatibility with many open source applications.
&lt;br/&gt;
Click on the link below to install Helicon Ape on the server:</value>
</data>
<data name="lblHtaccessAssembly.Text" xml:space="preserve">
<value>Module Assembly:</value>
@ -252,4 +256,7 @@
<data name="txtPublicSharedIP.Text" xml:space="preserve">
<value>Web Sites Public Shared Address:</value>
</data>
<data name="chkHeliconApeGlobalRegistration.Text">
<value xml:space="preserve">Register Helicon Ape module globally:</value>
</data>
</root>

View file

@ -427,6 +427,8 @@
</td>
<td class="Normal" valign="top">
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="lclHeliconApeInstallNote" />
<br/><br/>
<asp:LinkButton runat="server" ID="InstallHeliconApeLink" Text="Install Helicon Ape" />
</td>
</tr>
</table>
@ -458,9 +460,18 @@
</td>
<td class="Normal" valign="top">
<asp:Button ID="EditHeliconApeConfButton" runat="server" class="Button2"
Text="Edit httpd.conf (server config)" onclick="EditHeliconApeConfButton_Click"
/></td>
Text="Edit httpd.conf (server config)" onclick="EditHeliconApeConfButton_Click" />
</td>
</tr>
<tr>
<td valign="top">
<asp:Label runat="server" AssociatedControlID="chkHeliconApeGlobalRegistration" meta:resourcekey="chkHeliconApeGlobalRegistration">Register Helicon Ape module globally:</asp:Label>
</td>
<td>
<asp:CheckBox ID="chkHeliconApeGlobalRegistration" runat="server" style="margin-left: -4px;"/>
(<asp:Label runat="server" AssociatedControlID="chkHeliconApeGlobalRegistration">Uncheck this box to enable managing Helicon Ape using hosting plan policies.</asp:Label>)
</td>
</tr>
</table>
</asp:Panel>
</fieldset>

View file

@ -150,17 +150,36 @@ namespace WebsitePanel.Portal.ProviderControls
txtSecureFoldersModuleAsm.Text = settings["SecureFoldersModuleAssembly"];
//Helicon Ape
WebsitePanel.Providers.ResultObjects.HeliconApeStatus sts = ES.Services.WebServers.GetHeliconApeStatus(int.Parse(Request.QueryString["ServiceID"]));
Providers.ResultObjects.HeliconApeStatus sts = ES.Services.WebServers.GetHeliconApeStatus(int.Parse(Request.QueryString["ServiceID"]));
if (sts.IsInstalled)
{
downloadApePanel.Visible = false;
txtHeliconApeVersion.Text = sts.Version;
lblHeliconRegistrationText.Text = sts.RegistrationInfo;
if (sts.IsEnabled)
{
chkHeliconApeGlobalRegistration.Checked = true;
}
ViewState["HeliconApeInitiallyEnabled"] = chkHeliconApeGlobalRegistration.Checked;
}
else
{
configureApePanel.Visible = false;
// Build url manually, EditUrl throws exception: module is Null
// pid=Servers&mid=137&ctl=edit_platforminstaller&ServerID=1&Product=HeliconApe
List<string> qsParts= new List<string>();
qsParts.Add("pid=Servers");
qsParts.Add("ctl=edit_platforminstaller");
qsParts.Add("mid=" + Request.QueryString["mid"]);
qsParts.Add("ServerID=" + Request.QueryString["ServerID"]);
qsParts.Add("WPIProduct=HeliconApe");
InstallHeliconApeLink.Attributes["href"] = "Default.aspx?" + String.Join("&", qsParts.ToArray());
}
//
@ -254,6 +273,19 @@ namespace WebsitePanel.Portal.ProviderControls
ActiveDirectoryIntegration.SaveSettings(settings);
// Helicon Ape
bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked;
if (registerHeliconApeGlobbally != (bool)ViewState["HeliconApeInitiallyEnabled"])
{
if (registerHeliconApeGlobbally)
{
ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"]));
}
else
{
ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"]));
}
}
@ -279,6 +311,7 @@ namespace WebsitePanel.Portal.ProviderControls
settings["GalleryAppsAlwaysIgnoreDependencies"] = chkGalleryAppsAlwaysIgnoreDependencies.Checked.ToString();
}
/*
protected void DownladAndIstallApeLinkButton_Click(object sender, EventArgs e)
{
ES.Services.WebServers.InstallHeliconApe(PanelRequest.ServiceId);
@ -286,6 +319,7 @@ namespace WebsitePanel.Portal.ProviderControls
//Redirect to avoid 2-nd call
Response.Redirect(this.Context.Request.Url.AbsoluteUri);
}
*/
public string GetHttpdEditControlUrl(string ctrlKey, string name)
{

View file

@ -669,6 +669,15 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Localize Localize1;
/// <summary>
/// InstallHeliconApeLink 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.LinkButton InstallHeliconApeLink;
/// <summary>
/// configureApePanel control.
/// </summary>
@ -732,6 +741,15 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Button EditHeliconApeConfButton;
/// <summary>
/// chkHeliconApeGlobalRegistration 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.CheckBox chkHeliconApeGlobalRegistration;
/// <summary>
/// secOther control.
/// </summary>

View file

@ -108,6 +108,16 @@ namespace WebsitePanel.Portal
ShowProgressPanel();
}
string gotoProduct = Request.QueryString["WPIProduct"];
if (!string.IsNullOrEmpty(gotoProduct))
{
ArrayList wpiProductsForInstall = GetProductsToInstallList();
wpiProductsForInstall.Add(gotoProduct);
SetProductsToInstallList(wpiProductsForInstall);
btnInstall_Click(sender, e);
}
}
}

View file

@ -38,23 +38,12 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.Web;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal
{
public partial class WebSitesHeliconApeControl : WebsitePanelControlBase
{
private bool IsHeliconApeInstalled
{
get { return ViewState["IsHeliconApeInstalled"] != null ? (bool)ViewState["IsHeliconApeInstalled"] : false; }
set { ViewState["IsHeliconApeInstalled"] = value; }
}
private bool IsHeliconApeEnabled
{
get { return ViewState["IsHeliconApeEnabled"] != null ? (bool)ViewState["IsHeliconApeEnabled"] : false; }
set { ViewState["IsHeliconApeEnabled"] = value; }
}
private bool IsSecuredFoldersInstalled
{
@ -62,9 +51,16 @@ namespace WebsitePanel.Portal
set { ViewState["IsSecuredFoldersInstalled"] = value; }
}
private HeliconApeStatus HeliconApeStatus
{
get { return (HeliconApeStatus)ViewState["HeliconApeStatus"]; }
set { ViewState["HeliconApeStatus"] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (IsHeliconApeInstalled)
if (HeliconApeStatus.IsInstalled)
{
if (!IsPostBack)
{
@ -90,12 +86,12 @@ namespace WebsitePanel.Portal
public void BindHeliconApe(WebSite site)
{
// save initial state
IsHeliconApeInstalled = site.HeliconApeInstalled;
IsHeliconApeEnabled = site.HeliconApeEnabled;
IsSecuredFoldersInstalled = site.SecuredFoldersInstalled;
this.IsSecuredFoldersInstalled = site.SecuredFoldersInstalled;
this.HeliconApeStatus = site.HeliconApeStatus;
// Render a warning message about the automatic site's settings change
if (!IsHeliconApeEnabled && site.IIs7)
if (!HeliconApeStatus.IsEnabled && site.IIs7)
{
// Ensure the message is displayed only when neccessary
if (site.EnableWindowsAuthentication || !site.AspNetInstalled.EndsWith("I") || site.SecuredFoldersInstalled)
@ -113,11 +109,21 @@ namespace WebsitePanel.Portal
private void ToggleControls()
{
if (IsHeliconApeInstalled)
if (HeliconApeStatus.IsInstalled)
{
bool IsHeliconApeEnabled = HeliconApeStatus.IsEnabled;
// toggle button
btnToggleHeliconApe.Text = GetLocalizedString(
IsHeliconApeEnabled ? "DisableHeliconApe.Text" : "EnableHeliconApe.Text");
if (IsHeliconApeEnabled)
{
btnToggleHeliconApe.Text = GetLocalizedString("DisableHeliconApe.Text");
}
else
{
btnToggleHeliconApe.Text = GetLocalizedString("EnableHeliconApe.Text");
}
// toggle panels
HeliconApeFoldersPanel.Visible = IsHeliconApeEnabled;
@ -165,7 +171,7 @@ namespace WebsitePanel.Portal
try
{
int result = 0;
if (IsHeliconApeEnabled)
if (HeliconApeStatus.IsEnabled)
{
// uninstall folders
result = ES.Services.WebServers.DisableHeliconApe(PanelRequest.ItemID);
@ -189,7 +195,10 @@ namespace WebsitePanel.Portal
}
// change state
IsHeliconApeEnabled = !IsHeliconApeEnabled;
HeliconApeStatus status = HeliconApeStatus;
status.IsEnabled = !status.IsEnabled;
HeliconApeStatus = status;
// bind items
ToggleControls();