mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Renamed method SolveImmediately to GetSolutionAction because the old name was misleading: the method creates the action, it doesn't run it.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
dc8b2379c2
commit
7ea811e942
@ -80,7 +80,7 @@ namespace XenAdmin.Diagnostics.Problems
|
||||
return null;
|
||||
}
|
||||
|
||||
public AsyncAction SolveImmediately(out bool cancelled)
|
||||
public AsyncAction GetSolutionAction(out bool cancelled)
|
||||
{
|
||||
DeregisterSolutionActionEvent();
|
||||
solutionAction = CreateAction(out cancelled);
|
||||
|
@ -43,7 +43,6 @@ using XenAdmin.Diagnostics.Checks;
|
||||
using XenAdmin.Diagnostics.Checks.DR;
|
||||
using XenAdmin.Diagnostics.Problems;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAdmin.Properties;
|
||||
using XenAPI;
|
||||
|
||||
using XenAdmin.Actions.DR;
|
||||
@ -476,17 +475,16 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
return warnings;
|
||||
}
|
||||
|
||||
private ActionProgressDialog _progressDialog = null;
|
||||
|
||||
private void ExecuteSolution(PreCheckItemRow preCheckRow)
|
||||
{
|
||||
bool cancelled;
|
||||
AsyncAction action = preCheckRow.Problem.SolveImmediately(out cancelled);
|
||||
AsyncAction action = preCheckRow.Problem.GetSolutionAction(out cancelled);
|
||||
if (action != null)
|
||||
{
|
||||
action.Completed += action_Completed;
|
||||
_progressDialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks);
|
||||
_progressDialog.ShowDialog(this);
|
||||
using (var progressDialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks))
|
||||
progressDialog.ShowDialog(this);
|
||||
if (action.Succeeded)
|
||||
{
|
||||
var revertAction = preCheckRow.Problem.UnwindChanges();
|
||||
@ -531,7 +529,7 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
if (preCheckRow != null && preCheckRow.Problem != null)
|
||||
{
|
||||
bool cancelled;
|
||||
AsyncAction action = preCheckRow.Problem.SolveImmediately(out cancelled);
|
||||
AsyncAction action = preCheckRow.Problem.GetSolutionAction(out cancelled);
|
||||
if (action != null)
|
||||
{
|
||||
actions.Add(action, preCheckRow.Problem.UnwindChanges());
|
||||
@ -540,8 +538,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
}
|
||||
foreach (var asyncAction in actions.Keys)
|
||||
{
|
||||
_progressDialog = new ActionProgressDialog(asyncAction, ProgressBarStyle.Blocks);
|
||||
_progressDialog.ShowDialog(this);
|
||||
using (var progressDialog = new ActionProgressDialog(asyncAction, ProgressBarStyle.Blocks))
|
||||
progressDialog.ShowDialog(this);
|
||||
|
||||
if (asyncAction.Succeeded && actions[asyncAction] != null)
|
||||
RevertActions.Add(actions[asyncAction]);
|
||||
|
@ -851,7 +851,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
private void ExecuteSolution(PreCheckHostRow preCheckHostRow)
|
||||
{
|
||||
bool cancelled;
|
||||
resolvePrechecksAction = preCheckHostRow.Problem.SolveImmediately(out cancelled);
|
||||
resolvePrechecksAction = preCheckHostRow.Problem.GetSolutionAction(out cancelled);
|
||||
|
||||
if (resolvePrechecksAction != null)
|
||||
{
|
||||
@ -897,7 +897,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
if (preCheckHostRow != null && preCheckHostRow.Problem != null)
|
||||
{
|
||||
bool cancelled;
|
||||
AsyncAction action = preCheckHostRow.Problem.SolveImmediately(out cancelled);
|
||||
AsyncAction action = preCheckHostRow.Problem.GetSolutionAction(out cancelled);
|
||||
if (action != null)
|
||||
{
|
||||
preCheckHostRow.Enabled = false;
|
||||
|
Loading…
Reference in New Issue
Block a user