Web Console integration
This commit is contained in:
parent
d933862a05
commit
440af2bf77
25 changed files with 2260 additions and 409 deletions
|
@ -85,6 +85,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
allowedEngines.Add( new ShortHeliconZooEngine(){
|
||||
Name = (string)reader["QuotaName"],
|
||||
DisplayName= (string)reader["QuotaDescription"],
|
||||
Enabled = true
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -120,6 +122,21 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
public static bool IsWebCosoleEnabled(int serviceId)
|
||||
{
|
||||
HeliconZoo zooServer = new HeliconZoo();
|
||||
ServiceProviderProxy.Init(zooServer, serviceId);
|
||||
return zooServer.IsWebCosoleEnabled();
|
||||
}
|
||||
|
||||
public static void SetWebCosoleEnabled(int serviceId, bool enabled)
|
||||
{
|
||||
HeliconZoo zooServer = new HeliconZoo();
|
||||
ServiceProviderProxy.Init(zooServer, serviceId);
|
||||
zooServer.SetWebCosoleEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
#region private helpers
|
||||
private static void UpdateQuotas(int serviceId, HeliconZooEngine[] userEngines)
|
||||
{
|
||||
|
@ -183,7 +200,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DataProvider.AddHeliconZooQuota(groupId, quotaId,
|
||||
HeliconZooQuotaPrefix+engine.name,
|
||||
engine.displayName,
|
||||
order++);
|
||||
existingQuotas.Count + order++);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3404,7 +3404,83 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Helicon Zoo
|
||||
|
||||
public static List<WebVirtualDirectory> GetZooApplications(int siteItemId)
|
||||
{
|
||||
List<WebVirtualDirectory> dirs = new List<WebVirtualDirectory>();
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return dirs;
|
||||
|
||||
// truncate home folders
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
WebVirtualDirectory[] vdirs = web.GetZooApplications(siteItem.SiteId);
|
||||
|
||||
foreach (WebVirtualDirectory vdir in vdirs)
|
||||
{
|
||||
vdir.ContentPath = FilesController.GetVirtualPackagePath(siteItem.PackageId, vdir.ContentPath);
|
||||
dirs.Add(vdir);
|
||||
}
|
||||
|
||||
return dirs;
|
||||
}
|
||||
|
||||
public static StringResultObject SetZooEnvironmentVariable(int siteItemId, string appName, string envName, string envValue)
|
||||
{
|
||||
StringResultObject result = new StringResultObject {IsSuccess = false};
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooEnvironmentVariable(siteItem.SiteId, appName, envName, envValue);
|
||||
}
|
||||
|
||||
public static StringResultObject SetZooConsoleEnabled(int siteItemId, string appName)
|
||||
{
|
||||
StringResultObject result = new StringResultObject { IsSuccess = false };
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooConsoleEnabled(siteItem.SiteId, appName);
|
||||
}
|
||||
|
||||
|
||||
public static StringResultObject SetZooConsoleDisabled(int siteItemId, string appName)
|
||||
{
|
||||
StringResultObject result = new StringResultObject { IsSuccess = false };
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooConsoleDisabled(siteItem.SiteId, appName);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WebManagement Access
|
||||
|
||||
public static ResultObject GrantWebManagementAccess(int siteItemId, string accountName, string accountPassword)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue