HyperV - faster loading VPS list

This commit is contained in:
Alexander Trofimov 2015-05-26 09:35:55 +03:00
parent 31c3cd7c80
commit 60bc7505ca
4 changed files with 24 additions and 1 deletions

View file

@ -189,4 +189,7 @@
<data name="gvReplication.HeaderText" xml:space="preserve">
<value>Replication status</value>
</data>
<data name="btnReplicaStates.Text" xml:space="preserve">
<value>Show Replication Statuses</value>
</data>
</root>

View file

@ -25,6 +25,11 @@
<div class="Right">
<wsp:SearchBox ID="searchBox" runat="server" />
</div>
<div class="Right" style="margin-right: 20px">
<asp:Button ID="btnReplicaStates" runat="server" meta:resourcekey="btnReplicaStates"
Text="Show Replication Statuses" CssClass="Button1" CausesValidation="False"
OnClick="btnReplicaStates_Click" />
</div>
</div>
<asp:GridView ID="gvServers" runat="server" AutoGenerateColumns="False" EnableViewState="true"

View file

@ -54,7 +54,8 @@ namespace WebsitePanel.Portal.VPS2012
gvServers.Columns[4].Visible = !isUserSelected;
// replication
gvServers.Columns[5].Visible = PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED);
gvServers.Columns[5].Visible = false;
btnReplicaStates.Visible = PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED);
// check package quotas
bool manageAllowed = VirtualMachines2012Helper.IsVirtualMachineManagementAllowed(PanelSecurity.PackageId);
@ -119,6 +120,11 @@ namespace WebsitePanel.Portal.VPS2012
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "vdc_import_server"));
}
protected void btnReplicaStates_Click(object sender, EventArgs e)
{
gvServers.Columns[5].Visible = PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS2012_REPLICATION_ENABLED);
}
protected void gvServers_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")

View file

@ -48,6 +48,15 @@ namespace WebsitePanel.Portal.VPS2012 {
/// </remarks>
protected global::WebsitePanel.Portal.SearchBox searchBox;
/// <summary>
/// btnReplicaStates 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 btnReplicaStates;
/// <summary>
/// gvServers control.
/// </summary>