Zoo: try to enable engines on site creation
This commit is contained in:
parent
2c6f0bdf19
commit
d73ca06cb1
1 changed files with 23 additions and 0 deletions
|
@ -38,6 +38,7 @@ using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
using WebsitePanel.Providers.HeliconZoo;
|
||||||
using WebsitePanel.Providers.Web;
|
using WebsitePanel.Providers.Web;
|
||||||
using WebsitePanel.Providers.DNS;
|
using WebsitePanel.Providers.DNS;
|
||||||
using OS = WebsitePanel.Providers.OS;
|
using OS = WebsitePanel.Providers.OS;
|
||||||
|
@ -470,6 +471,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TryEnableHeliconZooEngines(site.SiteId, site.PackageId);
|
||||||
|
|
||||||
TaskManager.ItemId = siteItemId;
|
TaskManager.ItemId = siteItemId;
|
||||||
|
|
||||||
return siteItemId;
|
return siteItemId;
|
||||||
|
@ -3469,6 +3472,26 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return web.SetZooConsoleDisabled(siteItem.SiteId, appName);
|
return web.SetZooConsoleDisabled(siteItem.SiteId, appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void TryEnableHeliconZooEngines(string siteId, int packageId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ShortHeliconZooEngine[] allowedEngines = HeliconZooController.GetAllowedHeliconZooQuotasForPackage(packageId);
|
||||||
|
string[] engineNames = new string[allowedEngines.Length];
|
||||||
|
int i = 0;
|
||||||
|
foreach (ShortHeliconZooEngine engine in allowedEngines)
|
||||||
|
{
|
||||||
|
engineNames[i] = engine.Name.Replace(HeliconZooController.HeliconZooQuotaPrefix, "");
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
HeliconZooController.SetEnabledEnginesForSite(siteId, packageId, engineNames);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning("Error on enabling zoo engines for site '{0}': {1}", siteId, e.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region WebManagement Access
|
#region WebManagement Access
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue