Merge branch 'master' of ssh://hg.uk.xensource.com/carbon/cre-l/xenadmin

This commit is contained in:
Mihaela Stoica 2014-11-26 09:54:11 +00:00
commit a50451d4a7
17 changed files with 214 additions and 297 deletions

View File

@ -36,6 +36,7 @@ using System.Windows.Forms;
using System.IO;
using XenAdmin.Core;
using XenAdmin;
using XenAPI;
namespace XenAdmin.Commands
{
@ -82,8 +83,11 @@ namespace XenAdmin.Commands
private static bool CanExecute(SelectedItem selection)
{
if(selection.Connection != null && selection.Connection.IsConnected && selection.PoolAncestor != null)
return !Helpers.FeatureForbidden(selection.Connection, XenAPI.Host.RestrictExportResourceData);
bool isPoolOrStandalone = selection.XenObject is Pool
|| (selection.XenObject is Host && Helpers.GetPool(selection.Connection) == null);
if (selection.Connection != null && selection.Connection.IsConnected && isPoolOrStandalone)
return !Helpers.FeatureForbidden(selection.Connection, Host.RestrictExportResourceData);
return false;
}

View File

@ -88,19 +88,26 @@ namespace XenAdmin.Controls.CheckableDataGridView
}
cRow.CellDataUpdated += cRow_CellDataUpdated;
IXenObject xenObject = GetXenObject(cRow);
xenObject.PropertyChanged += XenObject_PropertyChanged;
if (xenObject != null && xenObject.Connection != null)
xenObject.Connection.Cache.RegisterBatchCollectionChanged<Host>(HostBatchCollectionChanged);
View.DrawRow(cRow);
}
rows.ForEach(r=>r.BeginCellUpdate());
}
void XenObject_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
void HostBatchCollectionChanged(object sender, EventArgs e)
{
IXenObject xo = sender as IXenObject;
if(xo==null) return;
ChangeableDictionary<XenRef<Host>, Host> d = sender as ChangeableDictionary<XenRef<Host>, Host>;
if (d == null) return;
RedrawRow(storedRows.FirstOrDefault(r => GetXenObject(r) == xo));
foreach (var host in d.Values)
{
var row = storedRows.FirstOrDefault(r => GetXenObject(r) == host);
if (row != null)
RedrawRow(row);
}
}
private void cRow_CellDataUpdated(object sender, EventArgs e)
@ -387,8 +394,8 @@ namespace XenAdmin.Controls.CheckableDataGridView
{
row.CellDataUpdated -= cRow_CellDataUpdated;
IXenObject xenObject = GetXenObject(row);
if(xenObject != null)
xenObject.PropertyChanged -= XenObject_PropertyChanged;
if (xenObject != null && xenObject.Connection != null)
xenObject.Connection.Cache.DeregisterBatchCollectionChanged<Host>(HostBatchCollectionChanged);
}
if(disposing)

View File

@ -47,11 +47,10 @@ namespace XenAdmin.Dialogs
this.enterpriseRadioButton = new System.Windows.Forms.RadioButton();
this.platinumRadioButton = new System.Windows.Forms.RadioButton();
this.xenDesktopEnterpriseRadioButton = new System.Windows.Forms.RadioButton();
this.enterprisePerSocketRadioButton = new System.Windows.Forms.RadioButton();
this.desktopRadioButton = new System.Windows.Forms.RadioButton();
this.enterprisePerUserRadioButton = new System.Windows.Forms.RadioButton();
this.enterprisePerSocketRadioButton = new System.Windows.Forms.RadioButton();
this.standardPerSocketRadioButton = new System.Windows.Forms.RadioButton();
this.standardPerUserRadioButton = new System.Windows.Forms.RadioButton();
this.xenDesktopPlatinumRadioButton = new System.Windows.Forms.RadioButton();
this.buttonsLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.mainLayoutPanel.SuspendLayout();
this.licenseServerLayoutPanel.SuspendLayout();
@ -134,9 +133,8 @@ namespace XenAdmin.Dialogs
this.editionLayoutPanel.Controls.Add(this.xenDesktopEnterpriseRadioButton);
this.editionLayoutPanel.Controls.Add(this.enterprisePerSocketRadioButton);
this.editionLayoutPanel.Controls.Add(this.enterprisePerUserRadioButton);
this.editionLayoutPanel.Controls.Add(this.desktopRadioButton);
this.editionLayoutPanel.Controls.Add(this.standardPerSocketRadioButton);
this.editionLayoutPanel.Controls.Add(this.standardPerUserRadioButton);
this.editionLayoutPanel.Controls.Add(this.xenDesktopPlatinumRadioButton);
this.editionLayoutPanel.Name = "editionLayoutPanel";
//
// perSocketRadioButton
@ -171,11 +169,11 @@ namespace XenAdmin.Dialogs
this.xenDesktopEnterpriseRadioButton.Name = "xenDesktopEnterpriseRadioButton";
this.xenDesktopEnterpriseRadioButton.UseVisualStyleBackColor = true;
//
// enterprisePerSocketRadioButton
// desktopRadioButton
//
resources.ApplyResources(this.enterprisePerSocketRadioButton, "enterprisePerSocketRadioButton");
this.enterprisePerSocketRadioButton.Name = "enterprisePerSocketRadioButton";
this.enterprisePerSocketRadioButton.UseVisualStyleBackColor = true;
resources.ApplyResources(this.desktopRadioButton, "desktopRadioButton");
this.desktopRadioButton.Name = "desktopRadioButton";
this.desktopRadioButton.UseVisualStyleBackColor = true;
//
// enterprisePerUserRadioButton
//
@ -183,24 +181,18 @@ namespace XenAdmin.Dialogs
this.enterprisePerUserRadioButton.Name = "enterprisePerUserRadioButton";
this.enterprisePerUserRadioButton.UseVisualStyleBackColor = true;
//
// enterprisePerSocketRadioButton
//
resources.ApplyResources(this.enterprisePerSocketRadioButton, "enterprisePerSocketRadioButton");
this.enterprisePerSocketRadioButton.Name = "enterprisePerSocketRadioButton";
this.enterprisePerSocketRadioButton.UseVisualStyleBackColor = true;
//
// standardPerSocketRadioButton
//
resources.ApplyResources(this.standardPerSocketRadioButton, "standardPerSocketRadioButton");
this.standardPerSocketRadioButton.Name = "standardPerSocketRadioButton";
this.standardPerSocketRadioButton.UseVisualStyleBackColor = true;
//
// standardPerUserRadioButton
//
resources.ApplyResources(this.standardPerUserRadioButton, "standardPerUserRadioButton");
this.standardPerUserRadioButton.Name = "standardPerUserRadioButton";
this.standardPerUserRadioButton.UseVisualStyleBackColor = true;
//
// xenDesktopPlatinumRadioButton
//
resources.ApplyResources(this.xenDesktopPlatinumRadioButton, "xenDesktopPlatinumRadioButton");
this.xenDesktopPlatinumRadioButton.Name = "xenDesktopPlatinumRadioButton";
this.xenDesktopPlatinumRadioButton.UseVisualStyleBackColor = true;
//
// buttonsLayoutPanel
//
resources.ApplyResources(this.buttonsLayoutPanel, "buttonsLayoutPanel");
@ -252,8 +244,7 @@ namespace XenAdmin.Dialogs
private System.Windows.Forms.RadioButton xenDesktopEnterpriseRadioButton;
private System.Windows.Forms.RadioButton enterprisePerSocketRadioButton;
private System.Windows.Forms.RadioButton enterprisePerUserRadioButton;
private System.Windows.Forms.RadioButton xenDesktopPlatinumRadioButton;
private System.Windows.Forms.RadioButton standardPerUserRadioButton;
private System.Windows.Forms.RadioButton desktopRadioButton;
private System.Windows.Forms.RadioButton standardPerSocketRadioButton;
}
}

View File

@ -126,8 +126,7 @@ namespace XenAdmin.Dialogs
enterprisePerSocketRadioButton.Visible = false;
enterprisePerUserRadioButton.Visible = false;
standardPerSocketRadioButton.Visible = false;
standardPerUserRadioButton.Visible = false;
xenDesktopPlatinumRadioButton.Visible = false;
desktopRadioButton.Visible = false;
perSocketRadioButton.Checked = true;
perSocketRadioButton.Text = String.Format(Messages.PERSOCKET_LICENSES_X_REQUIRED,
xos.Sum(x => x.Connection.Cache.Hosts.Sum(h=>h.CpuSockets)));
@ -138,8 +137,7 @@ namespace XenAdmin.Dialogs
enterprisePerSocketRadioButton.Visible = false;
enterprisePerUserRadioButton.Visible = false;
standardPerSocketRadioButton.Visible = false;
standardPerUserRadioButton.Visible = false;
xenDesktopPlatinumRadioButton.Visible = false;
desktopRadioButton.Visible = false;
advancedRadioButton.Checked = true;
}
}
@ -156,7 +154,9 @@ namespace XenAdmin.Dialogs
{
case Host.Edition.XenDesktop:
case Host.Edition.EnterpriseXD:
CheckRadioButtonIfVisible(xenDesktopEnterpriseRadioButton);
CheckRadioButtonIfVisible(xos.TrueForAll(x => Helpers.CreedenceOrGreater(x.Connection))
? desktopRadioButton
: xenDesktopEnterpriseRadioButton);
break;
case Host.Edition.Platinum:
CheckRadioButtonIfVisible(platinumRadioButton);
@ -176,15 +176,9 @@ namespace XenAdmin.Dialogs
case Host.Edition.EnterprisePerUser:
CheckRadioButtonIfVisible(enterprisePerUserRadioButton);
break;
case Host.Edition.XenDesktopPlatinum:
CheckRadioButtonIfVisible(xenDesktopPlatinumRadioButton);
break;
case Host.Edition.StandardPerSocket:
CheckRadioButtonIfVisible(standardPerSocketRadioButton);
break;
case Host.Edition.StandardPerUser:
CheckRadioButtonIfVisible(standardPerUserRadioButton);
break;
}
}
@ -211,13 +205,10 @@ namespace XenAdmin.Dialogs
if (enterprisePerUserRadioButton.Checked)
return Host.Edition.EnterprisePerUser;
if (xenDesktopPlatinumRadioButton.Checked)
return Host.Edition.XenDesktopPlatinum;
if (desktopRadioButton.Checked)
return Host.Edition.XenDesktop;
if (standardPerSocketRadioButton.Checked)
return Host.Edition.StandardPerSocket;
return Host.Edition.StandardPerUser;
return Host.Edition.StandardPerSocket;
}
private void okButton_Click(object sender, EventArgs e)

View File

@ -198,6 +198,33 @@
<data name="licenseServerLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="licenseServerNameLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="licenseServerNameLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="licenseServerNameLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerNameLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="licenseServerNameLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 8</value>
</data>
<data name="licenseServerNameLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>84, 29</value>
</data>
<data name="licenseServerNameLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="licenseServerNameLabel.Text" xml:space="preserve">
<value>&amp;License Server:</value>
</data>
<data name="licenseServerNameLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;licenseServerNameLabel.Name" xml:space="preserve">
<value>licenseServerNameLabel</value>
</data>
@ -210,6 +237,18 @@
<data name="&gt;&gt;licenseServerNameLabel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="licenseServerNameTextBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>101, 11</value>
</data>
<data name="licenseServerNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>304, 23</value>
</data>
<data name="licenseServerNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;licenseServerNameTextBox.Name" xml:space="preserve">
<value>licenseServerNameTextBox</value>
</data>
@ -222,6 +261,21 @@
<data name="&gt;&gt;licenseServerNameTextBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="licenseServerPortTextBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerPortTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>427, 11</value>
</data>
<data name="licenseServerPortTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 23</value>
</data>
<data name="licenseServerPortTextBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="licenseServerPortTextBox.Text" xml:space="preserve">
<value>27000</value>
</data>
<data name="&gt;&gt;licenseServerPortTextBox.Name" xml:space="preserve">
<value>licenseServerPortTextBox</value>
</data>
@ -234,6 +288,30 @@
<data name="&gt;&gt;licenseServerPortTextBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="colonLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="colonLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="colonLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="colonLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="colonLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>411, 15</value>
</data>
<data name="colonLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>10, 15</value>
</data>
<data name="colonLabel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="colonLabel.Text" xml:space="preserve">
<value>:</value>
</data>
<data name="&gt;&gt;colonLabel.Name" xml:space="preserve">
<value>colonLabel</value>
</data>
@ -511,7 +589,7 @@
<value>5</value>
</data>
<data name="enterprisePerSocketRadioButton.Text" xml:space="preserve">
<value>XenServer &amp;Enterprise Per-Socket</value>
<value>XenServer E&amp;nterprise Per-Socket</value>
</data>
<data name="&gt;&gt;enterprisePerSocketRadioButton.Name" xml:space="preserve">
<value>enterprisePerSocketRadioButton</value>
@ -537,17 +615,14 @@
<data name="enterprisePerUserRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 153</value>
</data>
<data name="enterprisePerUserRadioButton.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 10</value>
</data>
<data name="enterprisePerUserRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 29</value>
<value>180, 19</value>
</data>
<data name="enterprisePerUserRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="enterprisePerUserRadioButton.Text" xml:space="preserve">
<value>XenServer E&amp;nterprise Per-User</value>
<value>XenServer &amp;Enterprise Per-User</value>
</data>
<data name="&gt;&gt;enterprisePerUserRadioButton.Name" xml:space="preserve">
<value>enterprisePerUserRadioButton</value>
@ -561,6 +636,39 @@
<data name="&gt;&gt;enterprisePerUserRadioButton.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="desktopRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="desktopRadioButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="desktopRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="desktopRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 178</value>
</data>
<data name="desktopRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>123, 19</value>
</data>
<data name="desktopRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="desktopRadioButton.Text" xml:space="preserve">
<value>XenServer &amp;Desktop</value>
</data>
<data name="&gt;&gt;desktopRadioButton.Name" xml:space="preserve">
<value>desktopRadioButton</value>
</data>
<data name="&gt;&gt;desktopRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;desktopRadioButton.Parent" xml:space="preserve">
<value>editionLayoutPanel</value>
</data>
<data name="&gt;&gt;desktopRadioButton.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="standardPerSocketRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -571,7 +679,7 @@
<value>NoControl</value>
</data>
<data name="standardPerSocketRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 188</value>
<value>7, 203</value>
</data>
<data name="standardPerSocketRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>187, 19</value>
@ -592,77 +700,8 @@
<value>editionLayoutPanel</value>
</data>
<data name="&gt;&gt;standardPerSocketRadioButton.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="standardPerUserRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="standardPerUserRadioButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="standardPerUserRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="standardPerUserRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 213</value>
</data>
<data name="standardPerUserRadioButton.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 10</value>
</data>
<data name="standardPerUserRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>175, 29</value>
</data>
<data name="standardPerUserRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="standardPerUserRadioButton.Text" xml:space="preserve">
<value>XenServer S&amp;tandard Per-User</value>
</data>
<data name="&gt;&gt;standardPerUserRadioButton.Name" xml:space="preserve">
<value>standardPerUserRadioButton</value>
</data>
<data name="&gt;&gt;standardPerUserRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;standardPerUserRadioButton.Parent" xml:space="preserve">
<value>editionLayoutPanel</value>
</data>
<data name="&gt;&gt;standardPerUserRadioButton.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="xenDesktopPlatinumRadioButton.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="xenDesktopPlatinumRadioButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="xenDesktopPlatinumRadioButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="xenDesktopPlatinumRadioButton.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 248</value>
</data>
<data name="xenDesktopPlatinumRadioButton.Size" type="System.Drawing.Size, System.Drawing">
<value>139, 19</value>
</data>
<data name="xenDesktopPlatinumRadioButton.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="xenDesktopPlatinumRadioButton.Text" xml:space="preserve">
<value>&amp;XenDesktop Platinum</value>
</data>
<data name="&gt;&gt;xenDesktopPlatinumRadioButton.Name" xml:space="preserve">
<value>xenDesktopPlatinumRadioButton</value>
</data>
<data name="&gt;&gt;xenDesktopPlatinumRadioButton.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;xenDesktopPlatinumRadioButton.Parent" xml:space="preserve">
<value>editionLayoutPanel</value>
</data>
<data name="&gt;&gt;xenDesktopPlatinumRadioButton.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="editionLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -679,7 +718,7 @@
<value>4, 0, 4, 4</value>
</data>
<data name="editionLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>519, 274</value>
<value>519, 229</value>
</data>
<data name="editionLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -706,7 +745,7 @@
<value>11, 92</value>
</data>
<data name="editionsGroupBox.Size" type="System.Drawing.Size, System.Drawing">
<value>525, 296</value>
<value>525, 251</value>
</data>
<data name="editionsGroupBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -739,7 +778,7 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="buttonsLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>350, 399</value>
<value>350, 354</value>
</data>
<data name="buttonsLayoutPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 8, 3, 3</value>
@ -778,7 +817,7 @@
<value>6</value>
</data>
<data name="mainLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 442</value>
<value>547, 397</value>
</data>
<data name="mainLayoutPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -798,132 +837,6 @@
<data name="mainLayoutPanel.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="licenseServerLayoutPanel" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="mainLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="editionsGroupBox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="buttonsLayoutPanel" Row="3" 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,AutoSize,0,Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="licenseServerNameLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="licenseServerNameLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="licenseServerNameLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerNameLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="licenseServerNameLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 8</value>
</data>
<data name="licenseServerNameLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>84, 29</value>
</data>
<data name="licenseServerNameLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="licenseServerNameLabel.Text" xml:space="preserve">
<value>&amp;License Server:</value>
</data>
<data name="licenseServerNameLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;licenseServerNameLabel.Name" xml:space="preserve">
<value>licenseServerNameLabel</value>
</data>
<data name="&gt;&gt;licenseServerNameLabel.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;licenseServerNameLabel.Parent" xml:space="preserve">
<value>licenseServerLayoutPanel</value>
</data>
<data name="&gt;&gt;licenseServerNameLabel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="licenseServerNameTextBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>101, 11</value>
</data>
<data name="licenseServerNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>304, 23</value>
</data>
<data name="licenseServerNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;licenseServerNameTextBox.Name" xml:space="preserve">
<value>licenseServerNameTextBox</value>
</data>
<data name="&gt;&gt;licenseServerNameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;licenseServerNameTextBox.Parent" xml:space="preserve">
<value>licenseServerLayoutPanel</value>
</data>
<data name="&gt;&gt;licenseServerNameTextBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="licenseServerPortTextBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="licenseServerPortTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>427, 11</value>
</data>
<data name="licenseServerPortTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 23</value>
</data>
<data name="licenseServerPortTextBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="licenseServerPortTextBox.Text" xml:space="preserve">
<value>27000</value>
</data>
<data name="&gt;&gt;licenseServerPortTextBox.Name" xml:space="preserve">
<value>licenseServerPortTextBox</value>
</data>
<data name="&gt;&gt;licenseServerPortTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;licenseServerPortTextBox.Parent" xml:space="preserve">
<value>licenseServerLayoutPanel</value>
</data>
<data name="&gt;&gt;licenseServerPortTextBox.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="colonLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="colonLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="colonLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="colonLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="colonLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>411, 15</value>
</data>
<data name="colonLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>10, 15</value>
</data>
<data name="colonLabel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="colonLabel.Text" xml:space="preserve">
<value>:</value>
</data>
<data name="&gt;&gt;colonLabel.Name" xml:space="preserve">
<value>colonLabel</value>
</data>
<data name="&gt;&gt;colonLabel.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;colonLabel.Parent" xml:space="preserve">
<value>licenseServerLayoutPanel</value>
</data>
<data name="&gt;&gt;colonLabel.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -937,7 +850,7 @@
<value>GrowAndShrink</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>547, 442</value>
<value>547, 397</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>

View File

@ -198,7 +198,6 @@ namespace XenAdmin.Dialogs
new OpenLicenseFileDialog(View.Parent, RowsToHosts(validRows)[0], Messages.INSTALL_LICENSE_KEY, false).ShowDialogAndRunAction();
}
licenseRows.ForEach(r => r.BeginCellUpdate());
SummariseDisconnectedRows(rowsChecked);
ResetButtonEnablement();
}

View File

@ -329,6 +329,8 @@ namespace XenAdmin.Dialogs
{
if (XenObject.Connection.Cache.Hosts.All(h => h.EnterpriseFeaturesEnabled))
return Messages.LICENSE_SUPPORT_AND_ENTERPRISE_FEATURES_ENABLED;
if (XenObject.Connection.Cache.Hosts.All(h => h.DesktopFeaturesEnabled))
return Messages.LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED;
if (XenObject.Connection.Cache.Hosts.All(h => h.EligibleForSupport))
return Messages.LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED;
return Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT;

View File

@ -66,7 +66,7 @@ namespace XenAdmin.Dialogs
sb.AppendLine(Messages.LICENSE_MANAGER_SUMMARY_LICENSE_SERVER);
linkArea.Start = sb.Length;
sb.AppendLine(Row.LicenseServer);
linkArea.Length = Row.LicenseServerAddress.Length;
linkArea.Length = Row.LicenseServerAddress.ToLower() == "localhost" ? 0 : Row.LicenseServerAddress.Length;
return sb.AppendLine();
}
@ -77,7 +77,7 @@ namespace XenAdmin.Dialogs
public override string GetLink()
{
if (String.IsNullOrEmpty(Row.LicenseServer))
if (string.IsNullOrEmpty(Row.LicenseServer) || Row.LicenseServerAddress.ToLower() == "localhost")
return string.Empty;
return string.Format(Messages.LICENSE_SERVER_WEB_CONSOLE_FORMAT, Row.LicenseServerAddress, XenAPI.Host.LicenseServerWebConsolePort);

Binary file not shown.

View File

@ -950,7 +950,7 @@ namespace XenAdmin.TabPages
if (!string.IsNullOrEmpty(host.edition))
{
s.AddEntry(FriendlyName("host.edition"), FriendlyName(String.Format("host.edition-{0}", host.edition)) ?? String.Empty);
s.AddEntry(FriendlyName("host.edition"), Helpers.GetFriendlyLicenseName(host));
if (info.ContainsKey("sku_type"))
{
info.Remove("sku_type");
@ -967,8 +967,8 @@ namespace XenAdmin.TabPages
if (host.license_server.ContainsKey("address"))
{
var licenseServerAddress = host.license_server["address"].Trim().ToLower();
if (licenseServerAddress == "" || licenseServerAddress == "localhost")
var licenseServerAddress = host.license_server["address"].Trim();
if (licenseServerAddress == "" || licenseServerAddress.ToLower() == "localhost")
s.AddEntry(FriendlyName(String.Format("host.license_server-address")), host.license_server["address"]);
else
{

View File

@ -202,8 +202,6 @@ namespace XenAdmin.Actions
else
{
Pool.apply_edition(xo.Connection.Session, pool.opaque_ref, Host.GetEditionText(_edition));
//TODO: Look into why this is required. Event.Next returning late? XAPI returning before updated?
Thread.Sleep(200);
}

View File

@ -726,6 +726,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Citrix XenServer Desktop Edition.
/// </summary>
public static string Label_host_edition_desktop {
get {
return ResourceManager.GetString("Label-host.edition-desktop", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Citrix XenServer Enterprise Edition.
/// </summary>
@ -807,15 +816,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Citrix XenServer Standard Per User Edition.
/// </summary>
public static string Label_host_edition_standard_per_user {
get {
return ResourceManager.GetString("Label-host.edition-standard-per-user", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Citrix XenServer for XenDesktop.
/// </summary>

View File

@ -1705,7 +1705,7 @@
</data>
<data name="Message.name-license_server_version_obsolete" xml:space="preserve">
<value>The license server is an out-of-date version.</value>
</data>
</data>
<data name="Label-host.edition-enterprise-per-socket" xml:space="preserve">
<value>Citrix XenServer Enterprise Per Socket Edition</value>
</data>
@ -1715,12 +1715,9 @@
<data name="Label-host.edition-standard-per-socket" xml:space="preserve">
<value>Citrix XenServer Standard Per Socket Edition</value>
</data>
<data name="Label-host.edition-standard-per-user" xml:space="preserve">
<value>Citrix XenServer Standard Per User Edition</value>
</data>
<data name="Label-host.edition-xendesktop-platinum" xml:space="preserve">
<value>Citrix XenDesktop Platinum</value>
</data>
</data>
<data name="Message.help-license_expired" xml:space="preserve">
<value>Help on Licensing</value>
</data>
@ -1739,4 +1736,7 @@
<data name="Message.help-license_server_version_obsolete" xml:space="preserve">
<value>Help on Licensing</value>
</data>
<data name="Label-host.edition-desktop" xml:space="preserve">
<value>Citrix XenServer Desktop Edition</value>
</data>
</root>

View File

@ -18024,6 +18024,16 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///Desktop features enabled.
/// </summary>
public static string LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED {
get {
return ResourceManager.GetString("LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Eligible for support
///Enterprise features enabled.
@ -26884,7 +26894,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: XenServer 6.2 requires new licenses to be added to your license server..
/// Looks up a localized string similar to &apos;{0}&apos;: New versions of XenServer require new licenses to be added to your license server..
/// </summary>
public static string RPU_WARNING_DESCRIPTION_CLEARWATER_OR_GREATER {
get {

View File

@ -9336,7 +9336,7 @@ The master must be upgraded first, so if you skip the master, the rolling pool u
Upgrading VMs using StorageLink Gateway to XenServer 6.0 is only supported if the VMs are shut down and using NetApp, Dell EqualLogic or SMI-S adapters.</value>
</data>
<data name="RPU_WARNING_DESCRIPTION_CLEARWATER_OR_GREATER" xml:space="preserve">
<value>'{0}': XenServer 6.2 requires new licenses to be added to your license server.</value>
<value>'{0}': New versions of XenServer require new licenses to be added to your license server.</value>
</data>
<data name="RPU_WIZARD_TAMPA_AND_OLDER_TITLE" xml:space="preserve">
<value>Checking licensing status</value>
@ -12275,4 +12275,8 @@ Standard features only</value>
<data name="LICENSE_SERVER_WEB_CONSOLE_GOTO" xml:space="preserve">
<value>Go to...</value>
</data>
<data name="LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED" xml:space="preserve">
<value>Eligible for support
Desktop features enabled</value>
</data>
</root>

View File

@ -854,7 +854,9 @@ namespace XenAdmin.Core
if (string.IsNullOrEmpty(host.edition))
return Messages.UNKNOWN;
string name = PropertyManager.GetFriendlyName("Label-host.edition-" + host.edition);
string name = CreedenceOrGreater(host) && host.edition == "xendesktop"
? PropertyManager.GetFriendlyName("Label-host.edition-desktop")
: PropertyManager.GetFriendlyName("Label-host.edition-" + host.edition);
return name ?? Messages.UNKNOWN;
}

View File

@ -53,12 +53,10 @@ namespace XenAPI
Platinum,
EnterpriseXD,
PerSocket, //Added in Clearwater (PR-1589)
XenDesktop, //Added in Clearwater (PR-1589) and is new form of "EnterpriseXD"
XenDesktop, //Added in Clearwater (PR-1589) and is new form of "EnterpriseXD"; "Desktop Edition" in Creedence
EnterprisePerSocket, // Added in Creedence (enterprise-per-socket)
EnterprisePerUser, // Added in Creedence (enterprise-per-user)
XenDesktopPlatinum, // Added in Creedence (xendesktop-platinum)
StandardPerSocket, // Added in Creedence (standard-per-socket)
StandardPerUser // Added in Creedence (standard-per-user)
}
public static string LicenseServerWebConsolePort = "8082";
@ -92,12 +90,8 @@ namespace XenAPI
return Edition.EnterprisePerSocket;
case "enterprise-per-user":
return Edition.EnterprisePerUser;
case "xendesktop-platinum":
return Edition.XenDesktopPlatinum;
case "standard-per-socket":
return Edition.StandardPerSocket;
case "standard-per-user":
return Edition.StandardPerUser;
default:
return Edition.Free;
}
@ -141,12 +135,8 @@ namespace XenAPI
return "enterprise-per-socket";
case Edition.EnterprisePerUser:
return "enterprise-per-user";
case Edition.XenDesktopPlatinum:
return "xendesktop-platinum";
case Edition.StandardPerSocket:
return "standard-per-socket";
case Edition.StandardPerUser:
return "standard-per-user";
default:
return "free";
}
@ -1381,7 +1371,16 @@ namespace XenAPI
get
{
var hostEdition = GetEdition(edition);
return hostEdition == Edition.EnterprisePerSocket || hostEdition == Edition.EnterprisePerUser;
return EligibleForSupport && (hostEdition == Edition.EnterprisePerSocket || hostEdition == Edition.EnterprisePerUser
|| hostEdition == Edition.PerSocket);
}
}
public bool DesktopFeaturesEnabled
{
get
{
return EligibleForSupport && GetEdition(edition) == Edition.XenDesktop;
}
}
@ -1389,10 +1388,7 @@ namespace XenAPI
{
get
{
var hostEdition = GetEdition(edition);
return hostEdition == Edition.EnterprisePerSocket || hostEdition == Edition.EnterprisePerUser ||
hostEdition == Edition.XenDesktopPlatinum ||
hostEdition == Edition.StandardPerSocket || hostEdition == Edition.StandardPerUser;
return (Helpers.CreedenceOrGreater(this) && GetEdition(edition) != Edition.Free);
}
}