A lot of charts work

This commit is contained in:
Eric Herbrandson
2019-04-16 20:05:17 -05:00
parent 6d12138a60
commit 8ea4bd32a0
24 changed files with 248 additions and 187 deletions

View File

@@ -1,9 +1,9 @@
import _ from 'lodash';
export default function getPodMetrics(pods, metrics) {
if (!pods || !metrics) return null;
export default function getMetrics(items, metrics) {
if (!items || !metrics) return null;
const names = _.map(pods, x => x.metadata.name);
const names = _.map(items, x => x.metadata.name);
const filteredMetrics = metrics.filter(x => names.includes(x.metadata.name));
return _.keyBy(filteredMetrics, 'metadata.name');