mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Small clean up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
ecd2e72327
commit
739d8af85b
@ -25,12 +25,12 @@ const getHorizontalPodAutoscalerMetrics = getInjectable({
|
||||
&& getMetricName(current) === getMetricName(metric)
|
||||
);
|
||||
|
||||
const hpaV2ParserValues = getMetricValues(hpaV2Parser, currentMetric, metric);
|
||||
const hpaV1ParserValues = getMetricValues(hpaV1Parser, currentMetric, metric);
|
||||
let values = hpaV1ParserValues;
|
||||
const h2Values = getMetricValues(hpaV2Parser, currentMetric, metric);
|
||||
const h1Values = getMetricValues(hpaV1Parser, currentMetric, metric);
|
||||
let values = h1Values;
|
||||
|
||||
if (hpaV2ParserValues.current || hpaV2ParserValues.target) {
|
||||
values = hpaV2ParserValues;
|
||||
if (h2Values.current || h2Values.target) {
|
||||
values = h2Values;
|
||||
}
|
||||
|
||||
return `${values.current ?? "unknown"} / ${values.target ?? "unknown"}`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user