mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Merge pull request #2948 from weaveworks/fixes-flux-image-status
Correctly show whether there are new images or not.
This commit is contained in:
@@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import find from 'lodash/find';
|
||||
import map from 'lodash/map';
|
||||
import isNull from 'lodash/isNull';
|
||||
import { CircularProgress } from 'weaveworks-ui-components';
|
||||
|
||||
import { getImagesForService } from '../../actions/app-actions';
|
||||
@@ -14,7 +13,7 @@ function newImagesAvailable(images, currentId) {
|
||||
|
||||
if (current) {
|
||||
const timestamp = new Date(current.CreatedAt);
|
||||
return !isNull(find(images, i => timestamp < new Date(i.CreatedAt)));
|
||||
return Boolean(find(images, i => new Date(i.CreatedAt) > timestamp));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user