mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-05-14 19:56:35 +00:00
A lot of charts work
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user