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() {
|
||||
console.log("hello");
|
||||
const cluster = getHostedCluster();
|
||||
await eventStore.loadAll();
|
||||
await nodesStore.loadAll();
|
||||
await podsStore.loadAll();
|
||||
const promises: Promise<void>[] = [];
|
||||
if (isAllowedResource("events") && isAllowedResource("pods")) {
|
||||
promises.push(eventStore.loadAll());
|
||||
promises.push(podsStore.loadAll());
|
||||
}
|
||||
if (isAllowedResource("nodes")) {
|
||||
promises.push(nodesStore.loadAll());
|
||||
}
|
||||
await Promise.all(promises);
|
||||
|
||||
eventStore.subscribe();
|
||||
nodesStore.subscribe();
|
||||
podsStore.subscribe();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user