mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 06:00:06 +02:00
fix(cp-frontend): poll even when no services (service list)
This commit is contained in:
parent
d9ae6eb34a
commit
94c664fecc
@ -179,18 +179,12 @@ export default compose(
|
||||
}),
|
||||
withServiceMetricsPolling({
|
||||
pollingInterval: 1000,
|
||||
getPreviousEnd: ({ loading, error, services = [] }) => {
|
||||
getPreviousEnd: ({ loading, services = [] }) => {
|
||||
if (loading) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const _services = forceArray(services);
|
||||
|
||||
if (!_services.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const previousEnd = _services
|
||||
const previousEnd = forceArray(services)
|
||||
.map(service => get(service, 'instances[0].metrics[0].end', null))
|
||||
.filter(Boolean)
|
||||
.shift();
|
||||
|
Loading…
Reference in New Issue
Block a user