headlamp
headlamp copied to clipboard
plugin: Add plugin compatibility check UI
For https://github.com/headlamp-k8s/headlamp/issues/423#issuecomment-1831672945
- frontend: App: Move <Plugins> into AppContainer for snackbars
- frontend: plugin: Add warning snack about incompat plugins
- frontend: Fix npm run i18n to include missed files
How to test?
Get an old plugin with headlamp-plugin < 0.8.0.
git checkout v0.20.0
cp -a plugins/examples/pod-counter plugins/examples/pod-counter-old
git checkout -
cd plugins/examples/pod-counter-old
npm install
npm start
test the app has a settings plugin link
cd app
npm install
npm start
You should see the snackbar message with a link to the plugin settings.
In the frontend (not in app mode)
There should be no link to plugin settings on the snackbar warning.
I still see the plugin as being enabled after I get the incompatible notice.
@illume , if you prefer we can merge this and deal with disabling the plugin in a separate PR. But the current UX is a bit confusing as we're told the plugin is incompatible but it still looks like it's loaded/running.
@joaquimrocha Yeah, I can fix the settings view in this PR.
Thanks @knrt10 I updated that type, and added those translations.
I am seeing the same as previously commented, although not sure if the links are meant to be clickable as for me they aren't.
the plugins settings page looks to be up to speed! LGTM
Thanks @vyncent-t
Here's the action notifier now.
Here is the plugin settings screen in app mode.
Here it is NOT in app-mode.
Just reviewed the changes, color is now dark, enable is on app mode, enable not on web!