RDS Tabs changes

This commit is contained in:
vfedosevich 2015-04-06 04:01:43 -07:00
parent 13ca6e30ca
commit a02cdd87fe
10 changed files with 106 additions and 9 deletions

View file

@ -836,6 +836,7 @@ namespace WebsitePanel.EnterpriseServer
} }
rds.AddSessionHostServersToCollection(org.OrganizationId, collection.Name, newServers.ToArray()); rds.AddSessionHostServersToCollection(org.OrganizationId, collection.Name, newServers.ToArray());
rds.MoveSessionHostsToCollectionOU(collection.Servers.ToArray(), collection.Name, org.OrganizationId);
foreach (var server in newServers) foreach (var server in newServers)
{ {

View file

@ -83,5 +83,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
void MoveSessionHostToRdsOU(string hostName); void MoveSessionHostToRdsOU(string hostName);
void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings); void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings);
void ShadowSession(string sessionId, bool control); void ShadowSession(string sessionId, bool control);
void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId);
} }
} }

View file

@ -637,6 +637,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
} }
} }
public void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId)
{
foreach(var server in servers)
{
MoveSessionHostToCollectionOU(server.Name, collectionName, organizationId);
}
}
public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server) public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server)
{ {
Runspace runSpace = null; Runspace runSpace = null;

View file

@ -106,6 +106,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback ShadowSessionOperationCompleted; private System.Threading.SendOrPostCallback ShadowSessionOperationCompleted;
private System.Threading.SendOrPostCallback MoveSessionHostsToCollectionOUOperationCompleted;
/// <remarks/> /// <remarks/>
public RemoteDesktopServices() { public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx"; this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -225,6 +227,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
public event ShadowSessionCompletedEventHandler ShadowSessionCompleted; public event ShadowSessionCompletedEventHandler ShadowSessionCompleted;
/// <remarks/>
public event MoveSessionHostsToCollectionOUCompletedEventHandler MoveSessionHostsToCollectionOUCompleted;
/// <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)]
@ -1882,6 +1887,52 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/MoveSessionHostsToCollectionOU", 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 MoveSessionHostsToCollectionOU(RdsServer[] servers, string collectionName, string organizationId) {
this.Invoke("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId});
}
/// <remarks/>
public System.IAsyncResult BeginMoveSessionHostsToCollectionOU(RdsServer[] servers, string collectionName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId}, callback, asyncState);
}
/// <remarks/>
public void EndMoveSessionHostsToCollectionOU(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void MoveSessionHostsToCollectionOUAsync(RdsServer[] servers, string collectionName, string organizationId) {
this.MoveSessionHostsToCollectionOUAsync(servers, collectionName, organizationId, null);
}
/// <remarks/>
public void MoveSessionHostsToCollectionOUAsync(RdsServer[] servers, string collectionName, string organizationId, object userState) {
if ((this.MoveSessionHostsToCollectionOUOperationCompleted == null)) {
this.MoveSessionHostsToCollectionOUOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMoveSessionHostsToCollectionOUOperationCompleted);
}
this.InvokeAsync("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId}, this.MoveSessionHostsToCollectionOUOperationCompleted, userState);
}
private void OnMoveSessionHostsToCollectionOUOperationCompleted(object arg) {
if ((this.MoveSessionHostsToCollectionOUCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.MoveSessionHostsToCollectionOUCompleted(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);
@ -2523,4 +2574,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ShadowSessionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void ShadowSessionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void MoveSessionHostsToCollectionOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
} }

View file

@ -695,5 +695,21 @@ namespace WebsitePanel.Server
throw; throw;
} }
} }
[WebMethod, SoapHeader("settings")]
public void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId)
{
try
{
Log.WriteStart("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName);
RDSProvider.MoveSessionHostsToCollectionOU(servers, collectionName, organizationId);
Log.WriteEnd("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName), ex);
throw;
}
}
} }
} }

View file

@ -138,4 +138,7 @@
<data name="valRequireEmail.Text" xml:space="preserve"> <data name="valRequireEmail.Text" xml:space="preserve">
<value>* Enter E-Mail</value> <value>* Enter E-Mail</value>
</data> </data>
<data name="btnExit.Text" xml:space="preserve">
<value>Back to Users List</value>
</data>
</root> </root>

View file

@ -18,7 +18,7 @@
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_setup_letter" /> <wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_edit_users" />
<wsp:CollapsiblePanel id="secEmail" runat="server" IsCollapsed="true" <wsp:CollapsiblePanel id="secEmail" runat="server" IsCollapsed="true"
TargetControlID="EmailPanel" meta:resourcekey="secEmail" Text="Send via E-Mail"> TargetControlID="EmailPanel" meta:resourcekey="secEmail" Text="Send via E-Mail">
@ -41,13 +41,13 @@
</td> </td>
<td class="Normal"> <td class="Normal">
<asp:TextBox ID="txtCC" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox></td> <asp:TextBox ID="txtCC" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox></td>
</tr> </tr>
<tr>
<td></td>
<td>
<asp:Button ID="btnSend" runat="server" CssClass="Button2" meta:resourcekey="btnSend" Text="Send" OnClick="btnSend_Click" ValidationGroup="SendEmail" /></td>
</tr>
</table> </table>
<div class="FormFooterClean">
<asp:Button id="btnExit" runat="server" Text="Back to Users List" CssClass="Button1" meta:resourcekey="btnExit"
OnClick="btnExit_Click" OnClientClick="ShowProgressDialog('Loading ...');"/>
<asp:Button ID="btnSend" runat="server" CssClass="Button2" meta:resourcekey="btnSend" Text="Send" OnClick="btnSend_Click" ValidationGroup="SendEmail" />
</div>
</asp:Panel> </asp:Panel>
<div class="PreviewArea"> <div class="PreviewArea">

View file

@ -59,5 +59,10 @@ namespace WebsitePanel.Portal.RDS
return; return;
} }
} }
protected void btnExit_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_users", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
}
} }
} }

View file

@ -129,6 +129,15 @@ namespace WebsitePanel.Portal.RDS {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtCC; protected global::System.Web.UI.WebControls.TextBox txtCC;
/// <summary>
/// btnExit 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 btnExit;
/// <summary> /// <summary>
/// btnSend control. /// btnSend control.
/// </summary> /// </summary>

View file

@ -26,8 +26,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
tabsList.Add(CreateTab("rds_collection_edit_apps", "Tab.RdsApplications")); tabsList.Add(CreateTab("rds_collection_edit_apps", "Tab.RdsApplications"));
tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers")); tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers"));
tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions")); tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions"));
tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins")); tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins"));
tabsList.Add(CreateTab("rds_setup_letter", "Tab.RdsSetupLetter"));
int idx = 0; int idx = 0;