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({
|
withServiceMetricsPolling({
|
||||||
pollingInterval: 1000,
|
pollingInterval: 1000,
|
||||||
getPreviousEnd: ({ loading, error, services = [] }) => {
|
getPreviousEnd: ({ loading, services = [] }) => {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _services = forceArray(services);
|
const previousEnd = forceArray(services)
|
||||||
|
|
||||||
if (!_services.length) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const previousEnd = _services
|
|
||||||
.map(service => get(service, 'instances[0].metrics[0].end', null))
|
.map(service => get(service, 'instances[0].metrics[0].end', null))
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.shift();
|
.shift();
|
||||||
|
Loading…
Reference in New Issue
Block a user