mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CP-6093: Implemented changes to the View menu. Disabled again flaky tests that had
been enabled in a previous commit. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
fd284e57af
commit
bbe13a192d
77
XenAdmin/MainWindow.Designer.cs
generated
77
XenAdmin/MainWindow.Designer.cs
generated
@ -67,7 +67,6 @@ namespace XenAdmin
|
||||
this.navigationPane = new XenAdmin.Controls.MainWindowControls.NavigationPane();
|
||||
this.TheTabControl = new System.Windows.Forms.TabControl();
|
||||
this.TabPageHome = new System.Windows.Forms.TabPage();
|
||||
this.TabPageSearch = new System.Windows.Forms.TabPage();
|
||||
this.TabPageGeneral = new System.Windows.Forms.TabPage();
|
||||
this.TabPageBallooning = new System.Windows.Forms.TabPage();
|
||||
this.TabPageBallooningUpsell = new System.Windows.Forms.TabPage();
|
||||
@ -85,6 +84,7 @@ namespace XenAdmin
|
||||
this.TabPageWLB = new System.Windows.Forms.TabPage();
|
||||
this.TabPageWLBUpsell = new System.Windows.Forms.TabPage();
|
||||
this.TabPageAD = new System.Windows.Forms.TabPage();
|
||||
this.TabPageSearch = new System.Windows.Forms.TabPage();
|
||||
this.alertPage = new XenAdmin.TabPages.AlertSummaryPage();
|
||||
this.eventsPage = new XenAdmin.TabPages.HistoryPage();
|
||||
this.updatesPage = new XenAdmin.TabPages.ManageUpdatesPage();
|
||||
@ -125,10 +125,6 @@ namespace XenAdmin
|
||||
this.pluginItemsPlaceHolderToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.serverViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.templatesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.customTemplatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.localStorageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowHiddenObjectsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator24 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.pluginItemsPlaceHolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -270,6 +266,9 @@ namespace XenAdmin
|
||||
this.MainMenuBar = new XenAdmin.Controls.MenuStripEx();
|
||||
this.securityGroupsToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.MenuPanel = new System.Windows.Forms.Panel();
|
||||
this.templatesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.customTemplatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.localStorageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
@ -350,12 +349,6 @@ namespace XenAdmin
|
||||
this.TabPageHome.Name = "TabPageHome";
|
||||
this.TabPageHome.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TabPageSearch
|
||||
//
|
||||
resources.ApplyResources(this.TabPageSearch, "TabPageSearch");
|
||||
this.TabPageSearch.Name = "TabPageSearch";
|
||||
this.TabPageSearch.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TabPageGeneral
|
||||
//
|
||||
resources.ApplyResources(this.TabPageGeneral, "TabPageGeneral");
|
||||
@ -459,6 +452,12 @@ namespace XenAdmin
|
||||
this.TabPageAD.Name = "TabPageAD";
|
||||
this.TabPageAD.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// TabPageSearch
|
||||
//
|
||||
resources.ApplyResources(this.TabPageSearch, "TabPageSearch");
|
||||
this.TabPageSearch.Name = "TabPageSearch";
|
||||
this.TabPageSearch.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// alertPage
|
||||
//
|
||||
resources.ApplyResources(this.alertPage, "alertPage");
|
||||
@ -754,7 +753,9 @@ namespace XenAdmin
|
||||
//
|
||||
this.viewToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.serverViewToolStripMenuItem,
|
||||
this.customTemplatesToolStripMenuItem,
|
||||
this.templatesToolStripMenuItem1,
|
||||
this.localStorageToolStripMenuItem,
|
||||
this.ShowHiddenObjectsToolStripMenuItem,
|
||||
this.toolStripSeparator24,
|
||||
this.pluginItemsPlaceHolderToolStripMenuItem,
|
||||
@ -763,33 +764,6 @@ namespace XenAdmin
|
||||
resources.ApplyResources(this.viewToolStripMenuItem, "viewToolStripMenuItem");
|
||||
this.viewToolStripMenuItem.DropDownOpening += new System.EventHandler(this.topLevelMenu_DropDownOpening);
|
||||
//
|
||||
// serverViewToolStripMenuItem
|
||||
//
|
||||
this.serverViewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.templatesToolStripMenuItem1,
|
||||
this.customTemplatesToolStripMenuItem,
|
||||
this.localStorageToolStripMenuItem});
|
||||
this.serverViewToolStripMenuItem.Name = "serverViewToolStripMenuItem";
|
||||
resources.ApplyResources(this.serverViewToolStripMenuItem, "serverViewToolStripMenuItem");
|
||||
//
|
||||
// templatesToolStripMenuItem1
|
||||
//
|
||||
this.templatesToolStripMenuItem1.Name = "templatesToolStripMenuItem1";
|
||||
resources.ApplyResources(this.templatesToolStripMenuItem1, "templatesToolStripMenuItem1");
|
||||
this.templatesToolStripMenuItem1.Click += new System.EventHandler(this.templatesToolStripMenuItem1_Click);
|
||||
//
|
||||
// customTemplatesToolStripMenuItem
|
||||
//
|
||||
this.customTemplatesToolStripMenuItem.Name = "customTemplatesToolStripMenuItem";
|
||||
resources.ApplyResources(this.customTemplatesToolStripMenuItem, "customTemplatesToolStripMenuItem");
|
||||
this.customTemplatesToolStripMenuItem.Click += new System.EventHandler(this.customTemplatesToolStripMenuItem_Click);
|
||||
//
|
||||
// localStorageToolStripMenuItem
|
||||
//
|
||||
this.localStorageToolStripMenuItem.Name = "localStorageToolStripMenuItem";
|
||||
resources.ApplyResources(this.localStorageToolStripMenuItem, "localStorageToolStripMenuItem");
|
||||
this.localStorageToolStripMenuItem.Click += new System.EventHandler(this.localStorageToolStripMenuItem_Click);
|
||||
//
|
||||
// ShowHiddenObjectsToolStripMenuItem
|
||||
//
|
||||
this.ShowHiddenObjectsToolStripMenuItem.Name = "ShowHiddenObjectsToolStripMenuItem";
|
||||
@ -1750,6 +1724,24 @@ namespace XenAdmin
|
||||
resources.ApplyResources(this.MenuPanel, "MenuPanel");
|
||||
this.MenuPanel.Name = "MenuPanel";
|
||||
//
|
||||
// templatesToolStripMenuItem1
|
||||
//
|
||||
this.templatesToolStripMenuItem1.Name = "templatesToolStripMenuItem1";
|
||||
resources.ApplyResources(this.templatesToolStripMenuItem1, "templatesToolStripMenuItem1");
|
||||
this.templatesToolStripMenuItem1.Click += new System.EventHandler(this.templatesToolStripMenuItem1_Click);
|
||||
//
|
||||
// customTemplatesToolStripMenuItem
|
||||
//
|
||||
this.customTemplatesToolStripMenuItem.Name = "customTemplatesToolStripMenuItem";
|
||||
resources.ApplyResources(this.customTemplatesToolStripMenuItem, "customTemplatesToolStripMenuItem");
|
||||
this.customTemplatesToolStripMenuItem.Click += new System.EventHandler(this.customTemplatesToolStripMenuItem_Click);
|
||||
//
|
||||
// localStorageToolStripMenuItem
|
||||
//
|
||||
this.localStorageToolStripMenuItem.Name = "localStorageToolStripMenuItem";
|
||||
resources.ApplyResources(this.localStorageToolStripMenuItem, "localStorageToolStripMenuItem");
|
||||
this.localStorageToolStripMenuItem.Click += new System.EventHandler(this.localStorageToolStripMenuItem_Click);
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -1898,13 +1890,9 @@ namespace XenAdmin
|
||||
private XenAdmin.Controls.MenuStripEx MainMenuBar;
|
||||
private System.Windows.Forms.Panel MenuPanel;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
|
||||
private System.Windows.Forms.ToolStripMenuItem serverViewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem templatesToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator24;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolbarToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem ShowHiddenObjectsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem customTemplatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem localStorageToolStripMenuItem;
|
||||
internal System.Windows.Forms.TabControl TheTabControl;
|
||||
private System.Windows.Forms.TabPage TabPageHome;
|
||||
internal System.Windows.Forms.TabPage TabPageSearch;
|
||||
@ -1998,6 +1986,9 @@ namespace XenAdmin
|
||||
private XenAdmin.TabPages.AlertSummaryPage alertPage;
|
||||
private XenAdmin.TabPages.ManageUpdatesPage updatesPage;
|
||||
private XenAdmin.TabPages.HistoryPage eventsPage;
|
||||
private ToolStripMenuItem customTemplatesToolStripMenuItem;
|
||||
private ToolStripMenuItem templatesToolStripMenuItem1;
|
||||
private ToolStripMenuItem localStorageToolStripMenuItem;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -229,7 +229,6 @@ namespace XenAdmin
|
||||
{
|
||||
foreach (ToolStripItem item in menu.DropDownItems)
|
||||
{
|
||||
ToolStripMenuItem menuItem = item as ToolStripMenuItem;
|
||||
if (item != null && item.Text == "PluginItemsPlaceHolder")
|
||||
{
|
||||
pluginMenuItemStartIndexes.Add(menu, menu.DropDownItems.IndexOf(item));
|
||||
@ -2444,6 +2443,44 @@ namespace XenAdmin
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateViewMenu(NavigationPane.NavigationMode mode)
|
||||
{
|
||||
//the order is the reverse from the order in which we want them to appear
|
||||
var items = new ToolStripItem []
|
||||
{
|
||||
toolStripSeparator24,
|
||||
ShowHiddenObjectsToolStripMenuItem,
|
||||
localStorageToolStripMenuItem,
|
||||
templatesToolStripMenuItem1,
|
||||
customTemplatesToolStripMenuItem
|
||||
};
|
||||
|
||||
if (mode == NavigationPane.NavigationMode.Infrastructure)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (!viewToolStripMenuItem.DropDownItems.Contains(item))
|
||||
viewToolStripMenuItem.DropDownItems.Insert(0, item);
|
||||
}
|
||||
}
|
||||
else if (mode == NavigationPane.NavigationMode.Notifications)
|
||||
{
|
||||
foreach (var item in items)
|
||||
viewToolStripMenuItem.DropDownItems.Remove(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 2; i < items.Length; i++)
|
||||
viewToolStripMenuItem.DropDownItems.Remove(items[i]);
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
if (!viewToolStripMenuItem.DropDownItems.Contains(items[i]))
|
||||
viewToolStripMenuItem.DropDownItems.Insert(0, items[i]);
|
||||
}
|
||||
|
||||
pluginMenuItemStartIndexes[viewToolStripMenuItem] = viewToolStripMenuItem.DropDownItems.IndexOf(toolStripSeparator24) + 1;
|
||||
}
|
||||
|
||||
string GetTitleLabel(IXenObject xenObject)
|
||||
{
|
||||
string name = Helpers.GetName(xenObject);
|
||||
@ -2515,6 +2552,8 @@ namespace XenAdmin
|
||||
TheTabControl.Visible = true;
|
||||
alertPage.Visible = updatesPage.Visible = eventsPage.Visible = false;
|
||||
}
|
||||
|
||||
UpdateViewMenu(mode);
|
||||
}
|
||||
|
||||
private void navigationPane_TreeNodeBeforeSelected()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -101,6 +101,7 @@ namespace XenAdminTests.SearchTests
|
||||
/// </summary>
|
||||
/// <param name="xenObject">The xen object to be tested.</param>
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void TestSearcherUpdatesWhenTagsChange()
|
||||
{
|
||||
MW(() => EditSearchButton.PerformClick());
|
||||
@ -143,6 +144,7 @@ namespace XenAdminTests.SearchTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
public void TestSearcherUpdatesWhenCustomFieldsChange()
|
||||
{
|
||||
MW(() => EditSearchButton.PerformClick());
|
||||
|
Loading…
Reference in New Issue
Block a user