-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins: Allow disabling angular deprecation UI for specific plugins #77026
Plugins: Allow disabling angular deprecation UI for specific plugins #77026
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this looks good! I have added a suggestion about grouping the properties together in a struct and also revisit the types on the frontend since I believe we have added the properties incorrectly to the plugin meta type.
pkg/plugins/models.go
Outdated
AngularDetected bool `json:"angularDetected"` | ||
HideAngularDeprecation bool `json:"hideAngularDeprecation"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to group these into an angular struct? Something like: type Angular struct { Detected: bool HideDeprecation: bool }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it makes sense. I tried avoiding it so we don't introduce a breaking change. However this piece of information is currently being used only by the sandbox and detect-angular-dashboards, as far as I know. Since we own both pieces, and it was suggested also in the original PR, I will do it the way you suggested 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I got the functionality working for the akumuli-datasource
but I couldn't get it to work for the graph
.
This was the config I used:
[plugin.graph]
hide_angular_deprecation = true
Good catch! I have fixed the issue here: 7880738. However,
However |
What is this feature?
Adds
hideAngularDeprecation
to frontendsettings for each plugin. This field is set by the backend if the config containshide_angular_deprecation = true
in the plugin's settings:When this is true, the angular deprecation UI elements for that particular plugin will be hidden from dashboards. This does not affect other code relying on Angular detection (e.g.: plugins sandboxing), but it only hides the following UI elements from dashboards:
Why do we need this feature?
Rework of #71067 without breaking changes, as detect-angular-dashboards now depends on it. Due to it the previous PR got stale and was never merged.
Who is this feature for?
Grafana users relying on Angular plugins.
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: