mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Templating: Introduce macros to simplify and optimize some scopedVars (#65317)
* Templating: Introduce macros to simplify and optimize some scopedVars * Fixing tests * fix test * minor fix * refactoring so macros work with formatting * remove breaking change and keep current inconsistency * Rename valueIndex to rowIndex * Minor fixes * Added test dashboard * Added tags to dashboard * Update * Added test to check it returns match * Update * Fixed dashboard * fix
This commit is contained in:
@@ -26,24 +26,15 @@ export class DashboardScene extends SceneObjectBase<DashboardSceneState> {
|
||||
public static Component = DashboardSceneRenderer;
|
||||
private urlSyncManager?: UrlSyncManager;
|
||||
|
||||
public activate() {
|
||||
super.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
* It's better to do this before activate / mount to not trigger unnessary re-renders
|
||||
*/
|
||||
public initUrlSync() {
|
||||
this.urlSyncManager = new UrlSyncManager(this);
|
||||
this.urlSyncManager.initSync();
|
||||
}
|
||||
|
||||
public deactivate() {
|
||||
super.deactivate();
|
||||
|
||||
if (this.urlSyncManager) {
|
||||
this.urlSyncManager!.cleanUp();
|
||||
if (!this.urlSyncManager) {
|
||||
this.urlSyncManager = new UrlSyncManager(this);
|
||||
}
|
||||
|
||||
this.urlSyncManager.initSync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user