Merge pull request #1129 from GaborApatiNagy/REQ-156_github_master

Merge master into branch REQ-156
This commit is contained in:
Konstantina Chremmou 2016-08-18 17:02:47 +01:00 committed by GitHub
commit f17bf6fc68
167 changed files with 4041 additions and 3813 deletions

1
.gitattributes vendored
View File

@ -1,2 +1,3 @@
# Auto detect text files and perform LF normalization
* -crlf
*.sh text eol=lf

View File

@ -19,6 +19,7 @@ BRANDING_PRODUCT_MAJOR_VERSION=$(cat ${SCRATCH_DIR}/globals | grep -w PRODUCT_MA
BRANDING_PRODUCT_MINOR_VERION=$(cat ${SCRATCH_DIR}/globals | grep -w PRODUCT_MINOR_VERSION | sed -e 's/PRODUCT_MINOR_VERSION=//g' -e 's/"//g')
BRANDING_SEARCH=xensearch
BRANDING_UPDATE=xsupdate
BRANDING_BACKUP=xbk
BRANDING_SERVER=XenServer
BRANDING_BRAND_CONSOLE=$(cat ${SCRATCH_DIR}/globals | grep -w BRAND_CONSOLE | sed -e 's/BRAND_CONSOLE=//g' -e 's/"//g')
# Check for the micro version override from declarations.sh and use it if present otherwise use the one from branding

View File

@ -102,10 +102,10 @@
</Extension>
</ProgId>
- <!-- Define XBK extension -->
- <ProgId Id="XenCenter.xbk" Description="[XenServer] Backup File" Icon="XkbIcon">
- <ProgId Id="XenCenter.[xbk]" Description="[XenServer] Backup File" Icon="XkbIcon">
+ <!-- Define XBK extension -->
+ <ProgId Id="XenCenter.xbk" Description="!(loc.XenServer_Backup_File)" Icon="XkbIcon">
<Extension Id="xbk" ContentType="application/xbk">
+ <ProgId Id="XenCenter.[xbk]" Description="!(loc.XenServer_Backup_File)" Icon="XkbIcon">
<Extension Id="[xbk]" ContentType="application/[xbk]">
- <Verb Id="open" Command="Open" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
+ <Verb Id="open" Command="!(loc.Open)" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
</Extension>

View File

@ -127,8 +127,8 @@
</Extension>
</ProgId>
<!-- Define XBK extension -->
<ProgId Id="XenCenter.xbk" Description="[XenServer] Backup File" Icon="XkbIcon">
<Extension Id="xbk" ContentType="application/xbk">
<ProgId Id="XenCenter.[xbk]" Description="[XenServer] Backup File" Icon="XkbIcon">
<Extension Id="[xbk]" ContentType="application/[xbk]">
<Verb Id="open" Command="Open" TargetFile="XenCenterEXE" Argument="restore &quot;%1&quot;" />
</Extension>
</ProgId>

View File

@ -102,23 +102,19 @@ namespace XenAdmin.Actions.Wlb
foreach (KeyValuePair<VM, WlbOptimizationRecommendation> vmItem in vmOptList)
{
VM vm = vmItem.Key;
Host fromHost = null;
Host toHost = null;
if (vmItem.Key.is_control_domain)
{
log.Debug(vmItem.Value.powerOperation + " " + Helpers.GetName(vmItem.Value.toHost));
fromHost = vmItem.Value.fromHost;
Host fromHost = vmItem.Value.fromHost;
Helpers.SetOtherConfig(fromHost.Connection.Session, fromHost,WlbOptimizationRecommendation.OPTIMIZINGPOOL, vmItem.Value.recId.ToString());
try
{
AsyncAction hostAction = null;
int waitingInterval = 10 * 1000; // default to 10s
if (vmItem.Value.fromHost.IsLive)
{
hostAction = new ShutdownHostAction(fromHost,AddHostToPoolCommand.NtolDialog);
hostAction = new ShutdownHostAction(fromHost, AddHostToPoolCommand.NtolDialog);
}
else
{
@ -142,16 +138,10 @@ namespace XenAdmin.Actions.Wlb
}
}
}
catch (Exception)
{
throw;
}
}
else
{
log.Debug("Migrating VM " + vm.Name);
fromHost = this.Pool.Connection.Resolve(vm.resident_on);
toHost = vmItem.Value.toHost;
Host toHost = vmItem.Value.toHost;
try
{
@ -162,7 +152,7 @@ namespace XenAdmin.Actions.Wlb
catch (Failure f)
{
// prompt to user if ha notl can be raised, if yes, continue
long newNtol = 0;
long newNtol;
if (RaiseHANotl(vm, f, out newNtol))
{
DelegatedAsyncAction action = new DelegatedAsyncAction(vm.Connection, Messages.HA_LOWERING_NTOL, null, null,
@ -180,7 +170,7 @@ namespace XenAdmin.Actions.Wlb
{
Helpers.SetOtherConfig(this.Session, this.Pool, WlbOptimizationRecommendation.OPTIMIZINGPOOL, Messages.WLB_OPT_FAILED);
this.Description = Messages.WLB_OPT_FAILED;
throw f;
throw;
}
}
}
@ -197,7 +187,7 @@ namespace XenAdmin.Actions.Wlb
catch (Failure ex)
{
Helpers.SetOtherConfig(this.Session, this.Pool, WlbOptimizationRecommendation.OPTIMIZINGPOOL, optId);
WlbServerState.SetState(Pool, WlbServerState.ServerState.ConnectionError, (Failure)ex);
WlbServerState.SetState(Pool, WlbServerState.ServerState.ConnectionError, ex);
throw;
}
catch (CancelledException)

View File

@ -34,6 +34,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using XenAdmin.Core;
using XenAdmin.Network;
using XenAPI;
@ -66,7 +67,9 @@ namespace XenAdmin.Actions.OVFActions
IEnumerable<string> eulas, bool signAppliance, bool createManifest, X509Certificate2 certificate,
bool encryptFiles, string encryptPassword, bool createOVA, bool compressOVFfiles,
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway, bool shouldVerify)
: base(connection, Messages.EXPORT_APPLIANCE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection,
string.Format(createOVA ? Messages.EXPORT_OVA_PACKAGE : Messages.EXPORT_OVF_PACKAGE, applianceFileName, Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_applianceDirectory = applianceDirectory;
m_applianceFileName = applianceFileName;

View File

@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using XenAdmin.Core;
using XenAdmin.Mappings;
using XenAdmin.Network;
@ -60,7 +61,8 @@ namespace XenAdmin.Actions.OVFActions
public ImportApplianceAction(IXenConnection connection, EnvelopeType ovfEnv, Package package, Dictionary<string, VmMapping> vmMappings,
bool verifyManifest, bool verifySignature, string password, bool runfixups, SR selectedIsoSr,
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway)
: base(connection, Messages.IMPORT_APPLIANCE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection, string.Format(Messages.IMPORT_APPLIANCE, GetApplianceName(ovfEnv, package), Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_ovfEnvelope = ovfEnv;
m_package = package;
@ -151,10 +153,7 @@ namespace XenAdmin.Actions.OVFActions
envelopes.Add(envs[0]);
}
var appName = m_ovfEnvelope.Name;
if (string.IsNullOrEmpty(appName))
appName = Path.GetFileNameWithoutExtension(m_package.PackageSourceFile);
var appName = GetApplianceName(m_ovfEnvelope, m_package);
EnvelopeType env = OVF.Merge(envelopes, appName);
try //importVM
@ -176,5 +175,13 @@ namespace XenAdmin.Actions.OVFActions
PercentComplete = 100;
Description = Messages.COMPLETED;
}
private static string GetApplianceName(EnvelopeType ovfEnv, Package package)
{
var appName = ovfEnv.Name;
if (string.IsNullOrEmpty(appName))
appName = Path.GetFileNameWithoutExtension(package.PackageSourceFile);
return appName;
}
}
}

View File

@ -33,6 +33,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using XenAdmin.Core;
using XenAdmin.Mappings;
using XenAdmin.Network;
@ -57,7 +58,8 @@ namespace XenAdmin.Actions.OVFActions
public ImportImageAction(IXenConnection connection, EnvelopeType ovfEnv, string directory, Dictionary<string, VmMapping> vmMappings, bool runfixups, SR selectedIsoSr,
string networkUuid, bool isTvmIpStatic, string tvmIpAddress, string tvmSubnetMask, string tvmGateway)
: base(connection, Messages.IMPORT_DISK_IMAGE, networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
: base(connection, string.Format(Messages.IMPORT_DISK_IMAGE, ovfEnv.Name, Helpers.GetName(connection)),
networkUuid, isTvmIpStatic, tvmIpAddress, tvmSubnetMask, tvmGateway)
{
m_ovfEnvelope = ovfEnv;
m_directory = directory;

View File

@ -267,7 +267,8 @@ namespace XenAdmin.Alerts
}
else if (XenObject is VM)
{
xenObject = XenObject;
VM vm = (VM)XenObject;
xenObject = vm.IsControlDomainZero ? XenObject.Connection.Resolve(vm.resident_on) : XenObject;
}
if (xenObject == null)

View File

@ -132,33 +132,10 @@ namespace XenAdmin.Alerts
if (timeTillExpire.Ticks < 0)
return "";
if (capAtTenYears && timeTillExpire.TotalDays > 3653)
if (capAtTenYears && LicenseStatus.IsInfinite(timeTillExpire))
return Messages.UNLIMITED;
if (timeTillExpire.TotalDays > 60)
{
// Show remaining time in months
return string.Format(Messages.TIME_MONTHS,
(long)(Math.Floor(timeTillExpire.TotalDays / 30)));
}
if (timeTillExpire.TotalDays > 2)
{
// Show remaining time in days
return string.Format(Messages.TIME_DAYS,
(long)timeTillExpire.TotalDays);
}
if (timeTillExpire.TotalHours > 2)
{
// Show remaining time in hours
return string.Format(Messages.TIME_HOURS,
(long)timeTillExpire.TotalHours);
}
// Show remaining time in minutes (round up so you never get 'in 0 minutes')
return string.Format(Messages.TIME_MINUTES,
(long)Math.Ceiling(timeTillExpire.TotalMinutes));
return timeTillExpire.FuzzyTime();
}
#endregion

View File

@ -47,6 +47,7 @@ namespace XenAdmin
public const string COMPANY_NAME_SHORT = "[Citrix]";
public const string SEARCH = "[xensearch]";
public const string UPDATE = "[xsupdate]";
public const string BACKUP = "[xbk]";
public const string CHECK_FOR_UPDATES_URL = "[BRANDING_XENSERVER_UPDATE_URL]";
public static string Search

View File

@ -80,10 +80,10 @@ namespace XenAdmin.Commands
{
SaveFileDialog dialog = new SaveFileDialog();
dialog.AddExtension = true;
dialog.Filter = string.Format("{0} (*.xbk)|*.xbk|{1} (*.*)|*.*", Messages.XS_BACKUP_FILES, Messages.ALL_FILES);
dialog.Filter = string.Format("{0} (*.{1})|*.{1}|{2} (*.*)|*.*", Messages.XS_BACKUP_FILES, Branding.BACKUP, Messages.ALL_FILES);
dialog.FilterIndex = 0;
dialog.RestoreDirectory = true;
dialog.DefaultExt = "xbk";
dialog.DefaultExt = Branding.BACKUP;
if (dialog.ShowDialog(Parent) != DialogResult.Cancel)
new HostBackupRestoreAction(host, HostBackupRestoreAction.HostBackupRestoreType.backup, dialog.FileName).RunAsync();

View File

@ -130,14 +130,6 @@ namespace XenAdmin.Commands
/// Gets the current selection context for the Command.
/// </summary>
public SelectedItemCollection GetSelection()
{
return GetSelectionCore();
}
/// <summary>
/// Gets the current selection context for the Command.
/// </summary>
protected virtual SelectedItemCollection GetSelectionCore()
{
return _selection;
}
@ -409,35 +401,19 @@ namespace XenAdmin.Commands
foreach (SelectedItem item in GetSelection())
{
string reason = GetCantExecuteReason(item);
if (item == null || item.XenObject == null)
continue;
if (MainWindowCommandInterface != null && CanExecuteCore(new SelectedItemCollection(item)))
continue;
string reason = GetCantExecuteReasonCore(item);
if (reason != null)
{
cantExecuteReasons.Add(item, reason);
}
}
return cantExecuteReasons;
}
private string GetCantExecuteReason(SelectedItem item)
{
SelectedItemCollection selection = GetSelection();
((ICommand)this).SetSelection(new[] { item });
try
{
if (!CanExecute() && item.XenObject != null)
{
return GetCantExecuteReasonCore(item);
}
return null;
}
finally
{
((ICommand)this).SetSelection(selection);
}
}
/// <summary>
/// Gets the reason that the specified item from the selection cant execute. This is displayed in the error dialog.

View File

@ -112,12 +112,10 @@ namespace XenAdmin.Commands
Image = _command.ToolBarImage;
}
if (_command.ToolTipText != null)
{
//null is allowed (CA-147657)
ToolTipText = _command.ToolTipText;
}
}
}
protected override void OnClick(EventArgs e)
{

View File

@ -75,10 +75,8 @@ namespace XenAdmin.Commands
SecondImage = _command.SecondImage;
}
if (_command.ToolTipText != null)
{
//null is allowed (CA-147657)
ToolTipText = _command.ToolTipText;
}
StarRating = _command.StarRating;
}

View File

@ -38,7 +38,7 @@ using XenAPI;
namespace XenAdmin.Commands
{
/// <summary>
/// The command for the 'Home Server' subitem which is shown when WLB isn't enabled in the submenu for start-on, resume-on or migrate.
/// The command for the 'Target Server' subitem which is shown when WLB isn't enabled in the submenu for start-on, resume-on or migrate.
/// </summary>
internal class CrossPoolMigrateToHomeCommand : CrossPoolMigrateCommand
{

View File

@ -66,14 +66,14 @@ namespace XenAdmin.Commands
protected override void ExecuteCore(SelectedItemCollection selection)
{
List<Folder> folders = new List<Folder>(selection.AsXenObjects<Folder>(CanExecute));
List<IXenObject> folders = new List<IXenObject>(selection.AsXenObjects<Folder>(CanExecute));
folders.RemoveAll((Predicate<Folder>)delegate(Folder folder)
folders.RemoveAll((Predicate<IXenObject>)delegate(IXenObject folder)
{
// if the list contains any folders that are children to others in the list then
// they will automatically get deleted, so remove them here.
foreach (Folder f in folders)
foreach (var f in folders)
{
if (folder.opaque_ref.StartsWith(f.opaque_ref + "/"))
{
@ -83,12 +83,7 @@ namespace XenAdmin.Commands
return false;
});
List<AsyncAction> actions = new List<AsyncAction>();
foreach (Folder folder in folders)
{
actions.Add(new FolderAction((IXenObject)folder, null, FolderAction.Kind.Delete));
}
RunMultipleActions(actions, Messages.DELETING_FOLDERS, Messages.DELETING_FOLDERS, Messages.DELETED_FOLDERS, true);
new DeleteFolderAction(folders).RunAsync();
}
protected override bool CanExecuteCore(SelectedItemCollection selection)

View File

@ -32,10 +32,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using XenAPI;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.TabPages;
using XenAdmin.Core;
using XenAdmin.Commands.Controls;
using XenAdmin.Dialogs;
@ -419,8 +419,11 @@ namespace XenAdmin.Commands
DeactivateVBDCommand cmd = new DeactivateVBDCommand(Program.MainWindow, vbd);
if (!cmd.CanExecute())
{
return string.Format(Messages.CANNOT_DELETE_CANNOT_DEACTIVATE_REASON,
Helpers.GetName(vm).Ellipsise(20), cmd.ToolTipText);
var reasons = cmd.GetCantExecuteReasons();
return reasons.Count > 0
? string.Format(Messages.CANNOT_DELETE_CANNOT_DEACTIVATE_REASON,
Helpers.GetName(vm).Ellipsise(20), reasons.ElementAt(0).Value)
: Messages.UNKNOWN;
}
}
}

View File

@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XenAPI;
using XenAdmin.Commands.Controls;
@ -142,7 +143,10 @@ namespace XenAdmin.Commands
DeactivateVBDCommand cmd = new DeactivateVBDCommand(Program.MainWindow, vbd);
if (!cmd.CanExecute())
return cmd.ToolTipText;
{
var reasons = cmd.GetCantExecuteReasons();
return reasons.Count > 0 ? reasons.ElementAt(0).Value : Messages.UNKNOWN;
}
}
}
return base.GetCantExecuteReasonCore(item);

View File

@ -71,7 +71,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return _connection != null && _connection.IsConnected;
return _connection != null && (_connection.IsConnected || _connection.InProgress);
}
/// <summary>

View File

@ -162,12 +162,6 @@ namespace XenAdmin.Commands
protected override void ExecuteCore()
{
Folder targetFolder = GetTargetNodeAncestorAsXenObjectOrGroupingTag<Folder>();
List<AsyncAction> actions = new List<AsyncAction>();
foreach (IXenObject draggedItem in GetItemsNotAlreadyInTargetFolder())
{
actions.Add(new FolderAction(draggedItem, targetFolder, FolderAction.Kind.Move));
}
if (DraggedNodes != null)
{
@ -180,8 +174,7 @@ namespace XenAdmin.Commands
}
}
MultipleActionLauncher launcher = new MultipleActionLauncher(actions, string.Format(Messages.MOVE_OBJECTS_TO_FOLDER, targetFolder.Name), Messages.MOVING, Messages.MOVED, true);
launcher.Run();
new MoveToFolderAction(GetItemsNotAlreadyInTargetFolder(), targetFolder).RunAsync();
// need to now wait until the operation has finished... then we can expand the node.
ThreadPool.QueueUserWorkItem(delegate

View File

@ -36,7 +36,8 @@ using XenAdmin.Network;
using XenAdmin.Wizards.PatchingWizard;
using XenAdmin.Properties;
using System.Drawing;
using System.Collections.ObjectModel;
using XenAdmin.Core;
using XenAPI;
namespace XenAdmin.Commands
@ -68,11 +69,15 @@ namespace XenAdmin.Commands
{
foreach (IXenConnection xenConnection in ConnectionsManager.XenConnectionsCopy)
{
if (xenConnection.IsConnected)
{
if (!xenConnection.IsConnected)
continue;
Pool pool = Helpers.GetPoolOfOne(xenConnection);
if (pool != null && pool.IsPatchingForbidden)
continue;
return true;
}
}
return false;
}

View File

@ -150,7 +150,7 @@ namespace XenAdmin.Commands
DialogResult dr = new InstallToolsWarningDialog(vm.Connection).ShowDialog(Parent);
if (dr == DialogResult.Yes)
{
InstallPVToolsAction installToolsAction = new InstallPVToolsAction( vm, XSToolsSRNotFound, Properties.Settings.Default.ShowHiddenVMs);
var installToolsAction = new InstallPVToolsAction(vm, Properties.Settings.Default.ShowHiddenVMs);
installToolsAction.Completed += InstallToolsActionCompleted;
installToolsAction.RunAsync();
@ -160,18 +160,6 @@ namespace XenAdmin.Commands
return null;
}
private static void XSToolsSRNotFound()
{
Program.Invoke(Program.MainWindow, delegate
{
using (var dlg = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Error, Messages.XS_TOOLS_SR_NOT_FOUND, Messages.XENCENTER)))
{
dlg.ShowDialog(Program.MainWindow);
}
});
}
/// <summary>
/// Attempts to install tools on several VMs
/// </summary>
@ -225,7 +213,7 @@ namespace XenAdmin.Commands
{
foreach (VM vm in vms)
{
InstallPVToolsAction installToolsAction = new InstallPVToolsAction(vm, XSToolsSRNotFound, Properties.Settings.Default.ShowHiddenVMs);
var installToolsAction = new InstallPVToolsAction(vm, Properties.Settings.Default.ShowHiddenVMs);
if (vms.IndexOf(vm) == 0)
{

View File

@ -92,7 +92,7 @@ namespace XenAdmin.Commands
protected override bool CanExecuteCore(SelectedItemCollection selection)
{
return selection.Count >= 1 && selection.All(v=>VDIIsSuitable(v.XenObject as VDI));
return selection.Count >= 1 && selection.All(v => CanBeMigrated(v.XenObject as VDI));
}
private SR GetSR(VDI vdi)
@ -100,7 +100,7 @@ namespace XenAdmin.Commands
return vdi.Connection.Resolve(vdi.SR);
}
private bool VDIIsSuitable(VDI vdi)
private bool CanBeMigrated(VDI vdi)
{
if (vdi == null)
@ -115,9 +115,13 @@ namespace XenAdmin.Commands
return false;
if(vdi.GetVMs().Any(vm=>!vm.IsRunning) && !Helpers.DundeeOrGreater(vdi.Connection))
return false;
SR sr = GetSR(vdi);
if (sr == null || sr.HBALunPerVDI)
return false;
if (Helpers.DundeePlusOrGreater(vdi.Connection) && !sr.allowed_operations.Contains(storage_operations.vdi_mirror))
return false;
return true;
}
@ -136,11 +140,14 @@ namespace XenAdmin.Commands
return Messages.CANNOT_MOVE_DR_VD;
if (vdi.GetVMs().Any(vm => !vm.IsRunning) && !Helpers.DundeeOrGreater(vdi.Connection))
return Messages.CANNOT_MIGRATE_VDI_NON_RUNNING_VM;
SR sr = GetSR(vdi);
if (sr == null)
return base.GetCantExecuteReasonCore(item);
if (sr.HBALunPerVDI)
return Messages.UNSUPPORTED_SR_TYPE;
if (Helpers.DundeePlusOrGreater(vdi.Connection) && !sr.allowed_operations.Contains(storage_operations.vdi_mirror))
return Messages.UNSUPPORTED_SR_TYPE;
return base.GetCantExecuteReasonCore(item);
}

View File

@ -116,7 +116,7 @@ namespace XenAdmin.Commands
if (newPaths.Count > 0)
{
FolderAction action = new FolderAction(connection, FolderAction.Kind.New, newPaths.ToArray());
var action = new CreateFolderAction(connection, newPaths.ToArray());
Action<ActionBase> completed = null;
completed = delegate

View File

@ -35,7 +35,6 @@ using System.Text;
using XenAdmin.Core;
using XenAPI;
using XenAdmin.Wizards;
using System.Collections.ObjectModel;
namespace XenAdmin.Commands
@ -91,7 +90,8 @@ namespace XenAdmin.Commands
&& !sr.HasPBDs
&& sr.CanCreateWithXenCenter
&& !HelpersGUI.GetActionInProgress(sr)
&& !(sr.type == "cslg" && Helpers.FeatureForbidden(sr.Connection, Host.RestrictStorageChoices));
&& !(sr.type == "cslg" && Helpers.FeatureForbidden(sr.Connection, Host.RestrictStorageChoices))
&& (SM.GetByType(sr.Connection, sr.type) != null);
}
public override string MenuText

View File

@ -31,6 +31,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Properties;
@ -120,12 +121,32 @@ namespace XenAdmin.Commands
get
{
List<Host> hosts = GetSelection().AsXenObjects<Host>();
bool hasRunningVMs = (hosts.Find(h => h.resident_VMs.Count >= 2) != null); // 2 not 1, because the Control Domain doesn't count
if (hosts.Count == 1)
return (hasRunningVMs ? Messages.CONFIRM_REBOOT_SERVER : Messages.CONFIRM_REBOOT_SERVER_NO_VMS);
else
return (hasRunningVMs ? Messages.CONFIRM_REBOOT_SERVERS : Messages.CONFIRM_REBOOT_SERVERS_NO_VMS);
bool hasRunningVMs = false;
var hciHosts = new List<Host>();
foreach (Host h in hosts)
{
if (h.HasRunningVMs)
hasRunningVMs = true;
if (h.Connection.ResolveAll(h.resident_VMs).Exists(v => v.HciWarnBeforeShutdown))
hciHosts.Add(h);
}
if (hciHosts.Count > 0)
return hciHosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_HCI_WARN_SERVER, hciHosts[0].Name)
: string.Format(Messages.CONFIRM_REBOOT_HCI_WARN_SERVERS, string.Join("\n", hciHosts.Select(h => h.Name)));
if (hasRunningVMs)
return hosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_SERVER, hosts[0].Name)
: Messages.CONFIRM_REBOOT_SERVERS;
return hosts.Count == 1
? string.Format(Messages.CONFIRM_REBOOT_SERVER_NO_VMS, hosts[0].Name)
: Messages.CONFIRM_REBOOT_SERVERS_NO_VMS;
}
}
@ -183,5 +204,21 @@ namespace XenAdmin.Commands
return Messages.MAINWINDOW_REBOOT_HOST_CONTEXT_MENU;
}
}
protected override string ConfirmationDialogYesButtonLabel
{
get
{
return Messages.CONFIRM_REBOOT_SERVER_YES_BUTTON_LABEL;
}
}
protected override bool ConfirmationDialogNoButtonSelected
{
get
{
return true;
}
}
}
}

View File

@ -37,6 +37,7 @@ using XenAdmin.Actions;
using XenAdmin.Controls;
using XenAdmin.Model;
using XenAPI;
using System.Linq;
namespace XenAdmin.Commands
@ -77,18 +78,12 @@ namespace XenAdmin.Commands
protected override void ExecuteCore(SelectedItemCollection selection)
{
var actions = new List<AsyncAction>();
var objectsToBeRemoved = (from VirtualTreeNode node in _nodes
let xenObject = node.Tag as IXenObject
where xenObject != null
select xenObject).ToList();
foreach (VirtualTreeNode node in _nodes)
{
IXenObject xenObject = node.Tag as IXenObject;
if (xenObject != null)
actions.Add(new FolderAction(xenObject, null, FolderAction.Kind.Delete));
}
if (actions.Count != 0)
RunMultipleActions(actions, Messages.REMOVE_FROM_FOLDER, Messages.REMOVING_FROM_FOLDER, Messages.REMOVED_FROM_FOLDER, true);
new DeleteFolderAction(objectsToBeRemoved).RunAsync();
}
public override string MenuText

View File

@ -71,7 +71,7 @@ namespace XenAdmin.Commands
string newName = _newName;
Folders.FixupRelativePath(ref newName);
FolderAction action = new FolderAction(_folder, newName, FolderAction.Kind.Rename);
FolderAction action = new RenameFolderAction(_folder, newName);
action.Completed += action_Completed;
action.RunAsync();
}

View File

@ -98,10 +98,10 @@ namespace XenAdmin.Commands
oldDir = Directory.GetCurrentDirectory();
OpenFileDialog dialog = new OpenFileDialog();
dialog.AddExtension = true;
dialog.Filter = string.Format("{0} (*.xbk)|*.xbk|{1} (*.*)|*.*", Messages.XS_BACKUP_FILES, Messages.ALL_FILES);
dialog.Filter = string.Format("{0} (*.{1})|*.{1}|{2} (*.*)|*.*", Messages.XS_BACKUP_FILES, Branding.BACKUP, Messages.ALL_FILES);
dialog.FilterIndex = 0;
dialog.RestoreDirectory = true;
dialog.DefaultExt = "xbk";
dialog.DefaultExt = Branding.BACKUP;
dialog.CheckPathExists = false;
if (dialog.ShowDialog(Parent) == DialogResult.Cancel)
return;

View File

@ -64,11 +64,15 @@ namespace XenAdmin.Commands
{
foreach (IXenConnection xenConnection in ConnectionsManager.XenConnectionsCopy)
{
if (xenConnection.IsConnected)
{
if (!xenConnection.IsConnected)
continue;
var pool = Helpers.GetPoolOfOne(xenConnection);
if (pool != null && pool.IsUpgradeForbidden)
continue;
return true;
}
}
return false;
}

View File

@ -57,6 +57,15 @@ namespace XenAdmin.Commands
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectedItemCollection"/> class with one item
/// </summary>
/// <param name="item">The itemsthat will populate the collection.</param>
public SelectedItemCollection(SelectedItem item)
: base(new List<SelectedItem> {item})
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectedItemCollection"/> class.
/// </summary>

View File

@ -31,6 +31,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Core;
@ -132,14 +133,31 @@ namespace XenAdmin.Commands
get
{
List<Host> hosts = GetSelection().AsXenObjects<Host>();
bool hasRunningVMs = (hosts.Find(h => h.resident_VMs.Count >= 2) != null); // 2 not 1, because the Control Domain doesn't count
bool hasRunningVMs = false;
var hciHosts = new List<Host>();
if (hosts.Count == 1)
return (hasRunningVMs
foreach (Host h in hosts)
{
if (h.HasRunningVMs)
hasRunningVMs = true;
if (h.Connection.ResolveAll(h.resident_VMs).Exists(v => v.HciWarnBeforeShutdown))
hciHosts.Add(h);
}
if (hciHosts.Count > 0)
return hciHosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_HCI_WARN_SERVER, hciHosts[0].Name)
: string.Format(Messages.CONFIRM_SHUTDOWN_HCI_WARN_SERVERS, string.Join("\n", hciHosts.Select(h => h.Name)));
if (hasRunningVMs)
return hosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_SERVER, hosts[0].Name)
: string.Format(Messages.CONFIRM_SHUTDOWN_SERVER_NO_VMS, hosts[0].Name));
else
return (hasRunningVMs ? Messages.CONFIRM_SHUTDOWN_SERVERS : Messages.CONFIRM_SHUTDOWN_SERVERS_NO_VMS);
: Messages.CONFIRM_SHUTDOWN_SERVERS;
return hosts.Count == 1
? string.Format(Messages.CONFIRM_SHUTDOWN_SERVER_NO_VMS, hosts[0].Name)
: Messages.CONFIRM_SHUTDOWN_SERVERS_NO_VMS;
}
}

View File

@ -257,11 +257,11 @@ namespace XenAdmin.ConsoleView
#endregion
private System.Windows.Forms.Panel buttonPanel;
public System.Windows.Forms.Button dockButton;
private System.Windows.Forms.Button dockButton;
private System.Windows.Forms.Button sendCAD;
private System.Windows.Forms.Panel contentPanel;
private System.Windows.Forms.Panel bottomPanel;
public System.Windows.Forms.CheckBox scaleCheckBox;
private System.Windows.Forms.CheckBox scaleCheckBox;
private System.Windows.Forms.Button fullscreenButton;
private XenAdmin.Controls.DecentGroupBox groupBox1;
private System.Windows.Forms.ToolTip tip;
@ -272,10 +272,10 @@ namespace XenAdmin.ConsoleView
private System.Windows.Forms.Panel panel2;
private XenAdmin.Controls.GradientPanel.GradientPanel gradientPanel1;
private System.Windows.Forms.Label HostLabel;
public System.Windows.Forms.Button toggleConsoleButton;
private System.Windows.Forms.Button toggleConsoleButton;
private XenAdmin.Controls.MultipleDvdIsoList multipleDvdIsoList1;
private System.Windows.Forms.Label powerStateLabel;
private System.Windows.Forms.Label dedicatedGpuWarning;
public System.Windows.Forms.Button buttonSSH;
private System.Windows.Forms.Button buttonSSH;
}
}

View File

@ -43,7 +43,7 @@ using XenAdmin.Commands;
using XenAdmin.Dialogs;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
namespace XenAdmin.ConsoleView
{
@ -96,7 +96,9 @@ namespace XenAdmin.ConsoleView
HostLabel.Font = Program.HeaderGradientFont;
HostLabel.ForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.SetTextColor(Program.HeaderGradientForeColor);
multipleDvdIsoList1.LabelSingleDvdForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.LabelNewCdForeColor = Program.HeaderGradientForeColor;
multipleDvdIsoList1.LinkLabelLinkColor = Color.White;
#pragma warning disable 0219
// Force the handle to be created, because resize events
@ -131,7 +133,7 @@ namespace XenAdmin.ConsoleView
hostMetrics.PropertyChanged += Server_PropertyChanged;
}
HostLabel.Text = string.Format(Messages.CONSOLE_HOST, host.Name);
HostLabel.Text = string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, host.Name);
HostLabel.Visible = true;
}
}
@ -155,7 +157,7 @@ namespace XenAdmin.ConsoleView
this.vncScreen = new XSVNCScreen(source, new EventHandler(RDPorVNCResizeHandler), this, elevatedUsername, elevatedPassword);
ShowGpuWarningIfRequired();
if (source.is_control_domain || source.IsHVM && !hasRDP) //Linux HVM guests should only have one console: the console switch button vanishes altogether.
if (source.IsControlDomainZero || source.IsHVM && !hasRDP) //Linux HVM guests should only have one console: the console switch button vanishes altogether.
{
toggleConsoleButton.Visible = false;
}
@ -185,8 +187,6 @@ namespace XenAdmin.ConsoleView
this.vncScreen.Parent = this.contentPanel;
this.vncScreen.Dock = DockStyle.Fill;
this.Dock = DockStyle.Fill;
string rdpLabel = GuessNativeConsoleLabel(source);
this.toggleConsoleButton.Text = rdpLabel;
@ -210,6 +210,12 @@ namespace XenAdmin.ConsoleView
vncScreen.AutoSwitchRDPLater = true;
}
public bool IsScaled
{
get { return scaleCheckBox.Checked; }
set { scaleCheckBox.Checked = value; }
}
//CA-75479 - add to aid debugging
private void toggleConsoleButton_EnabledChanged(object sender, EventArgs e)
{
@ -243,7 +249,7 @@ namespace XenAdmin.ConsoleView
private void Host_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
if (source.is_control_domain)
if (source.IsControlDomainZero)
return;
Host host = e.Element as Host;
@ -279,7 +285,7 @@ namespace XenAdmin.ConsoleView
if (this.guestMetrics != null)
this.guestMetrics.PropertyChanged -= guestMetrics_PropertyChanged;
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host != null)
@ -520,9 +526,11 @@ namespace XenAdmin.ConsoleView
if (source.is_control_domain && e.PropertyName == "name_label")
{
HostLabel.Text = string.Format(Messages.CONSOLE_HOST, source.AffinityServerString);
string text = string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, source.AffinityServerString);
HostLabel.Text = text;
if (parentVNCView != null && parentVNCView.undockedForm != null)
parentVNCView.undockedForm.Text = source.AffinityServerString;
parentVNCView.undockedForm.Text = text;
}
}
@ -580,7 +588,7 @@ namespace XenAdmin.ConsoleView
private void Server_EnabledPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName != "enabled" || source.is_control_domain)
if (e.PropertyName != "enabled" || source.IsControlDomainZero)
return;
Host host = sender as Host;
@ -601,14 +609,9 @@ namespace XenAdmin.ConsoleView
multipleDvdIsoList1.VM = source;
}
private void cdLabel_Click(object sender, EventArgs e)
{
new InstallToolsCommand(Program.MainWindow, source, this).Execute();
}
private void updatePowerState()
{
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host == null)
@ -674,7 +677,7 @@ namespace XenAdmin.ConsoleView
private void hideTopBarContents()
{
VMPowerOff();
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
log.DebugFormat("'{0}' console: Hide top bar contents, server is unavailable", source.Name);
DisablePowerStateLabel(Messages.CONSOLE_HOST_DEAD);
@ -767,17 +770,6 @@ namespace XenAdmin.ConsoleView
}
}
public bool isPaused
{
get
{
if (vncScreen != null && !isFullscreen)
return vncScreen.wasPaused;
else
return false;
}
}
public void Pause()
{
if (vncScreen != null && !isFullscreen)
@ -1415,7 +1407,7 @@ namespace XenAdmin.ConsoleView
ContextMenuItemCollection contextMenuItems = new ContextMenuItemCollection();
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
// We're looking at the host console
if (host.Connection.IsConnected)
@ -1578,7 +1570,7 @@ namespace XenAdmin.ConsoleView
if (source.IsWindows)
return false;
if (source.is_control_domain)
if (source.IsControlDomainZero)
{
Host host = source.Connection.Resolve<Host>(source.resident_on);
if (host == null)

View File

@ -42,7 +42,7 @@ namespace XenAdmin.ConsoleView
public partial class VNCView : UserControl
{
private readonly VM source;
public readonly VNCTabView vncTabView;
private readonly VNCTabView vncTabView;
public Form undockedForm = null;
public bool isDocked
@ -53,14 +53,6 @@ namespace XenAdmin.ConsoleView
}
}
public bool isPaused
{
get
{
return vncTabView.isPaused;
}
}
public void Pause()
{
if (vncTabView != null && isDocked)
@ -78,10 +70,9 @@ namespace XenAdmin.ConsoleView
Program.AssertOnEventThread();
this.source = source;
this.vncTabView = new VNCTabView(this, source, elevatedUsername, elevatedPassword);
this.vncTabView = new VNCTabView(this, source, elevatedUsername, elevatedPassword) {Dock = DockStyle.Fill};
InitializeComponent();
this.Dock = DockStyle.Fill;
this.Controls.Add(this.vncTabView);
}
@ -128,7 +119,7 @@ namespace XenAdmin.ConsoleView
this.Controls.Remove(vncTabView);
undockedForm.Controls.Add(vncTabView);
oldScaledSetting = vncTabView.scaleCheckBox.Checked;
oldScaledSetting = vncTabView.IsScaled;
vncTabView.showHeaderBar(!source.is_control_domain, true);
@ -144,15 +135,13 @@ namespace XenAdmin.ConsoleView
}
undockedForm.HelpButton = true;
//undockedForm.MinimizeBox = false;
//undockedForm.MaximizeBox = false;
undockedForm.HelpButtonClicked += undockedForm_HelpButtonClicked;
undockedForm.HelpRequested += undockedForm_HelpRequested;
undockedForm.Show();
if(Properties.Settings.Default.PreserveScaleWhenUndocked)
vncTabView.scaleCheckBox.Checked = oldScaledSetting;
vncTabView.IsScaled = oldScaledSetting;
this.reattachConsoleButton.Show();
this.findConsoleButton.Show();
@ -164,7 +153,7 @@ namespace XenAdmin.ConsoleView
this.oldUndockedSize = undockedForm.Size;
if (!Properties.Settings.Default.PreserveScaleWhenUndocked)
vncTabView.scaleCheckBox.Checked = oldScaledSetting;
vncTabView.IsScaled = oldScaledSetting;
this.reattachConsoleButton.Hide();
this.findConsoleButton.Hide();
@ -192,7 +181,10 @@ namespace XenAdmin.ConsoleView
if (source.is_control_domain)
{
Host host = source.Connection.Resolve(source.resident_on);
return host == null ? source.Name : string.Format(Messages.CONSOLE_HOST, host.Name);
if (host == null)
return source.Name;
return string.Format(source.IsControlDomainZero ? Messages.CONSOLE_HOST : Messages.CONSOLE_HOST_NUTANIX, host.Name);
}
else
{

View File

@ -225,7 +225,7 @@ namespace XenAdmin.ConsoleView
return true;
}
public bool wasPaused = true;
private bool wasPaused = true;
public void Pause()
{
@ -727,9 +727,8 @@ namespace XenAdmin.ConsoleView
parentVNCTabView.DisableToggleVNCButton();
}
//Start the polling again
if (Source != null && !Source.is_control_domain)
if (Source != null && !Source.IsControlDomainZero)
{
if (!Source.IsHVM)
{

View File

@ -109,6 +109,7 @@ namespace XenAdmin.Controls
this.ReasonColumn});
resources.ApplyResources(this.ServersGridView, "ServersGridView");
this.ServersGridView.Name = "ServersGridView";
this.ServersGridView.VisibleChanged += new System.EventHandler(this.ServersGridView_VisibleChanged);
//
// ImageColumn
//

View File

@ -216,6 +216,17 @@ namespace XenAdmin.Controls
else
ServersGridView.Select();
}
bool selectedOnVisibleChanged = false;
private void ServersGridView_VisibleChanged(object sender, EventArgs e)
{
if (!selectedOnVisibleChanged)
{
selectedOnVisibleChanged = true;
SelectSomething();//CA-213728
}
}
}
internal class ServerGridRow : DataGridViewExRow

View File

@ -33,7 +33,9 @@ namespace XenAdmin.Controls
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChevronButton));
this.label1 = new System.Windows.Forms.Label();
this.pictureBoxButton = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxButton)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// label1
@ -49,15 +51,23 @@ namespace XenAdmin.Controls
this.pictureBoxButton.Name = "pictureBoxButton";
this.pictureBoxButton.TabStop = false;
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.pictureBoxButton, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label1, 1, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// ChevronButton
//
resources.ApplyResources(this, "$this");
this.Controls.Add(this.pictureBoxButton);
this.Controls.Add(this.label1);
this.Controls.Add(this.tableLayoutPanel1);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.DoubleBuffered = true;
this.Name = "ChevronButton";
((System.ComponentModel.ISupportInitialize)(this.pictureBoxButton)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -67,5 +77,6 @@ namespace XenAdmin.Controls
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBoxButton;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}

View File

@ -112,22 +112,22 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
<value>Left, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>27, 8</value>
<value>30, 8</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
@ -145,10 +145,10 @@
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>1</value>
@ -157,7 +157,7 @@
<value>3, 3</value>
</data>
<data name="pictureBoxButton.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 22</value>
<value>24, 24</value>
</data>
<data name="pictureBoxButton.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>CenterImage</value>
@ -169,15 +169,54 @@
<value>pictureBoxButton</value>
</data>
<data name="&gt;&gt;pictureBoxButton.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBoxButton.Parent" xml:space="preserve">
<value>$this</value>
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;pictureBoxButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 30</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBoxButton" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoSize" type="System.Boolean, mscorlib">
@ -186,16 +225,13 @@
<data name="$this.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 28</value>
<value>62, 30</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ChevronButton</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -48,9 +48,6 @@ namespace XenAdmin.Controls
protected bool refreshOnClose = false;
protected bool changing = false;
private IXenConnection _connection;
protected bool physicalOnly = false;
protected bool isoOnly = false;
protected bool empty = false;
private bool noTools = false;
private VDI selectedCD;
@ -109,10 +106,10 @@ namespace XenAdmin.Controls
if (sr.content_type != SR.Content_Type_ISO)
continue;
if (physicalOnly && !sr.Physical)
if (DisplayPhysical && !sr.Physical)
continue;
if (isoOnly && (sr.Physical || (noTools && sr.IsToolsSR)))
if (DisplayISO && (sr.Physical || (noTools && sr.IsToolsSR)))
continue;
if (vm == null && sr.IsBroken())
@ -186,45 +183,13 @@ namespace XenAdmin.Controls
}
}
// TODO: this means only physical. refactor to mean display physical
public bool Physical
{
get
{
return physicalOnly;
}
set
{
physicalOnly = value;
}
}
public bool DisplayPhysical { get; set; }
// TODO: this means only iso. refactor to mean display iso
public bool ISO
{
get
{
return isoOnly;
}
set
{
isoOnly = value;
}
}
public bool DisplayISO { get; set; }
public bool Empty
{
get
{
return empty;
}
set
{
empty = value;
}
}
public bool Empty { get; set; }
protected void AddSR(ToStringWrapper<SR> srWrapper)
private void AddSR(ToStringWrapper<SR> srWrapper)
{
Items.Add(srWrapper);

109
XenAdmin/Controls/ConsolePanel.Designer.cs generated Normal file
View File

@ -0,0 +1,109 @@
namespace XenAdmin.Controls
{
partial class ConsolePanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConsolePanel));
this.tableLayoutPanelRbac = new System.Windows.Forms.TableLayoutPanel();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.lableRbacWarning = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.tableLayoutPanelError = new System.Windows.Forms.TableLayoutPanel();
this.errorLabel = new System.Windows.Forms.Label();
this.tableLayoutPanelRbac.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tableLayoutPanelError.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanelRbac
//
resources.ApplyResources(this.tableLayoutPanelRbac, "tableLayoutPanelRbac");
this.tableLayoutPanelRbac.Controls.Add(this.pictureBox2, 0, 0);
this.tableLayoutPanelRbac.Controls.Add(this.lableRbacWarning, 1, 0);
this.tableLayoutPanelRbac.Name = "tableLayoutPanelRbac";
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Image = global::XenAdmin.Properties.Resources._000_WarningAlert_h32bit_32;
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// lableRbacWarning
//
resources.ApplyResources(this.lableRbacWarning, "lableRbacWarning");
this.lableRbacWarning.Name = "lableRbacWarning";
//
// pictureBox1
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._000_error_h32bit_16;
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// tableLayoutPanelError
//
resources.ApplyResources(this.tableLayoutPanelError, "tableLayoutPanelError");
this.tableLayoutPanelError.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanelError.Controls.Add(this.errorLabel, 1, 0);
this.tableLayoutPanelError.Name = "tableLayoutPanelError";
//
// errorLabel
//
resources.ApplyResources(this.errorLabel, "errorLabel");
this.errorLabel.Name = "errorLabel";
//
// ConsolePanel
//
this.Controls.Add(this.tableLayoutPanelError);
this.Controls.Add(this.tableLayoutPanelRbac);
this.Name = "ConsolePanel";
resources.ApplyResources(this, "$this");
this.tableLayoutPanelRbac.ResumeLayout(false);
this.tableLayoutPanelRbac.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tableLayoutPanelError.ResumeLayout(false);
this.tableLayoutPanelError.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lableRbacWarning;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelRbac;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelError;
private System.Windows.Forms.Label errorLabel;
}
}

View File

@ -35,37 +35,25 @@ using System.Linq;
using System.Windows.Forms;
using XenAdmin.ConsoleView;
using XenAPI;
using XenAdmin.Core;
using System.Drawing;
namespace XenAdmin.Controls
{
public class ConsolePanel : UserControl
public partial class ConsolePanel : UserControl
{
private const int MAX_ACTIVE_VM_CONSOLES = 10;
private List<VM> activeVMConsoles;
private Dictionary<VM, VNCView> vncViews;
private Label errorLabel;
private static string CouldNotConnect = Messages.VNC_COULD_NOT_CONNECT_CONSOLE;
private static string CouldNotFindConsole = Messages.VNC_COULD_NOT_FIND_CONSOLES;
public VNCView activeVNCView = null;
private Panel RbacWarningPanel;
private TableLayoutPanel tableLayoutPanel3;
private PictureBox pictureBox2;
private Label lableRbacWarning;
public VNCView activeVNCView;
private Dictionary<VM, VNCView> vncViews = new Dictionary<VM, VNCView>();
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
protected static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public ConsolePanel()
: base()
{
InitializeComponent();
this.vncViews = new Dictionary<VM, VNCView>();
this.activeVMConsoles = new List<VM>();
this.Dock = DockStyle.Fill;
pictureBox2.Image = SystemIcons.Warning.ToBitmap();
tableLayoutPanelRbac.Visible = false;
ClearErrorMessage();
}
public void PauseAllViews()
@ -118,34 +106,37 @@ namespace XenAdmin.Controls
// Start a timer for closing the inactive VNC connection after an interval (20 seconds)
StartCloseVNCTimer(activeVNCView);
this.Controls.Clear();
tableLayoutPanelRbac.Visible = false;
if (activeVNCView != null)
{
Controls.Remove(activeVNCView);
activeVNCView = null;
}
if (source == null)
{
activeVNCView = null;
return;
}
List<Role> allowedRoles = null;
List<Role> allowedRoles;
if (RbacDenied(source, out allowedRoles))
{
lableRbacWarning.Text = String.Format(allowedRoles.Count == 1 ? Messages.RBAC_CONSOLE_WARNING_ONE : Messages.RBAC_CONSOLE_WARNING_MANY,
string msg = allowedRoles.Count == 1 ? Messages.RBAC_CONSOLE_WARNING_ONE : Messages.RBAC_CONSOLE_WARNING_MANY;
lableRbacWarning.Text = string.Format(msg,
Role.FriendlyCSVRoleList(source.Connection.Session.Roles),
Role.FriendlyCSVRoleList(allowedRoles));
this.Controls.Add(RbacWarningPanel);
if (activeVNCView != null)
this.Controls.Remove(activeVNCView);
tableLayoutPanelRbac.Visible = true;
return;
}
activeVMConsoles.Remove(source);
activeVMConsoles.Add(source);
StopCloseVncTimer(source);
while (activeVMConsoles.Count > MAX_ACTIVE_VM_CONSOLES)
{
closeVNCForSource(activeVMConsoles[0]);
}
//remove one more as we're adding the selected further down
//Take(arg) returns empty list if the arg <= 0
var viewsToRemove = vncViews.Where(v => v.Key.opaque_ref != source.opaque_ref).Take(vncViews.Count -1 - MAX_ACTIVE_VM_CONSOLES);
foreach (var view in viewsToRemove)
closeVNCForSource(view.Key);
if (vncViews.ContainsKey(source))
{
@ -153,102 +144,54 @@ namespace XenAdmin.Controls
}
else
{
activeVNCView = new VNCView(source, null, null);
activeVNCView = new VNCView(source, null, null) { Dock = DockStyle.Fill };
vncViews[source] = activeVNCView;
}
activeVNCView.refreshIsoList();
this.Controls.Add(activeVNCView);
this.ClearErrorMessage();
Controls.Add(activeVNCView);
ClearErrorMessage();
}
internal void setCurrentSource(Host source)
internal virtual void setCurrentSource(Host source)
{
// sanity...
if (source == null)
{
log.Error("null source when attempting to connect to host VNC");
SetErrorMessage(CouldNotConnect);
log.Error("No local copy of host information when connecting to host VNC console.");
SetErrorMessage(Messages.VNC_COULD_NOT_CONNECT_CONSOLE);
return;
}
if (source == null)
{
log.Error("No local copy of host information when connecting to host VNC console...");
SetErrorMessage(CouldNotConnect);
return;
}
if (source.resident_VMs == null)
VM dom0 = source.ControlDomainZero;
if (dom0 == null)
{
log.Error("No dom0 on host when connecting to host VNC console.");
SetErrorMessage(CouldNotConnect);
return;
}
List<XenRef<VM>> controlVMs =
source.resident_VMs.FindAll((Predicate<XenRef<VM>>)delegate(XenRef<VM> vmRef)
{
VM vm = source.Connection.Resolve<VM>(vmRef);
if (vm == null)
{
return false;
SetErrorMessage(Messages.VNC_COULD_NOT_FIND_CONSOLES);
}
else
{
return vm.is_control_domain;
}
});
if (controlVMs.Count > 0)
{
VM vm = source.Connection.Resolve<VM>(controlVMs[0]);
if (vm == null)
{
SetErrorMessage(CouldNotFindConsole);
}
else
{
this.setCurrentSource(vm);
}
}
else
{
SetErrorMessage(CouldNotFindConsole);
}
setCurrentSource(dom0);
}
public static bool RbacDenied(VM source, out List<Role> AllowedRoles)
public static bool RbacDenied(VM source, out List<Role> allowedRoles)
{
if (source == null || source.Connection == null)
{
AllowedRoles = null;
allowedRoles = null;
return false;
}
else
{
var session = source.Connection.Session;
if (session != null && session.IsLocalSuperuser)
{
AllowedRoles = null;
allowedRoles = null;
return false;
}
}
List<Role> allowedRoles = null;
if (source.is_control_domain)
allowedRoles = Role.ValidRoleList("http/connect_console/host_console", source.Connection);
else
allowedRoles = Role.ValidRoleList("http/connect_console", source.Connection);
if (source.Connection.Session.Roles.Find(delegate(Role r) { return allowedRoles.Contains(r); }) != null)
{
AllowedRoles = allowedRoles;
return false;
}
AllowedRoles = allowedRoles;
return true;
string roleList = source.IsControlDomainZero ? "http/connect_console/host_console" : "http/connect_console";
List<Role> validRoles = Role.ValidRoleList(roleList, source.Connection);
allowedRoles = validRoles;
return source.Connection.Session.Roles.Find(r => validRoles.Contains(r)) == null;
}
internal Image Snapshot(VM vm, string elevatedUsername, string elevatedPassword)
@ -266,7 +209,7 @@ namespace XenAdmin.Controls
// use elevated credentials, if provided, to create a vncView (CA-91132)
useElevatedCredentials = !String.IsNullOrEmpty(elevatedUsername) && !String.IsNullOrEmpty(elevatedPassword);
if (useElevatedCredentials)
view = new VNCView(vm, elevatedUsername, elevatedPassword);
view = new VNCView(vm, elevatedUsername, elevatedPassword) { Dock = DockStyle.Fill };
else
{
setCurrentSource(vm);
@ -311,9 +254,6 @@ namespace XenAdmin.Controls
vncViews.Remove(source);
vncView.Dispose();
if (activeVMConsoles.Contains(source))
activeVMConsoles.Remove(source);
}
public void closeVNCForSource(VM source, bool vncOnly)
@ -324,93 +264,22 @@ namespace XenAdmin.Controls
closeVNCForSource(source);
}
public bool isVNCPausedForSource(VM source)
protected void SetErrorMessage(string message)
{
Program.AssertOnEventThread();
VNCView vncView = null;
if (vncViews.ContainsKey(source))
{
vncView = vncViews[source];
return vncView.isPaused;
}
return false;
}
private void SetErrorMessage(String message)
{
this.errorLabel.Text = message;
this.errorLabel.Visible = true;
this.Controls.Add(this.errorLabel);
this.setCurrentSource((VM)null);
errorLabel.Text = message;
tableLayoutPanelError.Visible = true;
setCurrentSource((VM)null);
}
private void ClearErrorMessage()
{
this.errorLabel.Text = "";
this.errorLabel.Visible = false;
this.Controls.Remove(this.errorLabel);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConsolePanel));
this.errorLabel = new System.Windows.Forms.Label();
this.RbacWarningPanel = new System.Windows.Forms.Panel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.lableRbacWarning = new System.Windows.Forms.Label();
this.RbacWarningPanel.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.SuspendLayout();
//
// errorLabel
//
resources.ApplyResources(this.errorLabel, "errorLabel");
this.errorLabel.Name = "errorLabel";
//
// RbacWarningPanel
//
this.RbacWarningPanel.BackColor = System.Drawing.Color.Transparent;
this.RbacWarningPanel.Controls.Add(this.tableLayoutPanel3);
resources.ApplyResources(this.RbacWarningPanel, "RbacWarningPanel");
this.RbacWarningPanel.Name = "RbacWarningPanel";
//
// tableLayoutPanel3
//
resources.ApplyResources(this.tableLayoutPanel3, "tableLayoutPanel3");
this.tableLayoutPanel3.Controls.Add(this.pictureBox2, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.lableRbacWarning, 1, 0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// lableRbacWarning
//
resources.ApplyResources(this.lableRbacWarning, "lableRbacWarning");
this.lableRbacWarning.Name = "lableRbacWarning";
//
// ConsolePanel
//
this.Controls.Add(this.RbacWarningPanel);
this.Name = "ConsolePanel";
resources.ApplyResources(this, "$this");
this.RbacWarningPanel.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.ResumeLayout(false);
tableLayoutPanelError.Visible = false;
}
public void SendCAD()
{
if (this.activeVNCView != null)
this.activeVNCView.SendCAD();
if (activeVNCView != null)
activeVNCView.SendCAD();
}
internal void SwitchIfRequired()
@ -487,4 +356,26 @@ namespace XenAdmin.Controls
#endregion
}
internal class CvmConsolePanel : ConsolePanel
{
internal override void setCurrentSource(Host source)
{
if (source == null)
{
log.Error("No local copy of host information when connecting to host VNC console.");
SetErrorMessage(Messages.VNC_COULD_NOT_CONNECT_CONSOLE);
return;
}
VM cvm = source.OtherControlDomains.FirstOrDefault();
if (cvm == null)
{
log.Error("Could not find CVM console on host.");
SetErrorMessage(Messages.VNC_COULD_NOT_FIND_CONSOLES);
}
else
setCurrentSource(cvm);
}
}
}

View File

@ -112,52 +112,28 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="errorLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="errorLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="errorLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>82, 70</value>
</data>
<data name="errorLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 13</value>
</data>
<data name="errorLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="errorLabel.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;errorLabel.Name" xml:space="preserve">
<value>errorLabel</value>
</data>
<data name="&gt;&gt;errorLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="tableLayoutPanel3.ColumnCount" type="System.Int32, mscorlib">
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanelRbac.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pictureBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 13</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 39</value>
<value>32, 32</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -166,10 +142,10 @@
<value>pictureBox2</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<value>tableLayoutPanel3</value>
<value>tableLayoutPanelRbac</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>0</value>
@ -184,10 +160,10 @@
<value>NoControl</value>
</data>
<data name="lableRbacWarning.Location" type="System.Drawing.Point, System.Drawing">
<value>66, 10</value>
<value>51, 10</value>
</data>
<data name="lableRbacWarning.Size" type="System.Drawing.Size, System.Drawing">
<value>545, 196</value>
<value>560, 196</value>
</data>
<data name="lableRbacWarning.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -199,72 +175,141 @@
<value>lableRbacWarning</value>
</data>
<data name="&gt;&gt;lableRbacWarning.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lableRbacWarning.Parent" xml:space="preserve">
<value>tableLayoutPanel3</value>
<value>tableLayoutPanelRbac</value>
</data>
<data name="&gt;&gt;lableRbacWarning.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel3.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tableLayoutPanel3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>10, 10, 10, 10</value>
</data>
<data name="tableLayoutPanel3.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel3.Size" type="System.Drawing.Size, System.Drawing">
<value>624, 216</value>
</data>
<data name="tableLayoutPanel3.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel3.Name" xml:space="preserve">
<value>tableLayoutPanel3</value>
</data>
<data name="&gt;&gt;tableLayoutPanel3.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel3.Parent" xml:space="preserve">
<value>RbacWarningPanel</value>
</data>
<data name="&gt;&gt;tableLayoutPanel3.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel3.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lableRbacWarning" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="RbacWarningPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="tableLayoutPanelRbac.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="RbacWarningPanel.Location" type="System.Drawing.Point, System.Drawing">
<data name="tableLayoutPanelRbac.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="RbacWarningPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>624, 216</value>
<data name="tableLayoutPanelRbac.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>10, 10, 10, 10</value>
</data>
<data name="RbacWarningPanel.TabIndex" type="System.Int32, mscorlib">
<data name="tableLayoutPanelRbac.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;RbacWarningPanel.Name" xml:space="preserve">
<value>RbacWarningPanel</value>
<data name="tableLayoutPanelRbac.Size" type="System.Drawing.Size, System.Drawing">
<value>624, 216</value>
</data>
<data name="&gt;&gt;RbacWarningPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="tableLayoutPanelRbac.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;RbacWarningPanel.Parent" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanelRbac.Name" xml:space="preserve">
<value>tableLayoutPanelRbac</value>
</data>
<data name="&gt;&gt;tableLayoutPanelRbac.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelRbac.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;RbacWarningPanel.ZOrder" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanelRbac.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanelRbac.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lableRbacWarning" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="pictureBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<value>tableLayoutPanelError</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="tableLayoutPanelError.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="tableLayoutPanelError.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanelError.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanelError.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="errorLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="errorLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="errorLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 4</value>
</data>
<data name="errorLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>48, 13</value>
</data>
<data name="errorLabel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="errorLabel.Text" xml:space="preserve">
<value>errorMsg</value>
</data>
<data name="&gt;&gt;errorLabel.Name" xml:space="preserve">
<value>errorLabel</value>
</data>
<data name="&gt;&gt;errorLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;errorLabel.Parent" xml:space="preserve">
<value>tableLayoutPanelError</value>
</data>
<data name="&gt;&gt;errorLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanelError.Location" type="System.Drawing.Point, System.Drawing">
<value>261, 222</value>
</data>
<data name="tableLayoutPanelError.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanelError.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 22</value>
</data>
<data name="tableLayoutPanelError.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;tableLayoutPanelError.Name" xml:space="preserve">
<value>tableLayoutPanelError</value>
</data>
<data name="&gt;&gt;tableLayoutPanelError.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanelError.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanelError.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanelError.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="errorLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
@ -274,6 +319,6 @@
<value>ConsolePanel</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -70,9 +70,13 @@ namespace XenAdmin.Controls.ConsoleTab
if (_selectedScreen == null) //screen not assigned yet
return;
string connectionName = _selectedScreen.Source.is_control_domain
? _selectedScreen.Source.AffinityServerString
: _selectedScreen.Source.Name;
string connectionName;
if (_selectedScreen.Source.IsControlDomainZero)
connectionName = _selectedScreen.Source.AffinityServerString;
else if (_selectedScreen.Source.is_control_domain)
connectionName = string.Format(Messages.CONSOLE_HOST_NUTANIX, _selectedScreen.Source.AffinityServerString);
else
connectionName = _selectedScreen.Source.Name;
using (Graphics g = toolStrip1.CreateGraphics())
{
@ -169,7 +173,7 @@ namespace XenAdmin.Controls.ConsoleTab
}
public void ShowAnimated()
private void ShowAnimated()
{
if (state == Animating.Open)
return;
@ -239,8 +243,7 @@ namespace XenAdmin.Controls.ConsoleTab
{
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) { }
protected override void OnRenderToolStripBackground(
ToolStripRenderEventArgs e)
protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
{
using (var brush = new LinearGradientBrush(e.AffectedBounds, Color.FromArgb(64, 64, 64), Color.Gray, 90))
{

View File

@ -197,7 +197,7 @@ namespace XenAdmin.Controls
Session dupSess = connection.DuplicateSession(60 * 1000);
// Use a 1 minute timeout here (rather than the default 1 day)
ntolMax = Pool.ha_compute_hypothetical_max_host_failures_to_tolerate(dupSess, config);
ntolMax = Pool.GetMaximumTolerableHostFailures(dupSess, config);
if (exitNtolUpdateThread)
continue;

View File

@ -46,7 +46,6 @@ namespace XenAdmin.Controls
// labelSingleDvd
//
resources.ApplyResources(this.labelSingleDvd, "labelSingleDvd");
this.labelSingleDvd.MaximumSize = new System.Drawing.Size(100, 23);
this.labelSingleDvd.Name = "labelSingleDvd";
//
// newCDLabel
@ -62,7 +61,6 @@ namespace XenAdmin.Controls
this.comboBoxDrive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxDrive.FormattingEnabled = true;
resources.ApplyResources(this.comboBoxDrive, "comboBoxDrive");
this.comboBoxDrive.MaximumSize = new System.Drawing.Size(120, 0);
this.comboBoxDrive.Name = "comboBoxDrive";
this.comboBoxDrive.SelectedIndexChanged += new System.EventHandler(this.comboBoxDrive_SelectedIndexChanged);
//
@ -85,6 +83,8 @@ namespace XenAdmin.Controls
// cdChanger1
//
this.cdChanger1.connection = null;
this.cdChanger1.DisplayISO = false;
this.cdChanger1.DisplayPhysical = false;
resources.ApplyResources(this.cdChanger1, "cdChanger1");
this.cdChanger1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cdChanger1.Drive = null;
@ -92,16 +92,13 @@ namespace XenAdmin.Controls
this.cdChanger1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cdChanger1.Empty = true;
this.cdChanger1.FormattingEnabled = true;
this.cdChanger1.ISO = false;
this.cdChanger1.Name = "cdChanger1";
this.cdChanger1.Physical = false;
this.cdChanger1.SelectedCD = null;
this.cdChanger1.TheVM = null;
//
// linkLabel1
//
resources.ApplyResources(this.linkLabel1, "linkLabel1");
this.linkLabel1.LinkColor = System.Drawing.Color.White;
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.TabStop = true;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
@ -128,6 +125,6 @@ namespace XenAdmin.Controls
private System.Windows.Forms.Label newCDLabel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel1;
internal System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.LinkLabel linkLabel1;
}
}

View File

@ -33,7 +33,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
@ -73,6 +72,34 @@ namespace XenAdmin.Controls
}
}
#region Designer browsable properties
[Browsable(true)]
[Category("Appearance")]
public Color LabelSingleDvdForeColor
{
get { return labelSingleDvd.ForeColor; }
set { labelSingleDvd.ForeColor = value; }
}
[Browsable(true)]
[Category("Appearance")]
public Color LabelNewCdForeColor
{
get { return newCDLabel.ForeColor; }
set { newCDLabel.ForeColor = value; }
}
[Browsable(true)]
[Category("Appearance")]
public Color LinkLabelLinkColor
{
get { return linkLabel1.LinkColor; }
set { linkLabel1.LinkColor = value; }
}
#endregion
protected virtual void DeregisterEvents()
{
if (vm == null)
@ -111,7 +138,7 @@ namespace XenAdmin.Controls
}
comboBoxDrive.Items.Clear();
if (VM != null)
if (VM != null && !VM.is_control_domain)
{
List<VBD> vbds = VM.Connection.ResolveAll(VM.VBDs);
if (vbds == null)
@ -236,12 +263,6 @@ namespace XenAdmin.Controls
}
}
public void SetTextColor(Color c)
{
labelSingleDvd.ForeColor = c;
newCDLabel.ForeColor = c;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (cdChanger1.Drive != null)

View File

@ -112,29 +112,32 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelSingleDvd.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelSingleDvd.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelSingleDvd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="labelSingleDvd.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 8</value>
</data>
<data name="labelSingleDvd.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 8, 3, 5</value>
</data>
<data name="labelSingleDvd.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>100, 23</value>
</data>
<data name="labelSingleDvd.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 15</value>
</data>
@ -151,7 +154,7 @@
<value>labelSingleDvd</value>
</data>
<data name="&gt;&gt;labelSingleDvd.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;labelSingleDvd.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -196,7 +199,7 @@
<value>newCDLabel</value>
</data>
<data name="&gt;&gt;newCDLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;newCDLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -210,6 +213,9 @@
<data name="comboBoxDrive.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 4, 3, 3</value>
</data>
<data name="comboBoxDrive.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>120, 0</value>
</data>
<data name="comboBoxDrive.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 21</value>
</data>
@ -223,7 +229,7 @@
<value>comboBoxDrive</value>
</data>
<data name="&gt;&gt;comboBoxDrive.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;comboBoxDrive.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -301,7 +307,7 @@
<value>linkLabel1</value>
</data>
<data name="&gt;&gt;linkLabel1.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkLabel1.Parent" xml:space="preserve">
<value>panel1</value>
@ -331,7 +337,7 @@
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -358,7 +364,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
@ -369,7 +375,7 @@
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="labelSingleDvd" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxDrive" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="newCDLabel" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
@ -382,6 +388,6 @@
<value>MultipleDvdIsoList</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -131,8 +131,12 @@ namespace XenAdmin.Controls
return Messages.CURRENT_LOCATION;
if (LocalToLocalMove())
return Messages.LOCAL_TO_LOCAL_MOVE;
if (!SrIsLocalToTheHostOnForExsistingVDIs())
if (TheSR.IsLocalSR && !SrIsLocalToTheHostOnForExsistingVDIs())
return Messages.SRPICKER_ERROR_LOCAL_SR_MUST_BE_RESIDENT_HOSTS;
if (!TheSR.CanBeSeenFrom(Affinity))
return TheSR.Connection != null
? string.Format(Messages.SR_CANNOT_BE_SEEN, Affinity == null ? Helpers.GetName(TheSR.Connection) : Helpers.GetName(Affinity))
: Messages.SR_DETACHED;
return base.CannotBeShownReason;
}
}
@ -195,7 +199,17 @@ namespace XenAdmin.Controls
protected override bool CanBeEnabled
{
get { return TheSR.SupportsVdiCreate() && TargetSRHasEnoughFreeSpace; }
get { return TheSR.SupportsVdiCreate() && !TheSR.IsDetached && TargetSRHasEnoughFreeSpace; }
}
protected override string CannotBeShownReason
{
get
{
if (TheSR.IsDetached)
return Messages.SR_DETACHED;
return base.CannotBeShownReason;
}
}
}
@ -221,7 +235,9 @@ namespace XenAdmin.Controls
if (Affinity == null && !TheSR.shared)
return Messages.SR_IS_LOCAL;
if (!TheSR.CanBeSeenFrom(Affinity))
return string.Format(Messages.SR_CANNOT_BE_SEEN, Affinity == null ? Helpers.GetName(TheSR.Connection) : Helpers.GetName(Affinity));
return TheSR.Connection != null
? string.Format(Messages.SR_CANNOT_BE_SEEN, Affinity == null ? Helpers.GetName(TheSR.Connection) : Helpers.GetName(Affinity))
: Messages.SR_DETACHED;
return base.CannotBeShownReason;
}
}

View File

@ -217,7 +217,7 @@
<value>2</value>
</data>
<data name="buttonColumns.Text" xml:space="preserve">
<value>Sh&amp;ow Columns</value>
<value>Show &amp;Columns</value>
</data>
<data name="&gt;&gt;buttonColumns.Name" xml:space="preserve">
<value>buttonColumns</value>

View File

@ -533,7 +533,7 @@ namespace XenAdmin.Core
{
TimeSpan timeDiff = h.LicenseExpiryUTC.Subtract(referenceDate);
if (timeDiff.TotalDays < 3653)
if (!LicenseStatus.IsInfinite(timeDiff))
{
var expiryString = "";
Program.Invoke(Program.MainWindow, delegate

View File

@ -98,6 +98,9 @@ namespace XenAdmin.Dialogs
return;
}
if (_connection != null)
XenConnectionUI.connectionDialogs.Remove(_connection);
base.OnFormClosing(e);
}

View File

@ -36,7 +36,6 @@ using System.Drawing;
using System.IO;
using System.Net;
using System.Windows.Forms;
using XenAdmin.Controls.Common;
using XenAdmin.Core;
using XenOvf;
@ -49,15 +48,14 @@ namespace XenAdmin.Dialogs
private readonly Uri m_uri;
private readonly Queue<ApplianceFile> m_filesToDownload = new Queue<ApplianceFile>();
public DownloadApplianceDialog(string uri)
public DownloadApplianceDialog(Uri uri)
{
InitializeComponent();
m_pictureBoxError.Image = SystemIcons.Error.ToBitmap();
m_tlpProgress.Visible = false;
HideDownloadError();
m_ctrlError.Visible = false;
m_uri = new Uri(uri);
m_uri = uri;
m_webClient = new WebClient();
m_webClient.DownloadFileCompleted += webclient_DownloadFileCompleted;
@ -189,7 +187,7 @@ namespace XenAdmin.Dialogs
private void m_buttonBrowse_Click(object sender, EventArgs e)
{
using (var dlog = new FolderBrowserDialog())
using (var dlog = new FolderBrowserDialog {Description = Messages.FOLDER_BROWSER_DOWNLOAD_APPLIANCE})
{
if (dlog.ShowDialog() == DialogResult.OK)
m_textBoxWorkspace.Text = dlog.SelectedPath;

View File

@ -145,7 +145,7 @@
<value>0</value>
</data>
<data name="autoHeightLabel1.Text" xml:space="preserve">
<value> Specify a local workspace to put the downloaded files. If any of them exist they will be overwritten, therefore an empty folder is recommended.</value>
<value>Specify a local workspace to put the downloaded files. If any of them exist, they will be overwritten, therefore an empty folder is recommended.</value>
</data>
<data name="&gt;&gt;autoHeightLabel1.Name" xml:space="preserve">
<value>autoHeightLabel1</value>

View File

@ -876,7 +876,7 @@ namespace XenAdmin.Dialogs
{
bool selected = false;
if (previousSelection != null && !selected)
if (previousSelection != null)
{
foreach (ToStringWrapper<Host> host in NewMasterComboBox.Items)
{
@ -892,7 +892,6 @@ namespace XenAdmin.Dialogs
if (NewMasterComboBox.Items.Count > 0 && !selected)
{
NewMasterComboBox.SelectedIndex = 0;
selected = true;
}
}

View File

@ -245,6 +245,7 @@ namespace XenAdmin.Dialogs.HealthCheck
this.existingAuthenticationRadioButton.Name = "existingAuthenticationRadioButton";
this.existingAuthenticationRadioButton.TabStop = true;
this.existingAuthenticationRadioButton.UseVisualStyleBackColor = true;
this.existingAuthenticationRadioButton.CheckedChanged += new System.EventHandler(this.existingAuthenticationRadioButton_CheckedChanged);
//
// newAuthenticationRadioButton
//

View File

@ -409,5 +409,10 @@ namespace XenAdmin.Dialogs.HealthCheck
{
Program.OpenURL(e.LinkText);
}
private void existingAuthenticationRadioButton_CheckedChanged(object sender, EventArgs e)
{
UpdateButtons();
}
}
}

View File

@ -78,6 +78,16 @@ namespace XenAdmin.Dialogs
private readonly AsyncServerTime serverTime = new AsyncServerTime();
public delegate void StatusUpdatedEvent(object sender, EventArgs e);
public static bool IsInfinite(TimeSpan span)
{
return span.TotalDays >= 3653;
}
public static bool IsGraceLicence(TimeSpan span)
{
return span.TotalDays < 30;
}
private IXenObject XenObject { get; set; }
public bool Updated { get; set; }
@ -258,11 +268,11 @@ namespace XenAdmin.Dialogs
if (LicenseEdition == Host.Edition.Free)
return HostState.Free;
if (LicenseExpiresIn.TotalDays >= 30)
if (!IsGraceLicence(LicenseExpiresIn))
return HostState.Licensed;
}
if (LicenseExpiresIn.TotalDays > 3653)
if (IsInfinite(LicenseExpiresIn))
{
return HostState.Licensed;
}
@ -272,7 +282,7 @@ namespace XenAdmin.Dialogs
return HostState.Expired;
}
if (LicenseExpiresIn.TotalDays < 30)
if (IsGraceLicence(LicenseExpiresIn))
{
if (InRegularGrace)
return HostState.RegularGrace;

View File

@ -127,14 +127,14 @@ namespace XenAdmin.Dialogs
if(Row.LicenseExpires.HasValue)
{
if(Row.LicenseExpiresIn.TotalDays < 3653)
if(LicenseStatus.IsInfinite(Row.LicenseExpiresIn))
{
string date = HelpersGUI.DateTimeToString(Row.LicenseExpires.Value, Messages.DATEFORMAT_DMY_LONG, true);
sb.AppendLine(date);
sb.AppendLine(Messages.NEVER);
}
else
{
sb.AppendLine(Messages.NEVER);
string date = HelpersGUI.DateTimeToString(Row.LicenseExpires.Value, Messages.DATEFORMAT_DMY_LONG, true);
sb.AppendLine(date);
}
}
else

View File

@ -445,7 +445,7 @@ namespace XenAdmin.Dialogs.VMAppliances
if (currentSelected == null)
return;
var selection = new SelectedItemCollection(new[] {new SelectedItem(currentSelected)});
var selection = new SelectedItemCollection(new SelectedItem(currentSelected));
(new ExportApplianceWizard(Pool.Connection, selection)).Show(this);
}

View File

@ -1107,4 +1107,7 @@
<data name="TabPageADUpsell" xml:space="preserve">
<value>1301</value>
</data>
<data name="Dom0MemoryDemandUsageMessageAlert" xml:space="preserve">
<value>7016</value>
</data>
</root>

View File

@ -1107,4 +1107,7 @@
<data name="TabPageADUpsell" xml:space="preserve">
<value>1301</value>
</data>
<data name="Dom0MemoryDemandUsageMessageAlert" xml:space="preserve">
<value>7016</value>
</data>
</root>

View File

@ -1107,4 +1107,7 @@
<data name="TabPageADUpsell" xml:space="preserve">
<value>1301</value>
</data>
<data name="Dom0MemoryDemandUsageMessageAlert" xml:space="preserve">
<value>7016</value>
</data>
</root>

View File

@ -70,6 +70,7 @@ namespace XenAdmin
this.TabPageBallooning = new System.Windows.Forms.TabPage();
this.TabPageBallooningUpsell = new System.Windows.Forms.TabPage();
this.TabPageConsole = new System.Windows.Forms.TabPage();
this.TabPageCvmConsole = new System.Windows.Forms.TabPage();
this.TabPageStorage = new System.Windows.Forms.TabPage();
this.TabPagePhysicalStorage = new System.Windows.Forms.TabPage();
this.TabPageSR = new System.Windows.Forms.TabPage();
@ -83,6 +84,7 @@ namespace XenAdmin
this.TabPageWLB = new System.Windows.Forms.TabPage();
this.TabPageWLBUpsell = new System.Windows.Forms.TabPage();
this.TabPageAD = new System.Windows.Forms.TabPage();
this.TabPageADUpsell = new System.Windows.Forms.TabPage();
this.TabPageGPU = new System.Windows.Forms.TabPage();
this.TabPageSearch = new System.Windows.Forms.TabPage();
this.TabPageDockerProcess = new System.Windows.Forms.TabPage();
@ -280,7 +282,6 @@ namespace XenAdmin
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.statusProgressBar = new System.Windows.Forms.ToolStripProgressBar();
this.TabPageADUpsell = new System.Windows.Forms.TabPage();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -342,6 +343,7 @@ namespace XenAdmin
this.TheTabControl.Controls.Add(this.TabPageBallooning);
this.TheTabControl.Controls.Add(this.TabPageBallooningUpsell);
this.TheTabControl.Controls.Add(this.TabPageConsole);
this.TheTabControl.Controls.Add(this.TabPageCvmConsole);
this.TheTabControl.Controls.Add(this.TabPageStorage);
this.TheTabControl.Controls.Add(this.TabPagePhysicalStorage);
this.TheTabControl.Controls.Add(this.TabPageSR);
@ -392,6 +394,12 @@ namespace XenAdmin
this.TabPageConsole.Name = "TabPageConsole";
this.TabPageConsole.UseVisualStyleBackColor = true;
//
// TabPageCvmConsole
//
resources.ApplyResources(this.TabPageCvmConsole, "TabPageCvmConsole");
this.TabPageCvmConsole.Name = "TabPageCvmConsole";
this.TabPageCvmConsole.UseVisualStyleBackColor = true;
//
// TabPageStorage
//
resources.ApplyResources(this.TabPageStorage, "TabPageStorage");
@ -471,6 +479,12 @@ namespace XenAdmin
this.TabPageAD.Name = "TabPageAD";
this.TabPageAD.UseVisualStyleBackColor = true;
//
// TabPageADUpsell
//
resources.ApplyResources(this.TabPageADUpsell, "TabPageADUpsell");
this.TabPageADUpsell.Name = "TabPageADUpsell";
this.TabPageADUpsell.UseVisualStyleBackColor = true;
//
// TabPageGPU
//
resources.ApplyResources(this.TabPageGPU, "TabPageGPU");
@ -1839,12 +1853,6 @@ namespace XenAdmin
this.statusProgressBar.Name = "statusProgressBar";
this.statusProgressBar.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
//
// TabPageADUpsell
//
resources.ApplyResources(this.TabPageADUpsell, "TabPageADUpsell");
this.TabPageADUpsell.Name = "TabPageADUpsell";
this.TabPageADUpsell.UseVisualStyleBackColor = true;
//
// MainWindow
//
resources.ApplyResources(this, "$this");
@ -2107,6 +2115,7 @@ namespace XenAdmin
private CommandToolStripButton restartContainerToolStripButton;
private CommandToolStripMenuItem healthCheckToolStripMenuItem1;
private TabPage TabPageADUpsell;
private TabPage TabPageCvmConsole;
}
}

View File

@ -85,6 +85,7 @@ namespace XenAdmin
internal readonly BallooningPage BallooningPage = new BallooningPage();
internal readonly BallooningUpsellPage BallooningUpsellPage = new BallooningUpsellPage();
internal readonly ConsolePanel ConsolePanel = new ConsolePanel();
internal readonly CvmConsolePanel CvmConsolePanel = new CvmConsolePanel();
internal readonly HAPage HAPage = new HAPage();
internal readonly HAUpsellPage HAUpsellPage = new HAUpsellPage();
internal readonly HomePage HomePage = new HomePage();
@ -153,6 +154,7 @@ namespace XenAdmin
components.Add(GeneralPage);
components.Add(BallooningPage);
components.Add(ConsolePanel);
components.Add(CvmConsolePanel);
components.Add(NetworkPage);
components.Add(HAPage);
components.Add(HomePage);
@ -171,6 +173,7 @@ namespace XenAdmin
AddTabContents(BallooningPage, TabPageBallooning);
AddTabContents(BallooningUpsellPage, TabPageBallooningUpsell);
AddTabContents(ConsolePanel, TabPageConsole);
AddTabContents(CvmConsolePanel, TabPageCvmConsole);
AddTabContents(NetworkPage, TabPageNetwork);
AddTabContents(HAPage, TabPageHA);
AddTabContents(HAUpsellPage, TabPageHAUpsell);
@ -768,13 +771,16 @@ namespace XenAdmin
foreach (VM vm in connection.Cache.VMs)
{
this.ConsolePanel.closeVNCForSource(vm);
ConsolePanel.closeVNCForSource(vm);
}
foreach (Host host in connection.Cache.Hosts)
foreach (VM vm in host.Connection.ResolveAll(host.resident_VMs))
if (vm.is_control_domain)
this.ConsolePanel.closeVNCForSource(vm);
{
ConsolePanel.closeVNCForSource(host.ControlDomainZero);
foreach (VM vm in host.OtherControlDomains)
CvmConsolePanel.closeVNCForSource(vm);
}
connection.EndConnect();
@ -1377,6 +1383,7 @@ namespace XenAdmin
bool isTemplateSelected = SelectionManager.Selection.FirstIsTemplate;
bool isHostLive = SelectionManager.Selection.FirstIsLiveHost;
bool isDockerContainerSelected = SelectionManager.Selection.First is DockerContainer;
bool hasManyControlDomains = isHostSelected && ((Host)SelectionManager.Selection.First).HasManyControlDomains;
bool selectedTemplateHasProvisionXML = SelectionManager.Selection.FirstIsTemplate && ((VM)SelectionManager.Selection[0].XenObject).HasProvisionXML;
@ -1406,6 +1413,7 @@ namespace XenAdmin
}
ShowTab(TabPageConsole, !shownConsoleReplacement && !multi && !SearchMode && (isRealVMSelected || (isHostSelected && isHostLive)));
ShowTab(TabPageCvmConsole, !shownConsoleReplacement && !multi && !SearchMode && isHostLive && hasManyControlDomains);
ShowTab(TabPagePeformance, !multi && !SearchMode && (isRealVMSelected || (isHostSelected && isHostLive)));
ShowTab(ha_upsell ? TabPageHAUpsell : TabPageHA, !multi && !SearchMode && isPoolSelected);
ShowTab(TabPageSnapshots, !multi && !SearchMode && isRealVMSelected);
@ -1772,13 +1780,23 @@ namespace XenAdmin
UnpauseVNC(e != null && sender == TheTabControl);
}
}
else if (t == TabPageCvmConsole)
{
if (SelectionManager.Selection.FirstIsHost)
{
CvmConsolePanel.setCurrentSource((Host)SelectionManager.Selection.First);
UnpauseVNC(e != null && sender == TheTabControl);
}
}
else
{
ConsolePanel.PauseAllViews();
CvmConsolePanel.PauseAllViews();
// Start timer for closing the VNC connection after an interval (20 seconds)
// when the console tab is not selected
ConsolePanel.StartCloseVNCTimer(ConsolePanel.activeVNCView);
CvmConsolePanel.StartCloseVNCTimer(CvmConsolePanel.activeVNCView);
if (t == TabPageGeneral)
{
@ -1971,10 +1989,14 @@ namespace XenAdmin
private void UnpauseVNC(bool focus)
{
ConsolePanel.UnpauseActiveView();
CvmConsolePanel.UnpauseActiveView();
if (focus)
{
ConsolePanel.FocusActiveView();
CvmConsolePanel.FocusActiveView();
ConsolePanel.SwitchIfRequired();
CvmConsolePanel.SwitchIfRequired();
}
}
@ -1983,7 +2005,7 @@ namespace XenAdmin
/// </summary>
public enum Tab
{
Overview, Home, Settings, Storage, Network, Console, Performance, NICs, SR, DockerProcess, DockerDetails
Overview, Home, Settings, Storage, Network, Console, CvmConsole, Performance, NICs, SR, DockerProcess, DockerDetails
}
public void SwitchToTab(Tab tab)
@ -2008,6 +2030,9 @@ namespace XenAdmin
case Tab.Console:
TheTabControl.SelectedTab = TabPageConsole;
break;
case Tab.CvmConsole:
TheTabControl.SelectedTab = TabPageCvmConsole;
break;
case Tab.Performance:
TheTabControl.SelectedTab = TabPagePeformance;
break;
@ -2375,6 +2400,8 @@ namespace XenAdmin
return "TabPageSearch" + modelObj;
if (TheTabControl.SelectedTab == TabPageConsole)
return "TabPageConsole" + modelObj;
if (TheTabControl.SelectedTab == TabPageCvmConsole)
return "TabPageCvmConsole" + modelObj;
if (TheTabControl.SelectedTab == TabPageGeneral)
return "TabPageSettings" + modelObj;
if (TheTabControl.SelectedTab == TabPagePhysicalStorage || TheTabControl.SelectedTab == TabPageStorage || TheTabControl.SelectedTab == TabPageSR)

View File

@ -318,6 +318,30 @@
<data name="&gt;&gt;TabPageConsole.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="TabPageCvmConsole.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="TabPageCvmConsole.Size" type="System.Drawing.Size, System.Drawing">
<value>753, 592</value>
</data>
<data name="TabPageCvmConsole.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="TabPageCvmConsole.Text" xml:space="preserve">
<value>Nutanix CVM Console</value>
</data>
<data name="&gt;&gt;TabPageCvmConsole.Name" xml:space="preserve">
<value>TabPageCvmConsole</value>
</data>
<data name="&gt;&gt;TabPageCvmConsole.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabPageCvmConsole.Parent" xml:space="preserve">
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageCvmConsole.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="TabPageStorage.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -349,7 +373,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageStorage.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="TabPagePhysicalStorage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -376,7 +400,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPagePhysicalStorage.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="TabPageSR.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
@ -406,7 +430,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageSR.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="TabPageNetwork.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -436,7 +460,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageNetwork.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="TabPageNICs.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -469,7 +493,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageNICs.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="TabPagePeformance.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -499,7 +523,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPagePeformance.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="TabPageHA.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -526,7 +550,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageHA.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="TabPageHAUpsell.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -553,7 +577,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageHAUpsell.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="snapshotPage.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
@ -610,7 +634,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageSnapshots.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="TabPageWLB.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -634,7 +658,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageWLB.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="TabPageWLBUpsell.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -658,7 +682,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageWLBUpsell.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="TabPageAD.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -682,7 +706,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageAD.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="TabPageADUpsell.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -709,7 +733,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageADUpsell.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="TabPageGPU.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -733,7 +757,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageGPU.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="TabPageSearch.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -763,7 +787,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageSearch.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="TabPageDockerProcess.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -793,7 +817,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageDockerProcess.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="TabPageDockerDetails.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -823,7 +847,7 @@
<value>TheTabControl</value>
</data>
<data name="&gt;&gt;TabPageDockerDetails.ZOrder" xml:space="preserve">
<value>21</value>
<value>22</value>
</data>
<data name="TheTabControl.Font" type="System.Drawing.Font, System.Drawing">
<value>Verdana, 8.25pt</value>
@ -1985,23 +2009,22 @@
</data>
<data name="powerOnToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK8gAA
CvIBPVL3EQAAAzRJREFUOE9tk21Mk1cYht9/BeGPYguzfsTFTzrnKAjO+bmZzLC5kCnQAHZKRVZGhcpa
EKGroWNStg4N1q0aSIYISjMx1BXCyhSDCmPpn20uuswumfHHEteK8SuGy/O+iwld9uM+yck59/PkPPd1
JCBOw8PD6sHBQUcgELja39//zO/3P+vp6bna1dXl6OjoUP/3ftxGmG3fDV3EN+Ll01EHNVfMfHTZxIFg
BY3+Ory+47S3t9tmemaavX2hs7jGDmEbs1D6fSFVo/swXzKSG9jMjuDb7Ox/h8YT9bjdbm9cAWF2nxk5
Tf21aiou72HnYC7bL77Fg6dTTAlln1uB7sxC1vals86/GkubGafT6VYKCLM2MDRA/ZiVvSPFlP1Qwm/3
fiFfFJl6el/RpvN6wn9PsubsSlZ2LuCNzgzsjTbsdrtWEgNzHQt5sIyaRNc3uXHvZ6XrlvNZ3PjjV0Xp
3VpiT2L8ePc6aW1J5JxcRX5zHlar1SWJaYdrQ1W8L97YMFZDLBbj49EKlp1OFaYo0cdRNCcSMQ0UKWcf
9BWyuEXDZvfrVFZWhiUR1ZPSkIGN32bgnTjK75FbLO3SML8zWTHLUrcloGlN4tbtmxwJNpHqSCbnyGuU
l5dHJZFztCSYR9a55bRPePjzToR5HclovkpEfSwB9RcJzP1MFGiaReSvCK3BZtS2JLKbXsVkMk1JApJw
yYUd6HuXiMh2Mz09TdnQLqXr3NYEUpqFnCpMvcXKWek3xSy0q1lfn43RaAxLgjDX/p4PlXhe+jqZn+5O
EH0UxTxQSkqTijkOFWW9RqIP/2EyMk6KJZFMh45tlVspKipySQJP7VFfGxu6M1nu06L3rWDyzoTSbaYm
b4+zumEZL1fPI6tuFYUlBRQUFGgVkASe7gPHq5R40r9chMY5i93dBjwhN57hFoynDMwxJ7LUOh99bTrb
Tbmy+V+Q5EWWjGd1i4VNnhyyPn+FxQ1pzK5SMbtCxaLqVPQHdaytyeC9Pe/K5niUX0jgaatrqCXfkccW
xzoyP9GReUjH+ppstpm3Yig2yOb//0wvJPBME4QdFpCMi5zlqORpj4uBHRbmtPj7SM8BGG2BcDWQi8oA
AAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAryAAAK8gE9UvcRAAADNElE
QVQ4T22TbUyTVxiG338F4Y9iC7N+xMVPOucoCM75uZnMsLmQKdAAdkpFVkaFyloQoauhY1K2Dg3WrRpI
hghKMzHUFcLKFIMKY+mfbS66zC6Z8ccS14rxK4bL876LCV324z7JyTn38+Q893UkIE7Dw8PqwcFBRyAQ
uNrf3//M7/c/6+npudrV1eXo6OhQ//d+3EaYbd8NXcQ34uXTUQc1V8x8dNnEgWAFjf46vL7jtLe322Z6
Zpq9faGzuMYOYRuzUPp9IVWj+zBfMpIb2MyO4Nvs7H+HxhP1uN1ub1wBYXafGTlN/bVqKi7vYedgLtsv
vsWDp1NMCWWfW4HuzELW9qWzzr8aS5sZp9PpVgoIszYwNED9mJW9I8WU/VDCb/d+IV8UmXp6X9Gm83rC
f0+y5uxKVnYu4I3ODOyNNux2u1YSA3MdC3mwjJpE1ze5ce9npeuW81nc+ONXRendWmJPYvx49zppbUnk
nFxFfnMeVqvVJYlph2tDVbwv3tgwVkMsFuPj0QqWnU4VpijRx1E0JxIxDRQpZx/0FbK4RcNm9+tUVlaG
JRHVk9KQgY3fZuCdOMrvkVss7dIwvzNZMctStyWgaU3i1u2bHAk2kepIJufIa5SXl0clkXO0JJhH1rnl
tE94+PNOhHkdyWi+SkR9LAH1FwnM/UwUaJpF5K8IrcFm1LYksptexWQyTUkCknDJhR3oe5eIyHYzPT1N
2dAupevc1gRSmoWcKky9xcpZ6TfFLLSrWV+fjdFoDEuCMNf+ng+VeF76Opmf7k4QfRTFPFBKSpOKOQ4V
Zb1Gog//YTIyToolkUyHjm2VWykqKnJJAk/tUV8bG7ozWe7TovetYPLOhNJtpiZvj7O6YRkvV88jq24V
hSUFFBQUaBWQBJ7uA8erlHjSv1yExjmL3d0GPCE3nuEWjKcMzDEnstQ6H31tOttNubL5X5DkRZaMZ3WL
hU2eHLI+f4XFDWnMrlIxu0LFoupU9Ad1rK3J4L0978rmeJRfSOBpq2uoJd+RxxbHOjI/0ZF5SMf6mmy2
mbdiKDbI5v//TC8k8EwThB0WkIyLnOWo5GmPi4EdFua0+PtIzwEYbYFwNZCLygAAAABJRU5ErkJggg==
</value>
</data>
<data name="powerOnToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
@ -2015,22 +2038,21 @@
</data>
<data name="ShutdownHostToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK8gAA
CvIBPVL3EQAAAvVJREFUOE9tU1tIk2EY/kW9VcRTsgvTi6TEC01E0As1ETQUCZ06dCBTJjoJL6YiJAvF
cEwUnWJkUlqZMkg8lGkWUcxTOtM5T/N0Y1fhpiEdlk/P/4fgoovnP7zv83zv973v8wkA3DA1NRU4MTFR
PzY2Zh4eHnaZTCbXwMCAub+/v763tzfwX77bD8XayfFxLHR0wFZXhz2VCjtFRbCUluKNVouezk4YjUbt
Rc1FcdeH589hr6nBflkZ7NnZ2Csuxk5BAWzx8dhMSsJSWhoe1dZCr9d3uS1Asd7c14eDigrsFhZi48YN
rCcm4vfJCVzHx1i5fBnLQUFYCQ/HakQEetRq6HQ6vbQAxbKp0VHsVlbCnpMDu1yOU6sVm6mpktjldMIa
GYlv8/NYDgvDTGAg3l+7Bh2PVF1dLRPYsMYFgwF7POt6QgJOV1cloTUqCgc2Gw7W1rDs7w+XwwGn2YxJ
T09MX7mC7sxMVFVVNQrstmWtvBwbycnYvX0bTla0s2lLvr74dXQk4SNPasnNlXLmW7dgYq4/NhYajcYi
cFQ/thi0clvbLS042N7Gko8PPrGSKP5JvOYCo/zf39rCrE6Hx97eeEK+Wq12CJyzYz0jAyuhodjR6/Fl
fx8LJItVp4mXxAtiiLFD5mYaGtDt5YWHV69CpVKdCDSJZTErC59lMuwoFDg7O4MtLw+TFI0RJuIZ8Y4x
MfeK704eoTU6Gkql0iLQYY2TJSXSeMys4pidlba9yKYOUdgnirnwd8a+MGcgp5tNrGPPFApFo0B7ynrb
2jDLUb0LCMBbjuoriWK1izhkrJu5FnJauX0lxy2Xy2WSkWhP/SONRhrPSEgInrLKW3piqakJC8QIv+8x
ZggORhs55enpovivkcSHCNGe7XTiYEwMBkl64OeHVg8PNBMGfrcz1kxvlN28KYrdrXwO2lN7h3fBwKYa
4+JwnyIj0XT9OrQpKSjMzxfF/79M56A9L9Fhd2mSOc5ZHJXY7Tk27C7Fl9z5EP4AZymF8JGogOsAAAAA
SUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAryAAAK8gE9UvcRAAAC9UlE
QVQ4T21TW0iTYRj+Rb1VxFOyC9OLpMQLTUTQCzURNBQJnTp0IFMmOgkvpiIkC8VwTBSdYmRSWpkySDyU
aRZRzFM60zlP83RjV+GmIR2WT8//h+Cii+c/vO/zfO/3ve/zCQDcMDU1FTgxMVE/NjZmHh4edplMJtfA
wIC5v7+/vre3N/BfvtsPxdrJ8XEsdHTAVleHPZUKO0VFsJSW4o1Wi57OThiNRu1FzUVx14fnz2GvqcF+
WRns2dnYKy7GTkEBbPHx2ExKwlJaGh7V1kKv13e5LUCx3tzXh4OKCuwWFmLjxg2sJybi98kJXMfHWLl8
GctBQVgJD8dqRAR61GrodDq9tADFsqnRUexWVsKekwO7XI5TqxWbqamS2OV0whoZiW/z81gOC8NMYCDe
X7sGHY9UXV0tE9iwxgWDAXs863pCAk5XVyWhNSoKBzYbDtbWsOzvD5fDAafZjElPT0xfuYLuzExUVVU1
Cuy2Za28HBvJydi9fRtOVrSzaUu+vvh1dCThI09qyc2VcuZbt2Birj82FhqNxiJwVD+2GLRyW9stLTjY
3saSjw8+sZIo/km85gKj/N/f2sKsTofH3t54Qr5arXYInLNjPSMDK6Gh2NHr8WV/Hwski1WniZfEC2KI
sUPmZhoa0O3lhYdXr0KlUp0INIllMSsLn2Uy7CgUODs7gy0vD5MUjREm4hnxjjEx94rvTh6hNToaSqXS
ItBhjZMlJdJ4zKzimJ2Vtr3Ipg5R2CeKufB3xr4wZyCnm02sY88UCkWjQHvKetvaMMtRvQsIwFuO6iuJ
YrWLOGSsm7kWclq5fSXHLZfLZZKRaE/9I41GGs9ISAiesspbemKpqQkLxAi/7zFmCA5GGznl6emi+K+R
xIcI0Z7tdOJgTAwGSXrg54dWDw80EwZ+tzPWTG+U3bwpit2tfA7aU3uHd8HAphrj4nCfIiPRdP06tCkp
KMzPF8X/v0znoD0v0WF3aZI5zlkcldjtOTbsLsWX3PkQ/gBnKYXwkaiA6wAAAABJRU5ErkJggg==
</value>
</data>
<data name="ShutdownHostToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">

View File

@ -34,6 +34,7 @@ using System.Drawing;
using System.IO;
using System.Net;
using System.Windows.Forms;
using System.Collections.Generic;
using XenAdmin.Core;
using XenAdmin.Dialogs;
using XenAPI;
@ -43,6 +44,8 @@ namespace XenAdmin.Network
{
class XenConnectionUI
{
public static Dictionary<IXenConnection, ConnectingToServerDialog> connectionDialogs = new Dictionary<IXenConnection, ConnectingToServerDialog>();
/// <summary>
/// Start connecting to a server
/// </summary>
@ -57,7 +60,21 @@ namespace XenAdmin.Network
Program.AssertOnEventThread();
RegisterEventHandlers(connection);
if (interactive)
new ConnectingToServerDialog(connection).BeginConnect(owner, initiateMasterSearch);
{
// CA-214953 - Focus on this connection's dialog, if one exists, otherwise create one
ConnectingToServerDialog dlg;
if (connectionDialogs.TryGetValue(connection, out dlg))
{
UnregisterEventHandlers(connection);
if (dlg.WindowState == FormWindowState.Minimized)
dlg.WindowState = FormWindowState.Normal;
dlg.Focus();
return;
}
dlg = new ConnectingToServerDialog(connection);
connectionDialogs.Add(connection, dlg);
dlg.BeginConnect(owner, initiateMasterSearch);
}
else
((XenConnection)connection).BeginConnect(initiateMasterSearch, PromptForNewPassword);
}

View File

@ -191,7 +191,7 @@
<value>..\Images\000_GetServerReport_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PDChevronDownOver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\PDChevronDownOver.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -251,7 +251,7 @@
<value>..\Images\000_PoolNew_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_000_Patch_h32bit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\000_patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\000_Patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sl_lun_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\sl_lun_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -920,7 +920,7 @@
<value>..\Images\memory_dynmin_slider.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="export_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SpinningFrame3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\SpinningFrame3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@ -191,7 +191,7 @@
<value>..\Images\000_GetServerReport_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PDChevronDownOver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\PDChevronDownOver.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -251,7 +251,7 @@
<value>..\Images\000_PoolNew_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_000_Patch_h32bit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\000_patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\000_Patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sl_lun_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\sl_lun_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -920,7 +920,7 @@
<value>..\Images\memory_dynmin_slider.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="export_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SpinningFrame3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\SpinningFrame3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@ -191,7 +191,7 @@
<value>..\Images\000_GetServerReport_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="import_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\import_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PDChevronDownOver" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\PDChevronDownOver.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -251,7 +251,7 @@
<value>..\Images\000_PoolNew_h32bit_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_000_Patch_h32bit_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\000_patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\000_Patch_h32bit_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sl_lun_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\sl_lun_16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -920,7 +920,7 @@
<value>..\Images\memory_dynmin_slider.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="export_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<value>..\Images\export_32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SpinningFrame3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Images\SpinningFrame3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@ -84,10 +84,7 @@ namespace XenAdmin.SettingsPanels
return;
Host currentAffinity = vm.Connection.Resolve(vm.affinity);
picker.SetAffinity(vm.Connection, currentAffinity,
vm.HasNoDisksAndNoLocalCD
? null
: vm.GetStorageHost(false));
picker.SetAffinity(vm.Connection, currentAffinity, null);
}
public bool ValidToSave

View File

@ -32,8 +32,8 @@ namespace XenAdmin.SettingsPanels
this.AlertIntervalLabel = new System.Windows.Forms.Label();
this.AlertIntervalMinutesLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.nudAlertInterval = new XenAdmin.SettingsPanels.AlertNumericUpDown();
this.labelRubric = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.PhysicalUtilisationGroupBox = new XenAdmin.Controls.DecentGroupBox();
this.physicalUtilisationMinutesLabel = new System.Windows.Forms.Label();
this.nudPhysicalUtilisationDurationThreshold = new XenAdmin.SettingsPanels.AlertNumericUpDown();
@ -90,8 +90,9 @@ namespace XenAdmin.SettingsPanels
this.CPUAlertCheckBox = new XenAdmin.SettingsPanels.AlertCheckBox();
this.CPUUsagePercentLabel = new System.Windows.Forms.Label();
this.CPUDurationThresholdLabel = new System.Windows.Forms.Label();
this.nudAlertInterval = new XenAdmin.SettingsPanels.AlertNumericUpDown();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudAlertInterval)).BeginInit();
this.panel1.SuspendLayout();
this.PhysicalUtilisationGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPhysicalUtilisationDurationThreshold)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudPhysicalUtilisation)).BeginInit();
@ -113,6 +114,7 @@ namespace XenAdmin.SettingsPanels
this.CpuGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudCPUUsagePercent)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudCPUDurationThreshold)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudAlertInterval)).BeginInit();
this.SuspendLayout();
//
// AlertIntervalLabel
@ -128,47 +130,33 @@ namespace XenAdmin.SettingsPanels
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.PhysicalUtilisationGroupBox, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.Dom0MemoryUsageGroupBox, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.MemoryGroupBox, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.SrGroupBox, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.DiskGroupBox, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.NetGroupBox, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.CpuGroupBox, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.labelRubric, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.PhysicalUtilisationGroupBox, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.Dom0MemoryUsageGroupBox, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.MemoryGroupBox, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.SrGroupBox, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.DiskGroupBox, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.NetGroupBox, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.CpuGroupBox, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// label1
// labelRubric
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
resources.ApplyResources(this.labelRubric, "labelRubric");
this.labelRubric.Name = "labelRubric";
//
// nudAlertInterval
// panel1
//
this.nudAlertInterval.Increment = new decimal(new int[] {
5,
0,
0,
0});
resources.ApplyResources(this.nudAlertInterval, "nudAlertInterval");
this.nudAlertInterval.Maximum = new decimal(new int[] {
86400,
0,
0,
0});
this.nudAlertInterval.Minimum = new decimal(new int[] {
5,
0,
0,
0});
this.nudAlertInterval.Name = "nudAlertInterval";
this.nudAlertInterval.Value = new decimal(new int[] {
60,
0,
0,
0});
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.AlertIntervalLabel);
this.panel1.Controls.Add(this.AlertIntervalMinutesLabel);
this.panel1.Controls.Add(this.nudAlertInterval);
this.panel1.Name = "panel1";
//
// PhysicalUtilisationGroupBox
//
resources.ApplyResources(this.PhysicalUtilisationGroupBox, "PhysicalUtilisationGroupBox");
this.PhysicalUtilisationGroupBox.Controls.Add(this.physicalUtilisationMinutesLabel);
this.PhysicalUtilisationGroupBox.Controls.Add(this.nudPhysicalUtilisationDurationThreshold);
this.PhysicalUtilisationGroupBox.Controls.Add(this.physicalUtilisationPercentLabel);
@ -176,7 +164,6 @@ namespace XenAdmin.SettingsPanels
this.PhysicalUtilisationGroupBox.Controls.Add(this.physicalUtilisationAlertCheckBox);
this.PhysicalUtilisationGroupBox.Controls.Add(this.physicalUtilisationDurationLabel);
this.PhysicalUtilisationGroupBox.Controls.Add(this.physicalUtilisationLabel);
resources.ApplyResources(this.PhysicalUtilisationGroupBox, "PhysicalUtilisationGroupBox");
this.PhysicalUtilisationGroupBox.Name = "PhysicalUtilisationGroupBox";
this.PhysicalUtilisationGroupBox.TabStop = false;
//
@ -249,6 +236,7 @@ namespace XenAdmin.SettingsPanels
//
// Dom0MemoryUsageGroupBox
//
resources.ApplyResources(this.Dom0MemoryUsageGroupBox, "Dom0MemoryUsageGroupBox");
this.Dom0MemoryUsageGroupBox.Controls.Add(this.nudDom0MemUsage);
this.Dom0MemoryUsageGroupBox.Controls.Add(this.Dom0MemoryDurationThresholdLabel);
this.Dom0MemoryUsageGroupBox.Controls.Add(this.nudDom0MemoryDurationThreshold);
@ -256,7 +244,6 @@ namespace XenAdmin.SettingsPanels
this.Dom0MemoryUsageGroupBox.Controls.Add(this.Dom0MemoryAlertCheckBox);
this.Dom0MemoryUsageGroupBox.Controls.Add(this.dom0MemoryMinutesLabel);
this.Dom0MemoryUsageGroupBox.Controls.Add(this.dom0MemoryPercentLabel);
resources.ApplyResources(this.Dom0MemoryUsageGroupBox, "Dom0MemoryUsageGroupBox");
this.Dom0MemoryUsageGroupBox.Name = "Dom0MemoryUsageGroupBox";
this.Dom0MemoryUsageGroupBox.TabStop = false;
//
@ -329,6 +316,7 @@ namespace XenAdmin.SettingsPanels
//
// MemoryGroupBox
//
resources.ApplyResources(this.MemoryGroupBox, "MemoryGroupBox");
this.MemoryGroupBox.Controls.Add(this.memoryMinutesLabel);
this.MemoryGroupBox.Controls.Add(this.nudMemoryDurationThreshold);
this.MemoryGroupBox.Controls.Add(this.memoryUnitsLabel);
@ -336,7 +324,6 @@ namespace XenAdmin.SettingsPanels
this.MemoryGroupBox.Controls.Add(this.MemoryAlertCheckBox);
this.MemoryGroupBox.Controls.Add(this.memoryDurationThresholdLabel);
this.MemoryGroupBox.Controls.Add(this.memoryUsageLabel);
resources.ApplyResources(this.MemoryGroupBox, "MemoryGroupBox");
this.MemoryGroupBox.Name = "MemoryGroupBox";
this.MemoryGroupBox.TabStop = false;
//
@ -414,6 +401,7 @@ namespace XenAdmin.SettingsPanels
//
// SrGroupBox
//
resources.ApplyResources(this.SrGroupBox, "SrGroupBox");
this.SrGroupBox.Controls.Add(this.srMinutesLabel);
this.SrGroupBox.Controls.Add(this.nudSrMinutes);
this.SrGroupBox.Controls.Add(this.srUnitsLabel);
@ -421,7 +409,6 @@ namespace XenAdmin.SettingsPanels
this.SrGroupBox.Controls.Add(this.SrAlertCheckBox);
this.SrGroupBox.Controls.Add(this.SrDurationThresholdLabel);
this.SrGroupBox.Controls.Add(this.SrUsageLabel);
resources.ApplyResources(this.SrGroupBox, "SrGroupBox");
this.SrGroupBox.Name = "SrGroupBox";
this.SrGroupBox.TabStop = false;
//
@ -499,6 +486,7 @@ namespace XenAdmin.SettingsPanels
//
// DiskGroupBox
//
resources.ApplyResources(this.DiskGroupBox, "DiskGroupBox");
this.DiskGroupBox.Controls.Add(this.DiskMinutesLabel);
this.DiskGroupBox.Controls.Add(this.nudDiskDurationThreshold);
this.DiskGroupBox.Controls.Add(this.DiskPercentLabel);
@ -506,7 +494,6 @@ namespace XenAdmin.SettingsPanels
this.DiskGroupBox.Controls.Add(this.DiskAlertCheckBox);
this.DiskGroupBox.Controls.Add(this.DiskDurationThresholdLabel);
this.DiskGroupBox.Controls.Add(this.DiskUsagePercentLabel);
resources.ApplyResources(this.DiskGroupBox, "DiskGroupBox");
this.DiskGroupBox.Name = "DiskGroupBox";
this.DiskGroupBox.TabStop = false;
//
@ -584,6 +571,7 @@ namespace XenAdmin.SettingsPanels
//
// NetGroupBox
//
resources.ApplyResources(this.NetGroupBox, "NetGroupBox");
this.NetGroupBox.Controls.Add(this.NetPercentLabel);
this.NetGroupBox.Controls.Add(this.nudNetUsagePercent);
this.NetGroupBox.Controls.Add(this.NetMinutesLabel);
@ -591,7 +579,6 @@ namespace XenAdmin.SettingsPanels
this.NetGroupBox.Controls.Add(this.NetAlertCheckBox);
this.NetGroupBox.Controls.Add(this.NetDurationThresholdLabel);
this.NetGroupBox.Controls.Add(this.NetUsagePercentLabel);
resources.ApplyResources(this.NetGroupBox, "NetGroupBox");
this.NetGroupBox.Name = "NetGroupBox";
this.NetGroupBox.TabStop = false;
//
@ -664,6 +651,7 @@ namespace XenAdmin.SettingsPanels
//
// CpuGroupBox
//
resources.ApplyResources(this.CpuGroupBox, "CpuGroupBox");
this.CpuGroupBox.Controls.Add(this.cpuPercentLabel);
this.CpuGroupBox.Controls.Add(this.nudCPUUsagePercent);
this.CpuGroupBox.Controls.Add(this.cpuMinutesLabel);
@ -671,7 +659,6 @@ namespace XenAdmin.SettingsPanels
this.CpuGroupBox.Controls.Add(this.CPUAlertCheckBox);
this.CpuGroupBox.Controls.Add(this.CPUUsagePercentLabel);
this.CpuGroupBox.Controls.Add(this.CPUDurationThresholdLabel);
resources.ApplyResources(this.CpuGroupBox, "CpuGroupBox");
this.CpuGroupBox.Name = "CpuGroupBox";
this.CpuGroupBox.TabStop = false;
//
@ -742,18 +729,41 @@ namespace XenAdmin.SettingsPanels
resources.ApplyResources(this.CPUDurationThresholdLabel, "CPUDurationThresholdLabel");
this.CPUDurationThresholdLabel.Name = "CPUDurationThresholdLabel";
//
// nudAlertInterval
//
this.nudAlertInterval.Increment = new decimal(new int[] {
5,
0,
0,
0});
resources.ApplyResources(this.nudAlertInterval, "nudAlertInterval");
this.nudAlertInterval.Maximum = new decimal(new int[] {
86400,
0,
0,
0});
this.nudAlertInterval.Minimum = new decimal(new int[] {
5,
0,
0,
0});
this.nudAlertInterval.Name = "nudAlertInterval";
this.nudAlertInterval.Value = new decimal(new int[] {
60,
0,
0,
0});
//
// PerfmonAlertEditPage
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.label1);
this.Controls.Add(this.AlertIntervalLabel);
this.Controls.Add(this.nudAlertInterval);
this.Controls.Add(this.AlertIntervalMinutesLabel);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "PerfmonAlertEditPage";
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nudAlertInterval)).EndInit();
this.tableLayoutPanel1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.PhysicalUtilisationGroupBox.ResumeLayout(false);
this.PhysicalUtilisationGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPhysicalUtilisationDurationThreshold)).EndInit();
@ -782,6 +792,7 @@ namespace XenAdmin.SettingsPanels
this.CpuGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudCPUUsagePercent)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudCPUDurationThreshold)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudAlertInterval)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -833,7 +844,7 @@ namespace XenAdmin.SettingsPanels
private AlertCheckBox SrAlertCheckBox;
private System.Windows.Forms.Label SrDurationThresholdLabel;
private System.Windows.Forms.Label SrUsageLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label labelRubric;
private Controls.DecentGroupBox Dom0MemoryUsageGroupBox;
private AlertNumericUpDown nudDom0MemUsage;
private System.Windows.Forms.Label Dom0MemoryDurationThresholdLabel;
@ -850,5 +861,6 @@ namespace XenAdmin.SettingsPanels
private AlertCheckBox physicalUtilisationAlertCheckBox;
private System.Windows.Forms.Label physicalUtilisationDurationLabel;
private System.Windows.Forms.Label physicalUtilisationLabel;
private System.Windows.Forms.Panel panel1;
}
}

View File

@ -200,7 +200,7 @@ namespace XenAdmin.SettingsPanels
{
get
{
var subs = from AlertGroup g in new[] { cpuAlert, netAlert, diskAlert, memoryAlert, srAlert, physicalUtilisationAlert }
var subs = from AlertGroup g in new[] { cpuAlert, netAlert, diskAlert, memoryAlert, srAlert, physicalUtilisationAlert, dom0MemoryAlert }
where !string.IsNullOrEmpty(g.SubText)
select g.SubText;
@ -275,19 +275,20 @@ namespace XenAdmin.SettingsPanels
// Dom0 memory usage is stored in the other_config of the Dom0 vm not on the host (or any other XenObject)
try
{
if (_XenObject is Host)
var host = _XenObject as Host;
if (host != null)
{
var controlDomain = (_XenObject as Host).ControlDomain;
var dom0 = host.ControlDomainZero;
if (controlDomain != null)
if (dom0 != null)
{
var controlDomainPerfmonDefinitions = PerfmonDefinition.GetPerfmonDefinitions(controlDomain);
var controlDomainPerfmonDefinitions = PerfmonDefinition.GetPerfmonDefinitions(dom0);
if (controlDomainPerfmonDefinitions != null)
{
for (int ii = 0; ii < controlDomainPerfmonDefinitions.Length; ii++)
for (int i = 0; i < controlDomainPerfmonDefinitions.Length; i++)
{
var def = controlDomainPerfmonDefinitions[ii];
var def = controlDomainPerfmonDefinitions[i];
if (def != null && def.IsDom0MemoryUsage)
dom0MemoryAlert.Populate(def);

File diff suppressed because it is too large Load Diff

View File

@ -53,6 +53,7 @@ namespace XenAdmin.SettingsPanels
private XenAdmin.Network.IXenConnection _connection;
private bool _hasChanged = false;
private bool _loading = false;
private HashSet<string> _uuidSet = new HashSet<string>();
private int[] minimumColumnWidths = {25, 50, 50, 50 };
@ -214,6 +215,7 @@ namespace XenAdmin.SettingsPanels
if (!HostCannotParticipateInPowerManagement(host))
{
if (e.NewValue == CheckState.Checked &&
_uuidSet.Contains(host.uuid) &&
(!_poolConfiguration.HostConfigurations.ContainsKey(host.uuid) ||
!_poolConfiguration.HostConfigurations[host.uuid].LastPowerOnSucceeded))
{
@ -236,6 +238,7 @@ namespace XenAdmin.SettingsPanels
}
else
{
_uuidSet.Add(host.uuid);
_hasChanged = true;
}
}

View File

@ -30,11 +30,11 @@ namespace XenAdmin.TabPages
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseTabPage));
this.pageContainerPanel = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanelBanner = new System.Windows.Forms.TableLayoutPanel();
this.deprecationBanner1 = new XenAdmin.Controls.DeprecationBanner();
this.gradientPanel1 = new XenAdmin.Controls.GradientPanel.GradientPanel();
this.titleLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanelBanner.SuspendLayout();
this.gradientPanel1.SuspendLayout();
this.SuspendLayout();
//
@ -43,11 +43,11 @@ namespace XenAdmin.TabPages
resources.ApplyResources(this.pageContainerPanel, "pageContainerPanel");
this.pageContainerPanel.Name = "pageContainerPanel";
//
// tableLayoutPanel1
// tableLayoutPanelBanner
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.deprecationBanner1, 1, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
resources.ApplyResources(this.tableLayoutPanelBanner, "tableLayoutPanelBanner");
this.tableLayoutPanelBanner.Controls.Add(this.deprecationBanner1, 1, 0);
this.tableLayoutPanelBanner.Name = "tableLayoutPanelBanner";
//
// deprecationBanner1
//
@ -77,11 +77,11 @@ namespace XenAdmin.TabPages
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.pageContainerPanel);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.tableLayoutPanelBanner);
this.Controls.Add(this.gradientPanel1);
this.Name = "BaseTabPage";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tableLayoutPanelBanner.ResumeLayout(false);
this.tableLayoutPanelBanner.PerformLayout();
this.gradientPanel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -93,7 +93,7 @@ namespace XenAdmin.TabPages
private XenAdmin.Controls.GradientPanel.GradientPanel gradientPanel1;
private System.Windows.Forms.Label titleLabel;
protected System.Windows.Forms.Panel pageContainerPanel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelBanner;
private XenAdmin.Controls.DeprecationBanner deprecationBanner1;
}

View File

@ -112,31 +112,34 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pageContainerPanel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pageContainerPanel.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="pageContainerPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pageContainerPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 91</value>
<value>0, 118</value>
</data>
<data name="pageContainerPanel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data>
<data name="pageContainerPanel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>10, 10, 10, 10</value>
<value>12, 12, 12, 12</value>
</data>
<data name="pageContainerPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>482, 368</value>
<value>602, 456</value>
</data>
<data name="pageContainerPanel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@ -145,7 +148,7 @@
<value>pageContainerPanel</value>
</data>
<data name="&gt;&gt;pageContainerPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pageContainerPanel.Parent" xml:space="preserve">
<value>$this</value>
@ -153,13 +156,13 @@
<data name="&gt;&gt;pageContainerPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
<data name="tableLayoutPanelBanner.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<data name="tableLayoutPanelBanner.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<data name="tableLayoutPanelBanner.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="deprecationBanner1.AutoScroll" type="System.Boolean, mscorlib">
@ -175,16 +178,16 @@
<value>Fill</value>
</data>
<data name="deprecationBanner1.Location" type="System.Drawing.Point, System.Drawing">
<value>53, 5</value>
<value>66, 6</value>
</data>
<data name="deprecationBanner1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>5, 5, 5, 5</value>
<value>6, 6, 6, 6</value>
</data>
<data name="deprecationBanner1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
<value>4, 4, 4, 4</value>
</data>
<data name="deprecationBanner1.Size" type="System.Drawing.Size, System.Drawing">
<value>375, 44</value>
<value>469, 60</value>
</data>
<data name="deprecationBanner1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -199,42 +202,42 @@
<value>XenAdmin.Controls.DeprecationBanner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;deprecationBanner1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
<value>tableLayoutPanelBanner</value>
</data>
<data name="&gt;&gt;deprecationBanner1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="tableLayoutPanelBanner.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 37</value>
<data name="tableLayoutPanelBanner.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 46</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 0</value>
<data name="tableLayoutPanelBanner.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<data name="tableLayoutPanelBanner.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>482, 54</value>
<data name="tableLayoutPanelBanner.Size" type="System.Drawing.Size, System.Drawing">
<value>602, 72</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<data name="tableLayoutPanelBanner.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
<data name="&gt;&gt;tableLayoutPanelBanner.Name" xml:space="preserve">
<value>tableLayoutPanelBanner</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;tableLayoutPanelBanner.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanelBanner.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;tableLayoutPanelBanner.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<data name="tableLayoutPanelBanner.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="deprecationBanner1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,10,Percent,80,Percent,10" /&gt;&lt;Rows Styles="Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="titleLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@ -247,13 +250,16 @@
<value>NoControl</value>
</data>
<data name="titleLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 7</value>
<value>0, 8</value>
</data>
<data name="titleLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 0</value>
</data>
<data name="titleLabel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 0, 0, 0</value>
<value>10, 0, 0, 0</value>
</data>
<data name="titleLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>482, 30</value>
<value>602, 38</value>
</data>
<data name="titleLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -265,7 +271,7 @@
<value>titleLabel</value>
</data>
<data name="&gt;&gt;titleLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;titleLabel.Parent" xml:space="preserve">
<value>gradientPanel1</value>
@ -279,8 +285,11 @@
<data name="gradientPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="gradientPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data>
<data name="gradientPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>482, 37</value>
<value>602, 46</value>
</data>
<data name="gradientPanel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -297,19 +306,22 @@
<data name="&gt;&gt;gradientPanel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
<value>120, 120</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 4, 4, 4</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>482, 459</value>
<value>602, 574</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BaseTabPage</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -48,9 +48,12 @@ namespace XenAdmin.TabPages
{
get
{
if (Status != null && Status.LicencedHost != null && Status.LicenseExpiresIn != null && Status.LicenseExpiresIn.TotalDays < 3653)
if (Status != null && Status.LicencedHost != null && Status.LicenseExpiresIn != null
&& !LicenseStatus.IsInfinite(Status.LicenseExpiresIn))
{
return HelpersGUI.DateTimeToString(Status.LicencedHost.LicenseExpiryUTC.ToLocalTime(),
Messages.DATEFORMAT_DMY_LONG, true);
}
return Messages.LICENSE_NEVER;
}

View File

@ -1265,7 +1265,7 @@ namespace XenAdmin.TabPages
}
private void chevronButton1_Click(object sender, EventArgs e)
private void chevronButton1_ButtonClick(object sender, EventArgs e)
{
if (contentTableLayoutPanel.ColumnStyles[1].Width == 0)
{
@ -1370,7 +1370,7 @@ namespace XenAdmin.TabPages
private void chevronButton1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Space)
chevronButton1_Click(sender, e);
chevronButton1_ButtonClick(sender, e);
}
private static void DeleteSnapshots(List<VM> snapshots)

View File

@ -71,14 +71,13 @@ namespace XenAdmin.TabPages
this.viewPanel = new System.Windows.Forms.Panel();
this.snapshotTreeView = new XenAdmin.Controls.SnapshotTreeView(this.components);
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.chevronButton1 = new XenAdmin.Controls.ChevronButton();
this.panel1 = new System.Windows.Forms.Panel();
this.buttonView = new System.Windows.Forms.Button();
this.newSnapshotButton = new System.Windows.Forms.Button();
this.toolTipContainerRevertButton = new XenAdmin.Controls.ToolTipContainer();
this.revertButton = new System.Windows.Forms.Button();
this.newSnapshotButton = new System.Windows.Forms.Button();
this.buttonView = new System.Windows.Forms.Button();
this.saveButton = new System.Windows.Forms.Button();
this.deleteButton = new System.Windows.Forms.Button();
this.chevronButton1 = new XenAdmin.Controls.ChevronButton();
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.TakeSnapshotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.revertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -134,7 +133,6 @@ namespace XenAdmin.TabPages
((System.ComponentModel.ISupportInitialize)(this.screenshotPictureBox)).BeginInit();
this.viewPanel.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panel1.SuspendLayout();
this.toolTipContainerRevertButton.SuspendLayout();
this.contextMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
@ -150,8 +148,8 @@ namespace XenAdmin.TabPages
//
// GeneralTableLayoutPanel
//
this.GeneralTableLayoutPanel.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.GeneralTableLayoutPanel, "GeneralTableLayoutPanel");
this.GeneralTableLayoutPanel.BackColor = System.Drawing.Color.Transparent;
this.GeneralTableLayoutPanel.Controls.Add(this.contentTableLayoutPanel, 0, 1);
this.GeneralTableLayoutPanel.Controls.Add(this.tableLayoutPanel2, 0, 0);
this.GeneralTableLayoutPanel.Name = "GeneralTableLayoutPanel";
@ -176,7 +174,6 @@ namespace XenAdmin.TabPages
this.panelVMPP.Controls.Add(this.linkLabelVMPPInfo);
this.panelVMPP.Controls.Add(this.labelVMPPInfo);
this.panelVMPP.Controls.Add(this.pictureBoxVMPPInfo);
this.panelVMPP.MinimumSize = new System.Drawing.Size(0, 60);
this.panelVMPP.Name = "panelVMPP";
//
// linkLabelVMPPInfo
@ -213,7 +210,6 @@ namespace XenAdmin.TabPages
this.propertiesTableLayoutPanel.Controls.Add(this.propertiesButton, 0, 3);
this.propertiesTableLayoutPanel.Controls.Add(this.nameLabel, 0, 1);
this.propertiesTableLayoutPanel.Controls.Add(this.shadowPanel1, 0, 0);
this.propertiesTableLayoutPanel.MaximumSize = new System.Drawing.Size(0, 450);
this.propertiesTableLayoutPanel.Name = "propertiesTableLayoutPanel";
//
// tableLayoutPanelSimpleSelection
@ -239,8 +235,6 @@ namespace XenAdmin.TabPages
//
this.folderLabel.AutoEllipsis = true;
resources.ApplyResources(this.folderLabel, "folderLabel");
this.folderLabel.MaximumSize = new System.Drawing.Size(0, 50);
this.folderLabel.MinimumSize = new System.Drawing.Size(0, 25);
this.folderLabel.Name = "folderLabel";
this.folderLabel.UseMnemonic = false;
//
@ -254,8 +248,6 @@ namespace XenAdmin.TabPages
//
this.tagsLabel.AutoEllipsis = true;
resources.ApplyResources(this.tagsLabel, "tagsLabel");
this.tagsLabel.MaximumSize = new System.Drawing.Size(0, 50);
this.tagsLabel.MinimumSize = new System.Drawing.Size(0, 25);
this.tagsLabel.Name = "tagsLabel";
this.tagsLabel.UseMnemonic = false;
//
@ -263,8 +255,6 @@ namespace XenAdmin.TabPages
//
this.descriptionLabel.AutoEllipsis = true;
resources.ApplyResources(this.descriptionLabel, "descriptionLabel");
this.descriptionLabel.MaximumSize = new System.Drawing.Size(0, 90);
this.descriptionLabel.MinimumSize = new System.Drawing.Size(0, 25);
this.descriptionLabel.Name = "descriptionLabel";
this.descriptionLabel.UseMnemonic = false;
//
@ -353,8 +343,6 @@ namespace XenAdmin.TabPages
//
this.screenshotPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
resources.ApplyResources(this.screenshotPictureBox, "screenshotPictureBox");
this.screenshotPictureBox.MaximumSize = new System.Drawing.Size(100, 75);
this.screenshotPictureBox.MinimumSize = new System.Drawing.Size(100, 75);
this.screenshotPictureBox.Name = "screenshotPictureBox";
this.screenshotPictureBox.TabStop = false;
this.screenshotPictureBox.Click += new System.EventHandler(this.screenshotPictureBox_Click);
@ -375,73 +363,6 @@ namespace XenAdmin.TabPages
this.snapshotTreeView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.snapshotTreeView.HGap = 42;
this.snapshotTreeView.HideSelection = false;
this.snapshotTreeView.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items1"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items2"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items3"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items4"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items5"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items6"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items7"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items8"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items9"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items10"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items11"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items12"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items13"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items14"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items15"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items16"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items17"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items18"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items19"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items20"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items21"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items22"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items23"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items24"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items25"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items26"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items27"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items28"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items29"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items30"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items31"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items32"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items33"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items34"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items35"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items36"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items37"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items38"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items39"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items40"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items41"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items42"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items43"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items44"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items45"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items46"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items47"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items48"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items49"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items50"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items51"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items52"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items53"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items54"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items55"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items56"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items57"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items58"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items59"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items60"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items61"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items62"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items63"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items64"))),
((System.Windows.Forms.ListViewItem)(resources.GetObject("snapshotTreeView.Items65")))});
this.snapshotTreeView.LinkLineColor = System.Drawing.SystemColors.ActiveBorder;
this.snapshotTreeView.Name = "snapshotTreeView";
this.snapshotTreeView.OwnerDraw = true;
@ -450,50 +371,34 @@ namespace XenAdmin.TabPages
this.snapshotTreeView.TileSize = new System.Drawing.Size(80, 60);
this.snapshotTreeView.UseCompatibleStateImageBehavior = false;
this.snapshotTreeView.VGap = 50;
this.snapshotTreeView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView1_MouseDoubleClick);
this.snapshotTreeView.SelectedIndexChanged += new System.EventHandler(this.view_SelectionChanged);
this.snapshotTreeView.Leave += new System.EventHandler(this.snapshotTreeView_Leave);
this.snapshotTreeView.Enter += new System.EventHandler(this.snapshotTreeView_Enter);
this.snapshotTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.snapshotTreeView_DragDrop);
this.snapshotTreeView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView_MouseMove);
this.snapshotTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView_MouseClick);
this.snapshotTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.snapshotTreeView_DragEnter);
this.snapshotTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.snapshotTreeView_ItemDrag);
this.snapshotTreeView.SelectedIndexChanged += new System.EventHandler(this.view_SelectionChanged);
this.snapshotTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.snapshotTreeView_DragDrop);
this.snapshotTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.snapshotTreeView_DragEnter);
this.snapshotTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.snapshotTreeView_DragOver);
this.snapshotTreeView.Enter += new System.EventHandler(this.snapshotTreeView_Enter);
this.snapshotTreeView.Leave += new System.EventHandler(this.snapshotTreeView_Leave);
this.snapshotTreeView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView1_MouseDoubleClick);
this.snapshotTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView_MouseClick);
this.snapshotTreeView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.snapshotTreeView_MouseMove);
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.chevronButton1, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.newSnapshotButton, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.toolTipContainerRevertButton, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.buttonView, 4, 0);
this.tableLayoutPanel2.Controls.Add(this.saveButton, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.deleteButton, 3, 0);
this.tableLayoutPanel2.Controls.Add(this.chevronButton1, 6, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// chevronButton1
// newSnapshotButton
//
resources.ApplyResources(this.chevronButton1, "chevronButton1");
this.chevronButton1.Cursor = System.Windows.Forms.Cursors.Default;
this.chevronButton1.Image = global::XenAdmin.Properties.Resources.PDChevronRight;
this.chevronButton1.Name = "chevronButton1";
this.chevronButton1.ButtonClick += new System.EventHandler(this.chevronButton1_Click);
this.chevronButton1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chevronButton1_KeyDown);
//
// panel1
//
this.panel1.Controls.Add(this.buttonView);
this.panel1.Controls.Add(this.toolTipContainerRevertButton);
this.panel1.Controls.Add(this.newSnapshotButton);
this.panel1.Controls.Add(this.saveButton);
this.panel1.Controls.Add(this.deleteButton);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// buttonView
//
this.buttonView.Image = global::XenAdmin.Properties.Resources.expanded_triangle;
resources.ApplyResources(this.buttonView, "buttonView");
this.buttonView.Name = "buttonView";
this.buttonView.UseVisualStyleBackColor = true;
this.buttonView.Click += new System.EventHandler(this.button1_Click);
resources.ApplyResources(this.newSnapshotButton, "newSnapshotButton");
this.newSnapshotButton.Name = "newSnapshotButton";
this.newSnapshotButton.UseVisualStyleBackColor = true;
this.newSnapshotButton.Click += new System.EventHandler(this.takeSnapshotToolStripButton_Click);
//
// toolTipContainerRevertButton
//
@ -509,12 +414,13 @@ namespace XenAdmin.TabPages
this.revertButton.UseVisualStyleBackColor = true;
this.revertButton.Click += new System.EventHandler(this.revertButton_Click);
//
// newSnapshotButton
// buttonView
//
resources.ApplyResources(this.newSnapshotButton, "newSnapshotButton");
this.newSnapshotButton.Name = "newSnapshotButton";
this.newSnapshotButton.UseVisualStyleBackColor = true;
this.newSnapshotButton.Click += new System.EventHandler(this.takeSnapshotToolStripButton_Click);
this.buttonView.Image = global::XenAdmin.Properties.Resources.expanded_triangle;
resources.ApplyResources(this.buttonView, "buttonView");
this.buttonView.Name = "buttonView";
this.buttonView.UseVisualStyleBackColor = true;
this.buttonView.Click += new System.EventHandler(this.button1_Click);
//
// saveButton
//
@ -531,8 +437,18 @@ namespace XenAdmin.TabPages
this.deleteButton.UseVisualStyleBackColor = true;
this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click);
//
// chevronButton1
//
resources.ApplyResources(this.chevronButton1, "chevronButton1");
this.chevronButton1.Cursor = System.Windows.Forms.Cursors.Default;
this.chevronButton1.Image = ((System.Drawing.Image)(resources.GetObject("chevronButton1.Image")));
this.chevronButton1.Name = "chevronButton1";
this.chevronButton1.ButtonClick += new System.EventHandler(this.chevronButton1_ButtonClick);
this.chevronButton1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chevronButton1_KeyDown);
//
// contextMenuStrip
//
this.contextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.TakeSnapshotToolStripMenuItem,
this.revertToolStripMenuItem,
@ -682,8 +598,8 @@ namespace XenAdmin.TabPages
this.dataGridView.ReadOnly = true;
this.dataGridView.RowHeadersVisible = false;
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView_MouseClick);
this.dataGridView.SelectionChanged += new System.EventHandler(this.view_SelectionChanged);
this.dataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView_MouseClick);
//
// Live
//
@ -770,6 +686,7 @@ namespace XenAdmin.TabPages
//
// saveMenuStrip
//
this.saveMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
this.saveMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.saveAsVMToolStripMenuItem,
this.toolStripSeparator2,
@ -812,6 +729,7 @@ namespace XenAdmin.TabPages
//
// contextMenuStripView
//
this.contextMenuStripView.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStripView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButtonListView,
this.toolStripButtonTreeView,
@ -853,7 +771,9 @@ namespace XenAdmin.TabPages
this.Name = "SnapshotsPage";
this.Controls.SetChildIndex(this.pageContainerPanel, 0);
this.pageContainerPanel.ResumeLayout(false);
this.pageContainerPanel.PerformLayout();
this.GeneralTableLayoutPanel.ResumeLayout(false);
this.GeneralTableLayoutPanel.PerformLayout();
this.contentTableLayoutPanel.ResumeLayout(false);
this.panelPropertiesColumn.ResumeLayout(false);
this.panelPropertiesColumn.PerformLayout();
@ -871,7 +791,6 @@ namespace XenAdmin.TabPages
this.viewPanel.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.panel1.ResumeLayout(false);
this.toolTipContainerRevertButton.ResumeLayout(false);
this.contextMenuStrip.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
@ -932,9 +851,7 @@ namespace XenAdmin.TabPages
private ToolStripMenuItem saveAsTemplateToolStripMenuItem;
private ToolStripMenuItem saveAsVMToolStripMenuItem;
private TableLayoutPanel tableLayoutPanel2;
private ChevronButton chevronButton1;
private ToolStripMenuItem exportAsBackupToolStripMenuItem;
private Panel panel1;
private Button newSnapshotButton;
private Button revertButton;
private Button saveButton;
@ -966,6 +883,7 @@ namespace XenAdmin.TabPages
private DataGridViewTextBoxColumn size;
private DataGridViewTextBoxColumn tags;
private DataGridViewTextBoxColumn description;
private ChevronButton chevronButton1;
}

File diff suppressed because it is too large Load Diff

View File

@ -191,7 +191,7 @@
<value>173, 22</value>
</data>
<data name="editVirtualDiskToolStripMenuItem.Text" xml:space="preserve">
<value>Properties</value>
<value>P&amp;roperties</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TitleLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">

View File

@ -67,7 +67,6 @@ namespace XenAdmin.TabPages
TitleLabel.ForeColor = Program.HeaderGradientForeColor;
TitleLabel.Font = Program.HeaderGradientFont;
multipleDvdIsoList1.linkLabel1.LinkColor = Color.FromArgb(0, 0, 255);
dataGridViewStorage.SortCompare += new DataGridViewSortCompareEventHandler(dataGridViewStorage_SortCompare);
dataGridViewStorage.Sort(ColumnDevicePosition, ListSortDirection.Ascending);
}

View File

@ -241,7 +241,7 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
private void BrowseButton_Click(object sender, EventArgs e)
{
using (FolderBrowserDialog dlog = new FolderBrowserDialog {SelectedPath = m_textBoxLocation.Text})
using (FolderBrowserDialog dlog = new FolderBrowserDialog {SelectedPath = m_textBoxLocation.Text, Description = Messages.FOLDER_BROWSER_BUG_TOOL})
{
if (dlog.ShowDialog() == DialogResult.OK)
m_textBoxLocation.Text = dlog.SelectedPath;

View File

@ -112,9 +112,9 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
}
}
protected override string HomeServerText { get { return Messages.CPM_WIZARD_DESTINATION_DESTINATION; } }
protected override string TargetServerText { get { return Messages.CPM_WIZARD_DESTINATION_DESTINATION; } }
protected override string HomeServerSelectionIntroText { get { return Messages.CPM_WIZARD_DESTINATION_TABLE_INTRO; } }
protected override string TargetServerSelectionIntroText { get { return Messages.CPM_WIZARD_DESTINATION_TABLE_INTRO; } }
public override DelayLoadingOptionComboBoxItem CreateDelayLoadingOptionComboBoxItem(IXenObject xenItem)
@ -122,7 +122,7 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
return new CrossPoolMigrateDelayLoadingComboBoxItem(xenItem, preSelectedHost, selectedVMs);
}
protected override List<ReasoningFilter> CreateHomeServerFilterList(IEnableableXenObjectComboBoxItem selectedItem)
protected override List<ReasoningFilter> CreateTargetServerFilterList(IEnableableXenObjectComboBoxItem selectedItem)
{
List<ReasoningFilter> filters = new List<ReasoningFilter>{ new ResidentHostIsSameAsSelectionFilter(selectedVMs) };
@ -168,5 +168,13 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
return TemplatesOnly ? Messages.TEMPLATE : Messages.VM;
}
}
protected override string TargetColumnHeaderText
{
get
{
return Messages.TARGET_SERVER;
}
}
}
}

View File

@ -67,10 +67,10 @@
resources.ApplyResources(this.networkComboBox, "networkComboBox");
this.networkComboBox.Name = "networkComboBox";
//
// label3
// blurbText
//
resources.ApplyResources(this.blurbText, "label3");
this.blurbText.Name = "label3";
resources.ApplyResources(this.blurbText, "blurbText");
this.blurbText.Name = "blurbText";
//
// CrossPoolMigrateTransferNetworkPage
//

View File

@ -145,7 +145,7 @@
<value>0, 0, 10, 0</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>88, 27</value>
<value>229, 46</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -172,10 +172,10 @@
<value>False</value>
</data>
<data name="networkComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>101, 3</value>
<value>242, 3</value>
</data>
<data name="networkComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 21</value>
<value>432, 39</value>
</data>
<data name="networkComboBox.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
@ -196,13 +196,13 @@
<value>Top</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 36</value>
<value>3, 55</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>608, 27</value>
<value>1529, 46</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -222,40 +222,40 @@
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="networkComboBox" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,Percent,100" /&gt;&lt;Rows Styles="AutoSize,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<data name="blurbText.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="blurbText.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="blurbText.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<data name="blurbText.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="label3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<data name="blurbText.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 20</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>608, 33</value>
<data name="blurbText.Size" type="System.Drawing.Size, System.Drawing">
<value>1529, 52</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<data name="blurbText.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="label3.Text" xml:space="preserve">
<data name="blurbText.Text" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
<data name="&gt;&gt;blurbText.Name" xml:space="preserve">
<value>blurbText</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<data name="&gt;&gt;blurbText.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<data name="&gt;&gt;blurbText.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<data name="&gt;&gt;blurbText.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@ -268,7 +268,7 @@
<value>2</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 332</value>
<value>1535, 830</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -286,16 +286,19 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label3" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="blurbText" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
<value>240, 240</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>8, 8, 8, 8</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>614, 332</value>
<value>1535, 830</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>CrossPoolMigrateTransferNetworkPage</value>

View File

@ -419,7 +419,7 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
summary = new VmTitleSummary(summary, pair.Value);
summary = new DestinationPoolSummary(summary, pair.Value, TargetConnection);
summary = new HomeServerSummary(summary, pair.Value, TargetConnection);
summary = new TargetServerSummary(summary, pair.Value, TargetConnection);
summary = new TransferNetworkSummary(summary, m_pageTransferNetwork.NetworkUuid.Value);
summary = new StorageSummary(summary, pair.Value, xenConnection);
summary = new NetworkSummary(summary, pair.Value, xenConnection);

View File

@ -237,7 +237,7 @@ namespace XenAdmin.Wizards.ExportWizard
private void m_buttonBrowse_Click(object sender, EventArgs e)
{
using (FolderBrowserDialog dlog = new FolderBrowserDialog())
using (FolderBrowserDialog dlog = new FolderBrowserDialog { Description = Messages.FOLDER_BROWSER_EXPORT_APPLIANCE })
{
if (dlog.ShowDialog() == DialogResult.OK)
m_textBoxFolderName.Text = dlog.SelectedPath;

View File

@ -101,9 +101,10 @@ namespace XenAdmin.Wizards.GenericPages
protected void InitializeText()
{
m_labelIntro.Text = InstructionText;
label1.Text = HomeServerText;
label2.Text = HomeServerSelectionIntroText;
label1.Text = TargetServerText;
label2.Text = TargetServerSelectionIntroText;
m_colVmName.HeaderText = VmColumnHeaderText;
m_colTarget.HeaderText = TargetColumnHeaderText;
}
private IXenObject _chosenItem;
@ -123,9 +124,9 @@ namespace XenAdmin.Wizards.GenericPages
protected abstract string InstructionText { get; }
/// <summary>
/// Text demarking what the label fot the home server drop down should be
/// Text demarking what the label for the target server drop down should be
/// </summary>
protected abstract string HomeServerText { get; }
protected abstract string TargetServerText { get; }
protected virtual string VmColumnHeaderText
{
@ -135,10 +136,19 @@ namespace XenAdmin.Wizards.GenericPages
}
}
protected virtual string TargetColumnHeaderText
{
get
{
return m_colTarget.HeaderText;
}
}
/// <summary>
/// Text above the table containing a list of VMs and concomitant home server
/// </summary>
protected abstract string HomeServerSelectionIntroText { get; }
protected abstract string TargetServerSelectionIntroText { get; }
protected virtual void OnChosenItemChanged()
{}
@ -553,7 +563,7 @@ namespace XenAdmin.Wizards.GenericPages
{
Cursor.Current = Cursors.WaitCursor;
ChosenItem = item == null ? null : item.Item;
Program.Invoke(Program.MainWindow, ()=> PopulateDataGridView(CreateHomeServerFilterList(item)));
Program.Invoke(Program.MainWindow, ()=> PopulateDataGridView(CreateTargetServerFilterList(item)));
}
finally
{
@ -569,7 +579,7 @@ namespace XenAdmin.Wizards.GenericPages
/// </summary>
/// <param name="item">selected item from the host combobox</param>
/// <returns></returns>
protected virtual List<ReasoningFilter> CreateHomeServerFilterList(IEnableableXenObjectComboBoxItem item)
protected virtual List<ReasoningFilter> CreateTargetServerFilterList(IEnableableXenObjectComboBoxItem item)
{
return new List<ReasoningFilter>();
}

View File

@ -112,26 +112,26 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="m_labelIntro.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="m_labelIntro.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="m_labelIntro.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="m_labelIntro.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
@ -285,18 +285,18 @@
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="m_colVmName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="m_colVmName.UserAddedColumn" type="System.Boolean, mscorlib">
<value>True</value>
</metadata>
</data>
<data name="m_colVmName.HeaderText" xml:space="preserve">
<value>VM</value>
</data>
<data name="m_colVmName.Width" type="System.Int32, mscorlib">
<value>48</value>
</data>
<metadata name="m_colTarget.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="m_colTarget.UserAddedColumn" type="System.Boolean, mscorlib">
<value>True</value>
</metadata>
</data>
<data name="m_colTarget.HeaderText" xml:space="preserve">
<value>Home Server</value>
</data>
@ -447,9 +447,9 @@
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="m_labelIntro" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="m_dataGridView" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="tableLayoutPanelWarning" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,Percent,100,AutoSize,0,Absolute,20" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="$this.Localizable" type="System.Boolean, mscorlib">
<value>True</value>
</metadata>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>

View File

@ -429,7 +429,7 @@ namespace XenAdmin.Wizards.GenericPages
continue;
var sr = TargetConnection.Resolve(pbd.SR);
if (sr == null)
if (sr == null || sr.IsDetached)
continue;
if ((sr.content_type.ToLower() == "iso" || sr.type.ToLower() == "iso") && !resource.SRTypeInvalid)

View File

@ -168,12 +168,12 @@ namespace XenAdmin.Wizards.GenericPages
}
}
public class HomeServerSummary : MappingSummaryDecorator
public class TargetServerSummary : MappingSummaryDecorator
{
private readonly VmMapping mapping;
private readonly IXenConnection connection;
public HomeServerSummary(MappingSummary summary, VmMapping mapping, IXenConnection connection)
public TargetServerSummary(MappingSummary summary, VmMapping mapping, IXenConnection connection)
: base(summary)
{
this.mapping = mapping;
@ -185,7 +185,7 @@ namespace XenAdmin.Wizards.GenericPages
get
{
List<SummaryDetails> decoratedSummary = summary.Details;
decoratedSummary.Add(new SummaryDetails(Messages.CPM_SUMMARY_KEY_HOME_SERVER, ResolveLabel()));
decoratedSummary.Add(new SummaryDetails(Messages.CPM_SUMMARY_KEY_TARGET_SERVER, ResolveLabel()));
return decoratedSummary;
}
}

Some files were not shown because too many files have changed in this diff Show More