Browse Source

fix npm run build

master
VargBurz 6 years ago
parent
commit
c11dd8cea9
  1. 2
      package.json
  2. 2
      src/controllers/analytic_controller.ts
  3. 4
      src/graph_renderer.ts
  4. 2
      src/module.ts

2
package.json

@ -22,6 +22,7 @@
"@types/md5": "^2.1.32",
"@types/moment": "^2.13.0",
"@types/perfect-scrollbar": "^1.3.0",
"@types/tinycolor": "^1.1.27",
"@types/tinycolor2": "^1.4.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
@ -32,6 +33,7 @@
"jquery": "^3.3.1",
"loader-utils": "^1.1.0",
"md5": "^2.2.1",
"tinycolor": "0.0.1",
"ts-jest": "^22.4.6",
"ts-loader": "^4.2.0",
"typescript": "^2.8.3",

2
src/controllers/analytic_controller.ts

@ -17,7 +17,7 @@ import { ANALYTIC_UNIT_COLORS } from '../colors';
import { Emitter } from 'grafana/app/core/utils/emitter';
import _ from 'lodash';
import * as tinycolor from 'tinycolor2';
export const REGION_FILL_ALPHA = 0.7;
export const REGION_STROKE_ALPHA = 0.9;

4
src/graph_renderer.ts

@ -619,13 +619,13 @@ export class GraphRenderer {
}
private _addXTableAxis() {
var ticks = _.map(this.data, function(series: any, seriesIndex) {
var ticks = _.map(this.data, function(series: any, seriesIndex: any) {
return _.map(series.datapoints, function(point, pointIndex) {
var tickIndex = seriesIndex * series.datapoints.length + pointIndex;
return [tickIndex + 1, point[1]];
});
});
ticks = _.flatten(ticks, true);
ticks = _.flatten(ticks);
this.flotOptions.xaxis = {
timezone: this.dashboard.getTimezone(),

2
src/module.ts

@ -448,7 +448,7 @@ class GraphCtrl extends MetricsPanelCtrl {
}
toggleAxis(info) {
var override = _.find(this.panel.seriesOverrides, { alias: info.alias });
var override: any = _.find(this.panel.seriesOverrides, { alias: info.alias });
if (!override) {
override = { alias: info.alias };
this.panel.seriesOverrides.push(override);

Loading…
Cancel
Save