Commit 0affb23c by Torkel Ödegaard Committed by GitHub

Merge pull request #14740 from simPod/some-cleanups

Some cleanup
parents dd6f606c c39dc1fb
......@@ -16,7 +16,7 @@ const BasicSettings: SFC<Props> = ({ dataSourceName, isDefault, onDefaultChange,
<div className="gf-form max-width-30" style={{ marginRight: '3px' }}>
<Label
tooltip={
'The name is used when you select the data source in panels. The Default data source is' +
'The name is used when you select the data source in panels. The Default data source is ' +
'preselected in new panels.'
}
>
......
......@@ -16,7 +16,7 @@ exports[`Render should render component 1`] = `
}
>
<Component
tooltip="The name is used when you select the data source in panels. The Default data source ispreselected in new panels."
tooltip="The name is used when you select the data source in panels. The Default data source is preselected in new panels."
>
Name
</Component>
......
import _ from 'lodash';
import React, { PureComponent } from 'react';
import classnames from 'classnames';
......
......@@ -55,7 +55,7 @@ class TypeaheadItem extends React.PureComponent<TypeaheadItemProps> {
interface TypeaheadGroupProps {
items: CompletionItem[];
label: string;
onClickItem: (CompletionItem) => void;
onClickItem: (suggestion: CompletionItem) => void;
selected: CompletionItem;
prefix?: string;
}
......
// Libraries
import _ from 'lodash';
// Services & utils
import coreModule from 'app/core/core_module';
import { Emitter } from 'app/core/utils/emitter';
......
......@@ -308,7 +308,7 @@ export default class InfluxDatasource {
return 'now()';
}
const parts = /^now-(\d+)([d|h|m|s])$/.exec(date);
const parts = /^now-(\d+)([dhms])$/.exec(date);
if (parts) {
const amount = parseInt(parts[1], 10);
const unit = parts[2];
......
import _ from 'lodash';
import React from 'react';
import Cascader from 'rc-cascader';
import PluginPrism from 'slate-prism';
......
......@@ -16,7 +16,6 @@ export default class StackdriverDatasource {
constructor(instanceSettings, private backendSrv, private templateSrv, private timeSrv) {
this.baseUrl = `/stackdriver/`;
this.url = instanceSettings.url;
this.doRequest = this.doRequest;
this.id = instanceSettings.id;
this.projectName = instanceSettings.jsonData.defaultProject || '';
this.authenticationType = instanceSettings.jsonData.authenticationType || 'jwt';
......
......@@ -88,7 +88,6 @@ export class StackdriverQueryCtrl extends QueryCtrl {
try {
jsonBody = JSON.parse(queryRes.error);
} catch {
this.lastQueryError = queryRes.error;
}
this.lastQueryError = jsonBody.error.message;
......
......@@ -251,7 +251,6 @@ export class HeatmapRenderer {
if (tickInterval === 0) {
yMax = max * this.dataRangeWidingFactor;
yMin = min - min * (this.dataRangeWidingFactor - 1);
tickInterval = (yMax - yMin) / 2;
} else {
yMax = Math.ceil((max + yWiding) / tickInterval) * tickInterval;
yMin = Math.floor((min - yWiding) / tickInterval) * tickInterval;
......@@ -389,9 +388,7 @@ export class HeatmapRenderer {
// Adjust data range to log base
adjustLogRange(min, max, logBase) {
let yMin, yMax;
yMin = this.data.heatmapStats.minLog;
let yMin = this.data.heatmapStats.minLog;
if (this.data.heatmapStats.minLog > 1 || !this.data.heatmapStats.minLog) {
yMin = 1;
} else {
......@@ -399,7 +396,7 @@ export class HeatmapRenderer {
}
// Adjust max Y value to log base
yMax = this.adjustLogMax(this.data.heatmapStats.max, logBase);
const yMax = this.adjustLogMax(this.data.heatmapStats.max, logBase);
return { yMin, yMax };
}
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
......
......@@ -3,9 +3,6 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = {
target: 'web',
stats: {
children: false
},
entry: {
app: './public/app/index.ts',
},
......@@ -25,6 +22,7 @@ module.exports = {
],
},
stats: {
children: false,
warningsFilter: /export .* was not found in/
},
node: {
......
......@@ -3,7 +3,6 @@
const merge = require('webpack-merge');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const common = require('./webpack.common.js');
const webpack = require('webpack');
const path = require('path');
const ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
const HtmlWebpackPlugin = require("html-webpack-plugin");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment