mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Upgrade to latest for all linting deps (#4755)
* Upgrade to eslint latest Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix OOM error Signed-off-by: Sebastian Malton <sebastian@malton.name> * resolve PR comments Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
2ad78c2a86
commit
38790eb886
35 files changed
+284
-470
No files matched your search
@@ -51,31 +51,34 @@ export class KubeObjectDetails extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
@disposeOnUnmount
|
||||
loader = reaction(() => [
|
||||
this.path,
|
||||
this.object, // resource might be updated via watch-event or from already opened details
|
||||
crdStore.items.length, // crd stores initialized after loading
|
||||
], async () => {
|
||||
this.loadingError = "";
|
||||
const { path, object } = this;
|
||||
componentDidMount(): void {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => [
|
||||
this.path,
|
||||
this.object, // resource might be updated via watch-event or from already opened details
|
||||
crdStore.items.length, // crd stores initialized after loading
|
||||
], async () => {
|
||||
this.loadingError = "";
|
||||
const { path, object } = this;
|
||||
|
||||
if (!object) {
|
||||
const store = apiManager.getStore(path);
|
||||
if (!object) {
|
||||
const store = apiManager.getStore(path);
|
||||
|
||||
if (store) {
|
||||
this.isLoading = true;
|
||||
if (store) {
|
||||
this.isLoading = true;
|
||||
|
||||
try {
|
||||
await store.loadFromPath(path);
|
||||
} catch (err) {
|
||||
this.loadingError = <>Resource loading has failed: <b>{err.toString()}</b></>;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
try {
|
||||
await store.loadFromPath(path);
|
||||
} catch (err) {
|
||||
this.loadingError = <>Resource loading has failed: <b>{err.toString()}</b></>;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { object, isLoading, loadingError } = this;
|
||||
|
||||
Reference in new issue
Block a user