diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 1d34e41d..354dbe4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -173,6 +173,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx index 284db1c3..33515c24 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx @@ -795,4 +795,7 @@ Add New RDS Server + + Edit RDS Server + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index ee1cc001..79ed3c2a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5680,6 +5680,9 @@ RDS Server not added + + RDS Server not updated + Session host certificate has been installed diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/RDSServersEditServer.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/RDSServersEditServer.ascx.resx new file mode 100644 index 00000000..2f06d924 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/RDSServersEditServer.ascx.resx @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Update + + + Free Memory: + + + Free Space: + + + Load Percentage: + + + Allocated Memory: + + + Processor: + + + Server Comments: + + + Server Fully Qualified Domain Name: + + + Size: + + + Status: + + + Volume Name: + + + Server Info + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx index fc6a2efe..9a1f231a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx @@ -177,10 +177,10 @@ View Info - + Free Space: - + Size: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx index 45518cce..cb516139 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx @@ -55,10 +55,13 @@ DataSourceID="odsRDSServersPaged" EnableViewState="False" EmptyDataText="gvRDSServers"> - + - + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs index 1b73054e..566cddbc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx.cs @@ -125,6 +125,10 @@ namespace WebsitePanel.Portal { InstallCertificate(e.CommandArgument.ToString()); } + else if (e.CommandName == "EditServer") + { + EditServer(e.CommandArgument.ToString()); + } } protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) @@ -186,7 +190,11 @@ namespace WebsitePanel.Portal } messageBoxPanel.Update(); -// Response.Redirect(Request.Url.ToString(), true); + } + + private void EditServer(string serverId) + { + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "edit_rdsserver", "SpaceID=" + PanelSecurity.PackageId, "ServerId=" + serverId)); } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx new file mode 100644 index 00000000..16696e16 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx @@ -0,0 +1,111 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSServersEditServer.ascx.cs" Inherits="WebsitePanel.Portal.RDSServersEditServer" %> +<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %> + + + + +
+ + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + + +
+
+
+ +
+ + +
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.cs new file mode 100644 index 00000000..940a29d0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Portal +{ + public partial class RDSServersEditServer : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + var rdsServer = ES.Services.RDS.GetRdsServer(PanelRequest.ServerId); + lblServerName.Text = rdsServer.FqdName; + txtServerComments.Text = rdsServer.Description; + + var serverInfo = ES.Services.RDS.GetRdsServerInfo(null, rdsServer.FqdName); + litProcessor.Text = string.Format("{0}x{1} MHz", serverInfo.NumberOfCores, serverInfo.MaxClockSpeed); + litLoadPercentage.Text = string.Format("{0}%", serverInfo.LoadPercentage); + litMemoryAllocated.Text = string.Format("{0} MB", serverInfo.MemoryAllocatedMb); + litFreeMemory.Text = string.Format("{0} MB", serverInfo.FreeMemoryMb); + litStatus.Text = serverInfo.Status; + rpServerDrives.DataSource = serverInfo.Drives; + rpServerDrives.DataBind(); + } + } + + protected void btnUpdate_Click(object sender, EventArgs e) + { + if (!Page.IsValid) + return; + try + { + var rdsServer = ES.Services.RDS.GetRdsServer(PanelRequest.ServerId); + rdsServer.Description = txtServerComments.Text; + + ResultObject result = ES.Services.RDS.UpdateRdsServer(rdsServer); + + if (!result.IsSuccess && result.ErrorCodes.Count > 0) + { + messageBox.ShowMessage(result, "RDSSERVER_NOT_UPDATED", ""); + return; + } + + RedirectToBrowsePage(); + } + catch (Exception ex) + { + ShowErrorMessage("RDSSERVER_NOT_UPDATED", ex); + } + } + + protected void btnCancel_Click(object sender, EventArgs e) + { + RedirectToBrowsePage(); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.designer.cs new file mode 100644 index 00000000..74024cbf --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersEditServer.ascx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// +// 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 RDSServersEditServer { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// locServerName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locServerName; + + /// + /// lblServerName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblServerName; + + /// + /// locServerComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locServerComments; + + /// + /// txtServerComments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtServerComments; + + /// + /// secServerInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secServerInfo; + + /// + /// panelHardwareInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel panelHardwareInfo; + + /// + /// locStatus control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal locStatus; + + /// + /// litStatus control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litStatus; + + /// + /// locProcessor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal locProcessor; + + /// + /// litProcessor control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litProcessor; + + /// + /// locLoadPercentage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal locLoadPercentage; + + /// + /// litLoadPercentage control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litLoadPercentage; + + /// + /// locMemoryAllocated control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal locMemoryAllocated; + + /// + /// litMemoryAllocated control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litMemoryAllocated; + + /// + /// locFreeMemory control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal locFreeMemory; + + /// + /// litFreeMemory control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litFreeMemory; + + /// + /// rpServerDrives control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater rpServerDrives; + + /// + /// btnUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnUpdate; + + /// + /// 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; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index d02cac7b..52a1dba3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -330,6 +330,13 @@ RDSServers.ascx + + RDSServersEditServer.ascx + ASPXCodeBehind + + + RDSServersEditServer.ascx + AssignedRDSServers.ascx ASPXCodeBehind @@ -4514,7 +4521,9 @@ Designer + +