Change events args
This commit is contained in:
@ -146,8 +146,6 @@
|
||||
{
|
||||
targetCampaign.StartedAt = campaign.StartedAt;
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
campaignsDataGrid.Reload();
|
||||
}
|
||||
|
||||
@ -168,8 +166,6 @@
|
||||
targetCampaign.Step = campaign.Step;
|
||||
targetCampaign.Progress = campaign.Progress;
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
campaignsDataGrid.Reload();
|
||||
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaign.Id)
|
||||
@ -185,18 +181,16 @@
|
||||
Task.Run(RefreshCampaigns);
|
||||
}
|
||||
|
||||
void OnOperationStarted(Operation operation)
|
||||
void OnOperationStarted(int operationId, int campaignId, DateTime startedAt)
|
||||
{
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
if (expandedCampaign != null && expandedCampaign.Id == operation.CampaignId)
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaignId)
|
||||
{
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operation.Id);
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operationId);
|
||||
if (targetOperation != null)
|
||||
{
|
||||
targetOperation.StartedAt = operation.StartedAt;
|
||||
|
||||
StateHasChanged();
|
||||
targetOperation.StartedAt = startedAt;
|
||||
|
||||
operationsDataGrid.Reload();
|
||||
}
|
||||
@ -204,18 +198,16 @@
|
||||
});
|
||||
}
|
||||
|
||||
void OnOperationExecuted(Operation operation)
|
||||
void OnOperationExecuted(int operationId, int campaignId, string messageGuid)
|
||||
{
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
if (expandedCampaign != null && expandedCampaign.Id == operation.CampaignId)
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaignId)
|
||||
{
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operation.Id);
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operationId);
|
||||
if (targetOperation != null)
|
||||
{
|
||||
targetOperation.MessageGuid = operation.MessageGuid;
|
||||
|
||||
StateHasChanged();
|
||||
targetOperation.MessageGuid = messageGuid;
|
||||
|
||||
operationsDataGrid.Reload();
|
||||
}
|
||||
@ -223,19 +215,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
void OnOperationEnded(Operation operation)
|
||||
void OnOperationEnded(int operationId, int campaignId, DateTime endedAt, string failureReason)
|
||||
{
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
if (expandedCampaign != null && expandedCampaign.Id == operation.CampaignId)
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaignId)
|
||||
{
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operation.Id);
|
||||
var targetOperation = expandedCampaign.Operations?.FirstOrDefault(x => x.Id == operationId);
|
||||
if (targetOperation != null)
|
||||
{
|
||||
targetOperation.EndedAt = operation.EndedAt;
|
||||
targetOperation.FailureReason = operation.FailureReason;
|
||||
|
||||
StateHasChanged();
|
||||
targetOperation.EndedAt = endedAt;
|
||||
targetOperation.FailureReason = failureReason;
|
||||
|
||||
operationsDataGrid.Reload();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user