mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Bump ogre-tools and adapt to breaking changes (#6481)
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
1 parent
2403e6d0cb
commit
646e953d47
12 files changed
+133
-108
No files matched your search
+25
-17
@@ -16,26 +16,34 @@ const activeHelmRepositoriesInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const requestFromChannel = di.inject(requestFromChannelInjectionToken);
|
||||
const showErrorNotification = di.inject(showErrorNotificationInjectable);
|
||||
const helmRepositoriesErrorState = di.inject(helmRepositoriesErrorStateInjectable);
|
||||
const helmRepositoriesErrorState = di.inject(
|
||||
helmRepositoriesErrorStateInjectable,
|
||||
);
|
||||
|
||||
return asyncComputed(async () => {
|
||||
const result = await requestFromChannel(getActiveHelmRepositoriesChannel);
|
||||
|
||||
if (result.callWasSuccessful) {
|
||||
return result.response;
|
||||
} else {
|
||||
showErrorNotification(result.error);
|
||||
|
||||
runInAction(() =>
|
||||
helmRepositoriesErrorState.set({
|
||||
controlsAreShown: false,
|
||||
errorMessage: result.error,
|
||||
}),
|
||||
return asyncComputed({
|
||||
getValueFromObservedPromise: async () => {
|
||||
const result = await requestFromChannel(
|
||||
getActiveHelmRepositoriesChannel,
|
||||
);
|
||||
|
||||
return [];
|
||||
}
|
||||
}, []);
|
||||
if (result.callWasSuccessful) {
|
||||
return result.response;
|
||||
} else {
|
||||
showErrorNotification(result.error);
|
||||
|
||||
runInAction(() =>
|
||||
helmRepositoriesErrorState.set({
|
||||
controlsAreShown: false,
|
||||
errorMessage: result.error,
|
||||
}),
|
||||
);
|
||||
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
valueWhenPending: [],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
+4
-3
@@ -12,9 +12,10 @@ const publicHelmRepositoriesInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const callForPublicHelmRepositories = di.inject(callForPublicHelmRepositoriesInjectable);
|
||||
|
||||
return asyncComputed(async () => {
|
||||
return await callForPublicHelmRepositories();
|
||||
}, []);
|
||||
return asyncComputed({
|
||||
getValueFromObservedPromise: callForPublicHelmRepositories,
|
||||
valueWhenPending: [],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user