[v10.4.x] Plugins: Angular deprecation: Fix AngularDeprecationNotice not being rendered on first page load (#83526)
Plugins: Angular deprecation: Fix AngularDeprecationNotice not being rendered on first page load (#83221)
* Plugins: Angular deprecation: Wait for plugins to be inizialized before rendering AngularDeprecationNotice
* use then
* fix tests
* mockCleanUpDashboardAndVariables.mockReset();
* Handle plugin not found
* PR review feedback
* Add comment
* removed unnecessary return
* PR review feedback
* Use grafanaBootData
* Removed comments
* fix tests
* Use config for hideDeprecation as well
(cherry picked from commit e068804a9e)
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
This commit is contained in:
committed by
GitHub
parent
09663d856d
commit
8290d41f4b
@@ -1342,7 +1342,9 @@ export class DashboardModel implements TimeModel {
|
||||
hasAngularPlugins(): boolean {
|
||||
return this.panels.some((panel) => {
|
||||
// Return false for plugins that are angular but have angular.hideDeprecation = false
|
||||
const isAngularPanel = panel.isAngularPlugin() && !panel.plugin?.meta.angular?.hideDeprecation;
|
||||
// We cannot use panel.plugin.isAngularPlugin() because panel.plugin may not be initialized at this stage.
|
||||
const isAngularPanel =
|
||||
config.panels[panel.type]?.angular?.detected && !config.panels[panel.type]?.angular?.hideDeprecation;
|
||||
let isAngularDs = false;
|
||||
if (panel.datasource?.uid) {
|
||||
isAngularDs = isAngularDatasourcePluginAndNotHidden(panel.datasource?.uid);
|
||||
|
||||
Reference in New Issue
Block a user