Commit Contribution from Helicon

Includes:

- complete re-write of Web Application Gallery
- Addition of Web PI Installer in Server module
This commit is contained in:
omara_vworks 2012-07-19 13:16:33 -04:00
parent 3b81883a25
commit a2beec7fe4
80 changed files with 9236 additions and 1762 deletions

View file

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="cmdContinue.Text" xml:space="preserve">
<value>Continue</value>
</data>
<data name="cmdPause.Text" xml:space="preserve">
<value>Pause</value>
</data>
<data name="cmdStart.Text" xml:space="preserve">
<value>Start</value>
</data>
<data name="cmdStop.Text" xml:space="preserve">
<value>Stop</value>
</data>
<data name="gvServices.Empty" xml:space="preserve">
<value>No Windows Services found.</value>
</data>
<data name="gvServicesId.Header" xml:space="preserve">
<value>Id</value>
</data>
<data name="gvServicesName.Header" xml:space="preserve">
<value>Name</value>
</data>
<data name="gvServicesStatus.Header" xml:space="preserve">
<value>Status</value>
</data>
<data name="gvWPILogo.Header" xml:space="preserve">
<value>Logo</value>
</data>
<data name="Status.ContinuePending" xml:space="preserve">
<value>Continuing</value>
</data>
<data name="Status.Paused" xml:space="preserve">
<value>Paused</value>
</data>
<data name="Status.PausePending" xml:space="preserve">
<value>Pausing</value>
</data>
<data name="Status.Running" xml:space="preserve">
<value>Running</value>
</data>
<data name="Status.StartPending" xml:space="preserve">
<value>Starting</value>
</data>
<data name="Status.Stopped" xml:space="preserve">
<value>Stopped</value>
</data>
<data name="Status.StopPending" xml:space="preserve">
<value>Stopping</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>Add</value>
</data>
<data name="btnInstall.Text" xml:space="preserve">
<value>Install</value>
</data>
<data name="gvInstall.Header" xml:space="preserve">
<value>Install</value>
</data>
<data name="btnAccept" xml:space="preserve">
<value>Accept</value>
</data>
<data name="WebPlatformInstallerDeps" xml:space="preserve">
<value>Products to be installed</value>
</data>
</root>

View file

@ -226,6 +226,12 @@
<data name="locDatabaseGroupDescr.Text" xml:space="preserve">
<value>Choose your database:</value>
</data>
<data name="locDatabaseType.Text" xml:space="preserve">
<value>Database type</value>
</data>
<data name="locDatabaseTypeDescr.Text" xml:space="preserve">
<value>Choose your database type:</value>
</data>
<data name="locNewDatabase.Text" xml:space="preserve">
<value>Create a new or use an existing database</value>
</data>

View file

@ -39,6 +39,12 @@ namespace WebsitePanel.Portal
return ES.Services.WebApplicationGallery.GetGalleryApplications(packageId, categoryId);
}
public GalleryApplicationsResult GetGalleryApplicationsFiltered(string pattern, int packageId)
{
return ES.Services.WebApplicationGallery.GetGalleryApplicationsFiltered(packageId, pattern);
}
public List<GalleryApplication> GetGalleryApplicationsByServiceId(int serviceId)
{
GalleryApplicationsResult result = ES.Services.WebApplicationGallery.GetGalleryApplicationsByServiceId(serviceId);

View file

@ -4,6 +4,7 @@
<%@ Register Src="../UserControls/EditDomainsList.ascx" TagName="EditDomainsList" TagPrefix="uc5" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register src="../UserControls/EditFeedsList.ascx" tagname="EditFeedsList" tagprefix="uc6" %>
<%@ Import Namespace="WebsitePanel.Portal.ProviderControls" %>
<fieldset>
@ -175,25 +176,36 @@
<asp:Label ID="lblWebAppGallery" runat="server" meta:resourcekey="lblWebAppGallery" Text="Pools" CssClass="NormalBold"></asp:Label>&nbsp;
</legend>
<br />
<table width="100%" cellpadding="4">
<tr>
<td class="Normal" valign="top" width="192">
<asp:Label ID="lblGalleryFeed" runat="server" meta:resourcekey="lblGalleryFeed" Text="Gallery feed URL:"></asp:Label>
</td>
<td class="Normal" valign="top">
<asp:TextBox ID="txtGalleryFeedUrl" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox>
<p style="text-align: justify;"><i><asp:Localize runat="server" meta:resourcekey="lclGalleryFeedNote" /></i></p>
</td>
</tr>
<tr>
<td class="Normal" valign="top" width="192">
<asp:Label runat="server" meta:resourcekey="GalleryFeedFilter" Text="Gallery feed filter:"></asp:Label>
</td>
<td class="Normal" valign="top">
<asp:LinkButton runat="server" ID="FilterDialogButton" meta:resourcekey="FilterDialogButton" Text="Click to apply a filter..." />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;">Enable Microsoft feed</td>
<td class="Normal">
<asp:CheckBox ID="wpiMicrosoftFeed" runat="server" Text="Yes" />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;">Enable HeliconTech feed</td>
<td class="Normal">
<asp:CheckBox ID="wpiHeliconTechFeed" runat="server" Text="Yes" />
</td>
</tr>
</table>
<uc6:EditFeedsList ID="wpiEditFeedsList" runat="server" DisplayNames="false" />
</fieldset>
<br />

View file

@ -127,7 +127,13 @@ namespace WebsitePanel.Portal.ProviderControls
// ASP.NET 2.0 & 4.0 Bitness Mode
Utils.SelectListItem(AspNetBitnessMode, settings[AspNetBitnessMode.ID]);
txtGalleryFeedUrl.Text = settings["GalleryXmlFeedUrl"];
// WPI
wpiMicrosoftFeed.Checked = Utils.ParseBool(settings["FeedEnableMicrosoft"], true);
wpiHeliconTechFeed.Checked = Utils.ParseBool(settings["FeedEnableHelicon"], true);
wpiEditFeedsList.Value = settings["FeedUrls"];
txtAspPath.Text = settings["AspPath"];
php4Path.Text = settings["Php4Path"];
@ -219,8 +225,6 @@ namespace WebsitePanel.Portal.ProviderControls
// ASP.NET 2.0 & 4.0 Bitness Mode
settings[AspNetBitnessMode.ID] = AspNetBitnessMode.SelectedValue;
settings["GalleryXmlFeedUrl"] = txtGalleryFeedUrl.Text.Trim();
settings["AspPath"] = txtAspPath.Text.Trim();
settings["Php4Path"] = php4Path.Text.Trim();
settings["PhpPath"] = txtPhpPath.Text.Trim();
@ -243,7 +247,12 @@ namespace WebsitePanel.Portal.ProviderControls
ActiveDirectoryIntegration.SaveSettings(settings);
settings["GalleryAppsFilter"] = GetAppsCatalogFilter();
settings["FeedEnableMicrosoft"] = wpiMicrosoftFeed.Checked.ToString();
settings["FeedEnableHelicon"] = wpiHeliconTechFeed.Checked.ToString();
settings["FeedUrls"] = wpiEditFeedsList.Value;
settings["GalleryAppsFilter"] = GetAppsCatalogFilter();
if (WDeployEnabledCheckBox.Checked)
{

View file

@ -1,3 +1,32 @@
// Copyright (c) 2012, 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.
@ -273,24 +302,6 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWebAppGallery;
/// <summary>
/// lblGalleryFeed 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 lblGalleryFeed;
/// <summary>
/// txtGalleryFeedUrl 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.TextBox txtGalleryFeedUrl;
/// <summary>
/// FilterDialogButton control.
/// </summary>
@ -300,6 +311,33 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton FilterDialogButton;
/// <summary>
/// wpiMicrosoftFeed 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 wpiMicrosoftFeed;
/// <summary>
/// wpiHeliconTechFeed 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 wpiHeliconTechFeed;
/// <summary>
/// wpiEditFeedsList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
/// <summary>
/// FilterDialogPanel control.
/// </summary>

View file

@ -196,6 +196,12 @@
meta:resourcekey="lnkEventViewer" Text="Event Viewer"></asp:HyperLink>
</td>
</tr>
<tr>
<td class="Normal">
&nbsp;&nbsp;&nbsp;<asp:HyperLink ID="lnkPlatformInstaller" runat="server"
meta:resourcekey="lnkPlatformInstaller" Text="Web Platform Installer"></asp:HyperLink>
</td>
</tr>
<tr>
<td class="Normal">
&nbsp;&nbsp;&nbsp;<asp:HyperLink ID="lnkServerReboot" runat="server"

View file

@ -67,6 +67,7 @@ namespace WebsitePanel.Portal
lnkWindowsServices.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_winservices");
lnkWindowsProcesses.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_processes");
lnkEventViewer.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_eventviewer");
lnkPlatformInstaller.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_platforminstaller");
lnkServerReboot.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_reboot");
lnkBackup.NavigateUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "backup");

View file

@ -1,10 +1,38 @@
// Copyright (c) 2012, 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.
// Runtime Version:2.0.50727.1873
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -400,6 +428,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkEventViewer;
/// <summary>
/// lnkPlatformInstaller 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.HyperLink lnkPlatformInstaller;
/// <summary>
/// lnkServerReboot control.
/// </summary>

View file

@ -1,21 +1,98 @@
// Copyright (c) 2012, 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.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class ServersEditSystemProcesses {
protected WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
protected System.Web.UI.WebControls.Button btnCancel;
protected System.Web.UI.UpdateProgress updatePanelProgress;
protected System.Web.UI.UpdatePanel ItemsUpdatePanel;
protected System.Web.UI.Timer itemsTimer;
protected System.Web.UI.WebControls.GridView gvProcesses;
/// <summary>
/// ServerHeaderControl1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
/// <summary>
/// btnCancel 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.Button btnCancel;
/// <summary>
/// updatePanelProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdateProgress updatePanelProgress;
/// <summary>
/// ItemsUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
/// <summary>
/// itemsTimer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer itemsTimer;
/// <summary>
/// gvProcesses 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.GridView gvProcesses;
}
}

View file

@ -0,0 +1,327 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ServersEditWebPlatformInstaller.ascx.cs" Inherits="WebsitePanel.Portal.ServersEditWebPlatformInstaller" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<%@ Register Src="ServerHeaderControl.ascx" TagName="ServerHeaderControl" TagPrefix="uc1" %>
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EditFeedsList.ascx" TagName="EditFeedsList" TagPrefix="uc6" %>
<script src="/JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<uc1:ServerHeaderControl id="ServerHeaderControl1" runat="server">
</uc1:ServerHeaderControl>
<%--<asp:Button ID="btnSettings" runat="server" Text="Settings"
onclick="btnSettings_Click" />
<asp:UpdatePanel ID="SettingsPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<uc6:EditFeedsList id="feedsList" runat="server" DisplayNames="false" />
<asp:Button ID="Button1" runat="server" Text="Save" />
</ContentTemplate>
</asp:UpdatePanel>
--%>
<style>
ul.WPIKeywordList {
padding: 0;
}
ul.WPIKeywordList>li {
padding: .4em .4em;
margin-right: .4em;
display: inline;
list-style-type: none;
}
ul.WPIKeywordList li .selected
{
padding: .4em .4em;
background-color: #E5F2FF;
border: solid 1px #86B9F7;
font-weight: bold;
}
ul.WPIKeywordList input {
display: none;
}
ul.WPIKeywordList label {
padding: 0 .1em;
cursor: pointer;
text-decoration: underline;
text-decoration-color: #888;
}
ul.WPIKeywordList li .selected label {
text-decoration: none;
}
.NormalGridView .AspNet-GridView table {
border-top: solid 1px #ccc;
}
.NormalGridView .AspNet-GridView h3 {
padding: 0;
margin: 0;
}
.AspNet-GridView-Pagination a,
.AspNet-GridView-Pagination span {
font-size: 16px !important;
padding: 0 3px !important;
}
h2.ProductTitle {
cursor: pointer;
}
.NormalBold {
font-size: 125%;
}
.FormFooter {
padding: 15px 10px;
}
.FormFooter h2,
.FormFooter p {
margin: .2em 0;
}
.WpiInstallInfo span,
.WpiInstallInfo a {
display: block;
}
.ProductsSearchInput {
margin: 0;
vertical-align: middle;
}
.ProgressAnimation {
margin: .5em 1em .5em 0;
}
.Failed {
color: #c00;
}
</style>
<script type="text/javascript">
Sys.Application.add_init(function () {
$('h2.ProductTitle').live('click', function () {
var $cell = $(this).parent();
$('.ProductMoreInfo', $cell).show();
$('.ProductDescription', $cell).show();
$('.ProductSummary', $cell).hide();
});
$('.ProductsSearchInput').focus();
$('.ProductsSearchInput').live("keypress", function (e) {
/* ENTER PRESSED*/
if (e.keyCode == 13) {
e.stopPropagation();
e.preventDefault();
$('.ProductsSearchButton')[0].click();
return false;
}
});
});
</script>
<asp:Panel ID="SearchPanel" class="FormBody" runat="server">
<table width="100%">
<tr>
<td>
<asp:RadioButtonList ID="keywordsList" runat="server"
RepeatLayout="UnorderedList" CssClass="WPIKeywordList FormBody"
onselectedindexchanged="keywordsList_SelectedIndexChanged"
AutoPostBack="True">
</asp:RadioButtonList>
</td>
<td style="width: 190px; vertical-align: middle;">
<asp:TextBox ID="searchBox" runat="server" CssClass="NormalTextBox ProductsSearchInput"></asp:TextBox><asp:ImageButton ID="ProductSearchGo" runat="server" SkinID="SearchButton" OnClick="SearchButton_Click" CssClass="ProductsSearchButton"/>
</td>
</tr>
</table>
</asp:Panel>
<div runat="server" ID="InstallButtons2" class="FormFooter">
<asp:Button ID="btnInstall2" Text="Install" runat="server" onclick="btnInstall_Click" CssClass="Button1" />
<asp:Button ID="btnCancel2" Text="Cancel" runat="server" onclick="btnCancel_Click" CssClass="Button1" />
</div>
<asp:UpdatePanel ID="ProductsPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<Triggers>
<asp:AsyncPostBackTrigger runat="server" ControlID="BackToGalleryButton" EventName="Click"/>
</Triggers>
<ContentTemplate>
<asp:GridView ID="gvWpiProducts" runat="server" AutoGenerateColumns="False"
EmptyDataText="Products not found"
CssSelectorClass="NormalGridView" EnableViewState="true"
OnRowCommand="gvWpiProducts_RowCommand"
ShowHeader="False"
AllowPaging="True" onpageindexchanging="gvWpiProducts_PageIndexChanging"
>
<Columns>
<asp:TemplateField ItemStyle-Wrap="false" HeaderText="gvWPILogo" ItemStyle-Width="5%" >
<ItemTemplate>
<asp:Image ID="icoLogo" runat="server" SkinID="Dvd48" src='<%# FixDefaultLogo((string)Eval("Logo")) %>' Width="48" Height="48" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Wrap="true" HeaderText="gvServicesName" ItemStyle-Width="85%">
<ItemTemplate>
<h2 class="ProductTitle Huge"><%# Eval("Title")%></h2>
<p class="ProductSummary"><%# Eval("Summary") %></p>
<p style="display: none" class="ProductDescription"><%# Eval("LongDescription")%></p>
<p>
<asp:HyperLink ID="productLink" runat="server" NavigateUrl='<%# Eval("Link")%>' Target="_blank">More information</asp:HyperLink>
&nbsp;&middot;&nbsp;
<span>Version: <%# Eval("Version")%></span>
&nbsp;&middot;&nbsp;
<span>Published: <%# ((DateTime)Eval("Published")).ToShortDateString() %></span>
</p>
<p class="ProductMoreInfo" style="display: none">
Publisher: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("AuthorUri")%>' Target="_blank"><%# Eval("Author")%></asp:HyperLink>
&nbsp;&middot;&nbsp;
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("EulaUrl")%>' Target="_blank">License terms</asp:HyperLink>
</p>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Wrap="false" HeaderText="gvInstall" ItemStyle-Width="10%">
<ItemStyle HorizontalAlign="Left" />
<ItemTemplate>
<asp:Label ID="LabelInstalled" runat="server" Text="installed" Visible='<%# Eval("IsInstalled") %>'></asp:Label>
<asp:Button ID="btnAdd" runat="server"
CssClass='Button1'
Visible = '<%# !(bool)Eval("IsInstalled") %>'
Text = '<%# IsAddedText((string)Eval("ProductID")) %>'
CommandArgument='<%# Eval("ProductID") %>'
CommandName="WpiAdd"
/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div runat="server" ID="InstallButtons1" class="FormFooter">
<asp:Button ID="btnInstall1" Text="Install" runat="server" onclick="btnInstall_Click" CssClass="Button1" />
<asp:Button ID="btnCancel1" Text="Cancel" runat="server" onclick="btnCancel_Click" CssClass="Button1" />
</div>
<asp:Panel ID="NoProductsSelectedPanel" runat="server" Visible="False">
<div class="FormBody">
<h2>No products selected to install</h2>
<br/>
</div>
<div class="FormFooter">
<asp:Button ID="NoProductsBackButton" runat="server" OnClick="NoProductsBackButtonClick" Text="Back to products" CssClass="Button1" />
<br/>
</div>
</asp:Panel>
<asp:UpdatePanel ID="InstallPanel" runat="server" Visible="False" UpdateMode="Conditional" >
<ContentTemplate>
<div class="FormBody">
<h2 class="NormalBold">Products to be installed</h2>
<p>Review the following list of software to be installed and Windows components to be turned on.</p>
</div>
<asp:GridView ID="gvWpiInstall" runat="server" AutoGenerateColumns="False" AllowPaging="false"
EmptyDataText="No products selected to install"
CssSelectorClass="NormalGridView" EnableViewState="true"
onrowdatabound="gvWpiInstall_RowDataBound"
ShowHeader="False">
<Columns>
<asp:TemplateField ItemStyle-Wrap="true" HeaderText="gvServicesName" ItemStyle-Width="95%" >
<ItemTemplate>
<h3><%# Eval("Title")%></h3>
<p class="WpiInstallInfo">
<asp:HyperLink ID="eulaLink" runat="server" NavigateUrl='<%# Eval("EulaUrl")%>' Target="_blank">License Agreement</asp:HyperLink>
<asp:HyperLink ID="productLink" runat="server" NavigateUrl='<%# Eval("DownloadedLocation")%>' Target="_blank"><%# Eval("DownloadedLocation")%></asp:HyperLink>
<asp:Label ID="downloadSize" runat="server" Text="Download size:"></asp:Label>
</p>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div runat="server" ID="AceptDEclineButtons" Visible="False" class="FormFooter">
<p>
Warning: During product installation your IIS process might be restarted depending on the package installed,
causing all users connected to the control panel to lose their session, requiring them to re-login after completion.
Please assure that no other users are processing requests before you start this process as it might cause corruption
if they are in the middle of an update.
</p>
<br/>
<p>
By clicking "I Accept", you agree to the license terms for the software listed above. If you do not agree
to all of the license terms, click "I Decline".
</p>
<br/>
<asp:Button ID="btnAccept" runat="server" CssClass="Button1" Text="I Accept" onclick="btnAccept_Click" />
<asp:Button ID="btnDecline" runat="server" CssClass="Button1" Text="I Decline" onclick="btnDecline_Click" />
<asp:Button ID="btnCancel3" runat="server" CssClass="Button1" Text="Cancel" onclick="btnCancel_Click" />
</div>
<asp:UpdatePanel ID="ProgressPanel" runat="server" Visible="False" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Timer ID="ProgressTimer" runat="server" Enabled="False" Interval="3000" OnTick="ProgressTimerTick"></asp:Timer>
<asp:Panel ID="ProgressMessagePanel" class="FormBody" runat="server">
<h3 class="NormalBold">Selected products are installed now:</h3>
<br/>
<asp:Image runat="server" ID="ProgressAnimation" ImageAlign="AbsMiddle" ImageUrl="" CssClass="ProgressAnimation"></asp:Image>
<asp:Label ID="ProgressMessage" runat="server">initializing...</asp:Label>
<br/>
<br/>
<asp:Button ID="CancelInstall" runat="server"
OnClick="CacnelInstallButtonClick" CssClass="Button1"
OnClientClick="return confirm('Are you sure to cancel installation?')"
Text="Cancel installation"></asp:Button>
<br/>
<br/>
</asp:Panel>
<asp:Panel ID="InstallCompletedPanel" runat="server" Visible="False">
<div class="FormBody">
<p><asp:Label ID="LabelInstallationSuccess" runat="server" CssClass="NormalBold">Selected products are successfully installed</asp:Label>
<asp:BulletedList ID="InstalledProductsList" runat="server" Visible="False">
</asp:BulletedList>
</p>
<p><asp:Label ID="LabelInstallationFailed" runat="server" Visible="False" CssClass="Failed">Some products installation are failed</asp:Label></p>
<br/>
<br/>
<asp:Button runat="server" ID="ShowLogsButton" Visible="False" OnClick="ShowLogsButton_OnClick" Text="Show installation logs" CssClass="Button1"/>
<asp:Panel runat="server" ID="WpiLogsPanel" Visible="False">
<pre runat="server" ID="WpiLogsPre" style="word-wrap: break-word;"></pre>
</asp:Panel>
<br/>
<br/>
</div>
<div class="FormFooter">
<asp:Button ID="BackToGalleryButton" runat="server" OnClick="BackToGalleryButtonClick" CssClass="Button1" Text="Back to products"></asp:Button>
<asp:Button ID="btnBackToServer" runat="server" OnClick="btnCancel_Click" CssClass="Button1" Text="Back to server profile"></asp:Button>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>

View file

@ -0,0 +1,569 @@
// Copyright (c) 2012, 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 System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using WebsitePanel.Server;
using WebsitePanel.Providers;
namespace WebsitePanel.Portal
{
public partial class ServersEditWebPlatformInstaller : WebsitePanelModuleBase
{
protected const string _wpiLogsDirViewStateKey = "WPI_LOGS_DIR";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
ES.Services.Servers.InitWPIFeeds(PanelRequest.ServerId);
}
catch
{
ProductsPanel.Visible = false;
keywordsList.Visible = false;
SearchPanel.Visible = false;
InstallButtons1.Visible = false;
InstallButtons2.Visible = false;
ShowWarningMessage("No products available. Please enable Web Platfrom Installer feeds in System Settings.");
return;
}
ProgressAnimation.ImageUrl = PortalUtils.GetThemedImage("indicator_medium.gif");
ViewState["SearchResultShown"] = false;
BindWpiProducts();
string message = UpdateProgress();
if (!string.IsNullOrEmpty(message))
{
ShowProgressPanel();
}
}
}
private void BindWpiProducts()
{
try
{
keywordsList.Items.Clear();
List<WPIKeyword> keywords = new List<WPIKeyword>(ES.Services.Servers.GetWPIKeywords(PanelRequest.ServerId));
keywords.Add(new WPIKeyword("Show installed", "Show Installed"));
keywordsList.DataSource = keywords;
keywordsList.DataTextField = "Text";
keywordsList.DataValueField = "ID";
keywordsList.DataBind();
if (keywordsList.Items.Count > 0)
{
keywordsList.Items[0].Attributes["class"] = "selected";
}
gvWpiProducts.DataSource = FilterInstaledProducts(ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue));
gvWpiProducts.DataBind();
}
catch (Exception ex)
{
ShowErrorMessage("SERVER_GET_WIN_SERVICES", ex);
return;
}
}
private string SelectedKeywordValue
{
get
{
return IsShowInstalledPseudoKeywordSelected ? null : keywordsList.SelectedValue;
}
}
private bool IsShowInstalledPseudoKeywordSelected
{
get { return keywordsList.SelectedIndex == keywordsList.Items.Count - 1; }
}
private ArrayList GetProductsToInstallList()
{
if (ViewState["wpiProductsForInstall"] != null)
{
return (ArrayList)ViewState["wpiProductsForInstall"];
}
return new ArrayList();
}
private void SetProductsToInstallList(ArrayList wpiProductsForInstall)
{
ViewState["wpiProductsForInstall"] = wpiProductsForInstall;
}
private void ShowProductsGrid()
{
ProductsPanel.Visible = true;
keywordsList.Visible = true;
SearchPanel.Visible = true;
InstallButtons1.Visible = true;
InstallButtons2.Visible = true;
NoProductsSelectedPanel.Visible = false;
InstallPanel.Visible = false;
AceptDEclineButtons.Visible = false;
ProgressPanel.Visible = false;
ProgressTimer.Enabled = false;
InstallCompletedPanel.Visible = false;
ProductsPanel.Update();
InstallPanel.Update();
ProgressPanel.Update();
}
private void ShowNoProductsSelectedPanel()
{
ProductsPanel.Visible = false;
keywordsList.Visible = false;
SearchPanel.Visible = false;
InstallButtons1.Visible = false;
InstallButtons2.Visible = false;
NoProductsSelectedPanel.Visible = true;
InstallPanel.Visible = false;
AceptDEclineButtons.Visible = false;
ProgressPanel.Visible = false;
ProgressTimer.Enabled = false;
InstallCompletedPanel.Visible = false;
ProductsPanel.Update();
InstallPanel.Update();
ProgressPanel.Update();
}
private void ShowSelectedProducts()
{
ProductsPanel.Visible = false;
keywordsList.Visible = false;
SearchPanel.Visible = false;
InstallButtons1.Visible = false;
InstallButtons2.Visible = false;
ProgressPanel.Visible = false;
ProgressTimer.Enabled = false;
InstallCompletedPanel.Visible = false;
InstallPanel.Visible = true;
AceptDEclineButtons.Visible = true;
ProductsPanel.Update();
InstallPanel.Update();
ProgressPanel.Update();
}
private void ShowProgressPanel()
{
ProductsPanel.Visible = false;
keywordsList.Visible = false;
SearchPanel.Visible = false;
InstallButtons1.Visible = false;
InstallButtons2.Visible = false;
InstallPanel.Visible = false;
AceptDEclineButtons.Visible = false;
InstallCompletedPanel.Visible = false;
ProgressPanel.Visible = true;
ProgressTimer.Enabled = true;
ProductsPanel.Update();
InstallPanel.Update();
ProgressPanel.Update();
}
protected void gvWpiProducts_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvWpiProducts.PageIndex = ((System.Web.UI.WebControls.GridViewPageEventArgs)e).NewPageIndex;
if ((bool)ViewState["SearchResultShown"])
{
gvWpiProducts.DataSource = GetWpiProductsFiltered();
}
else
{
gvWpiProducts.DataSource = FilterInstaledProducts(ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue));
}
gvWpiProducts.DataBind();
}
protected void gvWpiProducts_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "WpiAdd")
{
((Button)e.CommandSource).Text = "- remove";
((Button)e.CommandSource).CommandName = "WpiRemove";
ArrayList wpiProductsForInstall = GetProductsToInstallList();
wpiProductsForInstall.Add(e.CommandArgument.ToString());
SetProductsToInstallList(wpiProductsForInstall);
}
if (e.CommandName == "WpiRemove")
{
((Button)e.CommandSource).Text = "+ add";
((Button)e.CommandSource).CommandName = "WpiAdd";
ArrayList wpiProductsForInstall = GetProductsToInstallList();
wpiProductsForInstall.Remove(e.CommandArgument.ToString());
SetProductsToInstallList(wpiProductsForInstall);
}
}
private void UpdateProductsByKeyword()
{
gvWpiProducts.DataSource = FilterInstaledProducts(
ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, SelectedKeywordValue)
);
gvWpiProducts.DataBind();
}
protected void keywordsList_SelectedIndexChanged(object sender, EventArgs e)
{
gvWpiProducts.PageIndex = 0;
keywordsList.SelectedItem.Attributes["class"] = "selected";
searchBox.Text = "";
UpdateProductsByKeyword();
}
protected void btnInstall_Click(object sender, EventArgs e)
{
string[] productsToInstall = (string[]) GetProductsToInstallList().ToArray(typeof (string));
if (null == productsToInstall || productsToInstall.Length == 0)
{
ShowNoProductsSelectedPanel();
}
else
{
// get dependencies and show it
gvWpiInstall.DataSource = ES.Services.Servers.GetWPIProductsWithDependencies(PanelRequest.ServerId, productsToInstall);
gvWpiInstall.DataBind();
ShowSelectedProducts();
}
}
protected void btnDecline_Click(object sender, EventArgs e)
{
ShowProductsGrid();
}
private IAsyncResult WPIInstallationResult;
protected void btnAccept_Click(object sender, EventArgs e)
{
WPIInstallationResult = ES.Services.Servers.BeginInstallWPIProducts(
PanelRequest.ServerId,
(string[])GetProductsToInstallList().ToArray(typeof(string)),
null,
null
);
ShowProgressPanel();
UpdateProgress();
}
private string UpdateProgress()
{
try
{
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
if (string.IsNullOrEmpty(wpiLogsDir))
{
wpiLogsDir = ES.Services.Servers.WpiGetLogFileDirectory(PanelRequest.ServerId);
ViewState[_wpiLogsDirViewStateKey] = wpiLogsDir;
}
}
catch
{
//
}
string message = ES.Services.Servers.GetWPIStatus(PanelRequest.ServerId);
if (!string.IsNullOrEmpty(message))
{
ProgressMessage.Text = message.Replace("\n", "<br/>");
}
else
{
//ProgressMessage.Text = "please wait...";
}
return message;
}
protected void ProgressTimerTick(object sender, EventArgs e)
{
string message = UpdateProgress();
if (string.IsNullOrEmpty(message))
{
ShowInstallCompletedPanel();
//ProgressTimer.Enabled = false;
}
else if (message.IndexOf("failed", StringComparison.OrdinalIgnoreCase) > 0)
{
// some installation failed
ShowInstallFailedPanel();
}
}
private void ShowInstallFailedPanel()
{
ProgressMessagePanel.Visible = true;
InstallCompletedPanel.Visible = true;
ProgressAnimation.Style["display"] = "none";
CancelInstall.Visible = false;
LabelInstallationFailed.Visible = true;
LabelInstallationSuccess.Visible = false;
ShowLogButton();
}
private void ShowInstallCompletedPanel()
{
if (!LabelInstallationFailed.Visible)
{
ProgressMessagePanel.Visible = false;
}
InstallCompletedPanel.Visible = true;
ProgressAnimation.Style["display"] = "none";
if (!InstalledProductsList.Visible)
{
string[] productsToInstall = (string[]) GetProductsToInstallList().ToArray(typeof (string));
foreach (string product in productsToInstall)
{
InstalledProductsList.Items.Add(new ListItem(product));
}
InstalledProductsList.Visible = true;
}
ShowLogButton();
}
private void ShowLogButton()
{
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
if (!string.IsNullOrEmpty(wpiLogsDir))
{
ShowLogsButton.Visible = true;
}
}
protected void gvWpiInstall_RowDataBound(object sender, GridViewRowEventArgs e)
{
WPIProduct p = (WPIProduct)e.Row.DataItem;
if (p != null)
{
Label labelFileSize = (Label)e.Row.FindControl("downloadSize");
if (p.FileSize == 0 )
{
if (labelFileSize != null)
{
labelFileSize.Visible = false;
}
}
else
{
if (labelFileSize != null)
{
labelFileSize.Text += " " + p.FileSize + " Kb";
}
}
if (string.IsNullOrEmpty( p.EulaUrl ) )
{
HyperLink hl = (HyperLink)e.Row.FindControl("eulaLink");
if (hl != null)
{
hl.Visible = false;
}
}
if (string.IsNullOrEmpty( p.DownloadedLocation ) )
{
Label label = (Label)e.Row.FindControl("labelDownloaded");
if (label != null)
{
label.Visible = false;
}
}
}
}
protected void BackToGalleryButtonClick(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_platforminstaller"));
}
protected void CacnelInstallButtonClick(object sender, EventArgs e)
{
ES.Services.Servers.CancelInstallWPIProducts(PanelRequest.ServerId);
ProgressMessage.Text = "Canceling...";
LabelInstallationSuccess.Text = "Installation canceled";
}
protected void NoProductsBackButtonClick(object sender, EventArgs e)
{
ShowProductsGrid();
}
protected string IsAddedText(string productId)
{
if ( GetProductsToInstallList().Contains(productId) )
{
return "- remove";
}
else
{
return "+ add";
}
}
protected void btnCancel_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_server"));
}
protected void SearchButton_Click(object sender, EventArgs e)
{
keywordsList.ClearSelection();
ViewState["SearchResultShown"] = true;
gvWpiProducts.PageIndex = 0;
gvWpiProducts.DataSource = GetWpiProductsFiltered();
gvWpiProducts.DataBind();
}
private WPIProduct[] GetWpiProductsFiltered()
{
return ES.Services.Servers.GetWPIProductsFiltered(PanelRequest.ServerId, searchBox.Text);
}
protected ArrayList FilterInstaledProducts(WPIProduct[] products)
{
ViewState["SearchResultShown"] = false;
ArrayList result = new ArrayList();
foreach (WPIProduct product in products)
{
if (product.IsInstalled == IsShowInstalledPseudoKeywordSelected)
{
result.Add(product);
}
}
return result;
}
protected string FixDefaultLogo(string imgUrl)
{
if (string.IsNullOrEmpty(imgUrl))
{
return GetThemedImage("../icons/dvd_disc_48.png");
}
return imgUrl;
}
protected void ShowLogsButton_OnClick(object sender, EventArgs e)
{
//show logs
try
{
string wpiLogsDir = ViewState[_wpiLogsDirViewStateKey] as string;
if (!string.IsNullOrEmpty(wpiLogsDir))
{
//Get logs !!!
object[] logsEntrys = ES.Services.Servers.WpiGetLogsInDirectory(PanelRequest.ServerId, wpiLogsDir);
WpiLogsPanel.Visible = true;
StringBuilder sb = new StringBuilder();
foreach (SettingPair entry in logsEntrys)
{
string fileName = (string)entry.Name;
string fileContent = (string)entry.Value;
sb.AppendLine().AppendFormat("<h3>{0}</h3>", fileName).AppendLine().Append(fileContent).AppendLine();
}
WpiLogsPre.InnerHtml = sb.ToString();
ShowLogsButton.Visible = false;
ProgressTimer.Enabled = false;
}
}
catch (Exception ex)
{
WpiLogsPanel.Visible = true;
WpiLogsPre.InnerText = ex.ToString();
}
}
}
}

View file

@ -0,0 +1,377 @@
// Copyright (c) 2012, 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class ServersEditWebPlatformInstaller {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// ServerHeaderControl1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
/// <summary>
/// SearchPanel 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.Panel SearchPanel;
/// <summary>
/// keywordsList 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.RadioButtonList keywordsList;
/// <summary>
/// searchBox 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.TextBox searchBox;
/// <summary>
/// ProductSearchGo 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.ImageButton ProductSearchGo;
/// <summary>
/// InstallButtons2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons2;
/// <summary>
/// btnInstall2 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.Button btnInstall2;
/// <summary>
/// btnCancel2 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.Button btnCancel2;
/// <summary>
/// ProductsPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ProductsPanel;
/// <summary>
/// gvWpiProducts 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.GridView gvWpiProducts;
/// <summary>
/// InstallButtons1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons1;
/// <summary>
/// btnInstall1 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.Button btnInstall1;
/// <summary>
/// btnCancel1 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.Button btnCancel1;
/// <summary>
/// NoProductsSelectedPanel 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.Panel NoProductsSelectedPanel;
/// <summary>
/// NoProductsBackButton 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.Button NoProductsBackButton;
/// <summary>
/// InstallPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel InstallPanel;
/// <summary>
/// gvWpiInstall 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.GridView gvWpiInstall;
/// <summary>
/// AceptDEclineButtons control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl AceptDEclineButtons;
/// <summary>
/// btnAccept 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.Button btnAccept;
/// <summary>
/// btnDecline 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.Button btnDecline;
/// <summary>
/// btnCancel3 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.Button btnCancel3;
/// <summary>
/// ProgressPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ProgressPanel;
/// <summary>
/// ProgressTimer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer ProgressTimer;
/// <summary>
/// ProgressMessagePanel 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.Panel ProgressMessagePanel;
/// <summary>
/// ProgressAnimation 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.Image ProgressAnimation;
/// <summary>
/// ProgressMessage 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 ProgressMessage;
/// <summary>
/// CancelInstall 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.Button CancelInstall;
/// <summary>
/// InstallCompletedPanel 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.Panel InstallCompletedPanel;
/// <summary>
/// LabelInstallationSuccess 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 LabelInstallationSuccess;
/// <summary>
/// InstalledProductsList 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.BulletedList InstalledProductsList;
/// <summary>
/// LabelInstallationFailed 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 LabelInstallationFailed;
/// <summary>
/// ShowLogsButton 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.Button ShowLogsButton;
/// <summary>
/// WpiLogsPanel 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.Panel WpiLogsPanel;
/// <summary>
/// WpiLogsPre control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl WpiLogsPre;
/// <summary>
/// BackToGalleryButton 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.Button BackToGalleryButton;
/// <summary>
/// btnBackToServer 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.Button btnBackToServer;
}
}

View file

@ -1,21 +1,98 @@
// Copyright (c) 2012, 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.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class ServersEditWindowsServices {
protected WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
protected System.Web.UI.WebControls.Button btnCancel;
protected System.Web.UI.UpdateProgress updatePanelProgress;
protected System.Web.UI.UpdatePanel ItemsUpdatePanel;
protected System.Web.UI.Timer itemsTimer;
protected System.Web.UI.WebControls.GridView gvServices;
/// <summary>
/// ServerHeaderControl1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
/// <summary>
/// btnCancel 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.Button btnCancel;
/// <summary>
/// updatePanelProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdateProgress updatePanelProgress;
/// <summary>
/// ItemsUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
/// <summary>
/// itemsTimer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer itemsTimer;
/// <summary>
/// gvServices 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.GridView gvServices;
}
}

View file

@ -1,5 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SystemSettings.ascx.cs" Inherits="WebsitePanel.Portal.SystemSettings" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
<%@ Register src="UserControls/EditFeedsList.ascx" tagname="EditFeedsList" tagprefix="uc1" %>
<div class="FormBody">
<wsp:CollapsiblePanel id="lclSmtpSettings" runat="server"
TargetControlID="SmtpPanel" meta:resourcekey="lclSmtpSettings" Text="SMTP Server"/>
@ -39,6 +40,30 @@
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="lclWpiSettings" runat="server"
TargetControlID="WpiPanel" meta:resourcekey="lclWpiSettings" Text="WebPlatformInstaller Settings"/>
<asp:Panel ID="WpiPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="SubHead" style="width:200px;">Enable Microsoft feed</td>
<td class="Normal">
<asp:CheckBox ID="wpiMicrosoftFeed" runat="server" Text="Yes" />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;">Enable HeliconTech feed</td>
<td class="Normal">
<asp:CheckBox ID="wpiHeliconTechFeed" runat="server" Text="Yes" />
</td>
</tr>
</table>
<uc1:EditFeedsList ID="wpiEditFeedsList" runat="server" DisplayNames="false" />
</asp:Panel>
</div>
<div class="FormFooter">
<asp:Button runat="server" ID="btnSaveSettings" meta:resourcekey="btnSaveSettings"

View file

@ -51,6 +51,10 @@ namespace WebsitePanel.Portal
public const string BACKUPS_PATH = "BackupsPath";
public const string FEED_ULS = "FeedUrls";
public const string FEED_ENABLE_MICROSOFT = "FeedEnableMicrosoft";
public const string FEED_ENABLE_HELICON = "FeedEnableHelicon";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@ -88,6 +92,26 @@ namespace WebsitePanel.Portal
{
txtBackupsPath.Text = settings["BackupsPath"];
}
// WPI
settings = ES.Services.System.GetSystemSettings(
WSP.SystemSettings.WPI_SETTINGS);
if (settings != null)
{
wpiMicrosoftFeed.Checked = Utils.ParseBool(settings[FEED_ENABLE_MICROSOFT],true);
wpiHeliconTechFeed.Checked = Utils.ParseBool(settings[FEED_ENABLE_HELICON],true);
wpiEditFeedsList.Value = settings[FEED_ULS];
}
else
{
wpiMicrosoftFeed.Checked = true;
wpiHeliconTechFeed.Checked = true;
}
}
private void SaveSettings()
@ -117,7 +141,6 @@ namespace WebsitePanel.Portal
settings = new WSP.SystemSettings();
settings[BACKUPS_PATH] = txtBackupsPath.Text.Trim();
// BACKUP
result = ES.Services.System.SetSystemSettings(
WSP.SystemSettings.BACKUP_SETTINGS, settings);
@ -126,6 +149,23 @@ namespace WebsitePanel.Portal
ShowResultMessage(result);
return;
}
// WPI
settings[FEED_ULS] = wpiEditFeedsList.Value;
settings[FEED_ENABLE_MICROSOFT] = wpiMicrosoftFeed.Checked.ToString();
settings[FEED_ENABLE_HELICON] = wpiHeliconTechFeed.Checked.ToString();
result = ES.Services.System.SetSystemSettings(
WSP.SystemSettings.WPI_SETTINGS, settings);
if (result < 0)
{
ShowResultMessage(result);
return;
}
}
catch (Exception ex)
{

View file

@ -1,28 +1,206 @@
// Copyright (c) 2012, 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.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SystemSettings {
protected WebsitePanel.Portal.CollapsiblePanel lclSmtpSettings;
protected System.Web.UI.WebControls.Panel SmtpPanel;
protected System.Web.UI.WebControls.TextBox txtSmtpServer;
protected System.Web.UI.WebControls.TextBox txtSmtpPort;
protected System.Web.UI.WebControls.TextBox txtSmtpUser;
protected System.Web.UI.WebControls.TextBox txtSmtpPassword;
protected System.Web.UI.WebControls.Localize locEnableSsl;
protected System.Web.UI.WebControls.CheckBox chkEnableSsl;
protected WebsitePanel.Portal.CollapsiblePanel lclBackupSettings;
protected System.Web.UI.WebControls.Panel BackupPanel;
protected System.Web.UI.WebControls.Localize Localize1;
protected System.Web.UI.WebControls.TextBox txtBackupsPath;
protected System.Web.UI.WebControls.Button btnSaveSettings;
/// <summary>
/// lclSmtpSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel lclSmtpSettings;
/// <summary>
/// SmtpPanel 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.Panel SmtpPanel;
/// <summary>
/// txtSmtpServer 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.TextBox txtSmtpServer;
/// <summary>
/// txtSmtpPort 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.TextBox txtSmtpPort;
/// <summary>
/// txtSmtpUser 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.TextBox txtSmtpUser;
/// <summary>
/// txtSmtpPassword 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.TextBox txtSmtpPassword;
/// <summary>
/// locEnableSsl 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.Localize locEnableSsl;
/// <summary>
/// chkEnableSsl 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 chkEnableSsl;
/// <summary>
/// lclBackupSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel lclBackupSettings;
/// <summary>
/// BackupPanel 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.Panel BackupPanel;
/// <summary>
/// Localize1 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.Localize Localize1;
/// <summary>
/// txtBackupsPath 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.TextBox txtBackupsPath;
/// <summary>
/// lclWpiSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel lclWpiSettings;
/// <summary>
/// WpiPanel 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.Panel WpiPanel;
/// <summary>
/// wpiMicrosoftFeed 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 wpiMicrosoftFeed;
/// <summary>
/// wpiHeliconTechFeed 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 wpiHeliconTechFeed;
/// <summary>
/// wpiEditFeedsList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
/// <summary>
/// btnSaveSettings 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.Button btnSaveSettings;
}
}

View file

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAddFeed.Text" xml:space="preserve">
<value>Add</value>
</data>
<data name="cmdDeleteFeed.AlternateText" xml:space="preserve">
<value>Delete</value>
</data>
<data name="cmdDeleteFeed.OnClientClick" xml:space="preserve">
<value>return confirm('Delete item?');</value>
</data>
<data name="gvFeeds.Empty" xml:space="preserve">
<value>The list is empty.</value>
</data>
<data name="Item.Text" xml:space="preserve">
<value>Additional Name Server:</value>
</data>
<data name="Item0.Text" xml:space="preserve">
<value>Primary Name Server:</value>
</data>
<data name="Item1.Text" xml:space="preserve">
<value>Secondary Name Server:</value>
</data>
</root>

View file

@ -0,0 +1,184 @@
// Copyright (c) 2012, 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 System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web.UI.WebControls;
namespace WebsitePanel.Portal.UserControls
{
public abstract class DomainListControlBase : WebsitePanelControlBase
{
# region Properties
protected abstract Button AddButton { get; }
protected abstract GridView Grid { get; }
public Boolean DisplayNames
{
get { return Grid.Columns[ 0 ].Visible; }
set { Grid.Columns[ 0 ].Visible = value; }
}
public String Value
{
get
{
var items = CollectFormData( false );
return String.Join( ";", items.ToArray() );
}
set
{
var items = new List<String>();
if ( !String.IsNullOrEmpty( value ) )
{
var parts = value.Split( ';' );
items.AddRange( from part in parts where part.Trim() != "" select part.Trim() );
}
// save items
_loaded_items = items.ToArray();
if ( IsPostBack )
{
BindItems( _loaded_items );
}
}
}
# endregion
protected void Page_Load( Object sender, EventArgs e )
{
if ( !IsPostBack )
{
BindItems( _loaded_items ); // empty list
}
}
private void BindItems( IEnumerable items )
{
Grid.DataSource = items;
Grid.DataBind();
}
public List<String> CollectFormData( Boolean include_empty )
{
var items = new List<String>();
foreach ( GridViewRow row in Grid.Rows )
{
var txt_name = (TextBox)row.FindControl( _txt_control_name );
var val = txt_name.Text.Trim();
if ( include_empty || "" != val )
{
items.Add( val );
}
}
return items;
}
# region Events
protected void BtnAddClick( Object sender, EventArgs e)
{
var items = CollectFormData( true );
// add empty string
items.Add( "" );
// bind items
BindItems( items.ToArray() );
}
protected void ListRowCommand( Object sender, GridViewCommandEventArgs e )
{
if ( "delete_item" != e.CommandName )
{
return;
}
var items = CollectFormData(true);
// remove error
items.RemoveAt( Utils.ParseInt( e.CommandArgument, 0 ) );
// bind items
BindItems(items.ToArray());
}
protected void ListRowDataBound( Object sender, GridViewRowEventArgs e )
{
var lbl_name = (Label)e.Row.FindControl( _lbl_control_name );
var txt_name = (TextBox)e.Row.FindControl( _txt_control_name );
var cmd_delete = (ImageButton)e.Row.FindControl( _delete_control_name );
if ( null == lbl_name )
{
return;
}
var val = (String)e.Row.DataItem;
txt_name.Text = val;
var pos = ( e.Row.RowIndex < 2 )
? e.Row.RowIndex.ToString( CultureInfo.InvariantCulture )
: "";
lbl_name.Text = GetLocalizedString( "Item" + pos + ".Text" );
cmd_delete.CommandArgument = e.Row.RowIndex.ToString( CultureInfo.InvariantCulture );
}
# endregion
# region Fields
protected String[] _loaded_items = new String[] {};
protected String _txt_control_name;
protected String _lbl_control_name;
protected String _delete_control_name;
# endregion
}
}

View file

@ -2,12 +2,12 @@
<div style="width:400px;">
<div class="FormButtonsBar">
<asp:Button id="btnAddDomain" runat="server" meta:resourcekey="btnAddDomain" Text="Add"
CssClass="Button2" CausesValidation="false" OnClick="btnAddDomain_Click"/>
CssClass="Button2" CausesValidation="false" OnClick="BtnAddClick"/>
</div>
<asp:GridView id="gvDomains" Runat="server" AutoGenerateColumns="False"
CssSelectorClass="NormalGridView"
OnRowCommand="gvDomains_RowCommand" OnRowDataBound="gvDomains_RowDataBound"
OnRowCommand="ListRowCommand" OnRowDataBound="ListRowDataBound"
EmptyDataText="gvDomains" ShowHeader="False">
<columns>
<asp:TemplateField HeaderText="gvDomainsLabel" ItemStyle-Wrap="false">

View file

@ -26,134 +26,29 @@
// (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 System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace WebsitePanel.Portal.UserControls
{
public partial class EditDomainsList : WebsitePanelControlBase
public partial class EditDomainsList : DomainListControlBase
{
public bool DisplayNames
public EditDomainsList()
{
get { return gvDomains.Columns[0].Visible; }
set { gvDomains.Columns[0].Visible = value; }
_txt_control_name = "txtDomainName";
_lbl_control_name = "lblDomainName";
_delete_control_name = "cmdDeleteDomain";
}
public string Value
protected override Button AddButton
{
get { return GetDomainsValue(); }
set { SetDomainsValue(value); }
get { return btnAddDomain; }
}
private string GetDomainsValue()
protected override GridView Grid
{
List<string> items = CollectFormData(false);
return String.Join(";", items.ToArray());
}
private void SetDomainsValue(string s)
{
List<string> items = new List<string>();
if (!String.IsNullOrEmpty(s))
{
string[] parts = s.Split(';');
foreach (string part in parts)
{
if (part.Trim() != "")
items.Add(part.Trim());
}
}
// save items
loadItems = items.ToArray();
if (IsPostBack)
{
BindItems(loadItems);
}
}
private string[] loadItems = new string[] { };
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindItems(loadItems); // empty list
}
}
private void BindItems(string[] items)
{
gvDomains.DataSource = items;
gvDomains.DataBind();
}
public List<string> CollectFormData(bool includeEmpty)
{
List<string> items = new List<string>();
foreach (GridViewRow row in gvDomains.Rows)
{
TextBox txtDomainName = (TextBox)row.FindControl("txtDomainName");
string val = txtDomainName.Text.Trim();
if (includeEmpty || val != "")
items.Add(val);
}
return items;
}
protected void btnAddDomain_Click(object sender, EventArgs e)
{
List<string> items = CollectFormData(true);
// add empty string
items.Add("");
// bind items
BindItems(items.ToArray());
}
protected void gvDomains_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "delete_item")
{
List<string> items = CollectFormData(true);
// remove error
items.RemoveAt(Utils.ParseInt((string)e.CommandArgument, 0));
// bind items
BindItems(items.ToArray());
}
}
protected void gvDomains_RowDataBound(object sender, GridViewRowEventArgs e)
{
Label lblDomainName = (Label)e.Row.FindControl("lblDomainName");
TextBox txtDomainName = (TextBox)e.Row.FindControl("txtDomainName");
ImageButton cmdDeleteDomain = (ImageButton)e.Row.FindControl("cmdDeleteDomain");
if (lblDomainName != null)
{
string val = (string)e.Row.DataItem;
txtDomainName.Text = val;
string pos = (e.Row.RowIndex < 2) ? e.Row.RowIndex.ToString() : "";
lblDomainName.Text = GetLocalizedString("Item" + pos + ".Text");
cmdDeleteDomain.CommandArgument = e.Row.RowIndex.ToString();
}
get { return gvDomains; }
}
}
}

View file

@ -1,17 +1,62 @@
// Copyright (c) 2012, 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.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.UserControls {
public partial class EditDomainsList {
protected System.Web.UI.WebControls.Button btnAddDomain;
protected System.Web.UI.WebControls.GridView gvDomains;
/// <summary>
/// btnAddDomain 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.Button btnAddDomain;
/// <summary>
/// gvDomains 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.GridView gvDomains;
}
}

View file

@ -0,0 +1,38 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditFeedsList.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.EditFeedsList" %>
<div style="width:100%;">
<div class="FormButtonsBar">
<asp:Button id="btnAddFeed" runat="server" meta:resourcekey="btnAddFeed" Text="Add"
CssClass="Button2" CausesValidation="false" OnClick="BtnAddClick"/>
</div>
<asp:GridView id="gvFeeds" Runat="server" AutoGenerateColumns="False"
CssSelectorClass="NormalGridView"
OnRowCommand="ListRowCommand" OnRowDataBound="ListRowDataBound"
EmptyDataText="gvFeeds" ShowHeader="False">
<columns>
<asp:TemplateField HeaderText="gvFeedsLabel" ItemStyle-Wrap="false">
<itemtemplate>
<asp:Label id="lblFeedName" Runat="server"></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="gvFeedsName" ItemStyle-Width="100%">
<itemtemplate>
<asp:TextBox id="txtFeedName" Runat="server" Width="95%" CssClass="NormalTextBox">
</asp:TextBox>
<asp:RegularExpressionValidator id="valCorrectFeedName" runat="server" CssClass="NormalBold"
ValidationExpression="^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?$"
ErrorMessage="&nbsp;*" ControlToValidate="txtFeedName" Display="Dynamic"></asp:RegularExpressionValidator>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField>
<itemtemplate>
<asp:ImageButton ID="cmdDeleteFeed" runat="server" SkinID="DeleteSmall"
CommandName="delete_item" CausesValidation="false"
meta:resourcekey="cmdDeleteFeed"></asp:ImageButton>
</itemtemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</columns>
</asp:GridView>
</div>

View file

@ -0,0 +1,54 @@
// Copyright (c) 2012, 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.Web.UI.WebControls;
namespace WebsitePanel.Portal.UserControls
{
public partial class EditFeedsList : DomainListControlBase
{
public EditFeedsList()
{
_txt_control_name = "txtFeedName";
_lbl_control_name = "lblFeedName";
_delete_control_name = "cmdDeleteFeed";
}
protected override Button AddButton
{
get { return btnAddFeed; }
}
protected override GridView Grid
{
get { return gvFeeds; }
}
}
}

View file

@ -0,0 +1,62 @@
// Copyright (c) 2012, 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.UserControls {
public partial class EditFeedsList {
/// <summary>
/// btnAddFeed 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.Button btnAddFeed;
/// <summary>
/// gvFeeds 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.GridView gvFeeds;
}
}

View file

@ -1,15 +1,117 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebApplicationGallery.ascx.cs" Inherits="WebsitePanel.Portal.WebApplicationGallery" %>
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="uc1" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<script src="/JavaScript/jquery-1.4.4.min.js" type="text/javascript"></script>
<style>
ul.WPIKeywordList {
padding: 10px 0 0 0;
}
ul.WPIKeywordList>li {
padding: .4em .2em;
margin-right: .4em;
display: inline;
list-style-type: none;
line-height: 200%;
}
ul.WPIKeywordList li span,
ul.WPIKeywordList li label {
padding: .2em;
white-space: nowrap;
}
ul.WPIKeywordList li .selected
{
/*padding: .4em .4em;*/
background-color: #E5F2FF;
border: solid 1px #86B9F7;
color: #000;
}
ul.WPIKeywordList input {
display: none;
}
ul.WPIKeywordList label {
padding: 0 .1em;
cursor: pointer;
text-decoration: underline;
text-decoration-color: #888;
}
ul.WPIKeywordList li .selected label {
text-decoration: none;
}
.ProductsSearchInput {
}
.LanguagesBox {
margin: 10px 0;
}
.AspNet-GridView-Pagination {
font-size: 10pt !important;
}
</style>
<!--[if lt IE 9]>
<style>
ul.WPIKeywordList input {
display: inline;
}
ul.WPIKeywordList>li {
padding: .1em .2em;
}
</style>
<![endif]-->
<script type="text/javascript">
Sys.Application.add_init(function () {
$('.ProductsSearchInput').focus();
$('.ProductsSearchInput').live("keypress", function (e) {
/* ENTER PRESSED*/
if (e.keyCode == 13) {
e.stopPropagation();
e.preventDefault();
$('.ProductsSearchButton')[0].click();
return false;
}
});
});
</script>
<div class="FormButtonsBar">
<asp:DropDownList ID="ddlCategory" runat="server" CssClass="NormalTextBox"
DataValueField="Id" DataTextField="Name" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
</asp:DropDownList>
<table width="100%">
<tr>
<td>
<asp:RadioButtonList ID="rbsCategory" runat="server"
RepeatLayout="UnorderedList"
CssClass="WPIKeywordList FormBody"
DataValueField="Id"
DataTextField="Name"
AutoPostBack="True"
OnSelectedIndexChanged="CategorySelectedIndexChanged">
</asp:RadioButtonList>
</td>
<td style="width: 190px; vertical-align: middle; text-align: right; padding-top: 10px;">
<asp:TextBox ID="searchBox" runat="server"
CssClass="NormalTextBox ProductsSearchInput" >
</asp:TextBox><asp:ImageButton ID="ProductSearchGo" runat="server" SkinID="SearchButton" OnClick="SearchButton_Click" CssClass="ProductsSearchButton"/>
<br/>
<asp:DropDownList ID="dropDownLanguages" runat="server"
CssClass="LanguagesBox NormalTextBox"
onselectedindexchanged="dropDownLanguages_SelectedIndexChanged"
AutoPostBack="true">
</asp:DropDownList>
</td>
</tr>
</table>
</div>
<uc1:SimpleMessageBox ID="messageBox" runat="server" />
<%-- <asp:RadioButtonList ID="keywordsList" runat="server"
RepeatLayout="UnorderedList" CssClass="WPIKeywordList FormBody"
onselectedindexchanged="keywordsList_SelectedIndexChanged"
AutoPostBack="True">
</asp:RadioButtonList>--%>
<asp:GridView id="gvApplications" runat="server" AutoGenerateColumns="False" AllowPaging="true"
ShowHeader="false" CssSelectorClass="LightGridView" EmptyDataText="gvApplications" OnRowCommand="gvApplications_RowCommand"
OnPageIndexChanging="gvApplications_PageIndexChanging">
@ -20,7 +122,7 @@
<div style="text-align:center;">
<asp:hyperlink NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
runat="server" ID="Hyperlink3" ToolTip='<%# Eval("Title") %>'>
<asp:Image runat=server ID="Image1" Width="120" Height="120"
<asp:Image runat="server" ID="Image1" Width="120" Height="120"
ImageUrl='<%# "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode((string)Eval("IconUrl")) %>'
AlternateText='<%# Eval("Title") %>'>
</asp:Image>
@ -31,7 +133,7 @@
<asp:TemplateField>
<ItemTemplate>
<div class="MediumBold" style="padding:4px;">
<asp:hyperlink CssClass=MediumBold NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
<asp:hyperlink CssClass="MediumBold" NavigateUrl='<%# EditUrl("ApplicationID", Eval("Id").ToString(), "edit", "SpaceID=" + PanelSecurity.PackageId.ToString()) %>'
runat="server" ID="lnkAppDetails" ToolTip='<%# Eval("Title") %>'>
<%# Eval("Title")%>
</asp:hyperlink>

View file

@ -47,15 +47,19 @@ namespace WebsitePanel.Portal
//
if (!result.IsSuccess)
{
ddlCategory.Visible = false;
rbsCategory.Visible = false;
messageBox.ShowMessage(result, "WAG_NOT_AVAILABLE", "ModuleWAG");
return;
}
if (!IsPostBack)
{
//
SetLanguage();
BindLanguages();
BindCategories();
BindApplications();
ViewState["IsSearchResults"] = false;
}
}
catch(Exception ex)
@ -67,43 +71,69 @@ namespace WebsitePanel.Portal
protected void gvApplications_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvApplications.PageIndex = e.NewPageIndex;
//
BindApplications();
if ((bool)ViewState["IsSearchResults"] == false)
{
// categorized app list
BindApplications();
if (null != rbsCategory.SelectedItem)
{
rbsCategory.SelectedItem.Attributes["class"] = "selected";
}
}
else
{
// search result app list
SearchButton_Click(sender, null);
}
}
private void BindLanguages()
{
GalleryLanguagesResult result = ES.Services.WebApplicationGallery.GetGalleryLanguages(PanelSecurity.PackageId);
dropDownLanguages.DataSource = result.Value;
//dropDownLanguages.SelectedIndex = 0;
dropDownLanguages.SelectedValue = (string)Session["WebApplicationGaleryLanguage"];
dropDownLanguages.DataTextField = "Value";
dropDownLanguages.DataValueField = "Name";
dropDownLanguages.DataBind();
}
private void BindCategories()
{
GalleryCategoriesResult result = ES.Services.WebApplicationGallery.GetGalleryCategories(PanelSecurity.PackageId);
//
ddlCategory.DataSource = result.Value;
ddlCategory.DataTextField = "Name";
ddlCategory.DataValueField = "Id";
ddlCategory.DataBind();
rbsCategory.DataSource = result.Value;
rbsCategory.DataTextField = "Name";
rbsCategory.DataValueField = "Id";
rbsCategory.DataBind();
// add empty
ddlCategory.Items.Insert(0, new ListItem(GetLocalizedString("SelectCategory.Text"), ""));
ListItem listItem = new ListItem("All", "");
listItem.Attributes["class"] = "selected";
rbsCategory.Items.Insert(0, listItem);
}
private void BindApplications()
{
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
ViewState["IsSearchResults"] = false;
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
//
GalleryApplicationsResult result = helper.GetGalleryApplications(ddlCategory.SelectedValue, PanelSecurity.PackageId);
GalleryApplicationsResult result = helper.GetGalleryApplications(rbsCategory.SelectedValue, PanelSecurity.PackageId);
//
gvApplications.DataSource = result.Value;
gvApplications.DataBind();
}
protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e)
protected void CategorySelectedIndexChanged(object sender, EventArgs e)
{
gvApplications.PageIndex = 0;
//
BindApplications();
}
ViewState["IsSearchResults"] = false;
searchBox.Text = "";
gvApplications.PageIndex = 0;
rbsCategory.SelectedItem.Attributes["class"] = "selected";
protected void odsApplications_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
}
BindApplications();
}
protected void gvApplications_RowCommand(object sender, GridViewCommandEventArgs e)
{
@ -111,5 +141,42 @@ namespace WebsitePanel.Portal
Response.Redirect(EditUrl("ApplicationID", e.CommandArgument.ToString(), "edit",
"SpaceID=" + PanelSecurity.PackageId.ToString()));
}
protected void SearchButton_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
if ((bool)ViewState["IsSearchResults"] == false)
{
gvApplications.PageIndex = 0;
}
ViewState["IsSearchResults"] = true;
WebAppGalleryHelpers helper = new WebAppGalleryHelpers();
GalleryApplicationsResult result = helper.GetGalleryApplicationsFiltered(searchBox.Text, PanelSecurity.PackageId);
gvApplications.DataSource = result.Value ;
gvApplications.DataBind();
}
protected void dropDownLanguages_SelectedIndexChanged(object sender, EventArgs e)
{
Session["WebApplicationGaleryLanguage"] = dropDownLanguages.SelectedValue;
SetLanguage();
BindLanguages();
BindCategories();
BindApplications();
}
private void SetLanguage()
{
string lang = (string)Session["WebApplicationGaleryLanguage"];
if (string.IsNullOrEmpty(lang))
{
lang = "en";
}
ES.Services.WebApplicationGallery.SetResourceLanguage(PanelSecurity.PackageId, lang);
}
}
}

View file

@ -1,4 +1,33 @@
//------------------------------------------------------------------------------
// Copyright (c) 2012, 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.
//
@ -13,13 +42,40 @@ namespace WebsitePanel.Portal {
public partial class WebApplicationGallery {
/// <summary>
/// ddlCategory control.
/// rbsCategory 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.DropDownList ddlCategory;
protected global::System.Web.UI.WebControls.RadioButtonList rbsCategory;
/// <summary>
/// searchBox 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.TextBox searchBox;
/// <summary>
/// ProductSearchGo 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.ImageButton ProductSearchGo;
/// <summary>
/// dropDownLanguages 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.DropDownList dropDownLanguages;
/// <summary>
/// messageBox control.

View file

@ -27,7 +27,8 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.WebAppGallery;
using System.Globalization;
using WebsitePanel.Providers.WebAppGallery;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal
@ -39,7 +40,7 @@ namespace WebsitePanel.Portal
lblVersion.Text = application.Version;
lblDescription.Text = application.Description;
lblTitle.Text = application.Title;
lblSize.Text = application.Size;
lblSize.Text = application.InstallerFileSize.ToString(CultureInfo.InvariantCulture);
imgLogo.ImageUrl = "~/DesktopModules/WebsitePanel/resizeimage.ashx?url=" + Server.UrlEncode(application.IconUrl) +
"&width=200&height=200";

View file

@ -63,10 +63,10 @@
<%-- database engine --%>
<fieldset id="databaseEngineBlock" runat="server">
<legend>
<asp:Localize ID="locDatabaseGroup" meta:resourcekey="locDatabaseGroup" runat="server"></asp:Localize>
<asp:Localize ID="locDatabaseType" meta:resourcekey="locDatabaseType" runat="server"></asp:Localize>
</legend>
<div class="FormFieldDescription">
<asp:Localize ID="locDatabaseGroupDescr" meta:resourcekey="locDatabaseGroupDescr" runat="server"></asp:Localize>
<asp:Localize ID="locDatabaseTypeDescr" meta:resourcekey="locDatabaseTypeDescr" runat="server"></asp:Localize>
</div>
<div class="FormField">
<asp:DropDownList ID="databaseEngines" runat="server" AutoPostBack="true" Width="600px"
@ -106,6 +106,18 @@
</asp:Panel>
</div>
<asp:Panel runat="server" ID="InstallLogPanel" Visible="False" CssClass="FormBody">
<script type="text/javascript">
function showLogPre() {
document.getElementById('<%=InstallLog.ClientID%>').style.display = 'block';
return false;
}
</script>
<asp:Button runat="server" CssClass="Button1" Text="Show Install Log" OnClientClick="return showLogPre();" />
<pre runat="server" ID="InstallLog" style="white-space: pre-wrap; display: none;">
Logs not found
</pre>
</asp:Panel>
<div class="FormFooter">
<asp:Button ID="btnInstall" runat="server" meta:resourcekey="btnInstall" Text="Install" ValidationGroup="wag"

View file

@ -373,15 +373,28 @@ namespace WebsitePanel.Portal
// collect parameters
List<DeploymentParameter> parameters = GetParameters();
string language = (string)Session["WebApplicationGaleryLanguage"];
// install application
ResultObject res = ES.Services.WebApplicationGallery.Install(PanelSecurity.PackageId,
StringResultObject res = ES.Services.WebApplicationGallery.Install(PanelSecurity.PackageId,
PanelRequest.ApplicationID,
ddlWebSite.SelectedItem.Text,
directoryName.Text.Trim(),
parameters.ToArray());
parameters.ToArray(),
language
);
InstallLogPanel.Visible = true;
InstallLog.InnerText = res.Value;
// show message box with results
messageBox.ShowMessage(res, "WEB_APPLICATION_GALLERY_INSTALLED", "WebAppGallery");
if (res.IsSuccess)
{
messageBox.ShowMessage(res, "WEB_APPLICATION_GALLERY_INSTALLED", "WebAppGallery");
}
else
{
messageBox.ShowMessage(res, null, null);
}
// toggle controls if there are no errors
if (res.ErrorCodes.Count == 0)

View file

@ -1,4 +1,33 @@
//------------------------------------------------------------------------------
// Copyright (c) 2012, 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.
//
@ -175,22 +204,22 @@ namespace WebsitePanel.Portal {
protected global::System.Web.UI.HtmlControls.HtmlGenericControl databaseEngineBlock;
/// <summary>
/// locDatabaseGroup control.
/// locDatabaseType 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.Localize locDatabaseGroup;
protected global::System.Web.UI.WebControls.Localize locDatabaseType;
/// <summary>
/// locDatabaseGroupDescr control.
/// locDatabaseTypeDescr 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.Localize locDatabaseGroupDescr;
protected global::System.Web.UI.WebControls.Localize locDatabaseTypeDescr;
/// <summary>
/// databaseEngines control.
@ -246,6 +275,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater repParams;
/// <summary>
/// InstallLogPanel 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.Panel InstallLogPanel;
/// <summary>
/// InstallLog control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallLog;
/// <summary>
/// btnInstall control.
/// </summary>

View file

@ -336,15 +336,32 @@
</Compile>
<Compile Include="ProviderControls\Lync_Settings.ascx.cs">
<DependentUpon>Lync_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ServersEditWebPlatformInstaller.ascx.cs">
<DependentUpon>ServersEditWebPlatformInstaller.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\Lync_Settings.ascx.designer.cs">
<DependentUpon>Lync_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ServersEditWebPlatformInstaller.ascx.designer.cs">
<DependentUpon>ServersEditWebPlatformInstaller.ascx</DependentUpon>
</Compile>
<Compile Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx.cs">
<DependentUpon>NotifyOverusedDatabases.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UserControls\DomainListControlBase.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UserControls\EditFeedsList.ascx.cs">
<DependentUpon>EditFeedsList.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UserControls\EditFeedsList.ascx.designer.cs">
<DependentUpon>EditFeedsList.ascx</DependentUpon>
</Compile>
<Compile Include="VPSForPC\MonitoringPage.aspx.cs">
<DependentUpon>MonitoringPage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3759,6 +3776,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
<Content Include="ServersEditWebPlatformInstaller.ascx" />
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />
<Content Include="ExchangeServer\UserControls\MailboxPlanSelector.ascx" />
@ -3779,6 +3797,7 @@
<Content Include="ProviderControls\hMailServer5_Settings.ascx" />
<Content Include="ProviderControls\Lync_Settings.ascx" />
<Content Include="ScheduleTaskControls\NotifyOverusedDatabases.ascx" />
<Content Include="UserControls\EditFeedsList.ascx" />
<Content Include="VPSForPC\MonitoringPage.aspx" />
<Content Include="VPSForPC\VdcAccountVLanAdd.ascx" />
<Content Include="VPSForPC\VdcAccountVLanNetwork.ascx" />
@ -4893,6 +4912,9 @@
<Content Include="ProviderControls\App_LocalResources\hMailServer5_EditList.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="App_LocalResources\ServersEditWebPlatformInstaller.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="ExchangeServer\App_LocalResources\ExchangeAddMailboxPlan.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\ExchangeMailboxPlans.ascx.resx" />
<Content Include="Lync\App_LocalResources\LyncAddFederationDomain.ascx.resx" />