Merge pull request #1492 from MihaelaStoica/CA-137249

CA-137249: Strange 'Completed' text shows while enabling or disabling HA
This commit is contained in:
Gabor Apati-Nagy 2017-03-22 11:04:05 +00:00 committed by GitHub
commit 7a875cae94
3 changed files with 5 additions and 1 deletions

View File

@ -446,6 +446,8 @@ namespace XenAdmin
void actionChanged_(ActionBase action)
{
if (action.SuppressProgressReport) // suppress updates when the PureAsyncAction runs the action to populate the ApiMethodsToRoleCheck
return;
var meddlingAction = action as MeddlingAction;
if (meddlingAction == null)
statusProgressBar.Visible = action.ShowProgress && !action.IsCompleted;

View File

@ -303,7 +303,7 @@ namespace XenAdmin.Actions
}
}
protected bool SuppressProgressReport { get; set; }
public bool SuppressProgressReport { get; set; }
public void Tick(int percent, string description)
{
_description = description;

View File

@ -75,8 +75,10 @@ namespace XenAdmin.Actions
RbacMethodList rbacMethods = new RbacMethodList();
Session = new Session(RbacCollectorProxy.GetProxy(rbacMethods), Connection);
base.SuppressProgressReport = true;
var startDescription = Description;
Run();
base.SuppressProgressReport = false;
Description = startDescription; // reset Description;
return rbacMethods;
}
}