1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fixing ns loadMetrics() this context

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-07-23 10:30:52 +03:00
parent 8b3df1d098
commit 0a3ede1876

View File

@ -25,7 +25,7 @@ import React from "react";
import { computed, makeObservable, observable, reaction } from "mobx";
import { disposeOnUnmount, observer } from "mobx-react";
import { DrawerItem } from "../drawer";
import { cssNames } from "../../utils";
import { boundMethod, cssNames } from "../../utils";
import { getMetricsForNamespace, IPodMetrics, Namespace } from "../../api/endpoints";
import { getDetailsUrl, KubeObjectDetailsProps } from "../kube-object";
import { Link } from "react-router-dom";
@ -72,6 +72,7 @@ export class NamespaceDetails extends React.Component<Props> {
return limitRangeStore.getAllByNs(namespace);
}
@boundMethod
async loadMetrics() {
this.metrics = await getMetricsForNamespace(this.props.object.getName(), "");
}