Merge pull request #1192 from MihaelaStoica/CAR-2184

CP-19086: Improvements to the PVS cache UI
This commit is contained in:
mcintyre94 2016-10-05 16:55:35 +01:00 committed by GitHub
commit e363dc0bef
23 changed files with 526 additions and 813 deletions

View File

@ -1,36 +0,0 @@
namespace XenAdmin.Controls.DataGridViewEx
{
partial class CollapsingPvsSiteServerDataGridView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -1,99 +0,0 @@
/* Copyright (c) Citrix Systems Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.ComponentModel;
using System.Windows.Forms;
namespace XenAdmin.Controls.DataGridViewEx
{
public partial class CollapsingPvsSiteServerDataGridView : DataGridViewEx
{
public CollapsingPvsSiteServerDataGridView()
{
InitializeComponent();
}
public CollapsingPvsSiteServerDataGridView(IContainer container)
{
container.Add(this);
InitializeComponent();
}
public bool Updating { get; set; }
private const int expansionColumnIndex = 0;
protected override void OnCellContentClick(DataGridViewCellEventArgs e)
{
base.OnCellContentClick(e);
if (e.ColumnIndex == expansionColumnIndex)
ExpandCollapseClicked(e.RowIndex);
}
public void ExpandCollapseClicked(int rowIndex)
{
var siteRow = (CollapsingPvsSiteServerDataGridViewRow)Rows[rowIndex];
if (siteRow.UnderlyingSite != null)
{
for (int i = rowIndex + 1; i < Rows.Count; i++)
{
var row = (CollapsingPvsSiteServerDataGridViewRow)Rows[i];
if (row.IsSiteRow)
break;
row.Visible = !row.Visible;
if (row.Visible)
siteRow.SetCollapseIcon();
else
siteRow.SetExpandIcon();
}
}
}
protected override void OnKeyDown(KeyEventArgs e)
{
if (CurrentCell != null && CurrentCell.ColumnIndex == expansionColumnIndex)
{
if (e.KeyCode == Keys.Space)
{
ExpandCollapseClicked(CurrentCell.RowIndex);
e.Handled = true;
}
}
base.OnKeyDown(e);
}
}
}

View File

@ -1,140 +0,0 @@
/* Copyright (c) Citrix Systems Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System.Windows.Forms;
using XenAdmin.Properties;
using XenAPI;
namespace XenAdmin.Controls.DataGridViewEx
{
public class CollapsingPvsSiteServerDataGridViewRow : DataGridViewExRow
{
protected DataGridViewImageCell expansionCell;
protected DataGridViewTextBoxCell siteCell;
protected DataGridViewTextBoxCell ipAddressesCell;
protected DataGridViewTextBoxCell firstPortCell;
protected DataGridViewTextBoxCell lastPortCell;
protected bool isPvsSiteRow;
public CollapsingPvsSiteServerDataGridViewRow(PVS_site site)
{
Tag = site;
isPvsSiteRow = true;
SetupCells();
}
public CollapsingPvsSiteServerDataGridViewRow(PVS_server server)
{
Tag = server;
isPvsSiteRow = false;
SetupCells();
}
private void SetupCells()
{
expansionCell = new DataGridViewImageCell();
siteCell = new DataGridViewTextBoxCell();
ipAddressesCell = new DataGridViewTextBoxCell();
firstPortCell = new DataGridViewTextBoxCell();
lastPortCell = new DataGridViewTextBoxCell();
Cells.Add(expansionCell);
Cells.Add(siteCell);
Cells.Add(ipAddressesCell);
Cells.Add(firstPortCell);
Cells.Add(lastPortCell);
UpdateDetails();
}
protected void UpdateDetails()
{
if (isPvsSiteRow)
{
PVS_site site = (PVS_site)Tag;
if (site.servers.Count == 0)
SetNoIcon();
else
SetCollapseIcon();
siteCell.Value = site.Name;
}
else
{
PVS_server server = (PVS_server)Tag;
SetNoIcon();
ipAddressesCell.Value = string.Join(", ", server.addresses);
firstPortCell.Value = server.first_port;
lastPortCell.Value = server.last_port;
}
}
public bool IsSiteRow
{
get { return isPvsSiteRow; }
}
public bool IsServerRow
{
get { return !isPvsSiteRow; }
}
public PVS_site UnderlyingSite
{
get { return Tag as PVS_site; }
}
public PVS_server UnderlyingServer
{
get { return Tag as PVS_server; }
}
public void SetCollapseIcon()
{
expansionCell.Value = Resources.tree_minus;
}
public void SetExpandIcon()
{
expansionCell.Value = Resources.tree_plus;
}
public void SetNoIcon()
{
expansionCell.Value = null;
}
}
}

View File

@ -77,7 +77,12 @@ namespace XenAdmin.Controls
{
comboBoxCacheSr.Items.Clear();
// add Memeory SR first; if no memory SR found, add a placeholder (we will create the memory SR in ConfigurePvsCacheAction)
// add the "Not configured" item first
var notConfiguredItem = new ToStringWrapper<SR>(null, Messages.PVS_CACHE_NOT_CONFIGURED);
comboBoxCacheSr.Items.Add(notConfiguredItem);
comboBoxCacheSr.SelectedItem = notConfiguredItem;
// add Memeory SR; if no memory SR found, add a placeholder (we will create the memory SR in ConfigurePvsCacheAction)
var memorySr = Host.Connection.Cache.SRs.FirstOrDefault(s => s.GetSRType(false) == SR.SRTypes.tmpfs && s.CanBeSeenFrom(Host));
if (memorySr == null)
{
@ -162,7 +167,7 @@ namespace XenAdmin.Controls
{
get
{
if (OrigPvsCacheStorage == null)
if (OrigPvsCacheStorage == null || CacheSr == null)
return true;
return OrigPvsCacheStorage.SR.opaque_ref != CacheSr.opaque_ref || origCacheSizeGb != numericUpDownCacheSize.Value;
}
@ -179,7 +184,7 @@ namespace XenAdmin.Controls
var selectedSr = CacheSr;
if (selectedSr != null)
{
var maxSize = (decimal)Util.ToGB(selectedSr.GetSRType(false) == SR.SRTypes.tmpfs ? Host.dom0_memory : selectedSr.FreeSpace, 1, RoundingBehaviour.Down); ;
var maxSize = (decimal)Util.ToGB(selectedSr.GetSRType(false) == SR.SRTypes.tmpfs ? Host.dom0_memory_extra : selectedSr.FreeSpace, 1, RoundingBehaviour.Down); ;
if (maxSize != numericUpDownCacheSize.Maximum)
SetupCacheSizeSpinner(numericUpDownCacheSize.Value, numericUpDownCacheSize.Minimum, maxSize);
}

View File

@ -116,6 +116,7 @@ namespace XenAdmin.Dialogs
resources.ApplyResources(this, "$this");
this.Controls.Add(this.BlurbLabel);
this.Name = "PvsCacheConfigurationDialog";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PvsCacheConfigurationDialog_FormClosed);
this.Controls.SetChildIndex(this.okButton, 0);
this.Controls.SetChildIndex(this.cancelButton, 0);
this.Controls.SetChildIndex(this.splitContainer, 0);

View File

@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
@ -55,6 +56,7 @@ namespace XenAdmin.Dialogs
Text = string.Format(Messages.PVS_CACHE_CONFIG_DIALOG_TITLE, connection.Name);
Rebuild();
this.connection.Cache.RegisterCollectionChanged<PVS_site>(PvsSiteCollectionChanged);
}
protected override string GetTabTitle(VerticalTabs.VerticalTab verticalTab)
@ -123,23 +125,61 @@ namespace XenAdmin.Dialogs
verticalTabs.Items.Add(editPage);
}
private List<PVS_site> deletedSites = new List<PVS_site>();
void DeletePage(PvsCacheConfigurationPage page)
{
// try to delete the site (asks user for confirmation), also passing the site name, in case it has changed
if (!DeleteSite(page.PvsSite, page.Text))
return;
int selectedIndex = verticalTabs.SelectedIndex;
verticalTabs.Items.Remove(page);
verticalTabs.SelectedIndex = selectedIndex < verticalTabs.Items.Count - 1 ? selectedIndex : verticalTabs.Items.Count - 1;
page.Changed -= SomethingChangedOnPage;
page.DeleteButtonClicked -= DeleteButtonClickedOnPage;
if (page.PvsSite != null)
deletedSites.Add(page.PvsSite);
ContentPanel.Controls.Remove(page);
RefreshButtons();
ResizeVerticalTabs(verticalTabs.Items.Count);
}
private bool DeleteSite(PVS_site site, string siteName)
{
// We cannot delete the site if there are running proxies
if (site != null)
{
var pvsProxies = connection.Cache.PVS_proxies.Where(s => s.site.opaque_ref == site.opaque_ref).ToList();
if (pvsProxies.Count > 0)
{
using (var dlg =
new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Warning, Messages.PVS_SITE_CANNOT_BE_REMOVED, Messages.XENCENTER)))
{
dlg.ShowDialog(Parent);
}
return false;
}
}
// show confirmation dialog
DialogResult dialogResult;
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning, string.Format(Messages.CONFIRM_DELETE_PVS_SITE, siteName), Messages.XENCENTER),
ThreeButtonDialog.ButtonOK,
ThreeButtonDialog.ButtonCancel))
{
dialogResult = dlg.ShowDialog(Parent);
}
if (dialogResult != DialogResult.OK)
return false;
// if it is a newly added site, then there's noting we need to do here (it does not exist on the server yet)
if (site == null)
return true;
// delete existing site
var action = new DeletePvsSiteAction(site);
new ActionProgressDialog(action, ProgressBarStyle.Blocks).ShowDialog(this);
return action.Succeeded;
}
private void ResizeVerticalTabs(int itemCount)
{
int maxHeight = splitContainer.Panel1.Height - AddButton.Height;
@ -266,9 +306,7 @@ namespace XenAdmin.Dialogs
private void okButton_Click(object sender, EventArgs e)
{
List<AsyncAction> actions = GetActions();
actions.AddRange(deletedSites.Select(site => new DeletePvsSiteAction(site)));
if (actions.Count == 0)
return;
@ -298,5 +336,25 @@ namespace XenAdmin.Dialogs
return actions;
}
private void PvsSiteCollectionChanged(object sender, CollectionChangeEventArgs e)
{
if (e.Action == CollectionChangeAction.Add)
{
PVS_site addedSite = e.Element as PVS_site;
Program.Invoke(this, () =>
{
ResizeVerticalTabs(verticalTabs.Items.Count + 1);
NewPage(addedSite);
});
}
}
private void PvsCacheConfigurationDialog_FormClosed(object sender, FormClosedEventArgs e)
{
this.connection.Cache.DeregisterCollectionChanged<PVS_site>(PvsSiteCollectionChanged);
}
}
}

View File

@ -34,6 +34,7 @@ namespace XenAdmin.Dialogs
this.label1 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.viewPvsServersButton = new System.Windows.Forms.Button();
this.hostsPanel = new XenAdmin.Controls.FlickerFreePanel();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
@ -41,17 +42,17 @@ namespace XenAdmin.Dialogs
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.deleteButton, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.deleteButton, 3, 3);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label7, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.textBox1, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.hostsPanel, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.viewPvsServersButton, 1, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// deleteButton
//
resources.ApplyResources(this.deleteButton, "deleteButton");
this.tableLayoutPanel1.SetColumnSpan(this.deleteButton, 2);
this.deleteButton.Image = global::XenAdmin.Properties.Resources._000_RemoveSite_h32bit_16;
this.deleteButton.Name = "deleteButton";
this.deleteButton.UseVisualStyleBackColor = true;
@ -60,7 +61,7 @@ namespace XenAdmin.Dialogs
// label1
//
resources.ApplyResources(this.label1, "label1");
this.tableLayoutPanel1.SetColumnSpan(this.label1, 2);
this.tableLayoutPanel1.SetColumnSpan(this.label1, 3);
this.label1.Name = "label1";
//
// label7
@ -70,16 +71,24 @@ namespace XenAdmin.Dialogs
//
// textBox1
//
this.tableLayoutPanel1.SetColumnSpan(this.textBox1, 2);
resources.ApplyResources(this.textBox1, "textBox1");
this.textBox1.Name = "textBox1";
this.textBox1.TextChanged += new System.EventHandler(this.SomethingChanged);
//
// viewPvsServersButton
//
resources.ApplyResources(this.viewPvsServersButton, "viewPvsServersButton");
this.viewPvsServersButton.Name = "viewPvsServersButton";
this.viewPvsServersButton.UseVisualStyleBackColor = true;
this.viewPvsServersButton.Click += new System.EventHandler(this.viewServersButton_Click);
//
// hostsPanel
//
resources.ApplyResources(this.hostsPanel, "hostsPanel");
this.hostsPanel.BorderColor = System.Drawing.Color.Black;
this.hostsPanel.BorderWidth = 1;
this.tableLayoutPanel1.SetColumnSpan(this.hostsPanel, 2);
resources.ApplyResources(this.hostsPanel, "hostsPanel");
this.tableLayoutPanel1.SetColumnSpan(this.hostsPanel, 3);
this.hostsPanel.Name = "hostsPanel";
//
// PvsCacheConfigurationPage
@ -103,5 +112,6 @@ namespace XenAdmin.Dialogs
private Controls.FlickerFreePanel hostsPanel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button deleteButton;
public System.Windows.Forms.Button viewPvsServersButton;
}
}

View File

@ -82,8 +82,9 @@ namespace XenAdmin.Dialogs
// Generate a unique suggested name for the new site
textBox1.Text = Helpers.MakeUniqueName(Messages.PVS_SITE_NAME, takenNames);
}
LoadServers();
viewPvsServersButton.Enabled = PvsSite != null && PvsSite.servers.Count > 0;
}
public bool ValidToSave
@ -148,7 +149,7 @@ namespace XenAdmin.Dialogs
{
site = PvsSite != null ? new XenRef<PVS_site>(PvsSite) : null,
host = new XenRef<Host>(row.Host),
SR = new XenRef<SR>(row.CacheSr),
SR = row.CacheSr != null ? new XenRef<SR>(row.CacheSr) : null,
size = row.CacheSize
};
@ -187,5 +188,13 @@ namespace XenAdmin.Dialogs
if (DeleteButtonClicked != null)
DeleteButtonClicked(this, e);
}
private void viewServersButton_Click(object sender, EventArgs e)
{
if (PvsSite == null)
return;
using (var dialog = new PvsSiteDialog(PvsSite))
dialog.ShowDialog(this);
}
}
}

View File

@ -119,7 +119,7 @@
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
<value>3</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="deleteButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
@ -148,7 +148,7 @@
<value>128, 23</value>
</data>
<data name="deleteButton.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>6</value>
</data>
<data name="deleteButton.Text" xml:space="preserve">
<value>&amp;Remove PVS Site</value>
@ -247,7 +247,7 @@
<value>69, 13</value>
</data>
<data name="textBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>354, 20</value>
<value>368, 20</value>
</data>
<data name="textBox1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -264,6 +264,9 @@
<data name="&gt;&gt;textBox1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="hostsPanel.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="hostsPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -288,6 +291,42 @@
<data name="&gt;&gt;hostsPanel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="viewPvsServersButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="viewPvsServersButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="viewPvsServersButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="viewPvsServersButton.Location" type="System.Drawing.Point, System.Drawing">
<value>175, 330</value>
</data>
<data name="viewPvsServersButton.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 0, 5, 0</value>
</data>
<data name="viewPvsServersButton.Size" type="System.Drawing.Size, System.Drawing">
<value>128, 23</value>
</data>
<data name="viewPvsServersButton.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="viewPvsServersButton.Text" xml:space="preserve">
<value>&amp;View PVS Servers...</value>
</data>
<data name="&gt;&gt;viewPvsServersButton.Name" xml:space="preserve">
<value>viewPvsServersButton</value>
</data>
<data name="&gt;&gt;viewPvsServersButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;viewPvsServersButton.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;viewPvsServersButton.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -319,7 +358,7 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="deleteButton" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label1" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;Control Name="label7" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="textBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="hostsPanel" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="deleteButton" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="label7" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="textBox1" Row="0" RowSpan="1" Column="1" ColumnSpan="2" /&gt;&lt;Control Name="hostsPanel" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /&gt;&lt;Control Name="viewPvsServersButton" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>

View File

@ -28,21 +28,17 @@ namespace XenAdmin.Dialogs
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PvsSiteDialog));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.closeButton = new System.Windows.Forms.Button();
this.bottomPanel = new System.Windows.Forms.Panel();
this.mainPanel = new System.Windows.Forms.Panel();
this.gridView = new XenAdmin.Controls.DataGridViewEx.CollapsingPvsSiteServerDataGridView(this.components);
this.expansionColumn = new System.Windows.Forms.DataGridViewImageColumn();
this.siteColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gridView = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.bottomPanel = new System.Windows.Forms.Panel();
this.ipAddressesColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.firstPortColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lastPortColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bottomPanel.SuspendLayout();
this.mainPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
this.bottomPanel.SuspendLayout();
this.SuspendLayout();
//
// closeButton
@ -53,12 +49,6 @@ namespace XenAdmin.Dialogs
this.closeButton.UseVisualStyleBackColor = true;
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
//
// bottomPanel
//
this.bottomPanel.Controls.Add(this.closeButton);
resources.ApplyResources(this.bottomPanel, "bottomPanel");
this.bottomPanel.Name = "bottomPanel";
//
// mainPanel
//
this.mainPanel.Controls.Add(this.gridView);
@ -71,64 +61,42 @@ namespace XenAdmin.Dialogs
this.gridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.gridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.gridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.expansionColumn,
this.siteColumn,
this.ipAddressesColumn,
this.firstPortColumn,
this.lastPortColumn});
resources.ApplyResources(this.gridView, "gridView");
this.gridView.Name = "gridView";
this.gridView.ReadOnly = true;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 9F);
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.gridView.Updating = false;
//
// expansionColumn
// bottomPanel
//
this.expansionColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.expansionColumn.FillWeight = 16.66667F;
resources.ApplyResources(this.expansionColumn, "expansionColumn");
this.expansionColumn.Name = "expansionColumn";
this.expansionColumn.ReadOnly = true;
this.expansionColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// siteColumn
//
this.siteColumn.FillWeight = 108.4123F;
resources.ApplyResources(this.siteColumn, "siteColumn");
this.siteColumn.Name = "siteColumn";
this.siteColumn.ReadOnly = true;
this.siteColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.bottomPanel.Controls.Add(this.closeButton);
resources.ApplyResources(this.bottomPanel, "bottomPanel");
this.bottomPanel.Name = "bottomPanel";
//
// ipAddressesColumn
//
this.ipAddressesColumn.FillWeight = 172.9413F;
this.ipAddressesColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ipAddressesColumn.FillWeight = 105.6863F;
resources.ApplyResources(this.ipAddressesColumn, "ipAddressesColumn");
this.ipAddressesColumn.Name = "ipAddressesColumn";
this.ipAddressesColumn.ReadOnly = true;
this.ipAddressesColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// firstPortColumn
//
this.firstPortColumn.FillWeight = 100.9122F;
this.firstPortColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.firstPortColumn.FillWeight = 173.6275F;
resources.ApplyResources(this.firstPortColumn, "firstPortColumn");
this.firstPortColumn.Name = "firstPortColumn";
this.firstPortColumn.ReadOnly = true;
this.firstPortColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// lastPortColumn
//
this.lastPortColumn.FillWeight = 101.0676F;
this.lastPortColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.lastPortColumn.FillWeight = 173.6275F;
resources.ApplyResources(this.lastPortColumn, "lastPortColumn");
this.lastPortColumn.Name = "lastPortColumn";
this.lastPortColumn.ReadOnly = true;
this.lastPortColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// PvsSiteDialog
//
@ -143,9 +111,9 @@ namespace XenAdmin.Dialogs
this.MinimizeBox = true;
this.Name = "PvsSiteDialog";
this.ShowInTaskbar = true;
this.bottomPanel.ResumeLayout(false);
this.mainPanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
this.bottomPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -154,9 +122,7 @@ namespace XenAdmin.Dialogs
private System.Windows.Forms.Button closeButton;
private System.Windows.Forms.Panel bottomPanel;
private System.Windows.Forms.Panel mainPanel;
private Controls.DataGridViewEx.CollapsingPvsSiteServerDataGridView gridView;
private System.Windows.Forms.DataGridViewImageColumn expansionColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn siteColumn;
private Controls.DataGridViewEx.DataGridViewEx gridView;
private System.Windows.Forms.DataGridViewTextBoxColumn ipAddressesColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn firstPortColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lastPortColumn;

View File

@ -30,27 +30,28 @@
*/
using System;
using System.Linq;
using System.ComponentModel;
using XenAdmin.Network;
using XenAdmin.Controls.DataGridViewEx;
using System.Windows.Forms;
using XenAPI;
namespace XenAdmin.Dialogs
{
public partial class PvsSiteDialog : XenDialogBase
{
private readonly PVS_site pvsSite;
/// <summary>
/// Creates a dialog for viewing the PVS sites and PVS servers on a particular connection.
/// Creates a dialog for viewing the PVS servers on a particular site.
/// </summary>
/// <param name="_connection">May not be null.</param>
public PvsSiteDialog(IXenConnection _connection)
/// <param name="site">May not be null.</param>
public PvsSiteDialog(PVS_site site)
{
System.Diagnostics.Trace.Assert(_connection != null);
connection = _connection;
System.Diagnostics.Trace.Assert(site != null);
connection = site.Connection;
pvsSite = site;
InitializeComponent();
Text = string.Format(Messages.PVS_SITE_DIALOG_TITLE, this.connection.Name);
Text = string.Format(Messages.PVS_SITE_DIALOG_TITLE, pvsSite.Name.Ellipsise(50));
System.Diagnostics.Trace.Assert(gridView.Columns.Count > 0);
gridView.Columns[0].DefaultCellStyle.NullValue = null;
@ -62,21 +63,14 @@ namespace XenAdmin.Dialogs
private void RegisterEventHandlers()
{
UnregisterEventHandlers();
connection.Cache.RegisterBatchCollectionChanged<PVS_site>(PvsSiteBatchCollectionChanged);
connection.Cache.RegisterBatchCollectionChanged<PVS_server>(PvsServerBatchCollectionChanged);
}
private void UnregisterEventHandlers()
{
connection.Cache.DeregisterBatchCollectionChanged<PVS_site>(PvsSiteBatchCollectionChanged);
connection.Cache.DeregisterBatchCollectionChanged<PVS_server>(PvsServerBatchCollectionChanged);
}
private void PvsSiteBatchCollectionChanged(object sender, EventArgs e)
{
Program.Invoke(this, Rebuild);
}
private void PvsServerBatchCollectionChanged(object sender, EventArgs e)
{
Program.Invoke(this, Rebuild);
@ -98,19 +92,10 @@ namespace XenAdmin.Dialogs
gridView.SuspendLayout();
gridView.Rows.Clear();
var pvsSites = connection.Cache.PVS_sites.ToList();
pvsSites.Sort();
foreach (var pvsSite in pvsSites)
foreach (var pvsServer in connection.ResolveAll(pvsSite.servers))
{
var siteRow = new CollapsingPvsSiteServerDataGridViewRow(pvsSite);
gridView.Rows.Add(siteRow);
foreach (var pvsServer in connection.ResolveAll(pvsSite.servers))
{
var serverRow = new CollapsingPvsSiteServerDataGridViewRow(pvsServer);
gridView.Rows.Add(serverRow);
}
var serverRow = NewPvsServerRow(pvsServer);
gridView.Rows.Add(serverRow);
}
}
finally
@ -119,6 +104,21 @@ namespace XenAdmin.Dialogs
}
}
private DataGridViewRow NewPvsServerRow(PVS_server pvsServer)
{
var ipAddressesCell = new DataGridViewTextBoxCell();
var firstPortCell = new DataGridViewTextBoxCell();
var lastPortCell = new DataGridViewTextBoxCell();
ipAddressesCell.Value = string.Join(Messages.LIST_SEPARATOR, pvsServer.addresses);
firstPortCell.Value = pvsServer.first_port;
lastPortCell.Value = pvsServer.last_port;
var newRow = new DataGridViewRow { Tag = pvsSite };
newRow.Cells.AddRange(ipAddressesCell, firstPortCell, lastPortCell);
return newRow;
}
private void closeButton_Click(object sender, EventArgs e)
{
Close();

View File

@ -153,54 +153,6 @@
<data name="&gt;&gt;closeButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="bottomPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="bottomPanel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="bottomPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 325</value>
</data>
<data name="bottomPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>602, 29</value>
</data>
<data name="bottomPanel.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;bottomPanel.Name" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;bottomPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bottomPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bottomPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="expansionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="expansionColumn.HeaderText" xml:space="preserve">
<value />
</data>
<data name="expansionColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="expansionColumn.Width" type="System.Int32, mscorlib">
<value>20</value>
</data>
<metadata name="siteColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="siteColumn.HeaderText" xml:space="preserve">
<value>PVS Site</value>
</data>
<data name="siteColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>65</value>
</data>
<metadata name="ipAddressesColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -219,6 +171,9 @@
<data name="firstPortColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>60</value>
</data>
<data name="firstPortColumn.Width" type="System.Int32, mscorlib">
<value>130</value>
</data>
<metadata name="lastPortColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -228,6 +183,9 @@
<data name="lastPortColumn.MinimumWidth" type="System.Int32, mscorlib">
<value>60</value>
</data>
<data name="lastPortColumn.Width" type="System.Int32, mscorlib">
<value>130</value>
</data>
<data name="gridView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -247,7 +205,7 @@
<value>gridView</value>
</data>
<data name="&gt;&gt;gridView.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.CollapsingPvsSiteServerDataGridView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gridView.Parent" xml:space="preserve">
<value>mainPanel</value>
@ -285,6 +243,33 @@
<data name="&gt;&gt;mainPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="bottomPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="bottomPanel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="bottomPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 325</value>
</data>
<data name="bottomPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>602, 29</value>
</data>
<data name="bottomPanel.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;bottomPanel.Name" xml:space="preserve">
<value>bottomPanel</value>
</data>
<data name="&gt;&gt;bottomPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bottomPanel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bottomPanel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -297,6 +282,182 @@
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8pt</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA
CABoBQAAHg0AACAgAAABACAAqBAAAIYSAAAQEAAAAQAgAGgEAAAuIwAAKAAAACAAAABAAAAAAQAEAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACAgACAAAAAgACAAICAAACAgIAAwMDAAAAA
/wAA/wAAAP//AP8AAAD/AP8A//8AAP///wAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIoiI
iIiIiIiIiIiIiIiIiIiCIigiIiIozMzMzMzMyCIogiIoIiIiKM7m5ubm5sgiKIIiKCIiIijObm5ubm7I
IiiCIigiIiIozubm5ubmyCIogiIoIiIiKM5ubm5ubsgiKIIiKCIiIijO5ubm5ubIIiiIiIiIiIiIzm5u
bm5uyCIogRERERERGM7u7u7u7sgiKIHZWVlZWRjMzMzMzMzIIiiB1ZWVlZUYiIiIiIiIiIiIgdlZWVlZ
GDMzMzMzMzMzOIHVlZWVlRg/uLi4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y/8WmMb/FJK+/8DAwP8AAAAAAAAAAMDAwP/AwMD/wMDA/8DA
wP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/wMDA/8DAwP/AwMD/AAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAgAEAALQF
wf+0BQAAgAUAAIAFAACAAQAAgAHB/4ABAACAAQAAgAEAALwBAAC8AQAAvAHB/4ABbP///5H/
</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
@ -309,18 +470,6 @@
<data name="$this.Text" xml:space="preserve">
<value>PVS Sites</value>
</data>
<data name="&gt;&gt;expansionColumn.Name" xml:space="preserve">
<value>expansionColumn</value>
</data>
<data name="&gt;&gt;expansionColumn.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewImageColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;siteColumn.Name" xml:space="preserve">
<value>siteColumn</value>
</data>
<data name="&gt;&gt;siteColumn.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ipAddressesColumn.Name" xml:space="preserve">
<value>ipAddressesColumn</value>
</data>

View File

@ -31,33 +31,21 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PvsPage));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.dataGridViewVms = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.columnVM = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnCachingEnabled = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.columnCurrentlyCached = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnPvsSite = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label2 = new System.Windows.Forms.Label();
this.dataGridViewSites = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
this.ColumnSite = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnConfiguration = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnSRs = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.ConfigureButton = new System.Windows.Forms.Button();
this.ViewPvsSitesButton = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.enableButton = new XenAdmin.Commands.CommandButton();
this.disableButton = new XenAdmin.Commands.CommandButton();
this.pageContainerPanel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewVms)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSites)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
@ -70,12 +58,10 @@
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.dataGridViewVms, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.dataGridViewSites, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.dataGridViewVms, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// dataGridViewVms
@ -87,7 +73,6 @@
this.dataGridViewVms.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.columnVM,
this.ColumnCachingEnabled,
this.columnCurrentlyCached,
this.ColumnPvsSite,
this.ColumnStatus});
resources.ApplyResources(this.dataGridViewVms, "dataGridViewVms");
@ -107,21 +92,11 @@
//
// ColumnCachingEnabled
//
this.ColumnCachingEnabled.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
resources.ApplyResources(this.ColumnCachingEnabled, "ColumnCachingEnabled");
this.ColumnCachingEnabled.Name = "ColumnCachingEnabled";
this.ColumnCachingEnabled.ReadOnly = true;
//
// columnCurrentlyCached
//
this.columnCurrentlyCached.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.columnCurrentlyCached.DefaultCellStyle = dataGridViewCellStyle2;
this.columnCurrentlyCached.FillWeight = 30F;
resources.ApplyResources(this.columnCurrentlyCached, "columnCurrentlyCached");
this.columnCurrentlyCached.Name = "columnCurrentlyCached";
this.columnCurrentlyCached.ReadOnly = true;
this.columnCurrentlyCached.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// ColumnPvsSite
//
resources.ApplyResources(this.ColumnPvsSite, "ColumnPvsSite");
@ -130,8 +105,9 @@
//
// ColumnStatus
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.ColumnStatus.DefaultCellStyle = dataGridViewCellStyle3;
this.ColumnStatus.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.ColumnStatus.DefaultCellStyle = dataGridViewCellStyle2;
this.ColumnStatus.FillWeight = 30F;
resources.ApplyResources(this.ColumnStatus, "ColumnStatus");
this.ColumnStatus.Name = "ColumnStatus";
@ -142,62 +118,10 @@
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// dataGridViewSites
//
resources.ApplyResources(this.dataGridViewSites, "dataGridViewSites");
this.dataGridViewSites.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.dataGridViewSites.BackgroundColor = System.Drawing.SystemColors.Window;
this.dataGridViewSites.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.dataGridViewSites.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridViewSites.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ColumnSite,
this.ColumnConfiguration,
this.ColumnSRs});
this.dataGridViewSites.MultiSelect = true;
this.dataGridViewSites.Name = "dataGridViewSites";
this.dataGridViewSites.ReadOnly = true;
//
// ColumnSite
//
this.ColumnSite.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.ColumnSite.DefaultCellStyle = dataGridViewCellStyle4;
this.ColumnSite.FillWeight = 20F;
resources.ApplyResources(this.ColumnSite, "ColumnSite");
this.ColumnSite.Name = "ColumnSite";
this.ColumnSite.ReadOnly = true;
//
// ColumnConfiguration
//
this.ColumnConfiguration.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.ColumnConfiguration.DefaultCellStyle = dataGridViewCellStyle5;
this.ColumnConfiguration.FillWeight = 20F;
resources.ApplyResources(this.ColumnConfiguration, "ColumnConfiguration");
this.ColumnConfiguration.Name = "ColumnConfiguration";
this.ColumnConfiguration.ReadOnly = true;
this.ColumnConfiguration.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// ColumnSRs
//
this.ColumnSRs.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
this.ColumnSRs.DefaultCellStyle = dataGridViewCellStyle6;
resources.ApplyResources(this.ColumnSRs, "ColumnSRs");
this.ColumnSRs.Name = "ColumnSRs";
this.ColumnSRs.ReadOnly = true;
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.ConfigureButton);
this.panel1.Controls.Add(this.ViewPvsSitesButton);
this.panel1.Name = "panel1";
//
// ConfigureButton
@ -207,13 +131,6 @@
this.ConfigureButton.UseVisualStyleBackColor = true;
this.ConfigureButton.Click += new System.EventHandler(this.ConfigureButton_Click);
//
// ViewPvsSitesButton
//
resources.ApplyResources(this.ViewPvsSitesButton, "ViewPvsSitesButton");
this.ViewPvsSitesButton.Name = "ViewPvsSitesButton";
this.ViewPvsSitesButton.UseVisualStyleBackColor = true;
this.ViewPvsSitesButton.Click += new System.EventHandler(this.ViewPvsSitesButton_Click);
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
@ -242,7 +159,6 @@
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewVms)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewSites)).EndInit();
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
@ -253,23 +169,16 @@
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private Controls.DataGridViewEx.DataGridViewEx dataGridViewSites;
public System.Windows.Forms.Button ViewPvsSitesButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private Controls.DataGridViewEx.DataGridViewEx dataGridViewVms;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnSite;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnConfiguration;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnSRs;
private XenAdmin.Commands.CommandButton disableButton;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private XenAdmin.Commands.CommandButton enableButton;
public System.Windows.Forms.Button ConfigureButton;
private System.Windows.Forms.DataGridViewTextBoxColumn columnVM;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnCachingEnabled;
private System.Windows.Forms.DataGridViewTextBoxColumn columnCurrentlyCached;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnPvsSite;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnStatus;
public System.Windows.Forms.Button ConfigureButton;
}
}

View File

@ -89,74 +89,10 @@ namespace XenAdmin.TabPages
connection.Cache.RegisterBatchCollectionChanged<VM>(PvsProxyBatchCollectionChanged);
}
LoadSites();
LoadVMs();
}
}
#region PVS cache configuration
private void LoadSites()
{
Program.AssertOnEventThread();
if (!Visible)
return;
try
{
dataGridViewSites.SuspendLayout();
dataGridViewSites.Rows.Clear();
var pvsSites = Connection.Cache.PVS_sites.ToList();
pvsSites.Sort();
foreach (var pvsSite in pvsSites)
dataGridViewSites.Rows.Add(NewPvsSiteRow(pvsSite));
if (dataGridViewSites.SelectedRows.Count == 0 && dataGridViewSites.Rows.Count > 0)
dataGridViewSites.Rows[0].Selected = true;
}
finally
{
dataGridViewSites.ResumeLayout();
}
ViewPvsSitesButton.Enabled = Connection.Cache.PVS_sites.Length > 0;
}
private DataGridViewRow NewPvsSiteRow(PVS_site pvsSite)
{
var siteCell = new DataGridViewTextBoxCell { Value = pvsSite.Name };
var cacheSrs = new List<SR>();
foreach (var cacheStorage in Connection.ResolveAll(pvsSite.cache_storage))
{
var sr = Connection.Resolve(cacheStorage.SR);
if (sr != null && sr.GetSRType(false) != SR.SRTypes.tmpfs) //not memory SR
{
cacheSrs.Add(sr);
}
}
var configurationCell = new DataGridViewTextBoxCell
{
Value = cacheSrs.Count > 0
? Messages.PVS_CACHE_MEMORY_AND_DISK
: pvsSite.cache_storage.Count > 0 ? Messages.PVS_CACHE_MEMORY_ONLY : Messages.PVS_CACHE_NOT_CONFIGURED
};
var cacheSrsCell = new DataGridViewTextBoxCell
{
Value = cacheSrs.Count > 0 ? string.Join(Messages.LIST_SEPARATOR, cacheSrs) : Messages.NO_VALUE
};
var newRow = new DataGridViewRow { Tag = pvsSite };
newRow.Cells.AddRange(siteCell, configurationCell, cacheSrsCell);
return newRow;
}
#endregion
#region VMs
private void LoadVMs()
@ -267,12 +203,11 @@ namespace XenAdmin.TabPages
{
var vmCell = new DataGridViewTextBoxCell { Value = vm.Name };
var cacheEnabledCell = new DataGridViewTextBoxCell { Value = Messages.NO };
var cachedCell = new DataGridViewTextBoxCell { Value = Messages.NO_VALUE };
var pvsSiteCell = new DataGridViewTextBoxCell { Value = Messages.NO_VALUE };
var statusCell = new DataGridViewTextBoxCell { Value = Messages.NO_VALUE };
var newRow = new DataGridViewRow { Tag = vm };
newRow.Cells.AddRange(vmCell, cacheEnabledCell, cachedCell, pvsSiteCell, statusCell);
newRow.Cells.AddRange(vmCell, cacheEnabledCell, pvsSiteCell, statusCell);
vm.PropertyChanged += VmPropertyChanged;
return newRow;
@ -285,11 +220,6 @@ namespace XenAdmin.TabPages
var vmCell = new DataGridViewTextBoxCell { Value = vm.Name };
var cacheEnabledCell = new DataGridViewTextBoxCell { Value = Messages.YES };
var cachedCell = new DataGridViewTextBoxCell
{
Value = pvsProxy.currently_attached ? Messages.YES : Messages.NO
};
var pvsSiteCell = new DataGridViewTextBoxCell { Value = Connection.Resolve(pvsProxy.site) };
var statusCell = new DataGridViewTextBoxCell
@ -298,7 +228,7 @@ namespace XenAdmin.TabPages
};
var newRow = new DataGridViewRow { Tag = vm };
newRow.Cells.AddRange(vmCell, cacheEnabledCell, cachedCell, pvsSiteCell, statusCell);
newRow.Cells.AddRange(vmCell, cacheEnabledCell, pvsSiteCell, statusCell);
vm.PropertyChanged += VmPropertyChanged;
return newRow;
@ -348,7 +278,7 @@ namespace XenAdmin.TabPages
private void PvsSiteBatchCollectionChanged(object sender, EventArgs e)
{
Program.Invoke(this, LoadSites);
Program.Invoke(this, LoadVMs);
}
private void PvsProxyBatchCollectionChanged(object sender, EventArgs e)
@ -372,11 +302,6 @@ namespace XenAdmin.TabPages
}
}
private void ViewPvsSitesButton_Click(object sender, EventArgs e)
{
Program.MainWindow.ShowPerConnectionWizard(connection, new PvsSiteDialog(connection));
}
private void ConfigureButton_Click(object sender, EventArgs e)
{
using (var dialog = new PvsCacheConfigurationDialog(connection))
@ -392,9 +317,6 @@ namespace XenAdmin.TabPages
DataGridViewRow row1 = (DataGridViewRow)first;
DataGridViewRow row2 = (DataGridViewRow)second;
string ce1 = row1.Cells[1].Value.ToString();
string ce2 = row2.Cells[1].Value.ToString();
int cachingEnabled1 = row1.Cells[1].Value.ToString().Equals(Messages.YES) ? 0 : 1;
int cachingEnabled2 = row2.Cells[1].Value.ToString().Equals(Messages.YES) ? 0 : 1;

View File

@ -140,17 +140,8 @@
<data name="ColumnCachingEnabled.HeaderText" xml:space="preserve">
<value>Read caching enabled</value>
</data>
<metadata name="columnCurrentlyCached.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="columnCurrentlyCached.HeaderText" xml:space="preserve">
<value>Currently cached</value>
</data>
<data name="columnCurrentlyCached.MinimumWidth" type="System.Int32, mscorlib">
<value>120</value>
</data>
<data name="columnCurrentlyCached.Width" type="System.Int32, mscorlib">
<value>122</value>
<data name="ColumnCachingEnabled.Width" type="System.Int32, mscorlib">
<value>148</value>
</data>
<metadata name="ColumnPvsSite.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -162,11 +153,14 @@
<value>True</value>
</metadata>
<data name="ColumnStatus.HeaderText" xml:space="preserve">
<value>Status</value>
<value>Read caching status</value>
</data>
<data name="ColumnStatus.MinimumWidth" type="System.Int32, mscorlib">
<value>120</value>
</data>
<data name="ColumnStatus.Width" type="System.Int32, mscorlib">
<value>137</value>
</data>
<data name="dataGridViewVms.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -175,13 +169,16 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="dataGridViewVms.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 324</value>
<value>0, 62</value>
</data>
<data name="dataGridViewVms.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 1, 5</value>
</data>
<data name="dataGridViewVms.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>900, 500</value>
</data>
<data name="dataGridViewVms.Size" type="System.Drawing.Size, System.Drawing">
<value>1108, 237</value>
<value>854, 279</value>
</data>
<data name="dataGridViewVms.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
@ -205,7 +202,7 @@
<value>Segoe UI, 11.25pt</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 301</value>
<value>0, 39</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 10, 0, 0</value>
@ -234,105 +231,6 @@
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="dataGridViewSites.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<metadata name="ColumnSite.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnSite.HeaderText" xml:space="preserve">
<value>PVS Site</value>
</data>
<data name="ColumnSite.MinimumWidth" type="System.Int32, mscorlib">
<value>80</value>
</data>
<data name="ColumnSite.Width" type="System.Int32, mscorlib">
<value>80</value>
</data>
<metadata name="ColumnConfiguration.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnConfiguration.HeaderText" xml:space="preserve">
<value>Cache configuration</value>
</data>
<data name="ColumnConfiguration.MinimumWidth" type="System.Int32, mscorlib">
<value>140</value>
</data>
<data name="ColumnConfiguration.Width" type="System.Int32, mscorlib">
<value>140</value>
</data>
<metadata name="ColumnSRs.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="ColumnSRs.HeaderText" xml:space="preserve">
<value>Cache SRs</value>
</data>
<data name="ColumnSRs.MinimumWidth" type="System.Int32, mscorlib">
<value>80</value>
</data>
<data name="dataGridViewSites.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="dataGridViewSites.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 23</value>
</data>
<data name="dataGridViewSites.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 1, 5</value>
</data>
<data name="dataGridViewSites.Size" type="System.Drawing.Size, System.Drawing">
<value>1108, 228</value>
</data>
<data name="dataGridViewSites.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;dataGridViewSites.Name" xml:space="preserve">
<value>dataGridViewSites</value>
</data>
<data name="&gt;&gt;dataGridViewSites.Type" xml:space="preserve">
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;dataGridViewSites.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;dataGridViewSites.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 11.25pt</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="label1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 3</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 23</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>PVS Cache configuration</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -346,7 +244,7 @@
<value>5, 0, 5, 0</value>
</data>
<data name="ConfigureButton.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 23</value>
<value>170, 23</value>
</data>
<data name="ConfigureButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -366,41 +264,14 @@
<data name="&gt;&gt;ConfigureButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="ViewPvsSitesButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="ViewPvsSitesButton.Location" type="System.Drawing.Point, System.Drawing">
<value>156, 3</value>
</data>
<data name="ViewPvsSitesButton.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 0, 5, 0</value>
</data>
<data name="ViewPvsSitesButton.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 23</value>
</data>
<data name="ViewPvsSitesButton.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="ViewPvsSitesButton.Text" xml:space="preserve">
<value>View PVS &amp;Sites...</value>
</data>
<data name="&gt;&gt;ViewPvsSitesButton.Name" xml:space="preserve">
<value>ViewPvsSitesButton</value>
</data>
<data name="&gt;&gt;ViewPvsSitesButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ViewPvsSitesButton.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;ViewPvsSitesButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 259</value>
<value>0, 0</value>
</data>
<data name="panel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>309, 29</value>
<value>173, 29</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
@ -415,7 +286,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>4</value>
<value>2</value>
</data>
<data name="panel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -481,7 +352,10 @@
<value>1</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 569</value>
<value>0, 349</value>
</data>
<data name="panel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 3, 0, 3</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>349, 29</value>
@ -499,7 +373,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>5</value>
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -507,11 +381,14 @@
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 10</value>
</data>
<data name="tableLayoutPanel1.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>905, 602</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>6</value>
<value>4</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>1109, 601</value>
<value>855, 381</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -529,13 +406,13 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="dataGridViewVms" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="dataGridViewSites" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel2" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="dataGridViewVms" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="panel2" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,20,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="pageContainerPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 78</value>
</data>
<data name="pageContainerPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>1129, 621</value>
<value>875, 401</value>
</data>
<data name="&gt;&gt;pageContainerPanel.Name" xml:space="preserve">
<value>pageContainerPanel</value>
@ -559,7 +436,7 @@
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>1129, 699</value>
<value>875, 479</value>
</data>
<data name="&gt;&gt;columnVM.Name" xml:space="preserve">
<value>columnVM</value>
@ -573,12 +450,6 @@
<data name="&gt;&gt;ColumnCachingEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;columnCurrentlyCached.Name" xml:space="preserve">
<value>columnCurrentlyCached</value>
</data>
<data name="&gt;&gt;columnCurrentlyCached.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnPvsSite.Name" xml:space="preserve">
<value>ColumnPvsSite</value>
</data>
@ -591,24 +462,6 @@
<data name="&gt;&gt;ColumnStatus.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnSite.Name" xml:space="preserve">
<value>ColumnSite</value>
</data>
<data name="&gt;&gt;ColumnSite.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnConfiguration.Name" xml:space="preserve">
<value>ColumnConfiguration</value>
</data>
<data name="&gt;&gt;ColumnConfiguration.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ColumnSRs.Name" xml:space="preserve">
<value>ColumnSRs</value>
</data>
<data name="&gt;&gt;ColumnSRs.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>PvsPage</value>
</data>

View File

@ -161,13 +161,6 @@
<Compile Include="Controls\ConsolePanel.Designer.cs">
<DependentUpon>ConsolePanel.cs</DependentUpon>
</Compile>
<Compile Include="Controls\DataGridViewEx\CollapsingPvsSiteServerDataGridViewRow.cs" />
<Compile Include="Controls\DataGridViewEx\CollapsingPvsSiteServerDataGridView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\DataGridViewEx\CollapsingPvsSiteServerDataGridView.Designer.cs">
<DependentUpon>CollapsingPvsSiteServerDataGridView.cs</DependentUpon>
</Compile>
<Compile Include="Controls\DataGridViewEx\DataGridViewEx.cs">
<SubType>Component</SubType>
</Compile>

View File

@ -38,6 +38,8 @@ namespace XenAdmin.Actions
{
public class ConfigurePvsSiteAction : AsyncAction
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private PVS_site pvsSite;
private readonly List<PVS_cache_storage> pvsCacheStorages;
private readonly string siteName;
@ -71,10 +73,23 @@ namespace XenAdmin.Actions
PollToCompletion(0,10);
pvsSite = Connection.WaitForCache(new XenRef<PVS_site>(Result));
}
else if (pvsSite.name_label != siteName)
else
{
// set name_label
PVS_site.set_name_label(Session, pvsSite.opaque_ref, siteName);
// get the site again from cache, just in case it changed (or dissapeared) in the meantime
pvsSite = Connection.Cache.Resolve(new XenRef<PVS_site>(pvsSite.opaque_ref));
if (pvsSite == null)
{
log.InfoFormat("PVS Site '{0}' cannot be configured, because it cannot be found.", siteName);
PercentComplete = 100;
Description = Messages.COMPLETED;
return;
}
if (pvsSite.name_label != siteName)
{
// set name_label
PVS_site.set_name_label(Session, pvsSite.opaque_ref, siteName);
}
}
PercentComplete = 10;
@ -82,7 +97,7 @@ namespace XenAdmin.Actions
foreach (var pvsCacheStorage in pvsCacheStorages)
{
// create Memory SR, if needed
if (Helper.IsNullOrEmptyOpaqueRef(pvsCacheStorage.SR.opaque_ref))
if (pvsCacheStorage.SR != null && Helper.IsNullOrEmptyOpaqueRef(pvsCacheStorage.SR.opaque_ref))
{
RelatedTask = SR.async_create(Session, pvsCacheStorage.host, new Dictionary<string, string> { { URI, "" } }, 0,
Messages.PVS_CACHE_MEMORY_SR_NAME, "", SR.SRTypes.tmpfs.ToString(), "", false, new Dictionary<string, string>());
@ -107,9 +122,16 @@ namespace XenAdmin.Actions
}
// create new PVS_cache_storage
pvsCacheStorage.site = new XenRef<PVS_site>(pvsSite); //asign the new site
RelatedTask = PVS_cache_storage.async_create(Session, pvsCacheStorage);
PollToCompletion(PercentComplete, PercentComplete + inc);
if (pvsCacheStorage.SR != null)
{
pvsCacheStorage.site = new XenRef<PVS_site>(pvsSite); //asign the new site
RelatedTask = PVS_cache_storage.async_create(Session, pvsCacheStorage);
PollToCompletion(PercentComplete, PercentComplete + inc);
}
else
{
PercentComplete += inc;
}
}
PercentComplete = 100;
Description = Messages.ACTION_CONFUGURE_PVS_SITE_DONE;

View File

@ -1,4 +1,6 @@
using XenAPI;
using System;
using System.Linq;
using XenAPI;
namespace XenAdmin.Actions
{
@ -16,6 +18,22 @@ namespace XenAdmin.Actions
protected override void Run()
{
// check if there are any running proxies
var pvsProxies = Connection.Cache.PVS_proxies.Where(s => s.site.opaque_ref == pvsSite.opaque_ref).ToList();
if (pvsProxies.Count > 0)
{
throw new Failure(Failure.PVS_SITE_CONTAINS_RUNNING_PROXIES);
}
// delete PVS_servers
var pvsServers = Connection.Cache.PVS_servers.Where(s => s.site.opaque_ref == pvsSite.opaque_ref).ToList();
int inc = pvsServers.Count > 0 ? 50 / pvsServers.Count : 50;
foreach (var pvsServer in pvsServers)
{
RelatedTask = PVS_server.async_forget(Session, pvsServer.opaque_ref);
PollToCompletion(PercentComplete, PercentComplete + inc);
}
RelatedTask = PVS_site.async_forget(Session, pvsSite.opaque_ref);
PollToCompletion();
Description = Messages.ACTION_DELETE_PVS_SITE_DONE;

View File

@ -7245,6 +7245,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to delete &apos;{0}&apos;?.
/// </summary>
public static string CONFIRM_DELETE_PVS_SITE {
get {
return ResourceManager.GetString("CONFIRM_DELETE_PVS_SITE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Are you sure you want to delete the tag &apos;{0}&apos; from all managed resources?.
/// </summary>
@ -27877,7 +27886,16 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to PVS Sites - &apos;{0}&apos;.
/// Looks up a localized string similar to This PVS site cannot be removed because it contains running proxies..
/// </summary>
public static string PVS_SITE_CANNOT_BE_REMOVED {
get {
return ResourceManager.GetString("PVS_SITE_CANNOT_BE_REMOVED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PVS Servers on site {0}&apos;.
/// </summary>
public static string PVS_SITE_DIALOG_TITLE {
get {

View File

@ -9695,7 +9695,7 @@ Press OK to continue the wizard and return to the server and follow the instruct
<value>Not configured</value>
</data>
<data name="PVS_SITE_DIALOG_TITLE" xml:space="preserve">
<value>PVS Sites - '{0}'</value>
<value>PVS Servers on site {0}'</value>
</data>
<data name="PVS_SITE_NAME" xml:space="preserve">
<value>PVS Site</value>
@ -13246,4 +13246,10 @@ You will need to navigate to the Console on each of the selected VMs to complete
<data name="YOU_ARE_HERE" xml:space="preserve">
<value>You are here</value>
</data>
<data name="CONFIRM_DELETE_PVS_SITE" xml:space="preserve">
<value>Are you sure you want to delete '{0}'?</value>
</data>
<data name="PVS_SITE_CANNOT_BE_REMOVED" xml:space="preserve">
<value>This PVS site cannot be removed because it contains running proxies.</value>
</data>
</root>

View File

@ -83,6 +83,7 @@ namespace XenAPI
public const string HOST_UNKNOWN_TO_MASTER = "HOST_UNKNOWN_TO_MASTER";
public const string VM_HAS_VGPU = "VM_HAS_VGPU";
public const string OUT_OF_SPACE = "OUT_OF_SPACE";
public const string PVS_SITE_CONTAINS_RUNNING_PROXIES = "PVS_SITE_CONTAINS_RUNNING_PROXIES";
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -1284,6 +1284,15 @@ namespace XenAPI
}
}
public long dom0_memory_extra
{
get
{
VM vm = ControlDomainZero;
return vm != null ? vm.memory_static_max - vm.memory_static_min : 0;
}
}
/// <summary>
/// Friendly string showing memory usage on the host

View File

@ -2078,7 +2078,7 @@ namespace XenAPI
{
get
{
return Connection.Cache.PVS_proxies.FirstOrDefault(p => p.VM.Equals(this)); // null if none
return Connection.Cache.PVS_proxies.FirstOrDefault(p => p.VM != null && p.VM.Equals(this)); // null if none
}
}
}