Band-aid solution for not killing the server if dashboard charts can't update

pull/19/head
Pat Hartl 2023-03-15 17:45:19 -05:00
parent 521d6222b0
commit 42da3b6c81
3 changed files with 15 additions and 3 deletions

View File

@ -78,6 +78,10 @@
Data[instance] = Data[instance].ShiftArrayAndInsert((double)PerformanceCounters[instance].NextValue(), TimerHistory);
}
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
try
{
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
}
catch { }
}
}

View File

@ -78,6 +78,10 @@
Data[instance] = Data[instance].ShiftArrayAndInsert((double)PerformanceCounters[instance].NextValue(), TimerHistory);
}
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
try
{
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
}
catch { }
}
}

View File

@ -70,6 +70,10 @@
{
Data = Data.ShiftArrayAndInsert((double)Math.Ceiling(PerformanceCounter.NextValue()), TimerHistory);
await Chart.ChangeData(Data.Select((x, i) => new { value = x, index = i }), true);
try
{
await Chart.ChangeData(Data.Select((x, i) => new { value = x, index = i }), true);
}
catch { }
}
}