Helicon Ape: Server-wide enbaling/disabling (global registration) added

This commit is contained in:
ruslanht 2012-12-18 16:41:21 +02:00
parent 0817269e1b
commit deddc73f28
8 changed files with 361 additions and 92 deletions

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.</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

@ -460,9 +460,19 @@
</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;"/>
<br/>
<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,13 +150,19 @@ 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
{
@ -173,7 +179,6 @@ namespace WebsitePanel.Portal.ProviderControls
qsParts.Add("ServerID=" + Request.QueryString["ServerID"]);
qsParts.Add("WPIProduct=HeliconApe");
// TODO: make button here
InstallHeliconApeLink.Attributes["href"] = "Default.aspx?" + String.Join("&", qsParts.ToArray());
}
@ -268,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"]));
}
}
@ -293,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);
@ -300,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

@ -741,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>