mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed dashboard links not updating after variable or time range change, fixes #14493
This commit is contained in:
parent
41712c3957
commit
002f57ae00
@ -6,6 +6,7 @@ function dashLinksContainer() {
|
||||
return {
|
||||
scope: {
|
||||
links: '=',
|
||||
dashboard: '=',
|
||||
},
|
||||
restrict: 'E',
|
||||
controller: 'DashLinksContainerCtrl',
|
||||
@ -20,6 +21,8 @@ function dashLink($compile, $sanitize, linkSrv) {
|
||||
restrict: 'E',
|
||||
link: (scope, elem) => {
|
||||
const link = scope.link;
|
||||
const dashboard = scope.dashboard;
|
||||
|
||||
let template =
|
||||
'<div class="gf-form">' +
|
||||
'<a class="pointer gf-form-label" data-placement="bottom"' +
|
||||
@ -76,7 +79,7 @@ function dashLink($compile, $sanitize, linkSrv) {
|
||||
}
|
||||
|
||||
update();
|
||||
scope.$on('refresh', update);
|
||||
dashboard.events.on('refresh', update, scope);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div ng-if="ctrl.dashboard.links.length > 0" >
|
||||
<dash-links-container links="ctrl.dashboard.links" class="gf-form-inline"></dash-links-container>
|
||||
<dash-links-container links="ctrl.dashboard.links" dashboard="ctrl.dashboard" class="gf-form-inline"></dash-links-container>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user