Merge
This commit is contained in:
commit
bb3defca45
18 changed files with 631 additions and 24 deletions
|
@ -141,4 +141,5 @@
|
|||
<Control key="rds_create_collection" general_key="rds_collections" />
|
||||
<Control key="rds_collection_edit_apps" general_key="rds_collections" />
|
||||
<Control key="rds_collection_edit_users" general_key="rds_collections" />
|
||||
<Control key="rds_edit_collection" general_key="rds_collections" />
|
||||
</Controls>
|
||||
|
|
|
@ -574,6 +574,7 @@
|
|||
<Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" />
|
||||
<Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" />
|
||||
<Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" />
|
||||
<Control key="rds_edit_collection" src="WebsitePanel/RDS/RDSEditCollection.ascx" title="RDSEditCollection" type="View" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace WebsitePanel.Portal
|
|||
|
||||
public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
||||
{
|
||||
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, "", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, null, "", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||
|
||||
return rdsServers.Servers;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnCreate.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Adding RDS Server ...');</value>
|
||||
</data>
|
||||
<data name="btnSave.Text" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="FormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Edit RDS Collection</value>
|
||||
</data>
|
||||
<data name="locCollectionName.Text" xml:space="preserve">
|
||||
<value>Collection Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServerName.Header" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -47,8 +47,8 @@
|
|||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name">
|
||||
<ItemStyle Width="40%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal id="litCollectionName" runat="server" Text='<%# Eval("Name").ToString() %>'></asp:Literal>
|
||||
<ItemTemplate>
|
||||
<asp:hyperlink id="lnkCollectionName" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionEditUrl(Eval("Id").ToString()) %>'><%# Eval("Name").ToString() %></asp:hyperlink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="gvServer">
|
||||
|
|
|
@ -111,5 +111,10 @@ namespace WebsitePanel.Portal.RDS
|
|||
"CollectionId=" + collectionId,
|
||||
"ItemID=" + PanelRequest.ItemID);
|
||||
}
|
||||
|
||||
public string GetCollectionEditUrl(string collectionId)
|
||||
{
|
||||
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollection.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollection" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/RDSCollectionServers.ascx" TagName="CollectionServers" TagPrefix="wsp"%>
|
||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="imgAddRDSServer" SkinID="AddRDSServer48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Server To Organization"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormContentRDS">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<fieldset id="RDSServersPanel" runat="server">
|
||||
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
|
||||
<div style="padding: 10px;">
|
||||
<wsp:CollectionServers id="servers" runat="server" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="FormFooter">
|
||||
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" OnClick="btnSave_Click" ValidationGroup="SaveRDSCollection"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.RDS
|
||||
{
|
||||
public partial class RDSEditCollection : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
if (servers.GetServers().Count < 1)
|
||||
{
|
||||
messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
|
||||
return;
|
||||
}
|
||||
|
||||
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||
collection.Servers = servers.GetServers();
|
||||
|
||||
ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection);
|
||||
|
||||
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
|
||||
"SpaceID=" + PanelSecurity.PackageId));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace WebsitePanel.Portal.RDS {
|
||||
|
||||
|
||||
public partial class RDSEditCollection {
|
||||
|
||||
/// <summary>
|
||||
/// asyncTasks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||
|
||||
/// <summary>
|
||||
/// imgAddRDSServer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image imgAddRDSServer;
|
||||
|
||||
/// <summary>
|
||||
/// locTitle 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 locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||
|
||||
/// <summary>
|
||||
/// RDSServersPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl RDSServersPanel;
|
||||
|
||||
/// <summary>
|
||||
/// locRDSServersSection 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 locRDSServersSection;
|
||||
|
||||
/// <summary>
|
||||
/// servers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionServers servers;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 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 btnSave;
|
||||
}
|
||||
}
|
|
@ -53,19 +53,14 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
|||
{
|
||||
BindServers(servers, false);
|
||||
}
|
||||
|
||||
//public RdsServer[] GetServers()
|
||||
//{
|
||||
// return GetGridViewServers(SelectedState.All).ToArray();
|
||||
//}
|
||||
|
||||
|
||||
public List<RdsServer> GetServers()
|
||||
{
|
||||
return GetGridViewServers(SelectedState.All);
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
// register javascript
|
||||
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
|
||||
{
|
||||
|
@ -80,8 +75,14 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
|||
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
|
||||
script, true);
|
||||
}
|
||||
|
||||
if (!IsPostBack && PanelRequest.CollectionID > 0)
|
||||
{
|
||||
BindOrganizationServers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
// bind all servers
|
||||
|
@ -205,6 +206,25 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
|||
|
||||
}
|
||||
|
||||
protected void BindOrganizationServers()
|
||||
{
|
||||
RdsServer[] servers = ES.Services.RDS.GetOrganizationRdsServersPaged(PanelRequest.ItemID, PanelRequest.CollectionID, "FqdName", txtSearchValue.Text, null, 0, 1000).Servers;
|
||||
Array.Sort(servers, CompareAccount);
|
||||
|
||||
if (Direction == SortDirection.Ascending)
|
||||
{
|
||||
Array.Reverse(servers);
|
||||
Direction = SortDirection.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = SortDirection.Ascending;
|
||||
}
|
||||
|
||||
gvServers.DataSource = servers;
|
||||
gvServers.DataBind();
|
||||
}
|
||||
|
||||
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
BindPopupServers();
|
||||
|
|
|
@ -246,6 +246,13 @@
|
|||
<Compile Include="RDS\AddRDSServer.ascx.designer.cs">
|
||||
<DependentUpon>AddRDSServer.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RDS\RDSEditCollection.ascx.cs">
|
||||
<DependentUpon>RDSEditCollection.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RDS\RDSEditCollection.ascx.designer.cs">
|
||||
<DependentUpon>RDSEditCollection.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RDS\RDSEditCollectionApps.ascx.cs">
|
||||
<DependentUpon>RDSEditCollectionApps.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -4275,6 +4282,7 @@
|
|||
<Content Include="RDSServers.ascx" />
|
||||
<Content Include="RDS\AssignedRDSServers.ascx" />
|
||||
<Content Include="RDS\AddRDSServer.ascx" />
|
||||
<Content Include="RDS\RDSEditCollection.ascx" />
|
||||
<Content Include="RDS\RDSEditCollectionApps.ascx" />
|
||||
<Content Include="RDS\RDSEditCollectionUsers.ascx" />
|
||||
<Content Include="RDS\RDSCreateCollection.ascx" />
|
||||
|
@ -4286,6 +4294,7 @@
|
|||
<Content Include="App_LocalResources\SettingsDomainExpirationLetter.ascx.resx" />
|
||||
<Content Include="App_LocalResources\SettingsDomainLookupLetter.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\Windows2012_Settings.ascx.resx">
|
||||
<Content Include="RDS\App_LocalResources\RDSEditCollection.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<EmbeddedResource Include="ScheduleTaskControls\App_LocalResources\DomainLookupView.ascx.resx">
|
||||
|
@ -5595,7 +5604,9 @@
|
|||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="RDS\App_LocalResources\AddRDSServer.ascx.resx" />
|
||||
<Content Include="RDS\App_LocalResources\RDSCreateCollection.ascx.resx" />
|
||||
<Content Include="RDS\App_LocalResources\RDSCreateCollection.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="RDS\App_LocalResources\RDSEditCollectionUsers.ascx.resx" />
|
||||
<Content Include="RDS\App_LocalResources\RDSEditCollectionApps.ascx.resx" />
|
||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue