Skip to content

Commit

Permalink
Fix exception in Grafana 8 when using the Graph Panel (#100)
Browse files Browse the repository at this point in the history
* fix exception for graph plugin

* bump datasource version
  • Loading branch information
smithclay authored Feb 24, 2022
1 parent 5cc2098 commit b9f4ee4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lightstep-datasource/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md"
}
],
"version": "1.2.2",
"version": "1.2.3",
"updated": "2022-02-16"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/lightstep-graph/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class GraphCtrl extends MetricsPanelCtrl {

/** @ngInject */
constructor($scope, $injector, annotationsSrv) {
// hack for Grafana 8+
if ($scope.ctrl.events === undefined) {
$scope.ctrl.events = { emit: function() {} };
}

super($scope, $injector);
this.$scope = $scope
this.$injector = $injector;
Expand Down
2 changes: 1 addition & 1 deletion src/lightstep-graph/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md"
}
],
"version": "1.2.2",
"version": "1.2.3",
"updated": "2022-02-17"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md"
}
],
"version": "1.2.2",
"version": "1.2.3",
"updated": "2022-02-15"
},
"includes": [
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
target: 'node',
context: __dirname + "/src/lightstep-graph",
entry: './module.js',
mode: 'development',
// watch: true, // uncomment if you want "dev mode watching"
devtool: 'source-map',
output: {
Expand Down

0 comments on commit b9f4ee4

Please sign in to comment.