Showing Rds Server info

This commit is contained in:
vfedosevich 2015-02-16 04:26:12 -08:00
parent 244a600d83
commit 8faf2a7139
17 changed files with 1503 additions and 19 deletions

View file

@ -106,6 +106,14 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted; private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsServerInfoOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsServerStatusOperationCompleted;
private System.Threading.SendOrPostCallback ShutDownRdsServerOperationCompleted;
private System.Threading.SendOrPostCallback RestartRdsServerOperationCompleted;
/// <remarks/> /// <remarks/>
public esRemoteDesktopServices() { public esRemoteDesktopServices() {
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
@ -225,6 +233,18 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted; public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted;
/// <remarks/>
public event GetRdsServerInfoCompletedEventHandler GetRdsServerInfoCompleted;
/// <remarks/>
public event GetRdsServerStatusCompletedEventHandler GetRdsServerStatusCompleted;
/// <remarks/>
public event ShutDownRdsServerCompletedEventHandler ShutDownRdsServerCompleted;
/// <remarks/>
public event RestartRdsServerCompletedEventHandler RestartRdsServerCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollection GetRdsCollection(int collectionId) { public RdsCollection GetRdsCollection(int collectionId) {
@ -1944,6 +1964,182 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerInfo", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName) {
object[] results = this.Invoke("GetRdsServerInfo", new object[] {
itemId,
fqdnName});
return ((RdsServerInfo)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsServerInfo(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsServerInfo", new object[] {
itemId,
fqdnName}, callback, asyncState);
}
/// <remarks/>
public RdsServerInfo EndGetRdsServerInfo(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsServerInfo)(results[0]));
}
/// <remarks/>
public void GetRdsServerInfoAsync(int itemId, string fqdnName) {
this.GetRdsServerInfoAsync(itemId, fqdnName, null);
}
/// <remarks/>
public void GetRdsServerInfoAsync(int itemId, string fqdnName, object userState) {
if ((this.GetRdsServerInfoOperationCompleted == null)) {
this.GetRdsServerInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerInfoOperationCompleted);
}
this.InvokeAsync("GetRdsServerInfo", new object[] {
itemId,
fqdnName}, this.GetRdsServerInfoOperationCompleted, userState);
}
private void OnGetRdsServerInfoOperationCompleted(object arg) {
if ((this.GetRdsServerInfoCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsServerInfoCompleted(this, new GetRdsServerInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerStatus", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string GetRdsServerStatus(int itemId, string fqdnName) {
object[] results = this.Invoke("GetRdsServerStatus", new object[] {
itemId,
fqdnName});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsServerStatus(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsServerStatus", new object[] {
itemId,
fqdnName}, callback, asyncState);
}
/// <remarks/>
public string EndGetRdsServerStatus(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void GetRdsServerStatusAsync(int itemId, string fqdnName) {
this.GetRdsServerStatusAsync(itemId, fqdnName, null);
}
/// <remarks/>
public void GetRdsServerStatusAsync(int itemId, string fqdnName, object userState) {
if ((this.GetRdsServerStatusOperationCompleted == null)) {
this.GetRdsServerStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerStatusOperationCompleted);
}
this.InvokeAsync("GetRdsServerStatus", new object[] {
itemId,
fqdnName}, this.GetRdsServerStatusOperationCompleted, userState);
}
private void OnGetRdsServerStatusOperationCompleted(object arg) {
if ((this.GetRdsServerStatusCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsServerStatusCompleted(this, new GetRdsServerStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ShutDownRdsServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject ShutDownRdsServer(int itemId, string fqdnName) {
object[] results = this.Invoke("ShutDownRdsServer", new object[] {
itemId,
fqdnName});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginShutDownRdsServer(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ShutDownRdsServer", new object[] {
itemId,
fqdnName}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndShutDownRdsServer(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void ShutDownRdsServerAsync(int itemId, string fqdnName) {
this.ShutDownRdsServerAsync(itemId, fqdnName, null);
}
/// <remarks/>
public void ShutDownRdsServerAsync(int itemId, string fqdnName, object userState) {
if ((this.ShutDownRdsServerOperationCompleted == null)) {
this.ShutDownRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShutDownRdsServerOperationCompleted);
}
this.InvokeAsync("ShutDownRdsServer", new object[] {
itemId,
fqdnName}, this.ShutDownRdsServerOperationCompleted, userState);
}
private void OnShutDownRdsServerOperationCompleted(object arg) {
if ((this.ShutDownRdsServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ShutDownRdsServerCompleted(this, new ShutDownRdsServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RestartRdsServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject RestartRdsServer(int itemId, string fqdnName) {
object[] results = this.Invoke("RestartRdsServer", new object[] {
itemId,
fqdnName});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginRestartRdsServer(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("RestartRdsServer", new object[] {
itemId,
fqdnName}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndRestartRdsServer(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void RestartRdsServerAsync(int itemId, string fqdnName) {
this.RestartRdsServerAsync(itemId, fqdnName, null);
}
/// <remarks/>
public void RestartRdsServerAsync(int itemId, string fqdnName, object userState) {
if ((this.RestartRdsServerOperationCompleted == null)) {
this.RestartRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRestartRdsServerOperationCompleted);
}
this.InvokeAsync("RestartRdsServer", new object[] {
itemId,
fqdnName}, this.RestartRdsServerOperationCompleted, userState);
}
private void OnRestartRdsServerOperationCompleted(object arg) {
if ((this.RestartRdsServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.RestartRdsServerCompleted(this, new RestartRdsServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -2937,4 +3133,108 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsServerInfoCompletedEventHandler(object sender, GetRdsServerInfoCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsServerInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsServerInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsServerInfo Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsServerInfo)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsServerStatusCompletedEventHandler(object sender, GetRdsServerStatusCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsServerStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsServerStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ShutDownRdsServerCompletedEventHandler(object sender, ShutDownRdsServerCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ShutDownRdsServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal ShutDownRdsServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void RestartRdsServerCompletedEventHandler(object sender, RestartRdsServerCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RestartRdsServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal RestartRdsServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
} }

View file

@ -248,6 +248,26 @@ namespace WebsitePanel.EnterpriseServer
return GetRdsCollectionSessionHostsInternal(collectionId); return GetRdsCollectionSessionHostsInternal(collectionId);
} }
public static RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName)
{
return GetRdsServerInfoInternal(itemId, fqdnName);
}
public static string GetRdsServerStatus(int itemId, string fqdnName)
{
return GetRdsServerStatusInternal(itemId, fqdnName);
}
public static ResultObject ShutDownRdsServer(int itemId, string fqdnName)
{
return ShutDownRdsServerInternal(itemId, fqdnName);
}
public static ResultObject RestartRdsServer(int itemId, string fqdnName)
{
return RestartRdsServerInternal(itemId, fqdnName);
}
private static RdsCollection GetRdsCollectionInternal(int collectionId) private static RdsCollection GetRdsCollectionInternal(int collectionId)
{ {
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId)); var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
@ -1235,6 +1255,118 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
private static RdsServerInfo GetRdsServerInfoInternal(int itemId, string fqdnName)
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
return new RdsServerInfo();
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
var result = rds.GetRdsServerInfo(fqdnName);
return result;
}
private static string GetRdsServerStatusInternal(int itemId, string fqdnName)
{
Organization org = OrganizationController.GetOrganization(itemId);
var result = "Unavailable";
if (org == null)
{
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
try
{
result = rds.GetRdsServerStatus(fqdnName);
}
catch
{
}
return result;
}
private static ResultObject ShutDownRdsServerInternal(int itemId, string fqdnName)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SHUTDOWN_RDS_SERVER");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.ShutDownRdsServer(fqdnName);
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_SHUTDOWN_RDS_SERVER", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static ResultObject RestartRdsServerInternal(int itemId, string fqdnName)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "RESTART_RDS_SERVER");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.RestartRdsServer(fqdnName);
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_RESTART_RDS_SERVER", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static List<RemoteApplication> GetCollectionRemoteApplicationsInternal(int itemId, string collectionName) private static List<RemoteApplication> GetCollectionRemoteApplicationsInternal(int itemId, string collectionName)
{ {
var result = new List<RemoteApplication>(); var result = new List<RemoteApplication>();

View file

@ -289,5 +289,29 @@ namespace WebsitePanel.EnterpriseServer
{ {
return RemoteDesktopServicesController.GetRdsCollectionSessionHosts(collectionId); return RemoteDesktopServicesController.GetRdsCollectionSessionHosts(collectionId);
} }
[WebMethod]
public RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName)
{
return RemoteDesktopServicesController.GetRdsServerInfo(itemId, fqdnName);
}
[WebMethod]
public string GetRdsServerStatus(int itemId, string fqdnName)
{
return RemoteDesktopServicesController.GetRdsServerStatus(itemId, fqdnName);
}
[WebMethod]
public ResultObject ShutDownRdsServer(int itemId, string fqdnName)
{
return RemoteDesktopServicesController.ShutDownRdsServer(itemId, fqdnName);
}
[WebMethod]
public ResultObject RestartRdsServer(int itemId, string fqdnName)
{
return RemoteDesktopServicesController.RestartRdsServer(itemId, fqdnName);
}
} }
} }

View file

@ -69,5 +69,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
List<RdsUserSession> GetRdsUserSessions(string collectionName); List<RdsUserSession> GetRdsUserSessions(string collectionName);
void LogOffRdsUser(string unifiedSessionId, string hostServer); void LogOffRdsUser(string unifiedSessionId, string hostServer);
List<string> GetRdsCollectionSessionHosts(string collectionName); List<string> GetRdsCollectionSessionHosts(string collectionName);
RdsServerInfo GetRdsServerInfo(string serverName);
string GetRdsServerStatus(string serverName);
void ShutDownRdsServer(string serverName);
void RestartRdsServer(string serverName);
} }
} }

View file

@ -47,5 +47,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string ItemName { get; set; } public string ItemName { get; set; }
public int? RdsCollectionId { get; set; } public int? RdsCollectionId { get; set; }
public bool ConnectionEnabled { get; set; } public bool ConnectionEnabled { get; set; }
public string Status { get; set; }
} }
} }

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.RemoteDesktopServices
{
public class RdsServerDriveInfo
{
public string DeviceId { get; set; }
public string VolumeName { get; set; }
public double SizeMb { get; set; }
public double FreeSpaceMb { get; set; }
}
}

View file

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.RemoteDesktopServices
{
public class RdsServerInfo
{
public string Status { get; set; }
public int NumberOfCores { get; set; }
public int MaxClockSpeed { get; set; }
public int LoadPercentage { get; set; }
public double MemoryAllocatedMb { get; set; }
public double FreeMemoryMb { get; set; }
public RdsServerDriveInfo[] Drives { get; set; }
}
}

View file

@ -135,6 +135,8 @@
<Compile Include="RemoteDesktopServices\RdsEnums.cs" /> <Compile Include="RemoteDesktopServices\RdsEnums.cs" />
<Compile Include="RemoteDesktopServices\RdsPolicyTypes.cs" /> <Compile Include="RemoteDesktopServices\RdsPolicyTypes.cs" />
<Compile Include="RemoteDesktopServices\RdsServer.cs" /> <Compile Include="RemoteDesktopServices\RdsServer.cs" />
<Compile Include="RemoteDesktopServices\RdsServerDriveInfo.cs" />
<Compile Include="RemoteDesktopServices\RdsServerInfo.cs" />
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" /> <Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
<Compile Include="RemoteDesktopServices\RdsUserSession.cs" /> <Compile Include="RemoteDesktopServices\RdsUserSession.cs" />
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" /> <Compile Include="RemoteDesktopServices\RemoteApplication.cs" />

View file

@ -64,6 +64,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
private const string RdsGroupFormat = "rds-{0}-{1}"; private const string RdsGroupFormat = "rds-{0}-{1}";
private const string RdsModuleName = "RemoteDesktopServices"; private const string RdsModuleName = "RemoteDesktopServices";
private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\""; private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\"";
#endregion #endregion
#region Properties #region Properties
@ -958,8 +959,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
} }
private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server) private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server)
{ {
Command cmd = new Command("Get-RDserver"); Command cmd = new Command("Get-RDserver");
@ -1835,6 +1834,238 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
} }
#endregion #endregion
#region Server Info
public RdsServerInfo GetRdsServerInfo(string serverName)
{
var result = new RdsServerInfo();
Runspace runspace = null;
try
{
runspace = OpenRunspace();
result = GetServerInfo(runspace, serverName);
result.Status = GetRdsServerStatus(runspace, serverName);
}
finally
{
CloseRunspace(runspace);
}
return result;
}
public string GetRdsServerStatus(string serverName)
{
string result = "";
Runspace runspace = null;
try
{
runspace = OpenRunspace();
result = GetRdsServerStatus(runspace, serverName);
}
finally
{
CloseRunspace(runspace);
}
return result;
}
public void ShutDownRdsServer(string serverName)
{
Runspace runspace = null;
try
{
runspace = OpenRunspace();
var command = new Command("Stop-Computer");
command.Parameters.Add("ComputerName", serverName);
command.Parameters.Add("Force", true);
object[] errors = null;
ExecuteShellCommand(runspace, command, false, out errors);
if (errors.Any())
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
}
}
finally
{
CloseRunspace(runspace);
}
}
public void RestartRdsServer(string serverName)
{
Runspace runspace = null;
try
{
runspace = OpenRunspace();
var command = new Command("Restart-Computer");
command.Parameters.Add("ComputerName", serverName);
command.Parameters.Add("Force", true);
object[] errors = null;
ExecuteShellCommand(runspace, command, false, out errors);
if (errors.Any())
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
}
}
finally
{
CloseRunspace(runspace);
}
}
private RdsServerInfo GetServerInfo(Runspace runspace, string serverName)
{
var result = new RdsServerInfo();
Command cmd = new Command("Get-WmiObject");
cmd.Parameters.Add("Class", "Win32_Processor");
cmd.Parameters.Add("ComputerName", serverName);
object[] errors = null;
var psProcInfo = ExecuteShellCommand(runspace, cmd, false, out errors).First();
if (errors.Any())
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
return result;
}
cmd = new Command("Get-WmiObject");
cmd.Parameters.Add("Class", "Win32_OperatingSystem");
cmd.Parameters.Add("ComputerName", serverName);
var psMemoryInfo = ExecuteShellCommand(runspace, cmd, false, out errors).First();
if (errors.Any())
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
return result;
}
result.NumberOfCores = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "NumberOfCores"));
result.MaxClockSpeed = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "MaxClockSpeed"));
result.LoadPercentage = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "LoadPercentage"));
result.MemoryAllocatedMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psMemoryInfo, "TotalVisibleMemorySize")) / 1024, 1);
result.FreeMemoryMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psMemoryInfo, "FreePhysicalMemory")) / 1024, 1);
result.Drives = GetRdsServerDriveInfo(runspace, serverName).ToArray();
return result;
}
private string GetRdsServerStatus (Runspace runspace, string serverName)
{
if (CheckServerAvailability(serverName))
{
if (CheckPendingReboot(runspace, serverName))
{
return "Online - Pending Reboot";
}
return "Online";
}
else
{
return "Unavailable";
}
}
private List<RdsServerDriveInfo> GetRdsServerDriveInfo(Runspace runspace, string serverName)
{
var result = new List<RdsServerDriveInfo>();
Command cmd = new Command("Get-WmiObject");
cmd.Parameters.Add("Class", "Win32_LogicalDisk");
cmd.Parameters.Add("Filter", "DriveType=3");
cmd.Parameters.Add("ComputerName", serverName);
object[] errors = null;
var psDrives = ExecuteShellCommand(runspace, cmd, false, out errors);
if (errors.Any())
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
return result;
}
foreach (var psDrive in psDrives)
{
var driveInfo = new RdsServerDriveInfo()
{
VolumeName = GetPSObjectProperty(psDrive, "VolumeName").ToString(),
DeviceId = GetPSObjectProperty(psDrive, "DeviceId").ToString(),
SizeMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psDrive, "Size"))/1024/1024, 1),
FreeSpaceMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psDrive, "FreeSpace"))/1024/1024, 1)
};
result.Add(driveInfo);
}
return result;
}
private bool CheckRDSServerAvaliability(string serverName)
{
var ping = new Ping();
var reply = ping.Send(serverName, 1000);
if (reply.Status == IPStatus.Success)
{
return true;
}
return false;
}
private bool CheckPendingReboot(Runspace runspace, string serverName)
{
if (CheckPendingReboot(runspace, serverName, @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing", "RebootPending"))
{
return true;
}
if (CheckPendingReboot(runspace, serverName, @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "RebootRequired"))
{
return true;
}
if (CheckPendingReboot(runspace, serverName, @"HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager", "PendingFileRenameOperations"))
{
return true;
}
return false;
}
private bool CheckPendingReboot(Runspace runspace, string serverName, string registryPath, string registryKey)
{
Command cmd = new Command("Get-ItemProperty");
cmd.Parameters.Add("Path", registryPath);
cmd.Parameters.Add("Name", registryKey);
cmd.Parameters.Add("ErrorAction", "SilentlyContinue");
var feature = ExecuteRemoteShellCommand(runspace, serverName, cmd).FirstOrDefault();
if (feature != null)
{
return true;
}
return false;
}
#endregion
} }
} }

View file

@ -81,6 +81,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted; private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsServerInfoOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsServerStatusOperationCompleted;
private System.Threading.SendOrPostCallback ShutDownRdsServerOperationCompleted;
private System.Threading.SendOrPostCallback RestartRdsServerOperationCompleted;
/// <remarks/> /// <remarks/>
public RemoteDesktopServices() { public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx"; this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -164,6 +172,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted; public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted;
/// <remarks/>
public event GetRdsServerInfoCompletedEventHandler GetRdsServerInfoCompleted;
/// <remarks/>
public event GetRdsServerStatusCompletedEventHandler GetRdsServerStatusCompleted;
/// <remarks/>
public event ShutDownRdsServerCompletedEventHandler ShutDownRdsServerCompleted;
/// <remarks/>
public event RestartRdsServerCompletedEventHandler RestartRdsServerCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1299,6 +1319,170 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsServerInfo", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsServerInfo GetRdsServerInfo(string serverName) {
object[] results = this.Invoke("GetRdsServerInfo", new object[] {
serverName});
return ((RdsServerInfo)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsServerInfo(string serverName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsServerInfo", new object[] {
serverName}, callback, asyncState);
}
/// <remarks/>
public RdsServerInfo EndGetRdsServerInfo(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsServerInfo)(results[0]));
}
/// <remarks/>
public void GetRdsServerInfoAsync(string serverName) {
this.GetRdsServerInfoAsync(serverName, null);
}
/// <remarks/>
public void GetRdsServerInfoAsync(string serverName, object userState) {
if ((this.GetRdsServerInfoOperationCompleted == null)) {
this.GetRdsServerInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerInfoOperationCompleted);
}
this.InvokeAsync("GetRdsServerInfo", new object[] {
serverName}, this.GetRdsServerInfoOperationCompleted, userState);
}
private void OnGetRdsServerInfoOperationCompleted(object arg) {
if ((this.GetRdsServerInfoCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsServerInfoCompleted(this, new GetRdsServerInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsServerStatus", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string GetRdsServerStatus(string serverName) {
object[] results = this.Invoke("GetRdsServerStatus", new object[] {
serverName});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsServerStatus(string serverName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsServerStatus", new object[] {
serverName}, callback, asyncState);
}
/// <remarks/>
public string EndGetRdsServerStatus(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void GetRdsServerStatusAsync(string serverName) {
this.GetRdsServerStatusAsync(serverName, null);
}
/// <remarks/>
public void GetRdsServerStatusAsync(string serverName, object userState) {
if ((this.GetRdsServerStatusOperationCompleted == null)) {
this.GetRdsServerStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerStatusOperationCompleted);
}
this.InvokeAsync("GetRdsServerStatus", new object[] {
serverName}, this.GetRdsServerStatusOperationCompleted, userState);
}
private void OnGetRdsServerStatusOperationCompleted(object arg) {
if ((this.GetRdsServerStatusCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsServerStatusCompleted(this, new GetRdsServerStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ShutDownRdsServer", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void ShutDownRdsServer(string serverName) {
this.Invoke("ShutDownRdsServer", new object[] {
serverName});
}
/// <remarks/>
public System.IAsyncResult BeginShutDownRdsServer(string serverName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ShutDownRdsServer", new object[] {
serverName}, callback, asyncState);
}
/// <remarks/>
public void EndShutDownRdsServer(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void ShutDownRdsServerAsync(string serverName) {
this.ShutDownRdsServerAsync(serverName, null);
}
/// <remarks/>
public void ShutDownRdsServerAsync(string serverName, object userState) {
if ((this.ShutDownRdsServerOperationCompleted == null)) {
this.ShutDownRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShutDownRdsServerOperationCompleted);
}
this.InvokeAsync("ShutDownRdsServer", new object[] {
serverName}, this.ShutDownRdsServerOperationCompleted, userState);
}
private void OnShutDownRdsServerOperationCompleted(object arg) {
if ((this.ShutDownRdsServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ShutDownRdsServerCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RestartRdsServer", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void RestartRdsServer(string serverName) {
this.Invoke("RestartRdsServer", new object[] {
serverName});
}
/// <remarks/>
public System.IAsyncResult BeginRestartRdsServer(string serverName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("RestartRdsServer", new object[] {
serverName}, callback, asyncState);
}
/// <remarks/>
public void EndRestartRdsServer(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void RestartRdsServerAsync(string serverName) {
this.RestartRdsServerAsync(serverName, null);
}
/// <remarks/>
public void RestartRdsServerAsync(string serverName, object userState) {
if ((this.RestartRdsServerOperationCompleted == null)) {
this.RestartRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRestartRdsServerOperationCompleted);
}
this.InvokeAsync("RestartRdsServer", new object[] {
serverName}, this.RestartRdsServerOperationCompleted, userState);
}
private void OnRestartRdsServerOperationCompleted(object arg) {
if ((this.RestartRdsServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.RestartRdsServerCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -1826,4 +2010,64 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsServerInfoCompletedEventHandler(object sender, GetRdsServerInfoCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsServerInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsServerInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsServerInfo Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsServerInfo)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsServerStatusCompletedEventHandler(object sender, GetRdsServerStatusCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsServerStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsServerStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ShutDownRdsServerCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void RestartRdsServerCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
} }

View file

@ -495,5 +495,73 @@ namespace WebsitePanel.Server
throw; throw;
} }
} }
[WebMethod, SoapHeader("settings")]
public RdsServerInfo GetRdsServerInfo(string serverName)
{
try
{
Log.WriteStart("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName);
var result = RDSProvider.GetRdsServerInfo(serverName);
Log.WriteEnd("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public string GetRdsServerStatus(string serverName)
{
try
{
Log.WriteStart("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName);
var result = RDSProvider.GetRdsServerStatus(serverName);
Log.WriteEnd("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public void ShutDownRdsServer(string serverName)
{
try
{
Log.WriteStart("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName);
RDSProvider.ShutDownRdsServer(serverName);
Log.WriteEnd("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public void RestartRdsServer(string serverName)
{
try
{
Log.WriteStart("'{0}' RestartRdsServer", ProviderSettings.ProviderName);
RDSProvider.RestartRdsServer(serverName);
Log.WriteEnd("'{0}' RestartRdsServer", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' RestartRdsServer", ProviderSettings.ProviderName), ex);
throw;
}
}
} }
} }

View file

@ -43,7 +43,7 @@ namespace WebsitePanel.Portal.RDS
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
servers.HideRefreshButton();
} }
} }

View file

@ -26,6 +26,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using AjaxControlToolkit;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -40,6 +41,10 @@ namespace WebsitePanel.Portal.RDS
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
servers.Module = Module;
servers.OnRefreshClicked -= OnRefreshClicked;
servers.OnRefreshClicked += OnRefreshClicked;
if (!Page.IsPostBack) if (!Page.IsPostBack)
{ {
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID); var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
@ -47,7 +52,20 @@ namespace WebsitePanel.Portal.RDS
} }
} }
private bool SaveRdsServers() private void OnRefreshClicked(object sender, EventArgs e)
{
var rdsServers = (List<RdsServer>)sender;
foreach (var rdsServer in rdsServers)
{
rdsServer.Status = ES.Services.RDS.GetRdsServerStatus(PanelRequest.ItemID, rdsServer.FqdName);
}
servers.BindServers(rdsServers.ToArray());
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
}
private bool SaveRdsServers(bool exit = false)
{ {
try try
{ {
@ -62,6 +80,15 @@ namespace WebsitePanel.Portal.RDS
ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection); ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection);
if (!exit)
{
foreach(var rdsServer in collection.Servers)
{
rdsServer.Status = ES.Services.RDS.GetRdsServerStatus(PanelRequest.ItemID, rdsServer.FqdName);
}
servers.BindServers(collection.Servers.ToArray());
}
} }
catch(Exception ex) catch(Exception ex)
{ {

View file

@ -138,12 +138,21 @@
<data name="btnDelete.Text" xml:space="preserve"> <data name="btnDelete.Text" xml:space="preserve">
<value>Delete</value> <value>Delete</value>
</data> </data>
<data name="btnServerInfoCancel.OnClientClick" xml:space="preserve">
<value>CloseProgressDialog();</value>
</data>
<data name="btnServerInfoCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="gvPopupServerName.HeaderText" xml:space="preserve"> <data name="gvPopupServerName.HeaderText" xml:space="preserve">
<value>Server Name</value> <value>Server Name</value>
</data> </data>
<data name="gvPopupServers.EmptyDataText" xml:space="preserve"> <data name="gvPopupServers.EmptyDataText" xml:space="preserve">
<value>No servers found.</value> <value>No servers found.</value>
</data> </data>
<data name="gvPopupStatus.HeaderText" xml:space="preserve">
<value>Status</value>
</data>
<data name="gvServerName.HeaderText" xml:space="preserve"> <data name="gvServerName.HeaderText" xml:space="preserve">
<value>Server Name</value> <value>Server Name</value>
</data> </data>
@ -153,4 +162,28 @@
<data name="headerAddServers.Text" xml:space="preserve"> <data name="headerAddServers.Text" xml:space="preserve">
<value>Enabled Servers</value> <value>Enabled Servers</value>
</data> </data>
<data name="headerServerInfo.Text" xml:space="preserve">
<value>Server Info</value>
</data>
<data name="lbRestart.Text" xml:space="preserve">
<value>Restart</value>
</data>
<data name="lbShutdown.Text" xml:space="preserve">
<value>Shut Down</value>
</data>
<data name="lbViewInfo.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Getting Server Info ...');</value>
</data>
<data name="lbViewInfo.Text" xml:space="preserve">
<value>View Info</value>
</data>
<data name="locFreeSpace" xml:space="preserve">
<value>Free Space:</value>
</data>
<data name="locSize" xml:space="preserve">
<value>Size:</value>
</data>
<data name="locVolumeName.Text" xml:space="preserve">
<value>Volume Name:</value>
</data>
</root> </root>

View file

@ -1,15 +1,17 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSCollectionServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers" %>
<%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %> <%@ Register Src="../../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../../UserControls/CollapsiblePanel.ascx" %>
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<div class="FormButtonsBarClean"> <div class="FormButtonsBarClean">
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" /> <asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/> <asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
<asp:Button ID="btnRefresh" runat="server" Text="Refresh" CssClass="Button1" OnClick="btnRefresh_Click" OnClientClick="ShowProgressDialog('Refreshing...'); return true;" meta:resourcekey="btnRefresh" />
</div> </div>
<asp:GridView ID="gvServers" runat="server" meta:resourcekey="gvServers" AutoGenerateColumns="False" <asp:GridView ID="gvServers" runat="server" meta:resourcekey="gvServers" AutoGenerateColumns="False"
Width="600px" CssSelectorClass="NormalGridView" Width="600px" CssSelectorClass="NormalGridView"
DataKeyNames="Id"> DataKeyNames="Id" OnRowCommand="gvServers_RowCommand">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@ -21,18 +23,139 @@
<ItemStyle Width="10px" /> <ItemStyle Width="10px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvServerName" HeaderText="gvServerName"> <asp:TemplateField meta:resourcekey="gvServerName" HeaderText="gvServerName">
<ItemStyle Width="60%" Wrap="false"> <ItemStyle Width="30%" Wrap="false">
</ItemStyle> </ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="litFqdName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal> <asp:Literal ID="litFqdName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvPopupStatus">
<ItemStyle Width="30%" HorizontalAlign="Left" />
<ItemTemplate>
<asp:Literal ID="litStatus" runat="server" Text='<%# Eval("Status") %>'></asp:Literal>
<asp:HiddenField ID="hdnRdsCollectionId" runat="server" Value='<%# Eval("RdsCollectionId") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvViewInfo">
<ItemStyle Width="10%" HorizontalAlign="Right"/>
<ItemTemplate>
<asp:LinkButton OnClientClick="ShowProgressDialog('Getting Server Info ...');return true;" Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>' CommandName="ViewInfo" CommandArgument='<%# Eval("FqdName")%>' ID="lbViewInfo" runat="server" Text="View Info"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvRestart">
<ItemStyle Width="10%" HorizontalAlign="Right"/>
<ItemTemplate>
<asp:LinkButton ID="lbRestart" CommandName="Restart" CommandArgument='<%# Eval("FqdName")%>' Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>'
runat="server" Text="Restart" OnClientClick="return confirm('Are you sure you want to restart selected server?')"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvShutdown">
<ItemStyle Width="10%" HorizontalAlign="Right"/>
<ItemTemplate>
<asp:LinkButton ID="lbShutdown" CommandName="ShutDown" CommandArgument='<%# Eval("FqdName")%>' Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>'
runat="server" Text="Shut Down" OnClientClick="return confirm('Are you sure you want to shu down selected server?')"/>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<br /> <br />
<asp:Panel ID="ServerInfoPanel" runat="server" CssClass="Popup" style="display:none">
<table class="Popup-Header" cellpadding="0" cellspacing="0">
<tr>
<td class="Popup-HeaderLeft"/>
<td class="Popup-HeaderTitle">
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="headerServerInfo"></asp:Localize>
</td>
<td class="Popup-HeaderRight"/>
</tr>
</table>
<div class="Popup-Content">
<div class="Popup-Body">
<br />
<asp:UpdatePanel ID="serverInfoUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<div class="Popup-Scroll" style="height:auto;">
<wsp:CollapsiblePanel id="secServerInfo" runat="server" TargetControlID="panelHardwareInfo" meta:resourcekey="secRdsApplicationEdit" Text=""/>
<asp:Panel runat="server" ID="panelHardwareInfo">
<table>
<tr>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locProcessor" runat="server" Text="Processor:"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litProcessor" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locLoadPercentage" Text="Load Percentage:" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litLoadPercentage" runat="server"/>
</td>
</tr>
<tr>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locMemoryAllocated" runat="server" Text="Allocated Memory:"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litMemoryAllocated" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locFreeMemory" Text="Free Memory:" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litFreeMemory" runat="server"/>
</td>
</tr>
</table>
</asp:Panel>
<wsp:CollapsiblePanel id="secRdsApplicationEdit" runat="server" TargetControlID="panelDiskDrives" meta:resourcekey="secRdsApplicationEdit" Text="Disk Drives"/>
<asp:Panel runat="server" ID="panelDiskDrives">
<table>
<asp:Repeater ID="rpServerDrives" runat="server" EnableViewState="false">
<ItemTemplate>
<tr>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litDeviceId" runat="server" Text='<%# Eval("DeviceId") %>'/>
</td>
<td class="FormLabel150" style="width: 150px;"/>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locVolumeName" Text="Volume Name:" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litVolumeName" Text='<%# Eval("VolumeName") %>' runat="server"/>
</td>
</tr>
<tr>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locSize" Text="Size:" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litSize" Text='<%# Eval("SizeMb") + " MB" %>' runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="locFreeSpace" Text="Free Space:" runat="server"/>
</td>
<td class="FormLabel150" style="width: 150px;">
<asp:Literal ID="litFreeSpace" Text='<%# Eval("FreeSpaceMb") + " MB" %>' runat="server"/>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</asp:Panel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
</div>
<div class="FormFooter">
<asp:Button ID="btnCancelServerInfo" runat="server" CssClass="Button1" meta:resourcekey="btnServerInfoCancel" Text="Cancel" CausesValidation="false" />
</div>
</div>
</asp:Panel>
<asp:Panel ID="AddServersPanel" runat="server" CssClass="Popup" style="display:none"> <asp:Panel ID="AddServersPanel" runat="server" CssClass="Popup" style="display:none">
<table class="Popup-Header" cellpadding="0" cellspacing="0"> <table class="Popup-Header" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="Popup-HeaderLeft"></td> <td class="Popup-HeaderLeft"></td>
@ -71,7 +194,7 @@
<ItemStyle Width="10px" /> <ItemStyle Width="10px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvPopupServerName"> <asp:TemplateField meta:resourcekey="gvPopupServerName">
<ItemStyle Width="70%"></ItemStyle> <ItemStyle Width="70%"/>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="litName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal> <asp:Literal ID="litName" runat="server" Text='<%# Eval("FqdName") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@ -91,10 +214,12 @@
</div> </div>
</asp:Panel> </asp:Panel>
<asp:Button ID="btnAddServersFake" runat="server" style="display:none;" /> <asp:Button ID="btnViewInfoFake" runat="server" style="display:none;" />
<ajaxToolkit:ModalPopupExtender ID="AddServersModal" runat="server" <ajaxToolkit:ModalPopupExtender ID="ViewInfoModal" runat="server" TargetControlID="btnViewInfoFake" PopupControlID="ServerInfoPanel"
TargetControlID="btnAddServersFake" PopupControlID="AddServersPanel" BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelServerInfo"/>
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd"/>
<asp:Button ID="btnAddServersFake" runat="server" style="display:none;" />
<ajaxToolkit:ModalPopupExtender ID="AddServersModal" runat="server" TargetControlID="btnAddServersFake" PopupControlID="AddServersPanel"
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd"/>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View file

@ -35,12 +35,14 @@ using System.Linq;
using WebsitePanel.Providers.Web; using WebsitePanel.Providers.Web;
using WebsitePanel.EnterpriseServer.Base.HostedSolution; using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.RemoteDesktopServices;
using AjaxControlToolkit;
namespace WebsitePanel.Portal.RDS.UserControls namespace WebsitePanel.Portal.RDS.UserControls
{ {
public partial class RDSCollectionServers : WebsitePanelControlBase public partial class RDSCollectionServers : WebsitePanelControlBase
{ {
public const string DirectionString = "DirectionString"; public const string DirectionString = "DirectionString";
public event EventHandler OnRefreshClicked;
protected enum SelectedState protected enum SelectedState
{ {
@ -54,6 +56,17 @@ namespace WebsitePanel.Portal.RDS.UserControls
BindServers(servers, false); BindServers(servers, false);
} }
public void BindServers(RdsServer[] servers)
{
gvServers.DataSource = servers;
gvServers.DataBind();
}
public void HideRefreshButton()
{
btnRefresh.Visible = false;
}
public List<RdsServer> GetServers() public List<RdsServer> GetServers()
{ {
return GetGridViewServers(SelectedState.All); return GetGridViewServers(SelectedState.All);
@ -172,6 +185,13 @@ namespace WebsitePanel.Portal.RDS.UserControls
RdsServer server = new RdsServer(); RdsServer server = new RdsServer();
server.Id = (int)gvServers.DataKeys[i][0]; server.Id = (int)gvServers.DataKeys[i][0];
server.FqdName = ((Literal)row.FindControl("litFqdName")).Text; server.FqdName = ((Literal)row.FindControl("litFqdName")).Text;
server.Status = ((Literal)row.FindControl("litStatus")).Text;
var rdsCollectionId = ((HiddenField)row.FindControl("hdnRdsCollectionId")).Value;
if (!string.IsNullOrEmpty(rdsCollectionId))
{
server.RdsCollectionId = Convert.ToInt32(rdsCollectionId);
}
if (state == SelectedState.All || if (state == SelectedState.All ||
(state == SelectedState.Selected && chkSelect.Checked) || (state == SelectedState.Selected && chkSelect.Checked) ||
@ -209,6 +229,12 @@ namespace WebsitePanel.Portal.RDS.UserControls
protected void BindOrganizationServers() protected void BindOrganizationServers()
{ {
RdsServer[] servers = ES.Services.RDS.GetOrganizationRdsServersPaged(PanelRequest.ItemID, PanelRequest.CollectionID, "FqdName", txtSearchValue.Text, null, 0, 1000).Servers; RdsServer[] servers = ES.Services.RDS.GetOrganizationRdsServersPaged(PanelRequest.ItemID, PanelRequest.CollectionID, "FqdName", txtSearchValue.Text, null, 0, 1000).Servers;
foreach(var rdsServer in servers)
{
rdsServer.Status = ES.Services.RDS.GetRdsServerStatus(PanelRequest.ItemID, rdsServer.FqdName);
}
Array.Sort(servers, CompareAccount); Array.Sort(servers, CompareAccount);
if (Direction == SortDirection.Ascending) if (Direction == SortDirection.Ascending)
@ -240,5 +266,59 @@ namespace WebsitePanel.Portal.RDS.UserControls
{ {
return string.Compare(server1.FqdName, server2.FqdName); return string.Compare(server1.FqdName, server2.FqdName);
} }
protected void gvServers_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "ViewInfo")
{
try
{
ShowInfo(e.CommandArgument.ToString());
}
catch (Exception)
{
}
}
else if (e.CommandName == "Restart")
{
Restart(e.CommandArgument.ToString());
}
else if (e.CommandName == "ShutDown")
{
ShutDown(e.CommandArgument.ToString());
}
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
if (OnRefreshClicked != null)
{
OnRefreshClicked(GetServers(), new EventArgs());
}
}
private void ShowInfo(string serverName)
{
ViewInfoModal.Show();
var serverInfo = ES.Services.RDS.GetRdsServerInfo(PanelRequest.ItemID, serverName);
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);
rpServerDrives.DataSource = serverInfo.Drives;
rpServerDrives.DataBind();
}
private void Restart(string serverName)
{
ES.Services.RDS.RestartRdsServer(PanelRequest.ItemID, serverName);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
}
private void ShutDown(string serverName)
{
ES.Services.RDS.ShutDownRdsServer(PanelRequest.ItemID, serverName);
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
}
} }
} }

View file

@ -39,6 +39,15 @@ namespace WebsitePanel.Portal.RDS.UserControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnDelete; protected global::System.Web.UI.WebControls.Button btnDelete;
/// <summary>
/// btnRefresh 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 btnRefresh;
/// <summary> /// <summary>
/// gvServers control. /// gvServers control.
/// </summary> /// </summary>
@ -48,6 +57,159 @@ namespace WebsitePanel.Portal.RDS.UserControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.GridView gvServers; protected global::System.Web.UI.WebControls.GridView gvServers;
/// <summary>
/// ServerInfoPanel 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 ServerInfoPanel;
/// <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>
/// serverInfoUpdatePanel 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 serverInfoUpdatePanel;
/// <summary>
/// secServerInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secServerInfo;
/// <summary>
/// panelHardwareInfo 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 panelHardwareInfo;
/// <summary>
/// locProcessor 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.Literal locProcessor;
/// <summary>
/// litProcessor 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.Literal litProcessor;
/// <summary>
/// locLoadPercentage 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.Literal locLoadPercentage;
/// <summary>
/// litLoadPercentage 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.Literal litLoadPercentage;
/// <summary>
/// locMemoryAllocated 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.Literal locMemoryAllocated;
/// <summary>
/// litMemoryAllocated 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.Literal litMemoryAllocated;
/// <summary>
/// locFreeMemory 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.Literal locFreeMemory;
/// <summary>
/// litFreeMemory 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.Literal litFreeMemory;
/// <summary>
/// secRdsApplicationEdit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsApplicationEdit;
/// <summary>
/// panelDiskDrives 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 panelDiskDrives;
/// <summary>
/// rpServerDrives 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.Repeater rpServerDrives;
/// <summary>
/// btnCancelServerInfo 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 btnCancelServerInfo;
/// <summary> /// <summary>
/// AddServersPanel control. /// AddServersPanel control.
/// </summary> /// </summary>
@ -129,6 +291,24 @@ namespace WebsitePanel.Portal.RDS.UserControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancelAdd; protected global::System.Web.UI.WebControls.Button btnCancelAdd;
/// <summary>
/// btnViewInfoFake 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 btnViewInfoFake;
/// <summary>
/// ViewInfoModal control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ModalPopupExtender ViewInfoModal;
/// <summary> /// <summary>
/// btnAddServersFake control. /// btnAddServersFake control.
/// </summary> /// </summary>