Add Quota for Hyper-V replication
This commit is contained in:
parent
bf3ec75c08
commit
054241f84e
13 changed files with 321 additions and 161 deletions
|
@ -4121,6 +4121,9 @@
|
|||
<data name="Error.VPS_REQUIRED" xml:space="preserve">
|
||||
<value>Please fill required fields</value>
|
||||
</data>
|
||||
<data name="Error.VPS_QUOTA_REPLICATION_ENABLED" xml:space="preserve">
|
||||
<value>Replications is not allowed in the hosting plan</value>
|
||||
</data>
|
||||
|
||||
<data name="VPS.VPS_JOB_FAILED_ERROR" xml:space="preserve">
|
||||
<value>Job execution failed with the following code: {1}</value>
|
||||
|
@ -5244,6 +5247,9 @@
|
|||
<data name="Quota.VPS2012.StartShutdownAllowed" xml:space="preserve">
|
||||
<value>Allow user to Start, Turn off VPS</value>
|
||||
</data>
|
||||
<data name="Quota.VPS2012.ReplicationEnabled" xml:space="preserve">
|
||||
<value>Allow user to Replication</value>
|
||||
</data>
|
||||
<data name="Error.CreateCheckPointError" xml:space="preserve">
|
||||
<value>Error creating CheckPoint</value>
|
||||
</data>
|
||||
|
|
|
@ -134,7 +134,12 @@ namespace WebsitePanel.Portal.VPS2012.UserControls
|
|||
tabsList.Add(CreateTab("vps_network", "Tab.Network"));
|
||||
|
||||
if (VirtualMachines2012Helper.IsReplicationEnabled(PanelSecurity.PackageId) && !createError)
|
||||
tabsList.Add(CreateTab("vps_replication", "Tab.Replication"));
|
||||
{
|
||||
if (PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED))
|
||||
{
|
||||
tabsList.Add(CreateTab("vps_replication", "Tab.Replication"));
|
||||
}
|
||||
}
|
||||
|
||||
//tabsList.Add(CreateTab("vps_permissions", "Tab.Permissions"));
|
||||
//tabsList.Add(CreateTab("vps_tools", "Tab.Tools"));
|
||||
|
|
|
@ -52,7 +52,9 @@ namespace WebsitePanel.Portal.VPS2012
|
|||
gvServers.Columns[4].Visible = !isUserSelected;
|
||||
|
||||
// replication
|
||||
gvServers.Columns[5].Visible = VirtualMachines2012Helper.IsReplicationEnabled(PanelSecurity.PackageId);
|
||||
gvServers.Columns[5].Visible =
|
||||
PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED) &&
|
||||
VirtualMachines2012Helper.IsReplicationEnabled(PanelSecurity.PackageId);
|
||||
|
||||
// check package quotas
|
||||
bool manageAllowed = VirtualMachines2012Helper.IsVirtualMachineManagementAllowed(PanelSecurity.PackageId);
|
||||
|
|
|
@ -33,7 +33,8 @@ using System.Collections.Generic;
|
|||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.Virtualization;
|
||||
|
||||
namespace WebsitePanel.Portal.VPS2012
|
||||
|
@ -46,6 +47,13 @@ namespace WebsitePanel.Portal.VPS2012
|
|||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED))
|
||||
{
|
||||
ShowErrorMessage("VPS_QUOTA_REPLICATION_ENABLED");
|
||||
ReplicationPanel.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Bind();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue