CP-30335: Make all warnings in prechecks non-fixable, to avoid opening a modal dialog (for more info) or an URL when Resolve all is pressed

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2019-01-28 17:44:12 +00:00
parent 544bcb4978
commit df534e3f70
3 changed files with 7 additions and 14 deletions

View File

@ -41,14 +41,10 @@ namespace XenAdmin.Diagnostics.Problems
{
}
public override string HelpMessage
{
get { return null; }
}
public override bool IsFixable => false;
public override Image Image
{
get { return Images.GetImage16For(Icons.Warning); }
}
public override string HelpMessage => null;
public override Image Image => Images.GetImage16For(Icons.Warning);
}
}

View File

@ -40,8 +40,7 @@ namespace XenAdmin.Diagnostics.Problems
protected WarningWithMoreInfo(Check check) : base(check)
{
}
public override bool IsFixable => false;
public override string HelpMessage => Messages.PATCHINGWIZARD_MORE_INFO;
protected override Actions.AsyncAction CreateAction(out bool cancelled)

View File

@ -910,11 +910,9 @@ namespace XenAdmin.Wizards.PatchingWizard
List<AsyncAction> actions = new List<AsyncAction>();
foreach (DataGridViewRow row in dataGridView1.Rows)
{
PreCheckHostRow preCheckHostRow = row as PreCheckHostRow;
if (preCheckHostRow != null && preCheckHostRow.Problem != null)
if (row is PreCheckHostRow preCheckHostRow && preCheckHostRow.IsFixable)
{
bool cancelled;
AsyncAction action = preCheckHostRow.Problem.GetSolutionAction(out cancelled);
AsyncAction action = preCheckHostRow.Problem.GetSolutionAction(out _);
if (action != null)
{
preCheckHostRow.Enabled = false;