Web Changes
This commit is contained in:
parent
1ed886a045
commit
6437148de4
37 changed files with 1618 additions and 482 deletions
|
@ -1239,6 +1239,17 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
//CO Changes
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ApplyEnableHardQuotaFeature", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int ApplyEnableHardQuotaFeature(int packageId)
|
||||
{
|
||||
object[] results = this.Invoke("ApplyEnableHardQuotaFeature", new object[] {
|
||||
packageId });
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
//END
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
|
|
|
@ -463,6 +463,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
//CO Changes
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckFileServicesInstallation", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool CheckFileServicesInstallation(int serviceId)
|
||||
{
|
||||
object[] results = this.Invoke("CheckFileServicesInstallation", new object[] {
|
||||
serviceId});
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
//END
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState)
|
||||
{
|
||||
|
|
|
@ -1198,9 +1198,11 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteWebSite", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int DeleteWebSite(int siteItemId) {
|
||||
public int DeleteWebSite(int siteItemId, bool deleteWebsiteDirectory)
|
||||
{
|
||||
object[] results = this.Invoke("DeleteWebSite", new object[] {
|
||||
siteItemId});
|
||||
siteItemId,
|
||||
deleteWebsiteDirectory});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
|
|
|
@ -912,5 +912,163 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
return users.ToArray();
|
||||
}
|
||||
|
||||
public static int SetFolderQuota(int packageId, string path, string driveName)
|
||||
{
|
||||
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
if (accountCheck < 0) return accountCheck;
|
||||
|
||||
// check package
|
||||
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
|
||||
if (packageCheck < 0) return packageCheck;
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", path);
|
||||
TaskManager.ItemId = packageId;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// disk space quota
|
||||
// This gets all the disk space allocated for a specific customer
|
||||
// It includes the package Add Ons * Quatity + Hosting Plan System disk space value.
|
||||
QuotaValueInfo diskSpaceQuota = PackageController.GetPackageQuota(packageId, Quotas.OS_DISKSPACE);
|
||||
|
||||
|
||||
#region figure Quota Unit
|
||||
|
||||
// Quota Unit
|
||||
string unit = String.Empty;
|
||||
if (diskSpaceQuota.QuotaDescription.ToLower().Contains("gb"))
|
||||
unit = "GB";
|
||||
else if (diskSpaceQuota.QuotaDescription.ToLower().Contains("mb"))
|
||||
unit = "MB";
|
||||
else
|
||||
unit = "KB";
|
||||
|
||||
#endregion
|
||||
|
||||
OS.OperatingSystem os = GetOS(packageId);
|
||||
|
||||
os.SetQuotaLimitOnFolder(path, driveName, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty);
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Log and return a generic error rather than throwing an exception
|
||||
TaskManager.WriteError(ex);
|
||||
return BusinessErrorCodes.ERROR_FILE_GENERIC_LOGGED;
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static int ApplyEnableHardQuotaFeature(int packageId)
|
||||
{
|
||||
if (SecurityContext.CheckAccount(DemandAccount.IsActive | DemandAccount.IsAdmin | DemandAccount.NotDemo) != 0)
|
||||
throw new Exception("This method could be called by serveradmin only.");
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("FILES", "APPLY_ENABLEHARDQUOTAFEATURE");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// request OS service
|
||||
//int osId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
|
||||
//if (osId == 0)
|
||||
// return -1;
|
||||
|
||||
//OS.OperatingSystem os = new OS.OperatingSystem();
|
||||
//ServiceProviderProxy.Init(os, osId);
|
||||
|
||||
////Get operating system settings
|
||||
// StringDictionary osSesstings = ServerController.GetServiceSettings(osId);
|
||||
// bool diskQuotaEnabled = (osSesstings["EnableHardQuota"] != null) ? bool.Parse(osSesstings["EnableHardQuota"]) : false;
|
||||
//string driveName = osSesstings["LocationDrive"];
|
||||
|
||||
//if (!diskQuotaEnabled)
|
||||
// return -1;
|
||||
|
||||
|
||||
List<PackageInfo> allPackages = PackageController.GetPackagePackages(packageId, true);
|
||||
|
||||
foreach (PackageInfo childPackage in allPackages)
|
||||
{
|
||||
// request OS service
|
||||
int osId = PackageController.GetPackageServiceId(childPackage.PackageId, ResourceGroups.Os);
|
||||
if (osId == 0)
|
||||
continue;
|
||||
|
||||
OS.OperatingSystem os = new OS.OperatingSystem();
|
||||
ServiceProviderProxy.Init(os, osId);
|
||||
|
||||
//Get operating system settings
|
||||
StringDictionary osSesstings = ServerController.GetServiceSettings(osId);
|
||||
string driveName = osSesstings["LocationDrive"];
|
||||
|
||||
if (String.IsNullOrEmpty(driveName))
|
||||
continue;
|
||||
|
||||
string homeFolder = FilesController.GetHomeFolder(childPackage.PackageId);
|
||||
FilesController.SetFolderQuota(childPackage.PackageId, homeFolder, driveName);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw TaskManager.WriteError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public static int DeleteDirectoryRecursive(int packageId, string rootPath)
|
||||
{
|
||||
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
if (accountCheck < 0) return accountCheck;
|
||||
|
||||
// check package
|
||||
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
|
||||
if (packageCheck < 0) return packageCheck;
|
||||
|
||||
// place log record
|
||||
TaskManager.StartTask("FILES", "DELETE_DIRECTORY_RECURSIVE", rootPath);
|
||||
TaskManager.ItemId = packageId;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
OS.OperatingSystem os = GetOS(packageId);
|
||||
os.DeleteDirectoryRecursive(rootPath);
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Log and return a generic error rather than throwing an exception
|
||||
TaskManager.WriteError(ex);
|
||||
return BusinessErrorCodes.ERROR_FILE_GENERIC_LOGGED;
|
||||
}
|
||||
finally
|
||||
{
|
||||
TaskManager.CompleteTask();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -406,6 +406,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.CompleteTask();
|
||||
}
|
||||
}
|
||||
|
||||
// Check If FSRM Role services were installed
|
||||
public static bool CheckFileServicesInstallation(int serviceId)
|
||||
{
|
||||
OS.OperatingSystem os = GetOS(serviceId);
|
||||
return os.CheckFileServicesInstallation();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Web Platform Installer
|
||||
|
|
|
@ -770,6 +770,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
if (result.ExceedingQuotas.Tables[0].Rows.Count > 0)
|
||||
result.Result = BusinessErrorCodes.ERROR_PACKAGE_QUOTA_EXCEED;
|
||||
|
||||
// Update the Hard quota on home folder in case it was enabled and in case there was a change in disk space
|
||||
UpdatePackageHardQuota(package.PackageId);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -963,6 +966,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
homeFolder.PackageId = packageId;
|
||||
homeFolder.Name = path;
|
||||
|
||||
// Added By Haya
|
||||
UpdatePackageHardQuota(packageId);
|
||||
|
||||
// save package item
|
||||
return AddPackageItem(homeFolder);
|
||||
}
|
||||
|
@ -977,6 +983,30 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DataProvider.UpdatePackageBandwidthUpdate(packageId, updateDate);
|
||||
}
|
||||
|
||||
// This gets the system quota and updates the home folder with the value
|
||||
public static void UpdatePackageHardQuota(int packageId)
|
||||
{
|
||||
// request OS service
|
||||
int osId = GetPackageServiceId(packageId, ResourceGroups.Os);
|
||||
if (osId == 0)
|
||||
return;
|
||||
|
||||
OS.OperatingSystem os = new OS.OperatingSystem();
|
||||
ServiceProviderProxy.Init(os, osId);
|
||||
|
||||
//Get operating system settings
|
||||
StringDictionary osSesstings = ServerController.GetServiceSettings(osId);
|
||||
bool diskQuotaEnabled = (osSesstings["EnableHardQuota"] != null) ? bool.Parse(osSesstings["EnableHardQuota"]) : false;
|
||||
string driveName = osSesstings["LocationDrive"];
|
||||
|
||||
if (!diskQuotaEnabled)
|
||||
return;
|
||||
|
||||
string homeFolder = FilesController.GetHomeFolder(packageId);
|
||||
FilesController.SetFolderQuota(packageId, homeFolder, driveName);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Package Add-ons
|
||||
|
@ -1035,6 +1065,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
result.Result = addonId;
|
||||
|
||||
// Update the Hard quota on home folder in case it was enabled and in case there was a change in disk space
|
||||
UpdatePackageHardQuota(addon.PackageId);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1062,6 +1094,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (result.ExceedingQuotas.Tables[0].Rows.Count > 0)
|
||||
result.Result = BusinessErrorCodes.ERROR_PACKAGE_QUOTA_EXCEED;
|
||||
|
||||
// Update the Hard quota on home folder in case it was enabled and in case there was a change in disk space
|
||||
UpdatePackageHardQuota(addon.PackageId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1072,6 +1107,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
| DemandAccount.IsReseller);
|
||||
if (accountCheck < 0) return accountCheck;
|
||||
|
||||
|
||||
// Update the Hard quota on home folder in case it was enabled and in case there was a change in disk space
|
||||
UpdatePackageHardQuota(GetPackageAddon(packageAddonId).PackageId);
|
||||
|
||||
DataProvider.DeletePackageAddon(SecurityContext.User.UserId, packageAddonId);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -583,7 +583,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
public static int DeleteWebSite(int siteItemId)
|
||||
public static int DeleteWebSite(int siteItemId, bool deleteWebsiteDirectory)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||
|
@ -655,6 +655,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
//
|
||||
web.DeleteSite(siteItem.SiteId);
|
||||
|
||||
// Delete WebManagementAccess Account
|
||||
WebServerController.RevokeWebManagementAccess(siteItemId);
|
||||
|
||||
if (deleteWebsiteDirectory)
|
||||
{
|
||||
// Delete website directory from file server
|
||||
// This will remove the hard quota as well
|
||||
FilesController.DeleteDirectoryRecursive(siteItem.PackageId, new DirectoryInfo(siteItem.DataPath).Parent.FullName);
|
||||
|
||||
}
|
||||
// delete service item
|
||||
PackageController.DeletePackageItem(siteItemId);
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
</configSections>
|
||||
<!-- Connection strings -->
|
||||
<connectionStrings>
|
||||
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
|
||||
<add name="EnterpriseServer" connectionString="server=localhost\sqlexpress;database=WebsitePanelBeta;uid=WebsitePanel;pwd=bdeznsrsyce58m0bc61j;" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<!-- Encryption util settings -->
|
||||
<add key="WebsitePanel.CryptoKey" value="1234567890" />
|
||||
<add key="WebsitePanel.CryptoKey" value="84lc71526qnp8mlqx0gk" />
|
||||
<!-- A1D4KDHUE83NKHddF -->
|
||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||
<!-- Web Applications -->
|
||||
|
|
|
@ -193,5 +193,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
FilesController.ExecuteSyncActions(packageId, actions);
|
||||
}
|
||||
|
||||
//CO Changes
|
||||
[WebMethod]
|
||||
public int ApplyEnableHardQuotaFeature(int packageId)
|
||||
{
|
||||
return FilesController.ApplyEnableHardQuotaFeature(packageId);
|
||||
}
|
||||
//END
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,5 +93,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
return OperatingSystemController.DeleteOdbcSource(itemId);
|
||||
}
|
||||
|
||||
//CO Changes
|
||||
[WebMethod]
|
||||
public bool CheckFileServicesInstallation(int serviceId)
|
||||
{
|
||||
return OperatingSystemController.CheckFileServicesInstallation(serviceId);
|
||||
}
|
||||
//END
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,9 +152,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public int DeleteWebSite(int siteItemId)
|
||||
public int DeleteWebSite(int siteItemId, bool deleteWebsiteDirectory)
|
||||
{
|
||||
return WebServerController.DeleteWebSite(siteItemId);
|
||||
return WebServerController.DeleteWebSite(siteItemId, deleteWebsiteDirectory);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
|
|
@ -81,5 +81,11 @@ namespace WebsitePanel.Providers.OS
|
|||
// Synchronizing
|
||||
FolderGraph GetFolderGraph(string path);
|
||||
void ExecuteSyncActions(FileSyncAction[] actions);
|
||||
|
||||
void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword);
|
||||
void DeleteDirectoryRecursive(string rootPath);
|
||||
|
||||
// File Services
|
||||
bool CheckFileServicesInstallation();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -209,6 +209,16 @@ namespace WebsitePanel.Providers.OS
|
|||
SecurityUtils.GrantGroupNtfsPermissions(path, users, resetChildPermissions,
|
||||
ServerSettings, usersOU, null);
|
||||
}
|
||||
|
||||
public virtual void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||
{
|
||||
FileUtils.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
|
||||
}
|
||||
|
||||
public virtual void DeleteDirectoryRecursive(string rootPath)
|
||||
{
|
||||
FileUtils.DeleteDirectoryRecursive(rootPath);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ODBC DSNs
|
||||
|
@ -729,5 +739,11 @@ namespace WebsitePanel.Providers.OS
|
|||
{
|
||||
return WebsitePanel.Server.Utils.OS.GetVersion() == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2003;
|
||||
}
|
||||
|
||||
public virtual bool CheckFileServicesInstallation()
|
||||
{
|
||||
return WebsitePanel.Server.Utils.OS.CheckFileServicesInstallation();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,6 +132,12 @@ namespace WebsitePanel.Providers.OS {
|
|||
|
||||
private System.Threading.SendOrPostCallback DeleteDSNOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetQuotaLimitOnFolderOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteDirectoryRecursiveOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public OperatingSystem() {
|
||||
this.Url = "http://localhost/Server/OperatingSystem.asmx";
|
||||
|
@ -248,6 +254,16 @@ namespace WebsitePanel.Providers.OS {
|
|||
/// <remarks/>
|
||||
public event DeleteDSNCompletedEventHandler DeleteDSNCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetQuotaLimitOnFolderCompletedEventHandler SetQuotaLimitOnFolderCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteDirectoryRecursiveCompletedEventHandler DeleteDirectoryRecursiveCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event CheckFileServicesInstallationCompletedEventHandler CheckFileServicesInstallationCompleted;
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreatePackageFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -1593,6 +1609,153 @@ namespace WebsitePanel.Providers.OS {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetQuotaLimitOnFolder", 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 SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||
{
|
||||
object[] results = this.Invoke("SetQuotaLimitOnFolder", new object[] {
|
||||
folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword});
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("SetQuotaLimitOnFolder", new object[] {
|
||||
folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndSetQuotaLimitOnFolder(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||
{
|
||||
this.SetQuotaLimitOnFolderAsync(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword, object userState)
|
||||
{
|
||||
if ((this.SetQuotaLimitOnFolderOperationCompleted == null))
|
||||
{
|
||||
this.SetQuotaLimitOnFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetQuotaLimitOnFolderOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetQuotaLimitOnFolder", new object[] {
|
||||
folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword}, this.SetQuotaLimitOnFolderOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetQuotaLimitOnFolderOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.SetQuotaLimitOnFolderCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetQuotaLimitOnFolderCompleted(this, new SetQuotaLimitOnFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteDirectoryRecursive", 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 DeleteDirectoryRecursive(string rootPath)
|
||||
{
|
||||
object[] results = this.Invoke("DeleteDirectoryRecursive", new object[] {
|
||||
rootPath });
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteDirectoryRecursive(string rootPath, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("DeleteDirectoryRecursive", new object[] {
|
||||
rootPath}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndDeleteDirectoryRecursive(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteDirectoryRecursiveAsync(string rootPath)
|
||||
{
|
||||
this.DeleteDirectoryRecursiveAsync(rootPath, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteDirectoryRecursiveAsync(string rootPath, object userState)
|
||||
{
|
||||
if ((this.DeleteDirectoryRecursiveOperationCompleted == null))
|
||||
{
|
||||
this.DeleteDirectoryRecursiveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDirectoryRecursiveOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteDirectoryRecursive", new object[] {
|
||||
rootPath}, this.DeleteDirectoryRecursiveOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteDirectoryRecursiveOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteDirectoryRecursiveCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteDirectoryRecursiveCompleted(this, new DeleteDirectoryRecursiveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckFileServicesInstallation", 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 CheckFileServicesInstallation()
|
||||
{
|
||||
object[] results = this.Invoke("CheckFileServicesInstallation", new object[0]);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCheckFileServicesInstallation(System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("CheckFileServicesInstallation", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckFileServicesInstallationAsync()
|
||||
{
|
||||
this.CheckFileServicesInstallationAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckFileServicesInstallationAsync(object userState)
|
||||
{
|
||||
if ((this.CheckFileServicesInstallationOperationCompleted == null))
|
||||
{
|
||||
this.CheckFileServicesInstallationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckFileServicesInstallationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CheckFileServicesInstallation", new object[0], this.CheckFileServicesInstallationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCheckFileServicesInstallationOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.CheckFileServicesInstallationCompleted != null))
|
||||
{
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CheckFileServicesInstallationCompleted(this, new CheckFileServicesInstallationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetInstalledOdbcDrivers", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
|
@ -2391,4 +2554,95 @@ namespace WebsitePanel.Providers.OS {
|
|||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void DeleteDSNCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void SetQuotaLimitOnFolderCompletedEventHandler(object sender, SetQuotaLimitOnFolderCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SetQuotaLimitOnFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SetQuotaLimitOnFolderCompletedEventArgs(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.42")]
|
||||
public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal CheckFileServicesInstallationCompletedEventArgs(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.42")]
|
||||
public delegate void DeleteDirectoryRecursiveCompletedEventHandler(object sender, DeleteDirectoryRecursiveCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DeleteDirectoryRecursiveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DeleteDirectoryRecursiveCompletedEventArgs(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]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ using System.Collections.Generic;
|
|||
using System.Reflection;
|
||||
using Ionic.Zip;
|
||||
using WebsitePanel.Providers.OS;
|
||||
using System.Management;
|
||||
|
||||
namespace WebsitePanel.Providers.Utils
|
||||
{
|
||||
|
@ -844,6 +845,126 @@ namespace WebsitePanel.Providers.Utils
|
|||
conn, null);
|
||||
cat = null;
|
||||
}
|
||||
|
||||
public static void DeleteDirectoryRecursive(string rootPath)
|
||||
{
|
||||
// This code is done this way to force folder deletion
|
||||
// even if the folder was opened
|
||||
|
||||
DirectoryInfo treeRoot = new DirectoryInfo(rootPath);
|
||||
if (treeRoot.Exists)
|
||||
{
|
||||
|
||||
DirectoryInfo[] dirs = treeRoot.GetDirectories();
|
||||
while (dirs.Length > 0)
|
||||
{
|
||||
foreach (DirectoryInfo dir in dirs)
|
||||
DeleteDirectoryRecursive(dir.FullName);
|
||||
|
||||
dirs = treeRoot.GetDirectories();
|
||||
}
|
||||
|
||||
// DELETE THE FILES UNDER THE CURRENT ROOT
|
||||
string[] files = Directory.GetFiles(treeRoot.FullName);
|
||||
foreach (string file in files)
|
||||
{
|
||||
File.SetAttributes(file, FileAttributes.Normal);
|
||||
File.Delete(file);
|
||||
}
|
||||
|
||||
Directory.Delete(treeRoot.FullName, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
string[] splits = folderPath.Split('\\');
|
||||
if (splits.Length > 0)
|
||||
{
|
||||
// bat file pat
|
||||
string cmdFilePath = @"\\" + splits[2] + @"\" + splits[3] + @"\" + "Process.bat";
|
||||
|
||||
// Creating the BAT file
|
||||
FileStream fs = File.Create(cmdFilePath);
|
||||
if (fs != null)
|
||||
{
|
||||
fs.Close();
|
||||
fs.Dispose();
|
||||
}
|
||||
|
||||
StreamWriter swr = new StreamWriter(cmdFilePath);
|
||||
|
||||
if (swr != null)
|
||||
{
|
||||
swr.WriteLine(@"cd c:\windows\system32");
|
||||
|
||||
string sharePath = String.Empty;
|
||||
|
||||
if (splits.Length > 4)
|
||||
{
|
||||
// Form the share physicalPath
|
||||
sharePath = shareNameDrive + @":\" + splits[3];
|
||||
|
||||
if (splits.Length == 5 && !quotaLimit.Equals(String.Empty))
|
||||
{
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
// Set
|
||||
case 0:
|
||||
// Delete the quota in case one exists
|
||||
swr.WriteLine(@"dirquota quota delete /path:" + sharePath + @"\" + splits[4] + @" /remote:" + splits[2] + @" /quiet");
|
||||
swr.WriteLine(@"dirquota quota add /path:" + sharePath + @"\" + splits[4] + @" /limit:" + quotaLimit + @" /remote:" + splits[2]);
|
||||
break;
|
||||
|
||||
// Modify
|
||||
case 1: swr.WriteLine(@"dirquota quota modify /path:" + sharePath + @"\" + splits[4] + @" /limit:" + quotaLimit + @" /remote:" + splits[2]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
swr.Flush();
|
||||
swr.Close();
|
||||
swr.Dispose();
|
||||
}
|
||||
|
||||
ConnectionOptions connOptions = new ConnectionOptions();
|
||||
|
||||
if (wmiUserName.Length > 0)
|
||||
{
|
||||
connOptions.Username = wmiUserName;
|
||||
connOptions.Password = wmiPassword;
|
||||
}
|
||||
|
||||
connOptions.Impersonation = ImpersonationLevel.Impersonate;
|
||||
|
||||
connOptions.EnablePrivileges = true;
|
||||
|
||||
ManagementScope manScope =
|
||||
new ManagementScope(String.Format(@"\\{0}\ROOT\CIMV2", splits[2]), connOptions);
|
||||
manScope.Connect();
|
||||
|
||||
ObjectGetOptions objectGetOptions = new ObjectGetOptions();
|
||||
ManagementPath managementPath = new ManagementPath("Win32_Process");
|
||||
ManagementClass processClass = new ManagementClass(manScope, managementPath, objectGetOptions);
|
||||
|
||||
ManagementBaseObject inParams = processClass.GetMethodParameters("Create");
|
||||
inParams["CommandLine"] = cmdFilePath;
|
||||
ManagementBaseObject outParams = processClass.InvokeMethod("Create", inParams, null);
|
||||
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
#region Advanced Delete
|
||||
/// <summary>
|
||||
/// Deletes the specified file.
|
||||
|
|
|
@ -30,6 +30,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Management;
|
||||
|
||||
|
||||
namespace WebsitePanel.Server.Utils
|
||||
{
|
||||
|
@ -402,6 +404,22 @@ namespace WebsitePanel.Server.Utils
|
|||
{
|
||||
return Environment.GetEnvironmentVariable("windir");
|
||||
}
|
||||
/// <summary>
|
||||
/// Checks Whether the FSRM role services are installed
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool CheckFileServicesInstallation()
|
||||
{
|
||||
|
||||
ManagementClass objMC = new ManagementClass("Win32_ServerFeature");
|
||||
ManagementObjectCollection objMOC = objMC.GetInstances();
|
||||
foreach (ManagementObject objMO in objMOC)
|
||||
if (objMO.Properties["Name"].Value.ToString().ToLower().Contains("file server resource manager"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -533,6 +533,55 @@ namespace WebsitePanel.Server
|
|||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
||||
OsProvider.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
|
||||
Log.WriteEnd("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public void DeleteDirectoryRecursive(string rootPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' DeleteDirectoryRecursive", ProviderSettings.ProviderName);
|
||||
OsProvider.DeleteDirectoryRecursive(rootPath);
|
||||
Log.WriteEnd("'{0}' DeleteDirectoryRecursive", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' DeleteDirectoryRecursive", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public bool CheckFileServicesInstallation()
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' CheckFileServicesInstallation", ProviderSettings.ProviderName);
|
||||
return OsProvider.CheckFileServicesInstallation();
|
||||
Log.WriteEnd("'{0}' CheckFileServicesInstallation", ProviderSettings.ProviderName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' CheckFileServicesInstallation", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Synchronizing
|
||||
|
|
|
@ -76,6 +76,9 @@
|
|||
<MenuItem pageID="SpaceWebApplicationsGallery" resourceGroup="Web" quota="Web.WebAppGallery"/>
|
||||
<MenuItem pageID="SpaceApplicationsInstaller" resourceGroup="OS" quota="OS.AppInstaller"/>
|
||||
<MenuItem pageID="SpaceScheduledTasks" resourceGroup="OS" quota="OS.ScheduledTasks"/>
|
||||
<!--CO Changes-->
|
||||
<MenuItem pageID="SpaceApplyEnableHardQuotaFeature" resourceGroup="OS" quota=""/>
|
||||
<!--END-->
|
||||
<!--MenuItem url="http://phpmysqladmin.com" title="phpMyAdmin" target="_blank"
|
||||
resourceGroup="MySQL4"/-->
|
||||
</ModuleData>
|
||||
|
|
|
@ -594,4 +594,12 @@
|
|||
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
|
||||
<!-- CO Chnages-->
|
||||
<ModuleDefinition id="ApplyEnableHardQuotaFeature">
|
||||
<Controls>
|
||||
<Control key="" src="WebsitePanel/ApplyEnableHardQuotaFeature.ascx" title="ApplyEnableHardQuotaFeature" type="View" icon="calendar_month_2_clock_48.png" />
|
||||
</Controls>
|
||||
</ModuleDefinition>
|
||||
<!--END-->
|
||||
</ModuleDefinitions>
|
|
@ -566,4 +566,17 @@
|
|||
</Pages>
|
||||
</Page>
|
||||
|
||||
<!-- CO Changes -->
|
||||
<Page name="SpaceApplyEnableHardQuotaFeature" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True">
|
||||
<Content id="LeftPane">
|
||||
<Module moduleDefinitionID="SpaceMenu" title="SpaceMenu" container="Clear.ascx">
|
||||
<ModuleData ref="SpaceMenu"/>
|
||||
</Module>
|
||||
</Content>
|
||||
<Content id="ContentPane">
|
||||
<Module moduleDefinitionID="ApplyEnableHardQuotaFeature" title="ApplyEnableHardQuotaFeature" icon="cabinet_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
|
||||
</Content>
|
||||
</Page>
|
||||
<!--END-->
|
||||
|
||||
</Pages>
|
||||
|
|
|
@ -768,4 +768,7 @@
|
|||
<data name="ModuleTitle.SetupControlPanelAccounts" xml:space="preserve">
|
||||
<value>Setup WebsitePanel Accounts</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.ApplyEnableHardQuotaFeature" xml:space="preserve">
|
||||
<value>System Hard Quota</value>
|
||||
</data>
|
||||
</root>
|
|
@ -459,4 +459,7 @@
|
|||
<data name="PageTitle.SpaceVPSForPC" xml:space="preserve">
|
||||
<value>{user} - {space} - Virtual Private Servers for Private Cloud</value>
|
||||
</data>
|
||||
<data name="PageName.SpaceApplyEnableHardQuotaFeature" xml:space="preserve">
|
||||
<value>System Hard Quota</value>
|
||||
</data>
|
||||
</root>
|
|
@ -2124,7 +2124,6 @@
|
|||
<data name="ServiceItemType.HostHeader" xml:space="preserve">
|
||||
<value>Web Site Host Header</value>
|
||||
</data>
|
||||
|
||||
<data name="AuditLogSource.APP_INSTALLER" xml:space="preserve">
|
||||
<value>Applications Installer</value>
|
||||
</data>
|
||||
|
@ -5243,4 +5242,10 @@
|
|||
<data name="Success.WEB_SWITCH_TO_SHARED_IP" xml:space="preserve">
|
||||
<value>Web site has been updated to shared IP</value>
|
||||
</data>
|
||||
<data name="Warning.ApplyEnableHardQuotaFeature" xml:space="preserve">
|
||||
<value>Apply Enable Hard Quota Feature</value>
|
||||
</data>
|
||||
<data name="WarningDescription.ApplyEnableHardQuotaFeature" xml:space="preserve">
|
||||
<value>By clicking on the button 'Apply', you will apply the respective hard quota on each provisioned home folder. Note that this may take some time.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -486,4 +486,7 @@ To connect to web site management service please use username and password provi
|
|||
<data name="locSharedIPAddress.Text" xml:space="preserve">
|
||||
<value>IP address: Shared</value>
|
||||
</data>
|
||||
<data name="chkDeleteWebsiteDirectory.Text" xml:space="preserve">
|
||||
<value>Force delete website directory?</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,19 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ApplyEnableHardQuotaFeature.ascx.cs" Inherits="WebsitePanel.Portal.ApplyEnableHardQuotaFeature" %>
|
||||
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="messageBox" TagPrefix="uc4" %>
|
||||
|
||||
<div class="FormBody">
|
||||
<table cellspacing="0" cellpadding="4" width="100%">
|
||||
<tr>
|
||||
|
||||
<td class="Normal">
|
||||
<uc4:messageBox id="messageBox" runat="server" >
|
||||
</uc4:messageBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnUpdate" runat="server" meta:resourcekey="btnUpdate" CssClass="Button1" Text="Apply" OnClick="btnUpdate_Click"></asp:Button>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
// Copyright (c) 2012, 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.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.EnterpriseServer.Base.Scheduling;
|
||||
using WebsitePanel.Portal.Code.Framework;
|
||||
|
||||
namespace WebsitePanel.Portal
|
||||
{
|
||||
public partial class ApplyEnableHardQuotaFeature : WebsitePanelModuleBase
|
||||
{
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return PanelSecurity.PackageId; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
messageBox.ShowWarningMessage("ApplyEnableHardQuotaFeature");
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
try
|
||||
{
|
||||
ES.Services.Files.ApplyEnableHardQuotaFeature(PackageId);
|
||||
// redirect
|
||||
Response.Redirect(NavigatePageURL("SpaceHome", "SpaceID", PackageId.ToString()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
messageBox.ShowErrorMessage("APPLY_QUOTA", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Update();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 {
|
||||
|
||||
|
||||
public partial class ApplyEnableHardQuotaFeature {
|
||||
|
||||
/// <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>
|
||||
/// btnUpdate 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 btnUpdate;
|
||||
}
|
||||
}
|
|
@ -112,11 +112,17 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<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="lblLocationDrive.Text" xml:space="preserve">
|
||||
<value>Location Drive:</value>
|
||||
</data>
|
||||
<data name="lblSpacesFolder.Text" xml:space="preserve">
|
||||
<value>Hosting Spaces Folder:</value>
|
||||
</data>
|
||||
|
|
|
@ -4,6 +4,33 @@
|
|||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label ID="lblSpacesFolder" runat="server" meta:resourcekey="lblSpacesFolder" Text="User Packages Folder:"></asp:Label>
|
||||
</td>
|
||||
<td width="100%"><asp:TextBox Runat="server" ID="txtFolder" Width="300px" CssClass="NormalTextBox"></asp:TextBox></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>
|
||||
<asp:Label ID="lblLocationDrive" runat="server" meta:resourcekey="lblLocationDrive" Text="Location Drive:"></asp:Label>
|
||||
</td>
|
||||
<td width="100%">
|
||||
<asp:TextBox runat="server" ID="txtLocationDrive" Width="50px" MaxLength="1" CssClass="NormalTextBox"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valLocationDrive" runat="server" ControlToValidate="txtLocationDrive"
|
||||
ErrorMessage="*"></asp:RequiredFieldValidator>
|
||||
|
||||
</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" 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>
|
||||
|
|
|
@ -44,16 +44,40 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//CO Changes
|
||||
if (!IsPostBack)
|
||||
{
|
||||
try
|
||||
{
|
||||
chkEnableHardQuota.Enabled = ES.Services.OperatingSystems.CheckFileServicesInstallation(PanelRequest.ServiceId);
|
||||
txtLocationDrive.Enabled = chkEnableHardQuota.Enabled;
|
||||
valLocationDrive.Enabled = chkEnableHardQuota.Enabled;
|
||||
if (!chkEnableHardQuota.Enabled)
|
||||
lblFileServiceInfo.Visible = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
//END
|
||||
}
|
||||
|
||||
public void BindSettings(StringDictionary settings)
|
||||
{
|
||||
txtFolder.Text = settings["UsersHome"];
|
||||
//CO Changes
|
||||
txtLocationDrive.Text = settings["LocationDrive"];
|
||||
chkEnableHardQuota.Checked = settings["EnableHardQuota"] == "true" ? true : false;
|
||||
//END
|
||||
}
|
||||
|
||||
public void SaveSettings(StringDictionary settings)
|
||||
{
|
||||
settings["UsersHome"] = txtFolder.Text;
|
||||
//CO Changes
|
||||
settings["LocationDrive"] = txtLocationDrive.Text;
|
||||
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
|
||||
//END
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.312
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -11,12 +10,6 @@
|
|||
namespace WebsitePanel.Portal.ProviderControls {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Windows2008_Settings class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated class.
|
||||
/// </remarks>
|
||||
public partial class Windows2008_Settings {
|
||||
|
||||
/// <summary>
|
||||
|
@ -36,5 +29,50 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtFolder;
|
||||
|
||||
/// <summary>
|
||||
/// lblLocationDrive 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 lblLocationDrive;
|
||||
|
||||
/// <summary>
|
||||
/// txtLocationDrive 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 txtLocationDrive;
|
||||
|
||||
/// <summary>
|
||||
/// valLocationDrive 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.RequiredFieldValidator valLocationDrive;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
<?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="lblLocationDrive.Text" xml:space="preserve">
|
||||
<value>Location Drive:</value>
|
||||
</data>
|
||||
<data name="lblSpacesFolder.Text" xml:space="preserve">
|
||||
<value>Hosting Spaces Folder:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -106,7 +106,7 @@
|
|||
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="PubProfileWizardCancelButton" />
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" EnableViewState="false" />
|
||||
<table style="width:100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<table style="width: 100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table cellpadding="7" border="0">
|
||||
|
@ -128,7 +128,7 @@
|
|||
</asp:Panel>
|
||||
<asp:Panel ID="switchToDedicatedIP" runat="server" Visible="false">
|
||||
<asp:Localize ID="locSelectIPAddress" runat="server" meta:resourcekey="locSelectIPAddress" Text="Select IP address:" />
|
||||
<asp:dropdownlist id="ddlIpAddresses" Runat="server" CssClass="NormalTextBox"></asp:dropdownlist>
|
||||
<asp:DropDownList ID="ddlIpAddresses" runat="server" CssClass="NormalTextBox"></asp:DropDownList>
|
||||
|
||||
<asp:LinkButton ID="cmdApplyDedicatedIP" meta:resourcekey="cmdApplyDedicatedIP" runat="server" Text="Apply" OnClick="cmdApplyDedicatedIP_Click"></asp:LinkButton>
|
||||
|
||||
|
@ -153,8 +153,7 @@
|
|||
Target="_blank"><%# Eval("DomainName") %></asp:HyperLink>
|
||||
<asp:ImageButton runat="server" SkinID="DeleteSmall" ID="cmdDeletePointer" CommandName='delete'
|
||||
CommandArgument='<%# Eval("DomainId") %>' meta:resourcekey="cmdDeletePointer"
|
||||
Visible='<%# !(bool)Eval("IsInstantAlias") %>' OnClientClick="return confirm('Remove pointer?');">
|
||||
</asp:ImageButton>
|
||||
Visible='<%# !(bool)Eval("IsInstantAlias") %>' OnClientClick="return confirm('Remove pointer?');"></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
@ -189,8 +188,7 @@
|
|||
<td colspan="2">
|
||||
<table width="100%" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<td class="Tabs">
|
||||
|
||||
<td class="Tabs">
|
||||
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="dlTabs_SelectedIndexChanged"
|
||||
RepeatLayout="Flow" DataKeyField="ViewId">
|
||||
<ItemStyle Wrap="False" />
|
||||
|
@ -280,8 +278,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="Normal">
|
||||
<asp:Button ID="btnInstallFrontPage" runat="server" meta:resourcekey="btnInstallFrontPage"
|
||||
Text="Install" CssClass="Button1" ValidationGroup="FrontPage" OnClick="btnInstallFrontPage_Click"
|
||||
|
@ -309,23 +306,28 @@
|
|||
<div style="padding: 20;">
|
||||
<asp:PlaceHolder runat="server" ID="PanelWDeploySitePublishingDisabled" Visible="false">
|
||||
<div class="NormalBold">
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingDisabled" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingDisabled" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="Normal">
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingEnablementHint" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingEnablementHint" />
|
||||
</div>
|
||||
<br />
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="PanelWDeployManagePublishingProfile" Visible="false">
|
||||
<div class="NormalBold">
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingEnabled" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeploySitePublishingEnabled" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="Normal">
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeployPublishingProfileUsageNotes" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="WDeployPublishingProfileUsageNotes" />
|
||||
</div>
|
||||
<br />
|
||||
<p>
|
||||
<asp:LinkButton runat="server" ID="WDeployDownloadPubProfileLink" Text="Download Publishing Profile for this web site"
|
||||
CommandName="DownloadProfile" OnCommand="WDeployDownloadPubProfileLink_Command" /> / <asp:LinkButton
|
||||
runat="server" ID="WDeployRebuildPubProfileLinkButton" Text="Re-build Publishing Profile for this web site" /></p>
|
||||
runat="server" ID="WDeployRebuildPubProfileLinkButton" Text="Re-build Publishing Profile for this web site" />
|
||||
</p>
|
||||
<br />
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="PanelWDeployPublishingCredentials" Visible="false">
|
||||
|
@ -413,18 +415,22 @@
|
|||
<div style="padding: 20;">
|
||||
<asp:PlaceHolder runat="server" ID="pnlWmSvcSiteDisabled" Visible="false">
|
||||
<div class="NormalBold">
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcSiteDisabled" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcSiteDisabled" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="Normal">
|
||||
<asp:Localize runat="server" meta:resourcekey="lclEnablementHint" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="lclEnablementHint" />
|
||||
</div>
|
||||
<br />
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="pnlWmSvcSiteEnabled" Visible="false">
|
||||
<div class="NormalBold">
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcSiteEnabled" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcSiteEnabled" />
|
||||
</div>
|
||||
<br />
|
||||
<div class="Normal">
|
||||
<asp:Localize runat="server" ID="lclWmSvcConnectionHint" meta:resourcekey="lclWmSvcConnectionHint" /></div>
|
||||
<asp:Localize runat="server" ID="lclWmSvcConnectionHint" meta:resourcekey="lclWmSvcConnectionHint" />
|
||||
</div>
|
||||
<br />
|
||||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="pnlWmcSvcManagement">
|
||||
|
@ -479,7 +485,8 @@
|
|||
</asp:PlaceHolder>
|
||||
<asp:PlaceHolder runat="server" ID="pnlNotInstalled" Visible="false">
|
||||
<div class="NormalBold">
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcNotInstalled" /></div>
|
||||
<asp:Localize runat="server" meta:resourcekey="lclWmSvcNotInstalled" />
|
||||
</div>
|
||||
</asp:PlaceHolder>
|
||||
</div>
|
||||
</asp:View>
|
||||
|
@ -497,7 +504,10 @@
|
|||
CssClass="Button1" OnClick="btnUpdate_Click" OnClientClick="ShowProgressDialog('Updating web site...');" />
|
||||
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" Text="Cancel"
|
||||
CssClass="Button1" CausesValidation="false" OnClick="btnCancel_Click" />
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
<asp:Button ID="btnDelete" runat="server" meta:resourcekey="btnDelete" Text="Delete"
|
||||
CssClass="Button1" CausesValidation="false" OnClientClick="return confirm('Delete this web site?');"
|
||||
OnClick="btnDelete_Click" />
|
||||
<asp:CheckBox ID="chkDeleteWebsiteDirectory" runat="server" Text="Delete Website Directory?" AutoPostBack="false" meta:resourcekey="chkDeleteWebsiteDirectory" />
|
||||
</div>
|
|
@ -913,7 +913,7 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
try
|
||||
{
|
||||
int result = ES.Services.WebServers.DeleteWebSite(PanelRequest.ItemID);
|
||||
int result = ES.Services.WebServers.DeleteWebSite(PanelRequest.ItemID, chkDeleteWebsiteDirectory.Checked);
|
||||
if (result < 0)
|
||||
{
|
||||
ShowResultMessage(result);
|
||||
|
|
|
@ -1073,5 +1073,14 @@ namespace WebsitePanel.Portal {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// chkDeleteWebsiteDirectory 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 chkDeleteWebsiteDirectory;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,6 +93,13 @@
|
|||
<Compile Include="..\..\..\VersionInfo.cs">
|
||||
<Link>Code\VersionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ApplyEnableHardQuotaFeature.ascx.cs">
|
||||
<DependentUpon>ApplyEnableHardQuotaFeature.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ApplyEnableHardQuotaFeature.ascx.designer.cs">
|
||||
<DependentUpon>ApplyEnableHardQuotaFeature.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AuditLog.ascx.cs">
|
||||
<DependentUpon>AuditLog.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -3811,6 +3818,7 @@
|
|||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />
|
||||
<Content Include="ExchangeServer\OrganizationDomainNames.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
|
||||
|
@ -4975,6 +4983,7 @@
|
|||
<Content Include="ExchangeServer\App_LocalResources\OrganizationAddDomainName.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<None Include="Resources\Windows2008_Settings.ascx.resx" />
|
||||
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -717,8 +717,8 @@
|
|||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>False</AutoAssignPort>
|
||||
<DevelopmentServerPort>9001</DevelopmentServerPort>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>58306</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost/WebPortal</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue