mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Preload pods/events on nodes page (#2870)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
f3b3d15e50
commit
0466971a6c
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import "./nodes.scss";
|
import "./nodes.scss";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { disposeOnUnmount, observer } from "mobx-react";
|
||||||
import type { RouteComponentProps } from "react-router";
|
import type { RouteComponentProps } from "react-router";
|
||||||
import { cssNames, interval } from "../../utils";
|
import { cssNames, interval } from "../../utils";
|
||||||
import { TabLayout } from "../layout/tab-layout";
|
import { TabLayout } from "../layout/tab-layout";
|
||||||
@ -37,6 +37,8 @@ import kebabCase from "lodash/kebabCase";
|
|||||||
import upperFirst from "lodash/upperFirst";
|
import upperFirst from "lodash/upperFirst";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import { Badge } from "../badge/badge";
|
import { Badge } from "../badge/badge";
|
||||||
|
import { kubeWatchApi } from "../../api/kube-watch-api";
|
||||||
|
import { eventStore } from "../+events/event.store";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
@ -60,6 +62,11 @@ export class Nodes extends React.Component<Props> {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.metricsWatcher.start(true);
|
this.metricsWatcher.start(true);
|
||||||
|
disposeOnUnmount(this, [
|
||||||
|
kubeWatchApi.subscribeStores([nodesStore, podsStore, eventStore], {
|
||||||
|
preload: true,
|
||||||
|
})
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user