Merge
This commit is contained in:
commit
20c474a8a7
36 changed files with 2498 additions and 1575 deletions
|
@ -3,12 +3,22 @@
|
|||
<?include Config.wxi?>
|
||||
<?define VERSION="2.1"?>
|
||||
<Product Id="*" Name="WebsitePanel Scheduler Service Installer" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation" UpgradeCode="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
|
||||
|
||||
<Package InstallerVersion="200" Compressed="yes" />
|
||||
<Media Id="1" EmbedCab="yes" Cabinet="schedulerservice.cab" />
|
||||
<Feature Id="ProductFeature" Title="WebsitePanel Scheduler Service Installer" Level="1">
|
||||
<ComponentRef Id="ProductFiles" />
|
||||
</Feature>
|
||||
<Property Id="BannerBitmap">bannrbmp</Property>
|
||||
|
||||
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
|
||||
<Upgrade Id="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
|
||||
<UpgradeVersion
|
||||
Minimum="1.0.0.0" Maximum="99.0.0.0"
|
||||
Property="PREVIOUSVERSIONSINSTALLED"
|
||||
IncludeMinimum="yes" IncludeMaximum="no" />
|
||||
</Upgrade>
|
||||
|
||||
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
|
||||
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
|
||||
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
|
||||
|
@ -95,7 +105,9 @@
|
|||
<TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" />
|
||||
</UI>
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="FinalizeInstall" After="InstallFinalize" />
|
||||
<Custom Action="FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
|
||||
<RemoveExistingProducts After="InstallValidate" />
|
||||
<Custom Action='FinalizeInstall' After='InstallFinalize'>NOT Installed or REINSTALL</Custom>
|
||||
</InstallExecuteSequence>
|
||||
</Product>
|
||||
<Fragment>
|
||||
|
@ -105,6 +117,11 @@
|
|||
<Fragment>
|
||||
<CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" />
|
||||
</Fragment>
|
||||
<Fragment>
|
||||
<CustomAction Id="FinalizeUnInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeUnInstall" />
|
||||
<CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
|
||||
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
|
||||
</Fragment>
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="WEBSITEPANELFOLDER" Name="WebsitePanel">
|
||||
|
|
|
@ -34,6 +34,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using Microsoft.Deployment.WindowsInstaller;
|
||||
using WebsitePanel.Setup;
|
||||
|
||||
|
@ -69,6 +70,14 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
|||
return ActionResult.Success;
|
||||
}
|
||||
|
||||
[CustomAction]
|
||||
public static ActionResult FinalizeUnInstall(Session session)
|
||||
{
|
||||
UnInstallService();
|
||||
|
||||
return ActionResult.Success;
|
||||
}
|
||||
|
||||
private static void InstallService(string installFolder)
|
||||
{
|
||||
try
|
||||
|
@ -93,6 +102,26 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
|||
}
|
||||
}
|
||||
|
||||
private static void UnInstallService()
|
||||
{
|
||||
try
|
||||
{
|
||||
var schedulerService =
|
||||
ServiceController.GetServices().FirstOrDefault(
|
||||
s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase));
|
||||
|
||||
if (schedulerService != null)
|
||||
{
|
||||
StopService(schedulerService.ServiceName);
|
||||
|
||||
SecurityUtils.DeleteService(schedulerService.ServiceName);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private static void ChangeCryptoKey(string installFolder)
|
||||
{
|
||||
string path = Path.Combine(installFolder.Replace("SchedulerService", "Enterprise Server"), "web.config");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
USE [${install.database}]
|
||||
GO
|
||||
|
||||
-- update database version
|
||||
DECLARE @build_version nvarchar(10), @build_date datetime
|
||||
SET @build_version = N'${release.version}'
|
||||
|
@ -5451,7 +5450,8 @@ CREATE TABLE RDSServers
|
|||
Name NVARCHAR(255),
|
||||
FqdName NVARCHAR(255),
|
||||
Description NVARCHAR(255),
|
||||
RDSCollectionId INT/* FOREIGN KEY REFERENCES RDSCollection (ID)*/
|
||||
RDSCollectionId INT,
|
||||
ConnectionEnabled BIT NOT NULL DEFAULT(1)
|
||||
)
|
||||
GO
|
||||
|
||||
|
@ -5528,31 +5528,6 @@ WHERE Id = @Id
|
|||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServer')
|
||||
DROP PROCEDURE UpdateRDSServer
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[UpdateRDSServer]
|
||||
(
|
||||
@Id INT,
|
||||
@ItemID INT,
|
||||
@Name NVARCHAR(255),
|
||||
@FqdName NVARCHAR(255),
|
||||
@Description NVARCHAR(255),
|
||||
@RDSCollectionId INT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
ItemID = @ItemID,
|
||||
Name = @Name,
|
||||
FqdName = @FqdName,
|
||||
Description = @Description,
|
||||
RDSCollectionId = @RDSCollectionId
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServerToOrganization')
|
||||
DROP PROCEDURE AddRDSServerToOrganization
|
||||
GO
|
||||
|
@ -5704,76 +5679,6 @@ GO
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersPaged')
|
||||
DROP PROCEDURE GetRDSServersPaged
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServersPaged]
|
||||
(
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@ItemID int,
|
||||
@IgnoreItemId bit,
|
||||
@RdsCollectionId int,
|
||||
@IgnoreRdsCollectionId bit,
|
||||
@SortColumn nvarchar(50),
|
||||
@StartRow int,
|
||||
@MaximumRows int
|
||||
)
|
||||
AS
|
||||
-- build query and run it to the temporary table
|
||||
DECLARE @sql nvarchar(2000)
|
||||
|
||||
SET @sql = '
|
||||
|
||||
DECLARE @EndRow int
|
||||
SET @EndRow = @StartRow + @MaximumRows
|
||||
|
||||
DECLARE @RDSServer TABLE
|
||||
(
|
||||
ItemPosition int IDENTITY(0,1),
|
||||
RDSServerId int
|
||||
)
|
||||
INSERT INTO @RDSServer (RDSServerId)
|
||||
SELECT
|
||||
S.ID
|
||||
FROM RDSServers AS S
|
||||
WHERE
|
||||
((((@ItemID is Null AND S.ItemID is null) or @IgnoreItemId = 1)
|
||||
or (@ItemID is not Null AND S.ItemID = @ItemID))
|
||||
and
|
||||
(((@RdsCollectionId is Null AND S.RDSCollectionId is null) or @IgnoreRdsCollectionId = 1)
|
||||
or (@RdsCollectionId is not Null AND S.RDSCollectionId = @RdsCollectionId)))'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterValue <> ''
|
||||
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
|
||||
|
||||
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
|
||||
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
|
||||
|
||||
SET @sql = @sql + ' SELECT COUNT(RDSServerId) FROM @RDSServer;
|
||||
SELECT
|
||||
ST.ID,
|
||||
ST.ItemID,
|
||||
ST.Name,
|
||||
ST.FqdName,
|
||||
ST.Description,
|
||||
ST.RdsCollectionId,
|
||||
SI.ItemName
|
||||
FROM @RDSServer AS S
|
||||
INNER JOIN RDSServers AS ST ON S.RDSServerId = ST.ID
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = ST.ItemId
|
||||
WHERE S.ItemPosition BETWEEN @StartRow AND @EndRow'
|
||||
|
||||
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int, @RdsCollectionId int, @IgnoreItemId bit, @IgnoreRdsCollectionId bit',
|
||||
@StartRow, @MaximumRows, @FilterValue, @ItemID, @RdsCollectionId, @IgnoreItemId , @IgnoreRdsCollectionId
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
GO
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
|
@ -6914,3 +6819,108 @@ exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @PackageID int, @Fil
|
|||
|
||||
|
||||
RETURN
|
||||
|
||||
GO
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersPaged')
|
||||
DROP PROCEDURE GetRDSServersPaged
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[GetRDSServersPaged]
|
||||
(
|
||||
@FilterColumn nvarchar(50) = '',
|
||||
@FilterValue nvarchar(50) = '',
|
||||
@ItemID int,
|
||||
@IgnoreItemId bit,
|
||||
@RdsCollectionId int,
|
||||
@IgnoreRdsCollectionId bit,
|
||||
@SortColumn nvarchar(50),
|
||||
@StartRow int,
|
||||
@MaximumRows int
|
||||
)
|
||||
AS
|
||||
-- build query and run it to the temporary table
|
||||
DECLARE @sql nvarchar(2000)
|
||||
|
||||
SET @sql = '
|
||||
|
||||
DECLARE @EndRow int
|
||||
SET @EndRow = @StartRow + @MaximumRows
|
||||
|
||||
DECLARE @RDSServer TABLE
|
||||
(
|
||||
ItemPosition int IDENTITY(0,1),
|
||||
RDSServerId int
|
||||
)
|
||||
INSERT INTO @RDSServer (RDSServerId)
|
||||
SELECT
|
||||
S.ID
|
||||
FROM RDSServers AS S
|
||||
WHERE
|
||||
((((@ItemID is Null AND S.ItemID is null) or @IgnoreItemId = 1)
|
||||
or (@ItemID is not Null AND S.ItemID = @ItemID))
|
||||
and
|
||||
(((@RdsCollectionId is Null AND S.RDSCollectionId is null) or @IgnoreRdsCollectionId = 1)
|
||||
or (@RdsCollectionId is not Null AND S.RDSCollectionId = @RdsCollectionId)))'
|
||||
|
||||
IF @FilterColumn <> '' AND @FilterValue <> ''
|
||||
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
|
||||
|
||||
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
|
||||
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
|
||||
|
||||
SET @sql = @sql + ' SELECT COUNT(RDSServerId) FROM @RDSServer;
|
||||
SELECT
|
||||
ST.ID,
|
||||
ST.ItemID,
|
||||
ST.Name,
|
||||
ST.FqdName,
|
||||
ST.Description,
|
||||
ST.RdsCollectionId,
|
||||
SI.ItemName,
|
||||
ST.ConnectionEnabled
|
||||
FROM @RDSServer AS S
|
||||
INNER JOIN RDSServers AS ST ON S.RDSServerId = ST.ID
|
||||
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = ST.ItemId
|
||||
WHERE S.ItemPosition BETWEEN @StartRow AND @EndRow'
|
||||
|
||||
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int, @RdsCollectionId int, @IgnoreItemId bit, @IgnoreRdsCollectionId bit',
|
||||
@StartRow, @MaximumRows, @FilterValue, @ItemID, @RdsCollectionId, @IgnoreItemId , @IgnoreRdsCollectionId
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
GO
|
||||
|
||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServer')
|
||||
DROP PROCEDURE UpdateRDSServer
|
||||
GO
|
||||
CREATE PROCEDURE [dbo].[UpdateRDSServer]
|
||||
(
|
||||
@Id INT,
|
||||
@ItemID INT,
|
||||
@Name NVARCHAR(255),
|
||||
@FqdName NVARCHAR(255),
|
||||
@Description NVARCHAR(255),
|
||||
@RDSCollectionId INT,
|
||||
@ConnectionEnabled BIT
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE RDSServers
|
||||
SET
|
||||
ItemID = @ItemID,
|
||||
Name = @Name,
|
||||
FqdName = @FqdName,
|
||||
Description = @Description,
|
||||
RDSCollectionId = @RDSCollectionId,
|
||||
ConnectionEnabled = @ConnectionEnabled
|
||||
WHERE ID = @Id
|
||||
GO
|
||||
|
||||
|
||||
-- fix Windows 2012 Provider
|
||||
BEGIN
|
||||
UPDATE [dbo].[Providers] SET [EditorControl] = 'Windows2012' WHERE [ProviderName] = 'Windows2012'
|
||||
END
|
||||
GO
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4627,10 +4627,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
public static void UpdateRDSServer(RdsServer server)
|
||||
{
|
||||
UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description,
|
||||
server.RdsCollectionId);
|
||||
server.RdsCollectionId, server.ConnectionEnabled);
|
||||
}
|
||||
|
||||
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId)
|
||||
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId, bool connectionEnabled)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
|
@ -4641,7 +4641,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
new SqlParameter("@Name", name),
|
||||
new SqlParameter("@FqdName", fqdName),
|
||||
new SqlParameter("@Description", description),
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId)
|
||||
new SqlParameter("@RDSCollectionId", rdsCollectionId),
|
||||
new SqlParameter("@ConnectionEnabled", connectionEnabled)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -980,11 +980,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
homeFolder.PackageId = packageId;
|
||||
homeFolder.Name = path;
|
||||
|
||||
int res = AddPackageItem(homeFolder);
|
||||
|
||||
// Added By Haya
|
||||
UpdatePackageHardQuota(packageId);
|
||||
|
||||
// save package item
|
||||
return AddPackageItem(homeFolder);
|
||||
return res;
|
||||
}
|
||||
|
||||
public static DateTime GetPackageBandwidthUpdate(int packageId)
|
||||
|
|
|
@ -68,6 +68,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return AddRdsCollectionInternal(itemId, collection);
|
||||
}
|
||||
|
||||
public static ResultObject EditRdsCollection(int itemId, RdsCollection collection)
|
||||
{
|
||||
return EditRdsCollectionInternal(itemId, collection);
|
||||
}
|
||||
|
||||
public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
|
@ -93,9 +98,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return GetOrganizationRdsServersPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
return GetOrganizationRdsServersPagedInternal(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
public static RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
|
@ -108,6 +113,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return GetRdsServerInternal(rdsSeverId);
|
||||
}
|
||||
|
||||
public static ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||
{
|
||||
return SetRDServerNewConnectionAllowedInternal(itemId, newConnectionAllowed, rdsSeverId);
|
||||
}
|
||||
|
||||
public static List<RdsServer> GetCollectionRdsServers(int collectionId)
|
||||
{
|
||||
return GetCollectionRdsServersInternal(collectionId);
|
||||
|
@ -280,6 +290,58 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
private static ResultObject EditRdsCollectionInternal(int itemId, RdsCollection collection)
|
||||
{
|
||||
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "EDIT_RDS_COLLECTION");
|
||||
|
||||
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));
|
||||
var existingServers =
|
||||
ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
|
||||
var removedServers = existingServers.Where(x => !collection.Servers.Select(y => y.Id).Contains(x.Id));
|
||||
var newServers = collection.Servers.Where(x => !existingServers.Select(y => y.Id).Contains(x.Id));
|
||||
|
||||
foreach(var server in removedServers)
|
||||
{
|
||||
DataProvider.RemoveRDSServerFromCollection(server.Id);
|
||||
}
|
||||
|
||||
rds.AddRdsServersToDeployment(newServers.ToArray());
|
||||
|
||||
foreach (var server in newServers)
|
||||
{
|
||||
DataProvider.AddRDSServerToCollection(server.Id, collection.Id);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_COLLECTION", ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
TaskManager.CompleteResultTask(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskManager.CompleteResultTask();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||
|
@ -420,9 +482,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true);
|
||||
DataSet ds = DataProvider.GetRDSServersPaged(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: !collectionId.HasValue);
|
||||
|
||||
RdsServersPaged result = new RdsServersPaged();
|
||||
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
||||
|
@ -457,6 +519,54 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return ObjectUtils.FillObjectFromDataReader<RdsServer>(DataProvider.GetRDSServerById(rdsSeverId));
|
||||
}
|
||||
|
||||
private static ResultObject SetRDServerNewConnectionAllowedInternal(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||
{
|
||||
ResultObject result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED"); ;
|
||||
try
|
||||
{
|
||||
// load organization
|
||||
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));
|
||||
|
||||
var rdsServer = GetRdsServer(rdsSeverId);
|
||||
|
||||
if (rdsServer == null)
|
||||
{
|
||||
result.IsSuccess = false;
|
||||
result.AddError("", new NullReferenceException("RDS Server not found"));
|
||||
return result;
|
||||
}
|
||||
|
||||
rds.SetRDServerNewConnectionAllowed(newConnectionAllowed, rdsServer);
|
||||
rdsServer.ConnectionEnabled = newConnectionAllowed;
|
||||
DataProvider.UpdateRDSServer(rdsServer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError("REMOTE_DESKTOP_SERVICES_SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED", ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
TaskManager.CompleteResultTask(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskManager.CompleteResultTask();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static int GetOrganizationRdsUsersCountInternal(int itemId)
|
||||
{
|
||||
return DataProvider.GetOrganizationRdsUsersCount(itemId);
|
||||
|
@ -639,7 +749,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
RdsServer rdsServer = GetRdsServer(serverId);
|
||||
|
||||
if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName))
|
||||
//if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName))
|
||||
{
|
||||
rds.AddSessionHostFeatureToServer(rdsServer.FqdName);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject EditRdsCollection(int itemId, RdsCollection collection)
|
||||
{
|
||||
return RemoteDesktopServicesController.EditRdsCollection(itemId, collection);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
|
@ -101,10 +107,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue,
|
||||
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue,
|
||||
string sortColumn, int startRow, int maximumRows)
|
||||
{
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, filterColumn, filterValue,
|
||||
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, collectionId, filterColumn, filterValue,
|
||||
sortColumn, startRow, maximumRows);
|
||||
}
|
||||
|
||||
|
@ -122,6 +128,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return RemoteDesktopServicesController.GetRdsServer(rdsSeverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||
{
|
||||
return RemoteDesktopServicesController.SetRDServerNewConnectionAllowed(itemId, newConnectionAllowed, rdsSeverId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<RdsServer> GetCollectionRdsServers(int collectionId)
|
||||
{
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
public interface IRemoteDesktopServices
|
||||
{
|
||||
bool CreateCollection(string organizationId, RdsCollection collection);
|
||||
bool AddRdsServersToDeployment(RdsServer[] servers);
|
||||
RdsCollection GetCollection(string collectionName);
|
||||
bool RemoveCollection(string organizationId, string collectionName);
|
||||
bool SetUsersInCollection(string organizationId, string collectionName, List<string> users);
|
||||
|
@ -48,6 +49,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server);
|
||||
void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers);
|
||||
|
||||
void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server);
|
||||
|
||||
List<StartMenuApp> GetAvailableRemoteApplications(string collectionName);
|
||||
List<RemoteApplication> GetCollectionRemoteApplications(string collectionName);
|
||||
bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp);
|
||||
|
|
|
@ -18,5 +18,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
public string Address { get; set; }
|
||||
public string ItemName { get; set; }
|
||||
public int? RdsCollectionId { get; set; }
|
||||
public bool ConnectionEnabled { get; set; }
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -48,10 +48,12 @@
|
|||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
||||
<Name>WebsitePanel.Providers.Base</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
|
@ -80,10 +80,12 @@ namespace WebsitePanel.Providers.OS
|
|||
{
|
||||
Log.WriteStart("SetQuotaLimitOnFolder");
|
||||
Log.WriteInfo("FolderPath : {0}", folderPath);
|
||||
Log.WriteInfo("ShareNameDrive : {0}", shareNameDrive);
|
||||
Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
|
||||
|
||||
string path = Path.Combine(shareNameDrive + @":\", folderPath);
|
||||
string path = folderPath;
|
||||
|
||||
if (shareNameDrive != null)
|
||||
path = Path.Combine(shareNameDrive + @":\", folderPath);
|
||||
|
||||
Runspace runSpace = null;
|
||||
try
|
||||
|
|
|
@ -129,16 +129,75 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
|
||||
public override bool IsInstalled()
|
||||
{
|
||||
// TODO: Remove it.
|
||||
//return true;
|
||||
Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion();
|
||||
return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012;
|
||||
return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012 || version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012R2;
|
||||
}
|
||||
|
||||
public override string[] Install()
|
||||
{
|
||||
Runspace runSpace = null;
|
||||
PSObject feature = null;
|
||||
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
if (!IsFeatureInstalled("Desktop-Experience", runSpace))
|
||||
{
|
||||
feature = AddFeature(runSpace, "Desktop-Experience", true, false);
|
||||
}
|
||||
|
||||
if (!IsFeatureInstalled("NET-Framework-Core", runSpace))
|
||||
{
|
||||
feature = AddFeature(runSpace, "NET-Framework-Core", true, false);
|
||||
}
|
||||
|
||||
if (!IsFeatureInstalled("NET-Framework-45-Core", runSpace))
|
||||
{
|
||||
feature = AddFeature(runSpace, "NET-Framework-45-Core", true, false);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
|
||||
return new string[]{};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RDS Collections
|
||||
|
||||
public bool AddRdsServersToDeployment(RdsServer[] servers)
|
||||
{
|
||||
var result = true;
|
||||
Runspace runSpace = null;
|
||||
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
foreach (var server in servers)
|
||||
{
|
||||
if (!ExistRdsServerInDeployment(runSpace, server))
|
||||
{
|
||||
AddRdsServerToDeployment(runSpace, server);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool CreateCollection(string organizationId, RdsCollection collection)
|
||||
{
|
||||
var result = true;
|
||||
|
@ -411,6 +470,30 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
|
||||
#endregion
|
||||
|
||||
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
|
||||
{
|
||||
Runspace runSpace = null;
|
||||
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
Command cmd = new Command("Set-RDSessionHost");
|
||||
cmd.Parameters.Add("SessionHost", server.FqdName);
|
||||
cmd.Parameters.Add("NewConnectionAllowed", string.Format("${0}", newConnectionAllowed.ToString()));
|
||||
|
||||
ExecuteShellCommand(runSpace, cmd, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
}
|
||||
|
||||
#region Remote Applications
|
||||
|
||||
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
||||
|
@ -737,6 +820,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName));
|
||||
}
|
||||
}
|
||||
|
||||
SetRDServerNewConnectionAllowed(false, server);
|
||||
}
|
||||
|
||||
private void RemoveComputerFromCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server)
|
||||
|
@ -764,15 +849,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
public bool AddSessionHostFeatureToServer(string hostName)
|
||||
{
|
||||
bool installationResult = false;
|
||||
|
||||
Runspace runSpace = null;
|
||||
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
|
||||
|
||||
installationResult = (bool)GetPSObjectProperty(feature, "Success");
|
||||
}
|
||||
finally
|
||||
|
@ -1087,38 +1169,55 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
|
||||
#region Windows Feature PowerShell
|
||||
|
||||
internal bool IsFeatureInstalled(string hostName, string featureName)
|
||||
internal bool IsFeatureInstalled(string featureName, Runspace runSpace)
|
||||
{
|
||||
bool isInstalled = false;
|
||||
|
||||
Runspace runSpace = null;
|
||||
try
|
||||
{
|
||||
runSpace = OpenRunspace();
|
||||
|
||||
Command cmd = new Command("Get-WindowsFeature");
|
||||
cmd.Parameters.Add("Name", featureName);
|
||||
var feature = ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
|
||||
|
||||
if (feature != null)
|
||||
{
|
||||
isInstalled = (bool)GetPSObjectProperty(feature, "Installed");
|
||||
}
|
||||
|
||||
return isInstalled;
|
||||
}
|
||||
|
||||
internal bool IsFeatureInstalled(string hostName, string featureName, Runspace runSpace)
|
||||
{
|
||||
bool isInstalled = false;
|
||||
Command cmd = new Command("Get-WindowsFeature");
|
||||
cmd.Parameters.Add("Name", featureName);
|
||||
var feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
||||
|
||||
if (feature != null)
|
||||
{
|
||||
isInstalled = (bool) GetPSObjectProperty(feature, "Installed");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
|
||||
return isInstalled;
|
||||
}
|
||||
|
||||
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
||||
internal PSObject AddFeature(Runspace runSpace, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
||||
{
|
||||
PSObject feature;
|
||||
Command cmd = new Command("Add-WindowsFeature");
|
||||
cmd.Parameters.Add("Name", featureName);
|
||||
|
||||
try
|
||||
if (includeAllSubFeature)
|
||||
{
|
||||
cmd.Parameters.Add("IncludeAllSubFeature", true);
|
||||
}
|
||||
|
||||
if (restart)
|
||||
{
|
||||
cmd.Parameters.Add("Restart", true);
|
||||
}
|
||||
|
||||
return ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
|
||||
}
|
||||
|
||||
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
||||
{
|
||||
Command cmd = new Command("Add-WindowsFeature");
|
||||
cmd.Parameters.Add("Name", featureName);
|
||||
|
@ -1133,14 +1232,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
cmd.Parameters.Add("Restart", "");
|
||||
}
|
||||
|
||||
feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
||||
}
|
||||
finally
|
||||
{
|
||||
CloseRunspace(runSpace);
|
||||
}
|
||||
|
||||
return feature;
|
||||
return ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
||||
<OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -56,18 +56,22 @@
|
|||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
|
||||
<Name>WebsitePanel.Providers.Base</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
|
||||
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
|
||||
<Name>WebsitePanel.Providers.Web.IIs60</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj">
|
||||
<Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project>
|
||||
<Name>WebsitePanel.Providers.Web.IIs70</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||
<Project>{e91e52f3-9555-4d00-b577-2b1dbdd87ca7}</Project>
|
||||
<Name>WebsitePanel.Server.Utils</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
|
||||
private System.Threading.SendOrPostCallback CreateCollectionOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddRdsServersToDeploymentOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetCollectionOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback RemoveCollectionOperationCompleted;
|
||||
|
@ -45,6 +47,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
|
||||
private System.Threading.SendOrPostCallback RemoveSessionHostServersFromCollectionOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetRDServerNewConnectionAllowedOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetAvailableRemoteApplicationsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetCollectionRemoteApplicationsOperationCompleted;
|
||||
|
@ -69,6 +73,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
/// <remarks/>
|
||||
public event CreateCollectionCompletedEventHandler CreateCollectionCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddRdsServersToDeploymentCompletedEventHandler AddRdsServersToDeploymentCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetCollectionCompletedEventHandler GetCollectionCompleted;
|
||||
|
||||
|
@ -90,6 +97,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
/// <remarks/>
|
||||
public event RemoveSessionHostServersFromCollectionCompletedEventHandler RemoveSessionHostServersFromCollectionCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetRDServerNewConnectionAllowedCompletedEventHandler SetRDServerNewConnectionAllowedCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetAvailableRemoteApplicationsCompletedEventHandler GetAvailableRemoteApplicationsCompleted;
|
||||
|
||||
|
@ -159,6 +169,48 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRdsServersToDeployment", 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 bool AddRdsServersToDeployment(RdsServer[] servers) {
|
||||
object[] results = this.Invoke("AddRdsServersToDeployment", new object[] {
|
||||
servers});
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddRdsServersToDeployment(RdsServer[] servers, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("AddRdsServersToDeployment", new object[] {
|
||||
servers}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndAddRdsServersToDeployment(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddRdsServersToDeploymentAsync(RdsServer[] servers) {
|
||||
this.AddRdsServersToDeploymentAsync(servers, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddRdsServersToDeploymentAsync(RdsServer[] servers, object userState) {
|
||||
if ((this.AddRdsServersToDeploymentOperationCompleted == null)) {
|
||||
this.AddRdsServersToDeploymentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddRdsServersToDeploymentOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("AddRdsServersToDeployment", new object[] {
|
||||
servers}, this.AddRdsServersToDeploymentOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddRdsServersToDeploymentOperationCompleted(object arg) {
|
||||
if ((this.AddRdsServersToDeploymentCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.AddRdsServersToDeploymentCompleted(this, new AddRdsServersToDeploymentCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -478,6 +530,49 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetRDServerNewConnectionAllowed", 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 SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server) {
|
||||
this.Invoke("SetRDServerNewConnectionAllowed", new object[] {
|
||||
newConnectionAllowed,
|
||||
server});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetRDServerNewConnectionAllowed", new object[] {
|
||||
newConnectionAllowed,
|
||||
server}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndSetRDServerNewConnectionAllowed(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetRDServerNewConnectionAllowedAsync(bool newConnectionAllowed, RdsServer server) {
|
||||
this.SetRDServerNewConnectionAllowedAsync(newConnectionAllowed, server, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetRDServerNewConnectionAllowedAsync(bool newConnectionAllowed, RdsServer server, object userState) {
|
||||
if ((this.SetRDServerNewConnectionAllowedOperationCompleted == null)) {
|
||||
this.SetRDServerNewConnectionAllowedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetRDServerNewConnectionAllowedOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetRDServerNewConnectionAllowed", new object[] {
|
||||
newConnectionAllowed,
|
||||
server}, this.SetRDServerNewConnectionAllowedOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetRDServerNewConnectionAllowedOperationCompleted(object arg) {
|
||||
if ((this.SetRDServerNewConnectionAllowedCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetRDServerNewConnectionAllowedCompleted(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/GetAvailableRemoteApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -855,6 +950,32 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddRdsServersToDeploymentCompletedEventHandler(object sender, AddRdsServersToDeploymentCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class AddRdsServersToDeploymentCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal AddRdsServersToDeploymentCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetCollectionCompletedEventHandler(object sender, GetCollectionCompletedEventArgs e);
|
||||
|
@ -949,6 +1070,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void RemoveSessionHostServersFromCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SetRDServerNewConnectionAllowedCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetAvailableRemoteApplicationsCompletedEventHandler(object sender, GetAvailableRemoteApplicationsCompletedEventArgs e);
|
||||
|
|
|
@ -76,6 +76,23 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool AddRdsServersToDeployment(RdsServer[] servers)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
|
||||
var result = RDSProvider.AddRdsServersToDeployment(servers);
|
||||
Log.WriteEnd("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public RdsCollection GetCollection(string collectionName)
|
||||
{
|
||||
|
@ -191,6 +208,22 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
|
||||
RDSProvider.SetRDServerNewConnectionAllowed(newConnectionAllowed, server);
|
||||
Log.WriteEnd("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<!-- Custom configuration sections -->
|
||||
<configSections>
|
||||
|
@ -8,7 +8,12 @@
|
|||
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
|
||||
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||
</sectionGroup>
|
||||
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
@ -168,7 +173,7 @@
|
|||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012" />
|
||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80"/>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -17,7 +17,7 @@
|
|||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
|
@ -79,7 +79,6 @@
|
|||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
|
|
|
@ -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,126 @@
|
|||
<?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="chkEnableHardQuota.Text" xml:space="preserve">
|
||||
<value>Enable Hard Quota:</value>
|
||||
</data>
|
||||
<data name="lblSpacesFolder.Text" xml:space="preserve">
|
||||
<value>Hosting Spaces Folder:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,25 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Windows2012_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.Windows2012_Settings" %>
|
||||
<table cellpadding="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label ID="lblSpacesFolder" runat="server" meta:resourcekey="lblSpacesFolder" Text="Hosting Spaces Folder:"></asp:Label>
|
||||
</td>
|
||||
<td width="100%">
|
||||
<asp:TextBox runat="server" ID="txtFolder" Width="300px" CssClass="NormalTextBox"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap></td>
|
||||
<td width="100%">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox runat="server" AutoPostBack="false" ID="chkEnableHardQuota" meta:resourcekey="chkEnableHardQuota" Text="Enable Hard Quota:" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblFileServiceInfo" meta:resourcekey="lblFileServiceInfo" Text="Install File Services role on the file server to enable the check box" Font-Italic="true" Visible="false"></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,79 @@
|
|||
// Copyright (c) 2014, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace WebsitePanel.Portal.ProviderControls
|
||||
{
|
||||
public partial class Windows2012_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//CO Changes
|
||||
if (!IsPostBack)
|
||||
{
|
||||
try
|
||||
{
|
||||
chkEnableHardQuota.Enabled = ES.Services.OperatingSystems.CheckFileServicesInstallation(PanelRequest.ServiceId);
|
||||
if (!chkEnableHardQuota.Enabled)
|
||||
lblFileServiceInfo.Visible = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
//END
|
||||
}
|
||||
|
||||
public void BindSettings(StringDictionary settings)
|
||||
{
|
||||
txtFolder.Text = settings["UsersHome"];
|
||||
//CO Changes
|
||||
chkEnableHardQuota.Checked = settings["EnableHardQuota"] == "true" ? true : false;
|
||||
//END
|
||||
}
|
||||
|
||||
public void SaveSettings(StringDictionary settings)
|
||||
{
|
||||
settings["UsersHome"] = txtFolder.Text;
|
||||
//CO Changes
|
||||
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
|
||||
//END
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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.ProviderControls {
|
||||
|
||||
|
||||
public partial class Windows2012_Settings {
|
||||
|
||||
/// <summary>
|
||||
/// lblSpacesFolder 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.Label lblSpacesFolder;
|
||||
|
||||
/// <summary>
|
||||
/// txtFolder 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.TextBox txtFolder;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnableHardQuota 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.CheckBox chkEnableHardQuota;
|
||||
|
||||
/// <summary>
|
||||
/// lblFileServiceInfo 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.Label lblFileServiceInfo;
|
||||
}
|
||||
}
|
|
@ -147,4 +147,16 @@
|
|||
<data name="locQuota.Text" xml:space="preserve">
|
||||
<value>Total RDS Servers Allocated:</value>
|
||||
</data>
|
||||
<data name="cmdDisable.Text" xml:space="preserve">
|
||||
<value>Disable</value>
|
||||
</data>
|
||||
<data name="cmdEnable.Text" xml:space="preserve">
|
||||
<value>Enable</value>
|
||||
</data>
|
||||
<data name="cmdDisable.ToolTip" xml:space="preserve">
|
||||
<value>Disable</value>
|
||||
</data>
|
||||
<data name="cmdEnable.ToolTip" xml:space="preserve">
|
||||
<value>Enable</value>
|
||||
</data>
|
||||
</root>
|
|
@ -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>
|
|
@ -1,4 +1,5 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AssignedRDSServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.AssignedRDSServers" %>
|
||||
<%@ Import Namespace="WebsitePanel.Portal" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
|
@ -46,13 +47,22 @@
|
|||
DataSourceID="odsRDSAssignedServersPaged" PageSize="20">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="gvRDSServerName" SortExpression="Name">
|
||||
<ItemStyle Width="90%"></ItemStyle>
|
||||
<ItemStyle Width="80%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Label id="litRDSServerName" runat="server">
|
||||
<%# Eval("Name") %>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="10%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="EnableLinkButton" ImageUrl='<%# PortalUtils.GetThemedImage("Exchange/bullet.gif")%>' runat="server" Visible='<%# Eval("RdsCollectionId") != null && !Convert.ToBoolean(Eval("ConnectionEnabled")) %>'
|
||||
CommandName="EnableItem" CommandArgument='<%# Eval("Id") %>' meta:resourcekey="cmdEnable"></asp:ImageButton>
|
||||
<asp:ImageButton ID="DisableLinkButton" ImageUrl='<%# PortalUtils.GetThemedImage("Exchange/bullet_hover.gif")%>' runat="server" Visible='<%# Eval("RdsCollectionId") != null && Convert.ToBoolean(Eval("ConnectionEnabled")) %>'
|
||||
CommandName="DisableItem" CommandArgument='<%# Eval("Id") %>' meta:resourcekey="cmdDisable"></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgRemove1" runat="server" Text="Remove" Visible='<%# Eval("RdsCollectionId") == null %>'
|
||||
|
|
|
@ -61,35 +61,31 @@ namespace WebsitePanel.Portal.RDS
|
|||
|
||||
protected void gvRDSAssignedServers_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "DeleteItem")
|
||||
{
|
||||
// delete RDS Server
|
||||
int rdsServerId = int.Parse(e.CommandArgument.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
RdsServer rdsServer = ES.Services.RDS.GetRdsServer(rdsServerId);
|
||||
|
||||
switch (e.CommandName)
|
||||
{
|
||||
case "DeleteItem":
|
||||
if (rdsServer.RdsCollectionId != null)
|
||||
{
|
||||
messageBox.ShowErrorMessage("RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION");
|
||||
return;
|
||||
}
|
||||
|
||||
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS");
|
||||
return;
|
||||
DeleteItem(rdsServerId);
|
||||
break;
|
||||
case "EnableItem":
|
||||
ChangeConnectionState(true, rdsServer);
|
||||
break;
|
||||
case "DisableItem":
|
||||
ChangeConnectionState(false, rdsServer);
|
||||
break;
|
||||
}
|
||||
|
||||
gvRDSAssignedServers.DataBind();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
@ -98,5 +94,25 @@ namespace WebsitePanel.Portal.RDS
|
|||
|
||||
gvRDSAssignedServers.DataBind();
|
||||
}
|
||||
|
||||
#region Methods
|
||||
|
||||
private void DeleteItem(int rdsServerId)
|
||||
{
|
||||
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeConnectionState(bool enabled, RdsServer rdsServer)
|
||||
{
|
||||
ES.Services.RDS.SetRDServerNewConnectionAllowed(rdsServer.ItemId.Value, enabled, rdsServer.Id);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -48,7 +48,7 @@
|
|||
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name">
|
||||
<ItemStyle Width="40%"></ItemStyle>
|
||||
<ItemTemplate>
|
||||
<asp:Literal id="litCollectionName" runat="server" Text='<%# Eval("Name").ToString() %>'></asp:Literal>
|
||||
<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;
|
||||
}
|
||||
}
|
|
@ -54,11 +54,6 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
|||
BindServers(servers, false);
|
||||
}
|
||||
|
||||
//public RdsServer[] GetServers()
|
||||
//{
|
||||
// return GetGridViewServers(SelectedState.All).ToArray();
|
||||
//}
|
||||
|
||||
public List<RdsServer> GetServers()
|
||||
{
|
||||
return GetGridViewServers(SelectedState.All);
|
||||
|
@ -80,7 +75,13 @@ 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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
|
|
@ -211,6 +211,13 @@
|
|||
<Compile Include="Code\ReportingServices\IResourceStorage.cs" />
|
||||
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
|
||||
<Compile Include="Code\UserControls\Tab.cs" />
|
||||
<Compile Include="ProviderControls\Windows2012_Settings.ascx.cs">
|
||||
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\Windows2012_Settings.ascx.designer.cs">
|
||||
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RDSServersAddserver.ascx.cs">
|
||||
<DependentUpon>RDSServersAddserver.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -239,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>
|
||||
|
@ -4263,10 +4277,12 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||
<Content Include="ProviderControls\Windows2012_Settings.ascx" />
|
||||
<Content Include="RDSServersAddserver.ascx" />
|
||||
<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" />
|
||||
|
@ -4277,6 +4293,10 @@
|
|||
<Content Include="ScheduleTaskControls\App_LocalResources\DomainExpirationView.ascx.resx" />
|
||||
<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">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>DomainLookupView.ascx.Designer.cs</LastGenOutput>
|
||||
|
@ -5584,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