// 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.
//
//------------------------------------------------------------------------------
@@ -400,6 +428,15 @@ namespace WebsitePanel.Portal {
///
protected global::System.Web.UI.WebControls.HyperLink lnkEventViewer;
+ ///
+ /// lnkPlatformInstaller control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink lnkPlatformInstaller;
+
///
/// lnkServerReboot control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditSystemProcesses.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditSystemProcesses.ascx.designer.cs
index 60334595..d7ad231d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditSystemProcesses.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditSystemProcesses.ascx.designer.cs
@@ -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.
+
+
//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
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;
+
+ ///
+ /// ServerHeaderControl1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+
+ ///
+ /// updatePanelProgress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdateProgress updatePanelProgress;
+
+ ///
+ /// ItemsUpdatePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
+
+ ///
+ /// itemsTimer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer itemsTimer;
+
+ ///
+ /// gvProcesses control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvProcesses;
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx
new file mode 100644
index 00000000..456b474f
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx
@@ -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" %>
+
+
+
+
+
+
+
+
+<%--
+
+
+
+
+
+
+
+
+--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%# Eval("Title")%>
+ <%# Eval("Summary") %>
+ <%# Eval("LongDescription")%>
+
+
+ More information
+ ·
+ Version: <%# Eval("Version")%>
+ ·
+ Published: <%# ((DateTime)Eval("Published")).ToShortDateString() %>
+
+
+ Publisher: <%# Eval("Author")%>
+ ·
+ License terms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No products selected to install
+
+
+
+
+
+
+
+
+ Products to be installed
+ Review the following list of software to be installed and Windows components to be turned on.
+
+
+
+
+
+
+
+ <%# Eval("Title")%>
+
+ License Agreement
+ <%# Eval("DownloadedLocation")%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Selected products are installed now:
+
+
+ initializing...
+
+
+
+
+
+
+
+
+
+ Selected products are successfully installed
+
+
+
+ Some products installation are failed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs
new file mode 100644
index 00000000..1b2c1156
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs
@@ -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 keywords = new List(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", " ");
+ }
+ 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("{0}", 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();
+ }
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.designer.cs
new file mode 100644
index 00000000..15aaca0c
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.designer.cs
@@ -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.
+
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal {
+
+
+ public partial class ServersEditWebPlatformInstaller {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// ServerHeaderControl1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
+
+ ///
+ /// SearchPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel SearchPanel;
+
+ ///
+ /// keywordsList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButtonList keywordsList;
+
+ ///
+ /// searchBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox searchBox;
+
+ ///
+ /// ProductSearchGo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton ProductSearchGo;
+
+ ///
+ /// InstallButtons2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons2;
+
+ ///
+ /// btnInstall2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnInstall2;
+
+ ///
+ /// btnCancel2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel2;
+
+ ///
+ /// ProductsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel ProductsPanel;
+
+ ///
+ /// gvWpiProducts control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvWpiProducts;
+
+ ///
+ /// InstallButtons1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl InstallButtons1;
+
+ ///
+ /// btnInstall1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnInstall1;
+
+ ///
+ /// btnCancel1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel1;
+
+ ///
+ /// NoProductsSelectedPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel NoProductsSelectedPanel;
+
+ ///
+ /// NoProductsBackButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button NoProductsBackButton;
+
+ ///
+ /// InstallPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel InstallPanel;
+
+ ///
+ /// gvWpiInstall control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvWpiInstall;
+
+ ///
+ /// AceptDEclineButtons control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl AceptDEclineButtons;
+
+ ///
+ /// btnAccept control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAccept;
+
+ ///
+ /// btnDecline control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnDecline;
+
+ ///
+ /// btnCancel3 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel3;
+
+ ///
+ /// ProgressPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel ProgressPanel;
+
+ ///
+ /// ProgressTimer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer ProgressTimer;
+
+ ///
+ /// ProgressMessagePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel ProgressMessagePanel;
+
+ ///
+ /// ProgressAnimation control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image ProgressAnimation;
+
+ ///
+ /// ProgressMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label ProgressMessage;
+
+ ///
+ /// CancelInstall control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button CancelInstall;
+
+ ///
+ /// InstallCompletedPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel InstallCompletedPanel;
+
+ ///
+ /// LabelInstallationSuccess control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelInstallationSuccess;
+
+ ///
+ /// InstalledProductsList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.BulletedList InstalledProductsList;
+
+ ///
+ /// LabelInstallationFailed control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelInstallationFailed;
+
+ ///
+ /// ShowLogsButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button ShowLogsButton;
+
+ ///
+ /// WpiLogsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel WpiLogsPanel;
+
+ ///
+ /// WpiLogsPre control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl WpiLogsPre;
+
+ ///
+ /// BackToGalleryButton control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button BackToGalleryButton;
+
+ ///
+ /// btnBackToServer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnBackToServer;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWindowsServices.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWindowsServices.ascx.designer.cs
index b18b0e24..d316bb5b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWindowsServices.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWindowsServices.ascx.designer.cs
@@ -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.
+
+
//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
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;
+
+ ///
+ /// ServerHeaderControl1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.ServerHeaderControl ServerHeaderControl1;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+
+ ///
+ /// updatePanelProgress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdateProgress updatePanelProgress;
+
+ ///
+ /// ItemsUpdatePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdatePanel ItemsUpdatePanel;
+
+ ///
+ /// itemsTimer control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer itemsTimer;
+
+ ///
+ /// gvServices control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView gvServices;
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SystemSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SystemSettings.ascx
index 1441bac1..51c37f47 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SystemSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SystemSettings.ascx
@@ -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" %>
@@ -39,6 +40,30 @@
|
+
+