diff --git a/XenAdmin/Commands/ImportStorageLinkVolumeCommand.cs b/XenAdmin/Commands/ImportStorageLinkVolumeCommand.cs deleted file mode 100644 index f639ad2094..0000000000 --- a/XenAdmin/Commands/ImportStorageLinkVolumeCommand.cs +++ /dev/null @@ -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; -using System.Collections.Generic; -using System.Text; -using XenAPI; -using XenAdmin.Dialogs; -using System.Windows.Forms; -using XenAdmin.Actions; - - -namespace XenAdmin.Commands -{ - internal class ImportStorageLinkVolumeCommand : Command - { - public ImportStorageLinkVolumeCommand(IMainWindow mainWindow, IEnumerable selection) - : base(mainWindow, selection) - { - } - - public ImportStorageLinkVolumeCommand(IMainWindow mainWindow, StorageLinkRepository slr) - : base(mainWindow, slr) - { - } - - protected override bool CanExecuteCore(SelectedItemCollection selection) - { - return selection.ContainsOneItemOfType(sr => sr.StorageLinkRepository(Program.StorageLinkConnections) != null) || - selection.ContainsOneItemOfType(); - } - - protected override void ExecuteCore(SelectedItemCollection selection) - { - StorageLinkRepository slr = selection[0].XenObject as StorageLinkRepository; - - if (slr == null) - { - var sr = selection[0].XenObject as SR; - slr = sr != null ? sr.StorageLinkRepository(Program.StorageLinkConnections) : null; - } - - if (slr != null) - { - var dialog = new ImportStorageLinkVolumeDialog(slr); - - dialog.FormClosing += (s, e) => - { - if (dialog.DialogResult == DialogResult.OK) - { - var volumes = dialog.Volumes; - if (volumes.Count > 0) - { - var action = new DelegatedAsyncAction(null, - string.Format(Messages.IMPORT_STORAGELINK_VOLUME_ACTION_TITLE, slr), - string.Format(Messages.IMPORT_STORAGELINK_VOLUME_ACTION_START, slr), - string.Format(Messages.IMPORT_STORAGELINK_VOLUME_ACTION_FINSH, slr), - session => slr.StorageLinkConnection.AddStorageVolumesToStorageRepository(slr, volumes)); - - action.AppliesTo.Add(slr.opaque_ref); - action.AppliesTo.Add(slr.StorageLinkConnection.Cache.Server.opaque_ref); - action.RunAsync(); - } - } - }; - - dialog.Show(Parent); - } - } - } -} diff --git a/XenAdmin/Commands/NewSRCommand.cs b/XenAdmin/Commands/NewSRCommand.cs index 1baa8dda1a..d240bbc3d6 100644 --- a/XenAdmin/Commands/NewSRCommand.cs +++ b/XenAdmin/Commands/NewSRCommand.cs @@ -90,25 +90,7 @@ private static bool CanExecuteOnPool(Pool pool) protected override bool CanExecuteCore(SelectedItemCollection selection) { - if (selection.Count == 1 && selection.FirstIsStorageLink) - { - var storageLinkObject = (IStorageLinkObject)selection[0].XenObject; - - if (storageLinkObject is StorageLinkServer || storageLinkObject is StorageLinkSystem || storageLinkObject is StorageLinkPool) - { - if (storageLinkObject.StorageLinkConnection.ConnectionState == XenAdmin.Network.StorageLink.StorageLinkConnectionState.Connected) - { - foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy) - { - if (c.IsConnected && CanExecuteOnPool(Helpers.GetPool(c)) || CanExecuteOnHost(Helpers.GetMaster(c))) - { - return true; - } - } - } - } - } - else if (selection.HostAncestor != null) + if (selection.HostAncestor != null) { return CanExecuteOnHost(selection.HostAncestor); } diff --git a/XenAdmin/Commands/RemoveStorageLinkVolumeCommand.cs b/XenAdmin/Commands/RemoveStorageLinkVolumeCommand.cs deleted file mode 100644 index dcebbd28d7..0000000000 --- a/XenAdmin/Commands/RemoveStorageLinkVolumeCommand.cs +++ /dev/null @@ -1,124 +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; -using System.Collections.Generic; -using System.Text; -using XenAPI; -using XenAdmin.Actions; - - -namespace XenAdmin.Commands -{ - internal class RemoveStorageLinkVolumeCommand : Command - { - private readonly StorageLinkRepository _slr; - - public RemoveStorageLinkVolumeCommand(IMainWindow mainWindow, StorageLinkRepository slr, IEnumerable selection) - : base(mainWindow, selection) - { - _slr = slr; - } - - public RemoveStorageLinkVolumeCommand(IMainWindow mainWindow, StorageLinkRepository slr, VDI vdi) - : base(mainWindow, vdi) - { - _slr = slr; - } - - protected override bool CanExecuteCore(SelectedItemCollection selection) - { - if (_slr != null && selection.ContainsOneItemOfType()) - { - VDI vdi = (VDI)selection[0].XenObject; - var deleteCommand = new DeleteVirtualDiskCommand(MainWindowCommandInterface, vdi); - - return vdi.sm_config.ContainsKey("SVID") && !string.IsNullOrEmpty(vdi.sm_config["SVID"]) && deleteCommand.CanExecute(); - } - return false; - } - - protected override void ExecuteCore(SelectedItemCollection selection) - { - var vdi = (VDI)selection[0].XenObject; - string svid = vdi.sm_config["SVID"]; - var storageLinkVolume = vdi.StorageLinkVolume(Program.StorageLinkConnections.GetCopy()); - string volumeName = storageLinkVolume==null? "":storageLinkVolume.Name; - - var action = new DelegatedAsyncAction( - vdi.Connection, - string.Format(Messages.REMOVE_STORAGELINK_VOLUME_ACTION_TITLE, volumeName, _slr), - string.Format(Messages.REMOVE_STORAGELINK_VOLUME_ACTION_START, volumeName, _slr), - string.Format(Messages.REMOVE_STORAGELINK_VOLUME_ACTION_FINSH, volumeName, _slr), - s => _slr.StorageLinkConnection.RemoveStorageVolumesFromStorageRepository(_slr, new[] { svid })); - - action.AppliesTo.Add(vdi.opaque_ref); - action.AppliesTo.Add(svid); - action.AppliesTo.Add(_slr.opaque_ref); - - SR sr = _slr.SR(ConnectionsManager.XenConnectionsCopy); - - if(sr != null) - { - action.AppliesTo.Add(sr.opaque_ref); - } - - action.RunAsync(); - } - - protected override bool ConfirmationRequired - { - get - { - return true; - } - } - - protected override string ConfirmationDialogText - { - get - { - var vdi = (VDI)GetSelection()[0].XenObject; - var storageLinkVolume = vdi.StorageLinkVolume(Program.StorageLinkConnections.GetCopy()); - var volumeName = storageLinkVolume == null ? "" : storageLinkVolume.Name; - return string.Format(Messages.REMOVE_STORAGELINK_VOLUME_MESSAGEBOX_TEXT, volumeName); - } - } - - protected override string ConfirmationDialogTitle - { - get - { - return Messages.REMOVE_STORAGELINK_VOLUME_MESSAGEBOX_TITLE; - } - } - } -} diff --git a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.Designer.cs b/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.Designer.cs deleted file mode 100644 index 4ebc0fb90f..0000000000 --- a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.Designer.cs +++ /dev/null @@ -1,161 +0,0 @@ -using XenAdmin.Controls; -namespace XenAdmin.Dialogs -{ - partial class ImportStorageLinkVolumeDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImportStorageLinkVolumeDialog)); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.treeView = new XenAdmin.Controls.VirtualTreeView(); - this.listView = new XenAdmin.Controls.ListViewEx(); - this.columnHeaderStorageVolume = new System.Windows.Forms.ColumnHeader(); - this.columnHeaderCapacity = new System.Windows.Forms.ColumnHeader(); - this.label5 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnOK = new System.Windows.Forms.Button(); - this.searchTextBox = new XenAdmin.Controls.SearchTextBox(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer1 - // - resources.ApplyResources(this.splitContainer1, "splitContainer1"); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.treeView); - resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1"); - this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.listView); - this.splitContainer1.Panel2.Controls.Add(this.label5); - resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2"); - // - // treeView - // - resources.ApplyResources(this.treeView, "treeView"); - this.treeView.CheckBoxes = true; - this.treeView.HScrollPos = 0; - this.treeView.Name = "treeView"; - // - // listView - // - resources.ApplyResources(this.listView, "listView"); - this.listView.CheckBoxes = true; - this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderStorageVolume, - this.columnHeaderCapacity}); - this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listView.Name = "listView"; - this.listView.ShowItemToolTips = true; - this.listView.UseCompatibleStateImageBehavior = false; - this.listView.View = System.Windows.Forms.View.Details; - // - // columnHeaderStorageVolume - // - resources.ApplyResources(this.columnHeaderStorageVolume, "columnHeaderStorageVolume"); - // - // columnHeaderCapacity - // - resources.ApplyResources(this.columnHeaderCapacity, "columnHeaderCapacity"); - // - // label5 - // - resources.ApplyResources(this.label5, "label5"); - this.label5.Name = "label5"; - // - // label1 - // - resources.ApplyResources(this.label1, "label1"); - this.label1.Name = "label1"; - // - // btnCancel - // - resources.ApplyResources(this.btnCancel, "btnCancel"); - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Name = "btnCancel"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOK - // - resources.ApplyResources(this.btnOK, "btnOK"); - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Name = "btnOK"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // searchTextBox - // - resources.ApplyResources(this.searchTextBox, "searchTextBox"); - this.searchTextBox.Name = "searchTextBox"; - this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged); - // - // ImportStorageLinkVolumeDialog - // - this.AcceptButton = this.btnOK; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.btnCancel; - this.Controls.Add(this.searchTextBox); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Name = "ImportStorageLinkVolumeDialog"; - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.Panel2.PerformLayout(); - this.splitContainer1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private XenAdmin.Controls.ListViewEx listView; - private System.Windows.Forms.ColumnHeader columnHeaderStorageVolume; - private System.Windows.Forms.ColumnHeader columnHeaderCapacity; - private VirtualTreeView treeView; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.Button btnOK; - private SearchTextBox searchTextBox; - - } -} \ No newline at end of file diff --git a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.cs b/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.cs deleted file mode 100644 index 3f82df5220..0000000000 --- a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.cs +++ /dev/null @@ -1,296 +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; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Windows.Forms; -using XenAdmin.Controls; -using XenAdmin.Core; -using XenAdmin.Network; -using XenAPI; -using System.Diagnostics; -using XenAdmin.Properties; -using System.Drawing; - -namespace XenAdmin.Dialogs -{ - public partial class ImportStorageLinkVolumeDialog : XenDialogBase - { - private readonly StorageLinkRepository _slr; - private readonly List _canonRootNodes; - - public ImportStorageLinkVolumeDialog(StorageLinkRepository slr) - { - Util.ThrowIfParameterNull(slr, "slr"); - _slr = slr; - - InitializeComponent(); - - treeView.ImageList = Images.ImageList16; - listView.SmallImageList = Images.ImageList16; - - _canonRootNodes = PopulateCanonRootNodes(_slr); - - treeView.UpdateRootNodes(GetNewRootNodes()); - treeView.EndUpdate(); - - // expand storage-system and top level pools by default - new List(treeView.Nodes).ForEach(n => n.Expand()); - - if (treeView.Nodes.Count > 0) - { - treeView.Nodes[0].EnsureVisible(); - - treeView.AfterCheck += treeView_AfterCheck; - listView.ItemChecked += listView_ItemChecked; - - // check clipboard. If it matches any node, then select that node - string text = null; - bool selected = false; - - try - { - text = Clipboard.GetText().Trim(); - } - catch (Exception) - { - } - - if (text != null) - { - var node = new List(treeView.AllNodes).Find(n => n.Text.ToLower() == text.ToLower()); - if (node != null) - { - treeView.SelectedNode = node; - node.EnsureVisible(); - selected = true; - } - } - - if (!selected) - { - // select the pool that the SR is in? - } - } - } - - - private static VirtualTreeNode CreateCanonNode(IStorageLinkObject o) - { - return new VirtualTreeNode(o.Name) - { - Tag = o, - Name = o.opaque_ref, - ImageIndex = (int)Images.GetIconFor(o), - SelectedImageIndex = (int)Images.GetIconFor(o), - ShowCheckBox = o is StorageLinkVolume - }; - } - - private static ListViewItem CreateListViewItem(StorageLinkVolume vol) - { - var item = new ListViewItem(vol.Name) - { - Tag = vol, - ImageIndex = (int)Images.GetIconFor(vol), - Name = vol.opaque_ref, - Checked = true - }; - - item.SubItems.Add(Util.DiskSizeString(vol.Capacity * 1024L * 1024L)); - - return item; - } - - private static List PopulateCanonRootNodes(StorageLinkRepository slr) - { - List output = new List(); - - foreach (StorageLinkPool pool in slr.StorageLinkConnection.Cache.StoragePools) - { - if (pool.StorageLinkSystemId == slr.StorageLinkSystemId && string.IsNullOrEmpty(pool.ParentStorageLinkPoolId)) - { - output.Add(CreateCanonNode(pool)); - } - } - - var dontShow = new List(); - foreach (IXenConnection c in ConnectionsManager.XenConnectionsCopy.FindAll(c => c.IsConnected)) - { - foreach (VDI vdi in c.Cache.VDIs) - { - var otherConfig = new Dictionary(vdi.sm_config); - if (otherConfig.ContainsKey("SVID")) - { - dontShow.Add(otherConfig["SVID"]); - } - } - } - - foreach (StorageLinkVolume volume in slr.StorageLinkConnection.Cache.StorageVolumes) - { - if (volume.StorageLinkSystemId == slr.StorageLinkSystemId && !dontShow.Contains(volume.opaque_ref)) - { - output.Find(n => n.Name == volume.RootStorageLinkPool.opaque_ref).Nodes.Add(CreateCanonNode(volume)); - } - } - - return output; - } - - private void treeView_AfterCheck(object sender, VirtualTreeViewEventArgs e) - { - var volume = (StorageLinkVolume)e.Node.Tag; - if (!e.Node.Checked) - { - listView.Items.RemoveByKey(volume.opaque_ref); - } - else - { - listView.ItemChecked -= listView_ItemChecked; - listView.Items.Add(CreateListViewItem(volume)); - listView.ItemChecked += listView_ItemChecked; - } - } - - private void listView_ItemChecked(object sender, ItemCheckedEventArgs e) - { - if (!e.Item.Checked) - { - treeView.AfterCheck -= treeView_AfterCheck; - - var nodes = treeView.Nodes.Find(n => n.Name == e.Item.Name, true); - Debug.Assert(nodes != null && nodes.Length == 1); - if (nodes != null && nodes.Length > 0) - { - nodes[0].Checked = false; - } - treeView.AfterCheck += treeView_AfterCheck; - - listView.Items.Remove(e.Item); - } - } - - private void searchTextBox_TextChanged(object sender, EventArgs e) - { - // take copy of root-node with search text - treeView.UpdateRootNodes(GetNewRootNodes()); - - // set everything that matches the search to be expanded. - new List(treeView.AllNodes).FindAll(NodeMatches).ForEach(n => n.Expand()); - - treeView.EndUpdate(); - } - - private List GetNewRootNodes() - { - return _canonRootNodes.ConvertAll(n => - { - var nn = new VirtualTreeNode(string.Empty); - CopyNode(n, nn); - return nn; - }).FindAll(NodeMatches); - } - - private void CopyNode(VirtualTreeNode src, VirtualTreeNode dest) - { - StorageLinkVolume volume = src.Tag as StorageLinkVolume; - - dest.Text = src.Text; - dest.Tag = src.Tag; - dest.Name = src.Name; - dest.ImageIndex = src.ImageIndex; - dest.SelectedImageIndex = src.SelectedImageIndex; - dest.ShowCheckBox = src.ShowCheckBox; - dest.Checked = dest.ShowCheckBox && listView.Items.Find(src.Name, false).Length > 0; - - foreach (VirtualTreeNode n in src.Nodes) - { - if (NodeMatches(n)) - { - dest.Nodes.Add(new VirtualTreeNode(string.Empty)); - CopyNode(n, dest.Nodes[dest.Nodes.Count - 1]); - } - } - } - - private bool NodeTextMatches(VirtualTreeNode node) - { - return searchTextBox.Matches(node.Text); - } - - private bool NodeMatches(VirtualTreeNode node) - { - if (searchTextBox.Text.Length == 0 || - NodeTextMatches(node) || - new List(node.Ancestors).Find(NodeTextMatches) != null) - { - return true; - } - - foreach (VirtualTreeNode n in node.Nodes) - { - if (NodeMatches(n)) - { - return true; - } - } - - return false; - } - - private void btnCancel_Click(object sender, EventArgs e) - { - Close(); - } - - private void btnOK_Click(object sender, EventArgs e) - { - Close(); - } - - private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) - { - Image image = Resources.gripper; - - e.Graphics.DrawImageUnscaled(Resources.gripper, new Point(splitContainer1.Width / 2 - image.Width / 2, splitContainer1.Panel1.Height - 2)); - } - - public ReadOnlyCollection Volumes - { - get - { - return new ReadOnlyCollection(new List(Util.PopulateList(listView.Items).ConvertAll(i => i.Name))); - } - } - } -} diff --git a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.ja.resx b/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.ja.resx deleted file mode 100644 index 99d4135bc6..0000000000 --- a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.ja.resx +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Top, Bottom, Left, Right - - - - Segoe UI, 9pt - - - 12, 74 - - - Horizontal - - - Top, Bottom, Left, Right - - - Segoe UI, 9pt - - - 0, 0 - - - 544, 246 - - - - 4 - - - treeView - - - XenAdmin.Controls.VirtualTreeView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel1 - - - 0 - - - Segoe UI, 9pt - - - splitContainer1.Panel1 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 0 - - - 100 - - - Top, Bottom, Left, Right - - - ストレージ ボリューム - - - 455 - - - 容量 - - - 71 - - - Segoe UI, 9pt - - - 0, 21 - - - 544, 112 - - - 3 - - - listView - - - XenAdmin.Controls.ListViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel2 - - - 0 - - - True - - - Segoe UI, 9pt - - - 2, 3 - - - 144, 15 - - - 6 - - - 選択したストレージ ボリューム: - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1.Panel2 - - - 1 - - - Segoe UI, 9pt - - - splitContainer1.Panel2 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 1 - - - 100 - - - 544, 402 - - - 263 - - - 3 - - - 8 - - - splitContainer1 - - - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - True - - - Segoe UI, 9pt - - - 12, 16 - - - 326, 15 - - - 6 - - - ストレージ リポジトリにインポートするストレージ ボリュームを選択します。 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - Bottom, Right - - - Segoe UI, 9pt - - - 481, 482 - - - 75, 23 - - - 9 - - - キャンセル - - - btnCancel - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - Bottom, Right - - - Segoe UI, 9pt - - - 400, 482 - - - 75, 23 - - - 9 - - - OK - - - btnOK - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - Segoe UI, 9pt - - - 11, 45 - - - 179, 23 - - - 10 - - - searchTextBox - - - XenAdmin.Controls.SearchTextBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - - - True - - - 96, 96 - - - 569, 517 - - - Segoe UI, 9pt - - - 500, 400 - - - StorageLink ボリュームのインポート - - - columnHeaderStorageVolume - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - columnHeaderCapacity - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ImportStorageLinkVolumeDialog - - - XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - \ No newline at end of file diff --git a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.resx b/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.resx deleted file mode 100644 index 54ee1ea4ac..0000000000 --- a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.resx +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Top, Bottom, Left, Right - - - - Segoe UI, 9pt - - - 12, 74 - - - Horizontal - - - Top, Bottom, Left, Right - - - Segoe UI, 9pt - - - 0, 0 - - - 544, 246 - - - - 4 - - - treeView - - - XenAdmin.Controls.VirtualTreeView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel1 - - - 0 - - - Segoe UI, 9pt - - - splitContainer1.Panel1 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 0 - - - 100 - - - Top, Bottom, Left, Right - - - Storage Volume - - - 455 - - - Capacity - - - 71 - - - Segoe UI, 9pt - - - 0, 21 - - - 544, 112 - - - 3 - - - listView - - - XenAdmin.Controls.ListViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel2 - - - 0 - - - True - - - Segoe UI, 9pt - - - 2, 3 - - - 144, 15 - - - 6 - - - Selected storage volumes: - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1.Panel2 - - - 1 - - - Segoe UI, 9pt - - - splitContainer1.Panel2 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 1 - - - 100 - - - 544, 402 - - - 263 - - - 3 - - - 8 - - - splitContainer1 - - - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - True - - - Segoe UI, 9pt - - - 12, 16 - - - 326, 15 - - - 6 - - - Select storage volumes to import into the storage repository. - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - Bottom, Right - - - Segoe UI, 9pt - - - 481, 482 - - - 75, 23 - - - 9 - - - Cancel - - - btnCancel - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - Bottom, Right - - - Segoe UI, 9pt - - - 400, 482 - - - 75, 23 - - - 9 - - - OK - - - btnOK - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - Segoe UI, 9pt - - - 11, 45 - - - 179, 23 - - - 10 - - - searchTextBox - - - XenAdmin.Controls.SearchTextBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - - - True - - - 96, 96 - - - 569, 517 - - - Segoe UI, 9pt - - - 500, 400 - - - Import StorageLink Volumes - - - columnHeaderStorageVolume - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - columnHeaderCapacity - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ImportStorageLinkVolumeDialog - - - XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - \ No newline at end of file diff --git a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.zh-CN.resx b/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.zh-CN.resx deleted file mode 100644 index bc96b6c286..0000000000 --- a/XenAdmin/Dialogs/ImportStorageLinkVolumeDialog.zh-CN.resx +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Top, Bottom, Left, Right - - - - Segoe UI, 9pt - - - 12, 74 - - - Horizontal - - - Top, Bottom, Left, Right - - - Segoe UI, 9pt - - - 0, 0 - - - 544, 246 - - - - 4 - - - treeView - - - XenAdmin.Controls.VirtualTreeView, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel1 - - - 0 - - - Segoe UI, 9pt - - - splitContainer1.Panel1 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 0 - - - 100 - - - Top, Bottom, Left, Right - - - 存储卷 - - - 455 - - - 容量 - - - 71 - - - Segoe UI, 9pt - - - 0, 21 - - - 544, 112 - - - 3 - - - listView - - - XenAdmin.Controls.ListViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - splitContainer1.Panel2 - - - 0 - - - True - - - Segoe UI, 9pt - - - 2, 3 - - - 144, 15 - - - 6 - - - 选定的存储卷: - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1.Panel2 - - - 1 - - - Segoe UI, 9pt - - - splitContainer1.Panel2 - - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer1 - - - 1 - - - 100 - - - 544, 402 - - - 263 - - - 3 - - - 8 - - - splitContainer1 - - - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - True - - - Segoe UI, 9pt - - - 12, 16 - - - 326, 15 - - - 6 - - - 选择要导入存储库的存储卷。 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - Bottom, Right - - - Segoe UI, 9pt - - - 481, 482 - - - 75, 23 - - - 9 - - - 取消 - - - btnCancel - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - Bottom, Right - - - Segoe UI, 9pt - - - 400, 482 - - - 75, 23 - - - 9 - - - 确定 - - - btnOK - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - Segoe UI, 9pt - - - 11, 45 - - - 179, 23 - - - 10 - - - searchTextBox - - - XenAdmin.Controls.SearchTextBox, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - - - True - - - 96, 96 - - - 569, 517 - - - Segoe UI, 9pt - - - 500, 400 - - - 导入 StorageLink 卷 - - - columnHeaderStorageVolume - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - columnHeaderCapacity - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ImportStorageLinkVolumeDialog - - - XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - \ No newline at end of file diff --git a/XenAdmin/Help/HelpManager.resx b/XenAdmin/Help/HelpManager.resx index 1de182d143..d283d76668 100644 --- a/XenAdmin/Help/HelpManager.resx +++ b/XenAdmin/Help/HelpManager.resx @@ -573,10 +573,6 @@ xs70-010 6320 - - xs70-010 - 4035 - xs70-018 9511 diff --git a/XenAdmin/Images.cs b/XenAdmin/Images.cs index 14efae3c29..926e562710 100644 --- a/XenAdmin/Images.cs +++ b/XenAdmin/Images.cs @@ -154,17 +154,6 @@ static Images() ImageList16.Images.Add("000_Fields_h32bit_16.png", Properties.Resources._000_Fields_h32bit_16); ImageList16.Images.Add("ha_16.png", Properties.Resources.ha_16); - ImageList16.Images.Add("sl_16.png", Properties.Resources.sl_16); - ImageList16.Images.Add("sl_connected_16.png", Properties.Resources.sl_connected_16); - ImageList16.Images.Add("sl_disconnected_16.png", Properties.Resources.sl_disconnected_16); - ImageList16.Images.Add("sl_connecting_16.png", Properties.Resources.sl_connecting_16); - ImageList16.Images.Add("sl_system_16.png", Properties.Resources.sl_system_16); - ImageList16.Images.Add("sl_pool_16.png", Properties.Resources.sl_pool_16); - ImageList16.Images.Add("sl_pools_16.png", Properties.Resources.sl_pools_16); - ImageList16.Images.Add("sl_lun_16.png", Properties.Resources.sl_lun_16); - ImageList16.Images.Add("sl_luns_16.png", Properties.Resources.sl_luns_16); - ImageList16.Images.Add("000_Storage_h32bit_16.png", Properties.Resources._000_Storage_h32bit_16); - ImageList16.Images.Add("virtualappliance_16.png", Properties.Resources._000_VirtualAppliance_h32bit_16); ImageList16.Images.Add("000_MigrateVM_h32bit_16.png", Properties.Resources._000_MigrateVM_h32bit_16); @@ -275,26 +264,6 @@ public static Icons GetIconFor(IXenObject o) if (pif != null) return GetIconFor(pif); - StorageLinkServer storageLinkServer = o as StorageLinkServer; - if (storageLinkServer != null) - return GetIconFor(storageLinkServer); - - StorageLinkSystem storageLinkSystem = o as StorageLinkSystem; - if (storageLinkSystem != null) - return GetIconFor(storageLinkSystem); - - StorageLinkPool storageLinkPool = o as StorageLinkPool; - if (storageLinkPool != null) - return GetIconFor(storageLinkPool); - - StorageLinkVolume storageLinkVolume = o as StorageLinkVolume; - if (storageLinkVolume != null) - return GetIconFor(storageLinkVolume); - - StorageLinkRepository storageLinkRepository = o as StorageLinkRepository; - if (storageLinkRepository != null) - return GetIconFor(storageLinkRepository); - DockerContainer dockerContainer = o as DockerContainer; if (dockerContainer != null) return GetIconFor(dockerContainer); @@ -328,44 +297,6 @@ public static Icons GetIconFor(IXenConnection connection) return Icons.HostDisconnected; } - public static Icons GetIconFor(StorageLinkSystem storageLinkSystem) - { - return Icons.StorageLinkSystem; - } - - public static Icons GetIconFor(StorageLinkServer storageLinkServer) - { - if (storageLinkServer.StorageLinkConnection.ConnectionState == StorageLinkConnectionState.Connecting) - { - return Icons.StorageLinkServerConnecting; - } - else if (storageLinkServer.StorageLinkConnection.ConnectionState == StorageLinkConnectionState.Connected) - { - return Icons.StorageLinkServerConnected; - } - return Icons.StorageLinkServerDisconnected; - } - - public static Icons GetIconFor(StorageLinkPool storageLinkPool) - { - return Icons.StorageLinkPool; - } - - public static Icons GetIconFor(StorageLinkVolume storageLinkVolume) - { - VDI vdi = storageLinkVolume.VDI(ConnectionsManager.XenConnectionsCopy); - if (vdi != null) - { - return GetIconFor(vdi); - } - return Icons.StorageLinkVolume; - } - - public static Icons GetIconFor(StorageLinkRepository storageLinkRepository) - { - return Icons.StorageLinkRepository; - } - public static Icons GetIconFor(Folder folder) { return folder.Grey ? Icons.FolderGrey : Icons.Folder; diff --git a/XenAdmin/MainWindowTreeBuilder.cs b/XenAdmin/MainWindowTreeBuilder.cs index 33a7d79a45..1c6cf06ec4 100644 --- a/XenAdmin/MainWindowTreeBuilder.cs +++ b/XenAdmin/MainWindowTreeBuilder.cs @@ -352,26 +352,6 @@ public IAcceptGroups Add(Grouping grouping, Object group, int indent) { node = AddFolderNode((Folder)group); } - else if (group is StorageLinkServer) - { - node = AddStorageLinkServerNode((StorageLinkServer)group); - } - else if (group is StorageLinkSystem) - { - node = AddStorageLinkSystemNode((StorageLinkSystem)group); - } - else if (group is StorageLinkPool) - { - node = AddStorageLinkPoolNode((StorageLinkPool)group); - } - else if (group is StorageLinkVolume) - { - node = AddStorageLinkVolumeNode((StorageLinkVolume)group); - } - else if (group is StorageLinkRepository) - { - node = AddStorageLinkRepositoryNode((StorageLinkRepository)group); - } else { node = AddNode(grouping.GetGroupName(group), grouping.GetGroupIcon(group), @@ -402,43 +382,6 @@ private static object GetGroupingTagFromNode(VirtualTreeNode node) return node.Tag; } - private VirtualTreeNode AddStorageLinkServerNode(StorageLinkServer storageLinkServer) - { - return AddNode(storageLinkServer.Name, Images.GetIconFor(storageLinkServer), false, storageLinkServer); - } - - private VirtualTreeNode AddStorageLinkSystemNode(StorageLinkSystem storageLinkSystem) - { - return AddNode(Helpers.GetName(storageLinkSystem), Images.GetIconFor(storageLinkSystem), false, storageLinkSystem); - } - - private VirtualTreeNode AddStorageLinkPoolNode(StorageLinkPool storageLinkPool) - { - return AddNode(Helpers.GetName(storageLinkPool), Images.GetIconFor(storageLinkPool), false, storageLinkPool); - } - - private VirtualTreeNode AddStorageLinkVolumeNode(StorageLinkVolume storageLinkVolume) - { - string name = storageLinkVolume.FriendlyName; - - VDI vdi = storageLinkVolume.VDI(ConnectionsManager.XenConnectionsCopy); - if (vdi != null) - name = string.Format("{0} ({1})", vdi.Name, name); - - return AddNode(name, Images.GetIconFor(storageLinkVolume), false, storageLinkVolume); - } - - private VirtualTreeNode AddStorageLinkRepositoryNode(StorageLinkRepository storageLinkRepository) - { - string name = storageLinkRepository.Name; - StorageLinkPool pool = storageLinkRepository.StorageLinkPool; - - if (pool != null && !string.IsNullOrEmpty(pool.ParentStorageLinkPoolId)) - name = string.Format("{0} ({1})", storageLinkRepository.Name, pool); - - return AddNode(name, Images.GetIconFor(storageLinkRepository), false, storageLinkRepository); - } - private VirtualTreeNode AddPoolNode(Pool pool) { return AddNode(Helpers.GetName(pool), Images.GetIconFor(pool), false, pool); diff --git a/XenAdmin/Program.cs b/XenAdmin/Program.cs index 62dc21f280..fbb90ab976 100644 --- a/XenAdmin/Program.cs +++ b/XenAdmin/Program.cs @@ -242,7 +242,6 @@ static public void Main(string[] Args) ConnectionsManager.XenConnections.Clear(); ConnectionsManager.History.Clear(); - Search.InitSearch(() => Program.StorageLinkConnections.GetCopy()); TreeSearch.InitSearch(); ArgType argType = ArgType.None; diff --git a/XenAdmin/TabPages/GeneralTabPage.cs b/XenAdmin/TabPages/GeneralTabPage.cs index 05e1e4eba5..7e140f8a90 100644 --- a/XenAdmin/TabPages/GeneralTabPage.cs +++ b/XenAdmin/TabPages/GeneralTabPage.cs @@ -424,14 +424,6 @@ public void BuildList() base.Text = Messages.SR_GENERAL_TAB_TITLE; else if (xenObject is Pool) base.Text = Messages.POOL_GENERAL_TAB_TITLE; - else if (xenObject is StorageLinkPool) - base.Text = Messages.STORAGELINKPOOL_GENERAL_TAB_TITLE; - else if (xenObject is StorageLinkServer) - base.Text = Messages.STORAGELINKSERVER_GENERAL_TAB_TITLE; - else if (xenObject is StorageLinkSystem) - base.Text = Messages.STORAGELINKSYSTEM_GENERAL_TAB_TITLE; - else if (xenObject is StorageLinkRepository) - base.Text = Messages.SR_GENERAL_TAB_TITLE; else if (xenObject is DockerContainer) base.Text = Messages.CONTAINER_GENERAL_TAB_TITLE; @@ -1302,35 +1294,6 @@ private void generateGeneralBox() } } } - else if (xenObject is StorageLinkPool) - { - var pool = (StorageLinkPool)xenObject; - - string capacityText = Util.DiskSizeString(pool.Capacity * 1024L * 1024L); - string usedSpaceText = Util.DiskSizeString(pool.UsedSpace * 1024L * 1024L); - string text = string.Format(Messages.STORAGELINK_POOL_SIZE_USED, usedSpaceText, capacityText); - - s.AddEntry(Messages.SIZE, text); - } - else if (xenObject is StorageLinkServer) - { - StorageLinkServer server = (StorageLinkServer)xenObject; - s.AddEntry(Messages.USERNAME, server.StorageLinkConnection.Username); - - string error = server.StorageLinkConnection.Error; - - if (!string.IsNullOrEmpty(error)) - { - s.AddEntry(Messages.ERROR, error); - } - } - else if (xenObject is StorageLinkSystem) - { - StorageLinkSystem sys = (StorageLinkSystem)xenObject; - s.AddEntry(Messages.FULL_NAME, sys.FullName); - s.AddEntry(Messages.MODEL, sys.Model); - s.AddEntry(Messages.SERIAL_NUMBER, sys.SerialNumber); - } s.AddEntry(FriendlyName("host.uuid"), GetUUID(xenObject)); } diff --git a/XenAdmin/TabPages/SrStoragePage.Designer.cs b/XenAdmin/TabPages/SrStoragePage.Designer.cs index 61e2583c28..623950db29 100644 --- a/XenAdmin/TabPages/SrStoragePage.Designer.cs +++ b/XenAdmin/TabPages/SrStoragePage.Designer.cs @@ -35,13 +35,9 @@ private void InitializeComponent() this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.toolTipContainerRescan = new XenAdmin.Controls.ToolTipContainer(); this.buttonRefresh = new System.Windows.Forms.Button(); - this.addDropDownButton = new XenAdmin.Controls.DropDownButton(); - this.addContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.toolTipContainerMove = new XenAdmin.Controls.ToolTipContainer(); this.buttonMove = new System.Windows.Forms.Button(); - this.removeDropDownButton = new XenAdmin.Controls.DropDownButton(); - this.removeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.panel1 = new System.Windows.Forms.Panel(); this.dataGridViewVDIs = new System.Windows.Forms.DataGridView(); this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -149,12 +145,10 @@ private void InitializeComponent() // this.flowLayoutPanel1.Controls.Add(this.toolTipContainerRescan); this.flowLayoutPanel1.Controls.Add(this.addVirtualDiskButton); - this.flowLayoutPanel1.Controls.Add(this.addDropDownButton); this.flowLayoutPanel1.Controls.Add(this.groupBox1); this.flowLayoutPanel1.Controls.Add(this.EditButtonContainer); this.flowLayoutPanel1.Controls.Add(this.toolTipContainerMove); this.flowLayoutPanel1.Controls.Add(this.RemoveButtonContainer); - this.flowLayoutPanel1.Controls.Add(this.removeDropDownButton); resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1"); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; // @@ -171,19 +165,6 @@ private void InitializeComponent() this.buttonRefresh.UseVisualStyleBackColor = true; this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click); // - // addDropDownButton - // - resources.ApplyResources(this.addDropDownButton, "addDropDownButton"); - this.addDropDownButton.ContextMenuStrip = this.addContextMenuStrip; - this.addDropDownButton.Name = "addDropDownButton"; - this.addDropDownButton.UseVisualStyleBackColor = true; - // - // addContextMenuStrip - // - this.addContextMenuStrip.Name = "addContextMenuStrip"; - resources.ApplyResources(this.addContextMenuStrip, "addContextMenuStrip"); - this.addContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.addContextMenuStrip_Opening); - // // groupBox1 // resources.ApplyResources(this.groupBox1, "groupBox1"); @@ -203,25 +184,11 @@ private void InitializeComponent() this.buttonMove.UseVisualStyleBackColor = true; this.buttonMove.Click += new System.EventHandler(this.buttonMove_Click); // - // removeDropDownButton - // - this.removeDropDownButton.ContextMenuStrip = this.removeContextMenuStrip; - resources.ApplyResources(this.removeDropDownButton, "removeDropDownButton"); - this.removeDropDownButton.Name = "removeDropDownButton"; - this.removeDropDownButton.UseVisualStyleBackColor = true; - // - // removeContextMenuStrip - // - this.removeContextMenuStrip.Name = "removeContextMenuStrip"; - resources.ApplyResources(this.removeContextMenuStrip, "removeContextMenuStrip"); - this.removeContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.removeContextMenuStrip_Opening); - // // panel1 // resources.ApplyResources(this.panel1, "panel1"); this.panel1.Controls.Add(this.dataGridViewVDIs); this.panel1.Controls.Add(this.flowLayoutPanel1); - this.panel1.MaximumSize = new System.Drawing.Size(900, 400); this.panel1.Name = "panel1"; // // dataGridViewVDIs @@ -300,6 +267,7 @@ private void InitializeComponent() this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewVDIs)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -320,10 +288,6 @@ private void InitializeComponent() private System.Windows.Forms.Button buttonRefresh; private XenAdmin.Controls.ToolTipContainer toolTipContainerRescan; private System.Windows.Forms.GroupBox groupBox1; - private XenAdmin.Controls.DropDownButton addDropDownButton; - private XenAdmin.Controls.DropDownButton removeDropDownButton; - private System.Windows.Forms.ContextMenuStrip addContextMenuStrip; - private System.Windows.Forms.ContextMenuStrip removeContextMenuStrip; private XenAdmin.Controls.ToolTipContainer toolTipContainerMove; private System.Windows.Forms.Button buttonMove; private System.Windows.Forms.ToolStripMenuItem moveVirtualDiskToolStripMenuItem; diff --git a/XenAdmin/TabPages/SrStoragePage.cs b/XenAdmin/TabPages/SrStoragePage.cs index aea2ddd542..b145758be0 100644 --- a/XenAdmin/TabPages/SrStoragePage.cs +++ b/XenAdmin/TabPages/SrStoragePage.cs @@ -146,15 +146,6 @@ public SR SR sr.Connection.XenObjectsUpdated += Connection_XenObjectsUpdated; } - // removeDropDownButton and addDropDownButton are for storagelink. They contain extra stuff for adding - // and removing SL volumes. - - addDropDownButton.Visible = sr != null && sr.type == "cslg" && sr.StorageLinkRepository(Program.StorageLinkConnections) != null; - addVirtualDiskButton.Visible &= !addDropDownButton.Visible; - - removeDropDownButton.Visible = addDropDownButton.Visible; - RemoveButtonContainer.Visible = !removeDropDownButton.Visible; - BuildList(true); SetupDeprecationBanner(); } @@ -165,12 +156,10 @@ private void RefreshDataGridView(VDIsData data) dataGridViewVDIs.SuspendLayout(); try { - storageLinkVolumeColumn.Visible = data.ShowStorageLink; - // Update existing rows foreach (var vdiRow in data.VdiRowsToUpdate) { - vdiRow.RefreshRowDetails(data.ShowStorageLink); + vdiRow.RefreshRowDetails(); } // Remove rows for deleted VDIs @@ -182,7 +171,7 @@ private void RefreshDataGridView(VDIsData data) // Add rows for new VDIs foreach (var vdi in data.VdisToAdd) { - VDIRow newRow = new VDIRow(vdi, data.ShowStorageLink); + VDIRow newRow = new VDIRow(vdi); dataGridViewVDIs.Rows.Add(newRow); } } @@ -429,36 +418,8 @@ private void RefreshButtons() } else EditButton.Enabled = false; - - // Remove drop down button - removeDropDownButton.Enabled = deleteCmd.CanExecute(); - } - private void removeContextMenuStrip_Opening(object sender, CancelEventArgs e) - { - removeContextMenuStrip.Items.Clear(); - SelectedItemCollection vdis = SelectedVDIs; - if (vdis.Count > 0) - { - Command cmd = new DeleteVirtualDiskCommand(Program.MainWindow, vdis); - removeContextMenuStrip.Items.Add(new CommandToolStripMenuItem(cmd, Messages.DELETE_VIRTUAL_DISK)); - - cmd = new RemoveStorageLinkVolumeCommand(Program.MainWindow, sr.StorageLinkRepository(Program.StorageLinkConnections), vdis); - removeContextMenuStrip.Items.Add(new CommandToolStripMenuItem(cmd, Messages.DELETE_SL_VOLUME_CONTEXT_MENU_ELIPS)); - } - } - - private void addContextMenuStrip_Opening(object sender, CancelEventArgs e) - { - addContextMenuStrip.Items.Clear(); - - Command cmd = new AddVirtualDiskCommand(Program.MainWindow, sr); - addContextMenuStrip.Items.Add(new CommandToolStripMenuItem(cmd, Messages.ADD_VIRTUAL_DISK)); - - cmd = new ImportStorageLinkVolumeCommand(Program.MainWindow, sr.StorageLinkRepository(Program.StorageLinkConnections)); - addContextMenuStrip.Items.Add(new CommandToolStripMenuItem(cmd, Messages.ADD_SL_VOLUME)); - } #endregion #region buttonHandlers @@ -541,11 +502,8 @@ public class VDIRow : DataGridViewRow { public VDI VDI { get; private set; } - private bool showStorageLink = false; - - public VDIRow(VDI vdi, bool showStorageLink) + public VDIRow(VDI vdi) { - this.showStorageLink = showStorageLink; VDI = vdi; for (int i = 0; i < 5; i++) { @@ -574,9 +532,8 @@ private string GetCellText(int cellIndex) } } - public void RefreshRowDetails(bool showSL) + public void RefreshRowDetails() { - showStorageLink = showSL; for (int i = 0; i < 5; i++) { Cells[i].Value = GetCellText(i); @@ -589,15 +546,12 @@ public struct VDIsData public List VdiRowsToUpdate { get; private set; } public List VdiRowsToRemove { get; private set; } public List VdisToAdd { get; private set; } - public bool ShowStorageLink { get; private set; } - public VDIsData(List vdiRowsToUpdate, List vdiRowsToRemove, List vdisToAdd, - bool showStorageLink) : this() + public VDIsData(List vdiRowsToUpdate, List vdiRowsToRemove, List vdisToAdd) : this() { VdiRowsToUpdate = vdiRowsToUpdate; VdiRowsToRemove = vdiRowsToRemove; VdisToAdd = vdisToAdd; - ShowStorageLink = showStorageLink; } } @@ -649,8 +603,6 @@ private VDIsData GetCurrentData(SR sr, IEnumerable currentVDIRows) !vdi.IsAnIntermediateStorageMotionSnapshot) .ToList(); - bool showStorageLink = vdis.Find(v => v.sm_config.ContainsKey("SVID")) != null; - var vdiRowsToRemove = currentVDIRows.Where(vdiRow => !vdis.Contains(vdiRow.VDI)).OrderByDescending(row => row.Index).ToList(); @@ -658,7 +610,7 @@ private VDIsData GetCurrentData(SR sr, IEnumerable currentVDIRows) var vdisToAdd = vdis.Except(vdiRowsToUpdate.ConvertAll(vdiRow => vdiRow.VDI)).ToList(); - return new VDIsData(vdiRowsToUpdate, vdiRowsToRemove, vdisToAdd, showStorageLink); + return new VDIsData(vdiRowsToUpdate, vdiRowsToRemove, vdisToAdd); } private void DoWork(object sender, DoWorkEventArgs e) diff --git a/XenAdmin/TabPages/SrStoragePage.ja.resx b/XenAdmin/TabPages/SrStoragePage.ja.resx index 3eec603a01..84a82b56a7 100644 --- a/XenAdmin/TabPages/SrStoragePage.ja.resx +++ b/XenAdmin/TabPages/SrStoragePage.ja.resx @@ -267,51 +267,6 @@ 1 - - Top, Right - - - 172, 17 - - - 61, 4 - - - addContextMenuStrip - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 216, 5 - - - 3, 0, 3, 3 - - - 0, 0, 3, 0 - - - 102, 23 - - - 7 - - - 追加(&A) - - - addDropDownButton - - - XenAdmin.Controls.DropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - flowLayoutPanel1 - - - 2 - 324, 5 @@ -501,18 +456,6 @@ 6 - - 344, 17 - - - 61, 4 - - - removeContextMenuStrip - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 653, 5 diff --git a/XenAdmin/TabPages/SrStoragePage.resx b/XenAdmin/TabPages/SrStoragePage.resx index 71b73f130c..00fe5824d2 100644 --- a/XenAdmin/TabPages/SrStoragePage.resx +++ b/XenAdmin/TabPages/SrStoragePage.resx @@ -112,233 +112,230 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Top, Bottom, Left, Right + + panel1 - - True - - - Name + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - Storage Volume + + pageContainerPanel - - True - - - Description + + 0 - - True - - - Size + + label1 - - - 52 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - Virtual Machine + + pageContainerPanel - - Fill + + 1 - - - 0, 0 + + + 0, 78 - - 898, 334 + + 920, 372 - - 9 + + pageContainerPanel - - dataGridViewVDIs + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - panel1 + + 1 - - 0 + + 17, 17 + + + 174, 76 - - Fill + + contextMenuStrip1 - - 0, 0 + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3, 0, 3, 0 + + 173, 22 - - 102, 23 + + &Move virtual disk... - - 4 + + 173, 22 - - Res&can + + Delete virtual disk - - buttonRefresh + + 170, 6 - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 173, 22 - - toolTipContainerRescan + + Properties - - 1 + + + Fill - - 0, 5 + + Microsoft Sans Serif, 11.25pt - - 0, 0, 3, 0 + + NoControl - - 102, 23 + + 0, 0 - - 5 + + 8, 0, 0, 0 - - toolTipContainerRescan + + 920, 36 - - XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + 0 - - flowLayoutPanel1 + + Virtual Disks - - 0 + + MiddleLeft - - Top, Right + + TitleLabel - - NoControl + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 108, 5 + + Top, Right - - 3, 0, 3, 0 + + RemoveButton - - 102, 23 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + RemoveButtonContainer + + 1 - - &Add... + + 440, 5 - - addVirtualDiskButton + + 3, 0, 0, 0 - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 102, 23 - + + 3 + + + RemoveButtonContainer + + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + flowLayoutPanel1 - - 1 + + 5 - - Top, Right + + Fill - - 172, 17 - - - 61, 4 + + NoControl + + + 0, 0 - - addContextMenuStrip + + 102, 23 - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 - - 216, 5 + + &Delete - - 3, 0, 3, 3 + + RemoveButton - - 0, 0, 3, 0 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 102, 23 + + RemoveButtonContainer - - 7 + + 1 - - &Add + + Top, Right - - addDropDownButton + + EditButton - - XenAdmin.Controls.DropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - flowLayoutPanel1 + + EditButtonContainer - - 2 + + 1 - - 324, 5 + + 224, 5 - + 3, 0, 3, 0 - - 2, 20 + + 102, 23 - - 6 + + 2 - - groupBox1 + + EditButtonContainer - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - + flowLayoutPanel1 - + 3 - - Top, Right - Fill @@ -361,7 +358,7 @@ EditButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 EditButtonContainer @@ -369,185 +366,146 @@ 1 - - 332, 5 - - - 3, 0, 3, 0 + + Top, Right - - 102, 23 + + NoControl - - 2 - - - EditButtonContainer - - - XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - flowLayoutPanel1 - - - 4 - - - Fill + + 108, 5 - - 0, 0 + + 3, 0, 3, 0 - + 102, 23 - - 0 + + 1 - - Mov&e... + + &Add... - - buttonMove + + addVirtualDiskButton - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolTipContainerMove + + flowLayoutPanel1 - + 1 - - 440, 5 + + True - - 3, 0, 3, 0 + + Segoe UI, 12pt - - 102, 23 + + 6, 7 - - 9 + + 47, 21 - - toolTipContainerMove + + 6 - - XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + Disks - - flowLayoutPanel1 + + label1 - - 5 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Top, Right + + pageContainerPanel - - Fill + + 1 - - NoControl + + toolTipContainerRescan - - 0, 0 + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - 102, 23 + + flowLayoutPanel1 - + 0 - - &Delete - - - RemoveButton + + addVirtualDiskButton - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - RemoveButtonContainer + + flowLayoutPanel1 - + 1 - - 548, 5 + + groupBox1 - - 3, 0, 0, 0 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 102, 23 + + flowLayoutPanel1 - - 3 + + 2 - - RemoveButtonContainer + + EditButtonContainer - + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - + flowLayoutPanel1 - - 6 - - - 344, 17 - - - 61, 4 - - - removeContextMenuStrip - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 653, 5 - - - 3, 0, 3, 3 + + 3 - - 0, 0, 3, 0 + + toolTipContainerMove - - 102, 23 + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - 8 + + flowLayoutPanel1 - - &Delete + + 4 - - removeDropDownButton + + RemoveButtonContainer - - XenAdmin.Controls.DropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - + flowLayoutPanel1 - - 7 + + 5 Bottom - 0, 334 + 0, 293 0, 5, 0, 0 @@ -565,7 +523,7 @@ flowLayoutPanel1 - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 panel1 @@ -573,139 +531,259 @@ 1 - - 9, 31 + + buttonRefresh - - 898, 369 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 9 + + toolTipContainerRescan - - panel1 + + 1 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 5 - - pageContainerPanel + + 0, 0, 3, 0 - + + 102, 23 + + + 5 + + + toolTipContainerRescan + + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + flowLayoutPanel1 + + 0 - - True + + Fill - - Segoe UI, 12pt + + 0, 0 - - 6, 7 + + 3, 0, 3, 0 - - 47, 21 + + 102, 23 - - 6 + + 4 - - Disks + + Res&can - - label1 + + buttonRefresh - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - pageContainerPanel + + toolTipContainerRescan - + 1 - - 920, 413 + + 216, 5 - - pageContainerPanel + + 3, 0, 3, 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 20 - - $this + + 6 - - 0 + + groupBox1 - - 17, 17 - - - 173, 22 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - &Move virtual disk... + + flowLayoutPanel1 - - 173, 22 + + 2 - - Delete virtual disk + + buttonMove - - 170, 6 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 173, 22 + + toolTipContainerMove - - Properties + + 1 - - 174, 76 + + 332, 5 - - contextMenuStrip1 + + 3, 0, 3, 0 - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 102, 23 - + + 9 + + + toolTipContainerMove + + + XenAdmin.Controls.ToolTipContainer, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + flowLayoutPanel1 + + + 4 + + Fill - - Microsoft Sans Serif, 11.25pt + + 0, 0 - - NoControl + + 102, 23 - + + 0 + + + Mov&e... + + + buttonMove + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolTipContainerMove + + + 1 + + + Top, Bottom, Left, Right + + + True + + + True + + + True + + + True + + + True + + + Fill + + 0, 0 - - 8, 0, 0, 0 + + 898, 293 - - 920, 36 + + 9 - + + dataGridViewVDIs + + + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel1 + + 0 - - Virtual Disks + + 9, 31 - - MiddleLeft + + 900, 400 - - TitleLabel + + 898, 328 - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9 + + + panel1 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pageContainerPanel + + + 0 + + + True + + + Name + + + True + + + Storage Volume + + + True + + + Description + + + True + + + Size + + + 52 + + + True + + + Virtual Machine - + True @@ -724,55 +802,55 @@ moveVirtualDiskToolStripMenuItem - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 deleteVirtualDiskToolStripMenuItem - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolStripSeparator1 - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 editVirtualDiskToolStripMenuItem - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ColumnName - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ColumnVolume - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ColumnDesc - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ColumnSize - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ColumnVM - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 SrStoragePage diff --git a/XenAdmin/TabPages/SrStoragePage.zh-CN.resx b/XenAdmin/TabPages/SrStoragePage.zh-CN.resx index e1b8a75d7e..775a27dcdf 100644 --- a/XenAdmin/TabPages/SrStoragePage.zh-CN.resx +++ b/XenAdmin/TabPages/SrStoragePage.zh-CN.resx @@ -267,51 +267,6 @@ 1 - - Top, Right - - - 172, 17 - - - 61, 4 - - - addContextMenuStrip - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 216, 5 - - - 3, 0, 3, 3 - - - 0, 0, 3, 0 - - - 102, 23 - - - 7 - - - 添加(&A) - - - addDropDownButton - - - XenAdmin.Controls.DropDownButton, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - flowLayoutPanel1 - - - 2 - 324, 5 @@ -501,18 +456,6 @@ 6 - - 344, 17 - - - 61, 4 - - - removeContextMenuStrip - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 653, 5 diff --git a/XenAdmin/TabPages/VMStoragePage.cs b/XenAdmin/TabPages/VMStoragePage.cs index fccc83461e..f091bd44c7 100644 --- a/XenAdmin/TabPages/VMStoragePage.cs +++ b/XenAdmin/TabPages/VMStoragePage.cs @@ -53,7 +53,6 @@ internal partial class VMStoragePage : UserControl private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private readonly ContextMenu _TheContextMenu = new ContextMenu(); - private readonly DataGridViewColumn storageLinkColumn; private bool QoSRestricted = false; private VM vm; @@ -64,10 +63,6 @@ public VMStoragePage() _TheContextMenu.MenuItems.Add(AddButton.Text, AddButton_Click); - //dataGridViewStorage.VirtualMode = true; - - storageLinkColumn = ColumnSRVolume; - TitleLabel.ForeColor = Program.HeaderGradientForeColor; TitleLabel.Font = Program.HeaderGradientFont; multipleDvdIsoList1.linkLabel1.LinkColor = Color.FromArgb(0, 0, 255); @@ -128,12 +123,7 @@ public VM VM // set all columns to be preferred width but allow user to resize. foreach (DataGridViewTextBoxColumn col in dataGridViewStorage.Columns) - { - if (col != storageLinkColumn) - { - col.Width = col.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, false); - } - } + col.Width = col.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, false); } } @@ -219,8 +209,6 @@ private void BuildList() if (vm == null) return; - bool storageLinkColumnVisible = false; - List devices_in_use = new List(); foreach (VBD vbd in vm.Connection.ResolveAll(vm.VBDs)) { @@ -237,8 +225,6 @@ private void BuildList() if (sr == null || sr.IsToolsSR) continue; - storageLinkColumnVisible = vdi.sm_config.ContainsKey("SVID"); - vdi.PropertyChanged -= new PropertyChangedEventHandler(vdi_PropertyChanged); vdi.PropertyChanged += new PropertyChangedEventHandler(vdi_PropertyChanged); @@ -261,11 +247,8 @@ private void BuildList() HelpersGUI.ResizeLastGridViewColumn(ColumnDevicePath); } - - storageLinkColumn.Visible = storageLinkColumnVisible; dataGridViewStorage.Sort(dataGridViewStorage.SortedColumn, dataGridViewStorage.SortOrder == SortOrder.Ascending ? ListSortDirection.Ascending : ListSortDirection.Descending); - IEnumerable vbdsSelected = from VBDRow row in vbdSavedItems select row.VBD; foreach (VBDRow row in dataGridViewStorage.Rows) { diff --git a/XenAdmin/XenAdmin.csproj b/XenAdmin/XenAdmin.csproj index c356283c25..d8c90b6184 100644 --- a/XenAdmin/XenAdmin.csproj +++ b/XenAdmin/XenAdmin.csproj @@ -2898,9 +2898,7 @@ - - @@ -3269,12 +3267,6 @@ ExitMaintenanceModeDialog.cs - - Form - - - ImportStorageLinkVolumeDialog.cs - Form @@ -5057,15 +5049,6 @@ HostRequiresRebootDialog.cs - - ImportStorageLinkVolumeDialog.cs - - - ImportStorageLinkVolumeDialog.cs - - - ImportStorageLinkVolumeDialog.cs - InputPromptDialog.cs diff --git a/XenModel/Actions/Action.cs b/XenModel/Actions/Action.cs index 9b669426a7..0a085876c9 100644 --- a/XenModel/Actions/Action.cs +++ b/XenModel/Actions/Action.cs @@ -206,36 +206,6 @@ protected void SetAppliesTo(IXenObject xo) VDI vdi = (VDI)xo; SetAppliesTo(vdi.Connection.Resolve(vdi.SR)); } - else if (xo is StorageLinkServer) - { - AppliesTo.Add(xo.opaque_ref); - } - else if (xo is StorageLinkSystem) - { - StorageLinkSystem system = (StorageLinkSystem)xo; - AppliesTo.Add(system.opaque_ref); - SetAppliesTo(system.StorageLinkServer); - } - else if (xo is StorageLinkPool) - { - StorageLinkPool pool = (StorageLinkPool)xo; - AppliesTo.Add(xo.opaque_ref); - - if (pool.Parent == null) - { - SetAppliesTo(pool.StorageLinkSystem); - } - else - { - SetAppliesTo(pool.Parent); - } - } - else if (xo is StorageLinkVolume) - { - StorageLinkVolume volume = (StorageLinkVolume)xo; - AppliesTo.Add(xo.opaque_ref); - SetAppliesTo(volume.StorageLinkPool); - } } private string _description; diff --git a/XenModel/Icons.cs b/XenModel/Icons.cs index 02da40d5dc..73d52398ec 100644 --- a/XenModel/Icons.cs +++ b/XenModel/Icons.cs @@ -139,15 +139,6 @@ public enum Icons CustomField, HA, - StorageLinkServer, - StorageLinkServerConnected, - StorageLinkServerDisconnected, - StorageLinkServerConnecting, - StorageLinkSystem, - StorageLinkPool, - StorageLinkPools, - StorageLinkVolume, - StorageLinkVolumes, StorageLinkRepository, VmAppliance, diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index d6eb9b998b..af1bee8a39 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -14771,15 +14771,6 @@ public static string FRIDAY_SHORT { } } - /// - /// Looks up a localized string similar to Full Name. - /// - public static string FULL_NAME { - get { - return ResourceManager.GetString("FULL_NAME", resourceCulture); - } - } - /// /// Looks up a localized string similar to Fully applied. /// @@ -17525,33 +17516,6 @@ public static string IMPORT_SOURCE_PAGE_TITLE { } } - /// - /// Looks up a localized string similar to Imported StorageLink Volume(s) to '{0}'. - /// - public static string IMPORT_STORAGELINK_VOLUME_ACTION_FINSH { - get { - return ResourceManager.GetString("IMPORT_STORAGELINK_VOLUME_ACTION_FINSH", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Importing StorageLink Volume(s) to '{0}'. - /// - public static string IMPORT_STORAGELINK_VOLUME_ACTION_START { - get { - return ResourceManager.GetString("IMPORT_STORAGELINK_VOLUME_ACTION_START", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import Storagelink Volume(s) to '{0}'. - /// - public static string IMPORT_STORAGELINK_VOLUME_ACTION_TITLE { - get { - return ResourceManager.GetString("IMPORT_STORAGELINK_VOLUME_ACTION_TITLE", resourceCulture); - } - } - /// /// Looks up a localized string similar to Configure storage for the new template. /// @@ -20771,42 +20735,6 @@ public static string MESSAGEBOX_DELETE_SNAPSHOTS_TITLE_MULTIPLE { } } - /// - /// Looks up a localized string similar to Are you sure you want to delete the selected storage volume? This operation cannot be undone.. - /// - public static string MESSAGEBOX_DELETE_STORAGELINKVOLUME_CONTINUE { - get { - return ResourceManager.GetString("MESSAGEBOX_DELETE_STORAGELINKVOLUME_CONTINUE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete StorageLink Storage Volume. - /// - public static string MESSAGEBOX_DELETE_STORAGELINKVOLUME_CONTINUE_TITLE { - get { - return ResourceManager.GetString("MESSAGEBOX_DELETE_STORAGELINKVOLUME_CONTINUE_TITLE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the selected storage volumes? This operation cannot be undone.. - /// - public static string MESSAGEBOX_DELETE_STORAGELINKVOLUMES_CONTINUE { - get { - return ResourceManager.GetString("MESSAGEBOX_DELETE_STORAGELINKVOLUMES_CONTINUE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete StorageLink Storage Volumes. - /// - public static string MESSAGEBOX_DELETE_STORAGELINKVOLUMES_CONTINUE_TITLE { - get { - return ResourceManager.GetString("MESSAGEBOX_DELETE_STORAGELINKVOLUMES_CONTINUE_TITLE", resourceCulture); - } - } - /// /// Looks up a localized string similar to This will delete this system disk permanently, possibly leaving the VM unable to boot. Do you wish to continue?. /// @@ -21453,15 +21381,6 @@ public static string MIXED_POWER_ON_MODE { } } - /// - /// Looks up a localized string similar to Model. - /// - public static string MODEL { - get { - return ResourceManager.GetString("MODEL", resourceCulture); - } - } - /// /// Looks up a localized string similar to Monday. /// @@ -28855,15 +28774,6 @@ public static string SELECTION_CANNOT_BE_MIXED_FOR_LICENSING { } } - /// - /// Looks up a localized string similar to Serial Number. - /// - public static string SERIAL_NUMBER { - get { - return ResourceManager.GetString("SERIAL_NUMBER", resourceCulture); - } - } - /// /// Looks up a localized string similar to Server. /// @@ -30686,15 +30596,6 @@ public static string STORAGELINK_POOL_DISK_SPACE { } } - /// - /// Looks up a localized string similar to {0} used of {1} total. - /// - public static string STORAGELINK_POOL_SIZE_USED { - get { - return ResourceManager.GetString("STORAGELINK_POOL_SIZE_USED", resourceCulture); - } - } - /// /// Looks up a localized string similar to Fibre Channel. /// @@ -30884,123 +30785,6 @@ public static string STORAGELINK_UPGRADE_TEST { } } - /// - /// Looks up a localized string similar to StorageLink Storage Pool. - /// - public static string STORAGELINKPOOL { - get { - return ResourceManager.GetString("STORAGELINKPOOL", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Storage Pool General Properties. - /// - public static string STORAGELINKPOOL_GENERAL_TAB_TITLE { - get { - return ResourceManager.GetString("STORAGELINKPOOL_GENERAL_TAB_TITLE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage Pools. - /// - public static string STORAGELINKPOOLS { - get { - return ResourceManager.GetString("STORAGELINKPOOLS", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Storage Repository General Properties. - /// - public static string STORAGELINKREPOSITORY_GENERAL_TAB_TITLE { - get { - return ResourceManager.GetString("STORAGELINKREPOSITORY_GENERAL_TAB_TITLE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Server. - /// - public static string STORAGELINKSERVER { - get { - return ResourceManager.GetString("STORAGELINKSERVER", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Server General Properties. - /// - public static string STORAGELINKSERVER_GENERAL_TAB_TITLE { - get { - return ResourceManager.GetString("STORAGELINKSERVER_GENERAL_TAB_TITLE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Servers. - /// - public static string STORAGELINKSERVERS { - get { - return ResourceManager.GetString("STORAGELINKSERVERS", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage Repositories. - /// - public static string STORAGELINKSRS { - get { - return ResourceManager.GetString("STORAGELINKSRS", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage System. - /// - public static string STORAGELINKSYSTEM { - get { - return ResourceManager.GetString("STORAGELINKSYSTEM", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Storage System General Properties. - /// - public static string STORAGELINKSYSTEM_GENERAL_TAB_TITLE { - get { - return ResourceManager.GetString("STORAGELINKSYSTEM_GENERAL_TAB_TITLE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage Systems. - /// - public static string STORAGELINKSYSTEMS { - get { - return ResourceManager.GetString("STORAGELINKSYSTEMS", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage Volume. - /// - public static string STORAGELINKVOLUME { - get { - return ResourceManager.GetString("STORAGELINKVOLUME", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to StorageLink Storage Volumes. - /// - public static string STORAGELINKVOLUMES { - get { - return ResourceManager.GetString("STORAGELINKVOLUMES", resourceCulture); - } - } - /// /// Looks up a localized string similar to Storage Pools. /// @@ -33775,24 +33559,6 @@ public static string USER_NOT_AUTHORIZED { } } - /// - /// Looks up a localized string similar to Username. - /// - public static string USERNAME { - get { - return ResourceManager.GetString("USERNAME", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Username:. - /// - public static string USERNAME_LABLE { - get { - return ResourceManager.GetString("USERNAME_LABLE", resourceCulture); - } - } - /// /// Looks up a localized string similar to uses. /// diff --git a/XenModel/Messages.ja.resx b/XenModel/Messages.ja.resx index 90ceae49c0..df6f89f8a8 100644 --- a/XenModel/Messages.ja.resx +++ b/XenModel/Messages.ja.resx @@ -1112,9 +1112,6 @@ カスタム フィールド '{0}' を追加します - - 追加... - Active Directory 認証が使用されるプールにサーバー '{0}' を追加します。プール内のすべてのメンバで同じ認証方法を使用する必要があります。 diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 6d1819c0be..982a89684b 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -5167,9 +5167,6 @@ Would you like to eject these ISOs before continuing? Fully applied - - Full Name - {0} matches @@ -6149,15 +6146,6 @@ Click Configure HA to alter the settings displayed below. Locate the file you want to import - - Imported StorageLink Volume(s) to '{0}' - - - Importing StorageLink Volume(s) to '{0}' - - - Import Storagelink Volume(s) to '{0}' - Configure storage for the new template @@ -7203,18 +7191,6 @@ This will permanently delete and reinitialize all local storage on the servers. Delete entire snapshot - - Are you sure you want to delete the selected storage volumes? This operation cannot be undone. - - - Delete StorageLink Storage Volumes - - - Are you sure you want to delete the selected storage volume? This operation cannot be undone. - - - Delete StorageLink Storage Volume - This will delete this system disk permanently, possibly leaving the VM unable to boot. Do you wish to continue? @@ -7456,9 +7432,6 @@ To learn more about the XenServer Live VDI Migration feature or to start a XenSe Mixed - - Model - Monday @@ -10025,9 +9998,6 @@ Upgrading VMs using StorageLink Gateway to XenServer 6.0 is only supported if th Select VMs to Suspend - server '{0}' - - Serial Number - Server @@ -10578,51 +10548,9 @@ The upper limit: SR size / {2} There was an error while packaging the server status report. Only a partial report may be available - - StorageLink Storage Pool - - - StorageLink Storage Pools - - - Storage Pool General Properties - - - Storage Repository General Properties - - - StorageLink Server - - - StorageLink Servers - - - StorageLink Server General Properties - - - StorageLink Storage Repositories - - - StorageLink Storage System - - - StorageLink Storage Systems - - - Storage System General Properties - - - StorageLink Storage Volume - - - StorageLink Storage Volumes - {0} free of {1} - - {0} used of {1} total - Fibre Channel @@ -11693,12 +11621,6 @@ To learn more about the XenServer Dynamic Workload Balancing feature or to start ^(http|https|file|ftp)://* - - Username - - - &Username: - XenCenter was unable to authorize the action as {0}. See the application log files for more information. diff --git a/XenModel/Messages.zh-CN.resx b/XenModel/Messages.zh-CN.resx index c1c6e2bf46..3da234eb15 100644 --- a/XenModel/Messages.zh-CN.resx +++ b/XenModel/Messages.zh-CN.resx @@ -1112,9 +1112,6 @@ 添加自定义字段“{0}” - - 添加... - 您正在尝试将服务器“{0}”添加到已配置为使用 AD 身份验证的池中。所有池成员必须使用同一种身份验证方法。 diff --git a/XenModel/XenAPI-Extensions/VDI.cs b/XenModel/XenAPI-Extensions/VDI.cs index 9e24cab6c5..e2b61c6214 100644 --- a/XenModel/XenAPI-Extensions/VDI.cs +++ b/XenModel/XenAPI-Extensions/VDI.cs @@ -167,25 +167,6 @@ public string VMHint } } - public StorageLinkVolume StorageLinkVolume(IEnumerable connections) - { - string svid; - if (sm_config.TryGetValue("SVID", out svid) && !string.IsNullOrEmpty(svid)) - { - foreach (StorageLinkConnection slCon in connections) - { - StorageLinkVolume volume = new List(slCon.Cache.StorageVolumes).Find(v => v.opaque_ref == svid); - - if (volume != null) - { - return volume; - } - } - } - return null; - - } - public override string ToString() { return Name; diff --git a/XenModel/XenSearch/Common.cs b/XenModel/XenSearch/Common.cs index 7905e53fba..c3ab95eb0f 100644 --- a/XenModel/XenSearch/Common.cs +++ b/XenModel/XenSearch/Common.cs @@ -71,11 +71,6 @@ public enum ObjectTypes LocalSR = 1 << 8, VDI = 1 << 9, Network = 1 << 10, - //StorageLinkServer = 1 << 11, - //StorageLinkSystem = 1 << 12, - //StorageLinkPool = 1 << 13, - //StorageLinkVolume = 1 << 14, - //StorageLinkRepository = 1 << 15, Folder = 1 << 11, AllIncFolders = (1 << 12) - 1, AllExcFolders = AllIncFolders & ~ObjectTypes.Folder, @@ -173,22 +168,7 @@ public enum PropertyNames [HelpString("Whether the object has any custom fields defined")] has_custom_fields, - [HelpString("The StorageLink Server that this object belongs to")] - storageLinkServer, - - [HelpString("The StorageLink Storage System that this object belongs to")] - storageLinkSystem, - - [HelpString("The StorageLink Storage Pool that this object belongs to")] - storageLinkPool, - - [HelpString("The StorageLink Storage Volume that this object belongs to")] - storageLinkVolume, - - [HelpString("The StorageLink Storage Repository that this object belongs to")] - storageLinkRepository, - - [HelpString("Whether the VM is in any vApp")] + [HelpString("Whether the VM is in any vApp")] in_any_appliance } @@ -250,11 +230,6 @@ static PropertyAccessors() ObjectTypes_i18n[Messages.VIRTUAL_DISKS] = ObjectTypes.VDI; ObjectTypes_i18n[Messages.FOLDERS] = ObjectTypes.Folder; ObjectTypes_i18n[Messages.VM_APPLIANCE] = ObjectTypes.Appliance; - //ObjectTypes_i18n[Messages.STORAGELINKSERVERS] = ObjectTypes.StorageLinkServer; - //ObjectTypes_i18n[Messages.STORAGELINKSYSTEMS] = ObjectTypes.StorageLinkSystem; - //ObjectTypes_i18n[Messages.STORAGELINKPOOLS] = ObjectTypes.StorageLinkPool; - //ObjectTypes_i18n[Messages.STORAGELINKVOLUMES] = ObjectTypes.StorageLinkVolume; - //ObjectTypes_i18n[Messages.STORAGELINKSRS] = ObjectTypes.StorageLinkRepository; foreach (VM.HA_Restart_Priority p in VM.GetAvailableRestartPriorities(null)) //CA-57600 - From Boston onwards, the HA restart priorities list contains Restart instead of AlwaysRestartHighPriority and AlwaysRestart @@ -292,11 +267,6 @@ static PropertyAccessors() PropertyNames_i18n[PropertyNames.folder] = Messages.PARENT_FOLDER; PropertyNames_i18n[PropertyNames.folders] = Messages.ANCESTOR_FOLDERS; PropertyNames_i18n[PropertyNames.has_custom_fields] = Messages.HAS_CUSTOM_FIELDS; - PropertyNames_i18n[PropertyNames.storageLinkServer] = Messages.STORAGELINKSERVER; - PropertyNames_i18n[PropertyNames.storageLinkSystem] = Messages.STORAGELINKSYSTEM; - PropertyNames_i18n[PropertyNames.storageLinkPool] = Messages.STORAGELINKPOOL; - PropertyNames_i18n[PropertyNames.storageLinkVolume] = Messages.STORAGELINKVOLUME; - PropertyNames_i18n[PropertyNames.storageLinkRepository] = Messages.SR; PropertyNames_i18n[PropertyNames.in_any_appliance] = Messages.IN_ANY_APPLIANCE; VM_power_state_images[vm_power_state.Halted] = Icons.PowerStateHalted; @@ -319,11 +289,6 @@ static PropertyAccessors() ObjectTypes_images[ObjectTypes.VDI] = Icons.VDI; ObjectTypes_images[ObjectTypes.Folder] = Icons.Folder; ObjectTypes_images[ObjectTypes.Appliance] = Icons.VmAppliance; - //ObjectTypes_images[ObjectTypes.StorageLinkServer] = Icons.StorageLinkServer; - //ObjectTypes_images[ObjectTypes.StorageLinkSystem] = Icons.StorageLinkSystem; - //ObjectTypes_images[ObjectTypes.StorageLinkPool] = Icons.StorageLinkPool; - //ObjectTypes_images[ObjectTypes.StorageLinkVolume] = Icons.StorageLinkVolume; - //ObjectTypes_images[ObjectTypes.StorageLinkRepository] = Icons.StorageLinkRepository; property_types.Add(PropertyNames.pool, typeof(Pool)); property_types.Add(PropertyNames.host, typeof(Host)); @@ -343,67 +308,9 @@ static PropertyAccessors() property_types.Add(PropertyNames.sr_type, typeof(SR.SRTypes)); property_types.Add(PropertyNames.folder, typeof(Folder)); property_types.Add(PropertyNames.folders, typeof(Folder)); - property_types.Add(PropertyNames.storageLinkServer, typeof(StorageLinkServer)); - property_types.Add(PropertyNames.storageLinkSystem, typeof(StorageLinkSystem)); - property_types.Add(PropertyNames.storageLinkPool, typeof(StorageLinkPool)); - property_types.Add(PropertyNames.storageLinkRepository, typeof(StorageLinkRepository)); property_types.Add(PropertyNames.in_any_appliance, typeof(bool)); property_types.Add(PropertyNames.disks, typeof(VDI)); - properties[PropertyNames.storageLinkServer] = delegate(IXenObject o) - { - StorageLinkSystem system = o as StorageLinkSystem; - if (system != null) - { - return system.StorageLinkConnection.Cache.Server; - } - StorageLinkPool pool = o as StorageLinkPool; - if (pool != null) - { - return pool.StorageLinkConnection.Cache.Server; - } - StorageLinkRepository r = o as StorageLinkRepository; - if (r != null) - { - return r.StorageLinkConnection.Cache.Server; - } - return null; - }; - - properties[PropertyNames.storageLinkSystem] = delegate(IXenObject o) - { - StorageLinkPool pool = o as StorageLinkPool; - - if (pool != null) - { - return pool.StorageLinkSystem; - } - - StorageLinkRepository r = o as StorageLinkRepository; - - if (r != null) - { - return r.StorageLinkSystem; - } - - return null; - }; - - properties[PropertyNames.storageLinkPool] = delegate(IXenObject o) - { - StorageLinkRepository repo = o as StorageLinkRepository; - StorageLinkPool pool = repo != null ? repo.StorageLinkPool : null; - - if (pool != null) - { - var l = new List { pool }; - l.AddRange(pool.GetAncestors()); - return l[l.Count - 1]; - } - - return null; - }; - properties[PropertyNames.os_name] = delegate(IXenObject o) { return GetForRealVM(o, delegate(VM vm, IXenConnection conn) @@ -933,26 +840,6 @@ private static IComparable TypeProperty(IXenObject o) { return (IComparable)ObjectTypes.Folder; } - //else if (o is StorageLinkServer) - //{ - // return ObjectTypes.StorageLinkServer; - //} - //else if (o is StorageLinkSystem) - //{ - // return ObjectTypes.StorageLinkSystem; - //} - //else if (o is StorageLinkPool) - //{ - // return ObjectTypes.StorageLinkPool; - //} - //else if (o is StorageLinkVolume) - //{ - // return ObjectTypes.StorageLinkVolume; - //} - //else if (o is StorageLinkRepository) - //{ - // return ObjectTypes.StorageLinkRepository; - //} else if (o is DockerContainer) { return (IComparable)ObjectTypes.DockerContainer; @@ -1084,11 +971,6 @@ private static ComparableList HostProperty(IXenObject o) { ComparableList hosts = new ComparableList(); - if (o is IStorageLinkObject) - { - return null; - } - // If we're not in a pool then just group everything under the same host Pool pool = Helpers.GetPool(o.Connection); if (pool == null) @@ -1263,13 +1145,6 @@ private static ComparableList IPAddressProperty(IXenObject o) addresses.Add(ipAddress); } } - else if (o is StorageLinkServer) - { - StorageLinkServer storageLinkServer = (StorageLinkServer)o; - ComparableAddress ipAddress; - if (ComparableAddress.TryParse(storageLinkServer.FriendlyName, false, true, out ipAddress)) - addresses.Add(ipAddress); - } return (addresses.Count == 0 ? null : addresses); // CA-28300 } diff --git a/XenModel/XenSearch/GroupAlg.cs b/XenModel/XenSearch/GroupAlg.cs index 56e69b40e0..3df6a22ba0 100644 --- a/XenModel/XenSearch/GroupAlg.cs +++ b/XenModel/XenSearch/GroupAlg.cs @@ -101,19 +101,6 @@ private static void GetGrouped(Search search, Group group) group.FilterAdd(search.Query, disconnectedHost); } } - - if (Search.GetStorageLinkConnectionsCopy != null) - { - List storageLinkConnections = Search.GetStorageLinkConnectionsCopy(); - foreach (StorageLinkConnection storageLinkConnection in storageLinkConnections) - { - foreach (IXenObject o in storageLinkConnection.Cache.XenSearchableObjects(ConnectionsManager.XenConnectionsCopy)) - { - if (!Hide(o)) - group.FilterAdd(search.Query, o); - } - } - } } private static bool Hide(IXenObject o) diff --git a/XenModel/XenSearch/Search.cs b/XenModel/XenSearch/Search.cs index 95cd57103b..198d22797a 100644 --- a/XenModel/XenSearch/Search.cs +++ b/XenModel/XenSearch/Search.cs @@ -32,7 +32,6 @@ using System; using System.Collections.Generic; using System.IO; -using XenAdmin.Network.StorageLink; using XenAPI; using XenAdmin.Core; @@ -528,9 +527,6 @@ public static Search SearchFor(IXenObject value, QueryScope scope) { // This is the default search on the treeview - //Grouping storageLinkPoolGrouping = new XenModelObjectPropertyGrouping(PropertyNames.storageLinkPool, (Grouping)null); - //Grouping storageLinkSystemGrouping = new XenModelObjectPropertyGrouping(PropertyNames.storageLinkSystem, storageLinkPoolGrouping); - //Grouping storageLinkServerGrouping = new XenModelObjectPropertyGrouping(PropertyNames.storageLinkServer, storageLinkSystemGrouping); Grouping dockervmGrouping = new XenModelObjectPropertyGrouping(PropertyNames.dockervm, null); Grouping hostGrouping = new XenModelObjectPropertyGrouping(PropertyNames.host, dockervmGrouping); Grouping poolGrouping = new XenModelObjectPropertyGrouping(PropertyNames.pool, hostGrouping); @@ -544,7 +540,6 @@ public static ObjectTypes DefaultObjectTypes() { ObjectTypes types = ObjectTypes.DisconnectedServer | ObjectTypes.Server | ObjectTypes.VM | ObjectTypes.RemoteSR | ObjectTypes.DockerContainer; - //| ObjectTypes.StorageLinkServer | ObjectTypes.StorageLinkSystem | ObjectTypes.StorageLinkPool | ObjectTypes.StorageLinkVolume | ObjectTypes.StorageLinkRepository; return types; } @@ -700,24 +695,6 @@ public static Search[] Searches } } - internal static Func> GetStorageLinkConnectionsCopy; - - /// - /// - /// - /// A function that gets a copy of the StorageLink connections. - public static void InitSearch(Func> getStorageLinkConnectionsCopy) - { - searches = new Dictionary(); - - InitDefaultSearches(); - - ConnectionsManager.XenConnections.CollectionChanged += CollectionChanged; - SynchroniseSearches(); - - GetStorageLinkConnectionsCopy = getStorageLinkConnectionsCopy; - } - private static void CollectionChanged(Object sender, System.ComponentModel.CollectionChangeEventArgs e) { //InvokeHelper.AssertOnEventThread();