diff --git a/package.json b/package.json index bd876eb67e..5bc2c803cc 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "dependencies": {}, "devDependencies": { "acorn": "6.2.0", - "angular": "1.4.14", + "angular": "1.7.9", "angular-route": "1.4.14", "babel-eslint": "8.2.6", "comma-separated-values": "^3.6.4", diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index bd85804f4c..cfd3f92d2b 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -87,6 +87,11 @@ define([ bootstrapper ); + // Override of angular1.6 ! hashPrefix + app.config(['$locationProvider', function ($locationProvider) { + $locationProvider.hashPrefix(''); + }]); + // Apply logging levels; this must be done now, before the // first log statement. new LogLevel(logLevel).configure(app, $log); diff --git a/src/plugins/plot/src/chart/MCTChartController.js b/src/plugins/plot/src/chart/MCTChartController.js index 54ca0e239a..aa086d412d 100644 --- a/src/plugins/plot/src/chart/MCTChartController.js +++ b/src/plugins/plot/src/chart/MCTChartController.js @@ -54,27 +54,29 @@ function ( * @constructor */ function MCTChartController($scope) { - this.$scope = $scope; - this.isDestroyed = false; - this.lines = []; - this.pointSets = []; - this.alarmSets = []; - this.offset = {}; - this.config = $scope.config; - this.listenTo(this.$scope, '$destroy', this.destroy, this); - this.draw = this.draw.bind(this); - this.scheduleDraw = this.scheduleDraw.bind(this); - this.seriesElements = new WeakMap(); + this.$onInit = () => { + this.$scope = $scope; + this.isDestroyed = false; + this.lines = []; + this.pointSets = []; + this.alarmSets = []; + this.offset = {}; + this.config = $scope.config; + this.listenTo(this.$scope, '$destroy', this.destroy, this); + this.draw = this.draw.bind(this); + this.scheduleDraw = this.scheduleDraw.bind(this); + this.seriesElements = new WeakMap(); - this.listenTo(this.config.series, 'add', this.onSeriesAdd, this); - this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this); - this.listenTo(this.config.yAxis, 'change:key', this.clearOffset, this); - this.listenTo(this.config.xAxis, 'change:key', this.clearOffset, this); - this.listenTo(this.config.yAxis, 'change', this.scheduleDraw); - this.listenTo(this.config.xAxis, 'change', this.scheduleDraw); - this.$scope.$watch('highlights', this.scheduleDraw); - this.$scope.$watch('rectangles', this.scheduleDraw); - this.config.series.forEach(this.onSeriesAdd, this); + this.listenTo(this.config.series, 'add', this.onSeriesAdd, this); + this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this); + this.listenTo(this.config.yAxis, 'change:key', this.clearOffset, this); + this.listenTo(this.config.xAxis, 'change:key', this.clearOffset, this); + this.listenTo(this.config.yAxis, 'change', this.scheduleDraw); + this.listenTo(this.config.xAxis, 'change', this.scheduleDraw); + this.$scope.$watch('highlights', this.scheduleDraw); + this.$scope.$watch('rectangles', this.scheduleDraw); + this.config.series.forEach(this.onSeriesAdd, this); + } } eventHelpers.extend(MCTChartController.prototype); diff --git a/src/plugins/plot/src/plot/MCTPlotController.js b/src/plugins/plot/src/plot/MCTPlotController.js index e22cf271c4..1156bc876a 100644 --- a/src/plugins/plot/src/plot/MCTPlotController.js +++ b/src/plugins/plot/src/plot/MCTPlotController.js @@ -34,25 +34,27 @@ define([ * values near the cursor. */ function MCTPlotController($scope, $element, $window) { - this.$scope = $scope; - this.$scope.config = this.config; - this.$scope.plot = this; - this.$element = $element; - this.$window = $window; + this.$onInit = () => { + this.$scope = $scope; + this.$scope.config = this.config; + this.$scope.plot = this; + this.$element = $element; + this.$window = $window; - this.xScale = new LinearScale(this.config.xAxis.get('displayRange')); - this.yScale = new LinearScale(this.config.yAxis.get('displayRange')); + this.xScale = new LinearScale(this.config.xAxis.get('displayRange')); + this.yScale = new LinearScale(this.config.yAxis.get('displayRange')); - this.pan = undefined; - this.marquee = undefined; + this.pan = undefined; + this.marquee = undefined; - this.chartElementBounds = undefined; - this.tickUpdate = false; + this.chartElementBounds = undefined; + this.tickUpdate = false; - this.$scope.plotHistory = this.plotHistory = []; - this.listenTo(this.$scope, 'plot:clearHistory', this.clear, this); + this.$scope.plotHistory = this.plotHistory = []; + this.listenTo(this.$scope, 'plot:clearHistory', this.clear, this); - this.initialize(); + this.initialize(); + } } MCTPlotController.$inject = ['$scope', '$element', '$window']; diff --git a/src/plugins/plot/src/plot/MCTTicksController.js b/src/plugins/plot/src/plot/MCTTicksController.js index 5ae128cd12..0ee55ed4b1 100644 --- a/src/plugins/plot/src/plot/MCTTicksController.js +++ b/src/plugins/plot/src/plot/MCTTicksController.js @@ -114,15 +114,17 @@ define([ } function MCTTicksController($scope, $element) { - this.$scope = $scope; - this.$element = $element; + this.$onInit = () => { + this.$scope = $scope; + this.$element = $element; - this.tickCount = 4; - this.tickUpdate = false; - this.listenTo(this.axis, 'change:displayRange', this.updateTicks, this); - this.listenTo(this.axis, 'change:format', this.updateTicks, this); - this.listenTo(this.$scope, '$destroy', this.stopListening, this); - this.updateTicks(); + this.tickCount = 4; + this.tickUpdate = false; + this.listenTo(this.axis, 'change:displayRange', this.updateTicks, this); + this.listenTo(this.axis, 'change:format', this.updateTicks, this); + this.listenTo(this.$scope, '$destroy', this.stopListening, this); + this.updateTicks(); + } } MCTTicksController.$inject = ['$scope', '$element'];