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)
|
||||
|
|
|
@ -97,5 +97,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
HeliconZooController.SetEnabledEnginesForSite(siteId, packageId, engines);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public bool IsWebCosoleEnabled(int serviceId)
|
||||
{
|
||||
return HeliconZooController.IsWebCosoleEnabled(serviceId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void SetWebCosoleEnabled(int serviceId, bool enabled)
|
||||
{
|
||||
HeliconZooController.SetWebCosoleEnabled(serviceId, enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return WebAppGalleryController.GetGalleryApplications(packageId, categoryId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationsResult GetInstaledApplications(int packageId, string categoryId)
|
||||
{
|
||||
WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId);
|
||||
return WebAppGalleryController.GetGalleryApplications(packageId, categoryId);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern)
|
||||
{
|
||||
|
|
|
@ -443,6 +443,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Helicon Ape Users
|
||||
[WebMethod]
|
||||
public HtaccessUser[] GetHeliconApeUsers(int siteItemId)
|
||||
|
@ -495,6 +497,38 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Helicon Zoo
|
||||
|
||||
[WebMethod]
|
||||
public List<WebVirtualDirectory> GetZooApplications(int siteItemId)
|
||||
{
|
||||
return WebServerController.GetZooApplications(siteItemId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public StringResultObject SetZooEnvironmentVariable(int siteItemId, string appName, string envName, string envValue)
|
||||
{
|
||||
return WebServerController.SetZooEnvironmentVariable(siteItemId, appName, envName, envValue);
|
||||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public StringResultObject SetZooConsoleEnabled(int siteItemId, string appName)
|
||||
{
|
||||
return WebServerController.SetZooConsoleEnabled(siteItemId, appName);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public StringResultObject SetZooConsoleDisabled(int siteItemId, string appName)
|
||||
{
|
||||
return WebServerController.SetZooConsoleDisabled(siteItemId, appName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region WebManagement Access
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue