mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix loadAll calls
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
b68bc0e3b8
commit
1c55e2f7f2
@ -73,11 +73,17 @@ export class App extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
console.log("hello");
|
|
||||||
const cluster = getHostedCluster();
|
const cluster = getHostedCluster();
|
||||||
await eventStore.loadAll();
|
const promises: Promise<void>[] = [];
|
||||||
await nodesStore.loadAll();
|
if (isAllowedResource("events") && isAllowedResource("pods")) {
|
||||||
await podsStore.loadAll();
|
promises.push(eventStore.loadAll());
|
||||||
|
promises.push(podsStore.loadAll());
|
||||||
|
}
|
||||||
|
if (isAllowedResource("nodes")) {
|
||||||
|
promises.push(nodesStore.loadAll());
|
||||||
|
}
|
||||||
|
await Promise.all(promises);
|
||||||
|
|
||||||
eventStore.subscribe();
|
eventStore.subscribe();
|
||||||
nodesStore.subscribe();
|
nodesStore.subscribe();
|
||||||
podsStore.subscribe();
|
podsStore.subscribe();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user