mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CA-107240: VDI move window shows incorrect message for broken storage as ‘Local storage must belong to resident host’
Also fixed a similar issue, where the broken SR was selectable (Create new virtual disk from the SR Storage tab) Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
8de55cb90c
commit
ae4670c3b1
@ -131,8 +131,10 @@ 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 string.Format(Messages.SR_CANNOT_BE_SEEN, Affinity == null ? Helpers.GetName(TheSR.Connection) : Helpers.GetName(Affinity));
|
||||
return base.CannotBeShownReason;
|
||||
}
|
||||
}
|
||||
@ -195,7 +197,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user