Merge pull request #6653 from epixa/letconst
[internal] Replace empty var declarations with let
This commit is contained in:
commit
914763874d
|
@ -85,7 +85,7 @@ describe('lib/config/config', function () {
|
|||
|
||||
describe('#resetTo(object)', function () {
|
||||
|
||||
var config;
|
||||
let config;
|
||||
beforeEach(function () {
|
||||
config = new Config(schema);
|
||||
});
|
||||
|
@ -102,7 +102,7 @@ describe('lib/config/config', function () {
|
|||
|
||||
describe('#has(key)', function () {
|
||||
|
||||
var config;
|
||||
let config;
|
||||
beforeEach(function () {
|
||||
config = new Config(schema);
|
||||
});
|
||||
|
@ -122,7 +122,7 @@ describe('lib/config/config', function () {
|
|||
});
|
||||
|
||||
describe('#set(key, value)', function () {
|
||||
var config;
|
||||
let config;
|
||||
|
||||
beforeEach(function () {
|
||||
config = new Config(schema);
|
||||
|
@ -171,7 +171,7 @@ describe('lib/config/config', function () {
|
|||
|
||||
describe('#get(key)', function () {
|
||||
|
||||
var config;
|
||||
let config;
|
||||
|
||||
beforeEach(function () {
|
||||
config = new Config(schema);
|
||||
|
@ -210,7 +210,7 @@ describe('lib/config/config', function () {
|
|||
});
|
||||
|
||||
describe('#extendSchema(key, schema)', function () {
|
||||
var config;
|
||||
let config;
|
||||
beforeEach(function () {
|
||||
config = new Config(schema);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
module.exports = function (dot, nestedObj, flattenArrays) {
|
||||
var key; // original key
|
||||
let key; // original key
|
||||
var stack = []; // track key stack
|
||||
var flatObj = {};
|
||||
(function flattenObj(obj) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import Status from '../status';
|
|||
import ServerStatus from '../server_status';
|
||||
|
||||
describe('ServerStatus class', function () {
|
||||
var server;
|
||||
var serverStatus;
|
||||
let server;
|
||||
let serverStatus;
|
||||
|
||||
beforeEach(function () {
|
||||
server = { expose: sinon.stub(), log: sinon.stub() };
|
||||
|
|
|
@ -4,8 +4,8 @@ import Status from '../status';
|
|||
import ServerStatus from '../server_status';
|
||||
|
||||
describe('Status class', function () {
|
||||
var server;
|
||||
var serverStatus;
|
||||
let server;
|
||||
let serverStatus;
|
||||
|
||||
beforeEach(function () {
|
||||
server = { expose: sinon.stub(), log: sinon.stub() };
|
||||
|
|
|
@ -9,11 +9,11 @@ import AggResponseTabifyTabifyProvider from 'ui/agg_response/tabify/tabify';
|
|||
import AggResponseGeoJsonGeoJsonProvider from 'ui/agg_response/geo_json/geo_json';
|
||||
|
||||
describe('GeoJson Agg Response Converter', function () {
|
||||
var vis;
|
||||
var tabify;
|
||||
var convert;
|
||||
var esResponse;
|
||||
var aggs;
|
||||
let vis;
|
||||
let tabify;
|
||||
let convert;
|
||||
let esResponse;
|
||||
let aggs;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
@ -108,10 +108,10 @@ describe('GeoJson Agg Response Converter', function () {
|
|||
describe('includes one feature per row in the table', function () {
|
||||
this.timeout(60000);
|
||||
|
||||
var table;
|
||||
var chart;
|
||||
var geoColI;
|
||||
var metricColI;
|
||||
let table;
|
||||
let chart;
|
||||
let geoColI;
|
||||
let metricColI;
|
||||
|
||||
before(function () {
|
||||
table = makeTable();
|
||||
|
|
|
@ -4,7 +4,7 @@ import expect from 'expect.js';
|
|||
describe('buildHierarchicalData()', function () {
|
||||
describe('arrayToLinkedList', function () {
|
||||
|
||||
var results;
|
||||
let results;
|
||||
beforeEach(function () {
|
||||
results = arrayToLinkedList([
|
||||
{ id: 1 },
|
||||
|
|
|
@ -9,11 +9,11 @@ import VisAggConfigsProvider from 'ui/vis/agg_configs';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
import AggResponseHierarchicalBuildHierarchicalDataProvider from 'ui/agg_response/hierarchical/build_hierarchical_data';
|
||||
|
||||
var Vis;
|
||||
var Notifier;
|
||||
var AggConfigs;
|
||||
var indexPattern;
|
||||
var buildHierarchicalData;
|
||||
let Vis;
|
||||
let Notifier;
|
||||
let AggConfigs;
|
||||
let indexPattern;
|
||||
let buildHierarchicalData;
|
||||
|
||||
describe('buildHierarchicalData', function () {
|
||||
|
||||
|
@ -31,8 +31,8 @@ describe('buildHierarchicalData', function () {
|
|||
|
||||
|
||||
describe('metric only', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
@ -103,8 +103,8 @@ describe('buildHierarchicalData', function () {
|
|||
});
|
||||
|
||||
describe('threeTermBuckets', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
@ -145,8 +145,8 @@ describe('buildHierarchicalData', function () {
|
|||
});
|
||||
|
||||
describe('oneHistogramBucket', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
@ -177,8 +177,8 @@ describe('buildHierarchicalData', function () {
|
|||
});
|
||||
|
||||
describe('oneRangeBucket', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
@ -218,8 +218,8 @@ describe('buildHierarchicalData', function () {
|
|||
});
|
||||
|
||||
describe('oneFilterBucket', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
@ -254,8 +254,8 @@ describe('buildHierarchicalData', function () {
|
|||
});
|
||||
|
||||
describe('oneFilterBucket that is a split', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(function () {
|
||||
var id = 1;
|
||||
|
|
|
@ -3,7 +3,7 @@ import _ from 'lodash';
|
|||
import collectBranch from 'ui/agg_response/hierarchical/_collect_branch';
|
||||
import expect from 'expect.js';
|
||||
describe('collectBranch()', function () {
|
||||
var results;
|
||||
let results;
|
||||
var convert = function (name) {
|
||||
return 'converted:' + name;
|
||||
};
|
||||
|
|
|
@ -9,14 +9,14 @@ import VisProvider from 'ui/vis';
|
|||
import VisAggConfigsProvider from 'ui/vis/agg_configs';
|
||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
|
||||
var AggConfigs;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let AggConfigs;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
describe('buildHierarchicalData()', function () {
|
||||
describe('createRawData()', function () {
|
||||
var vis;
|
||||
var results;
|
||||
let vis;
|
||||
let results;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import AggResponseHierarchicalTransformAggregationProvider from 'ui/agg_response
|
|||
|
||||
describe('buildHierarchicalData()', function () {
|
||||
describe('transformAggregation()', function () {
|
||||
var transform;
|
||||
var fixture;
|
||||
let transform;
|
||||
let fixture;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
export default function (buckets) {
|
||||
var previous;
|
||||
let previous;
|
||||
_.each(buckets, function (bucket) {
|
||||
if (previous) {
|
||||
bucket._previous = previous;
|
||||
|
|
|
@ -21,7 +21,7 @@ export default function HierarchicalTooltipFormaterProvider($rootScope, $compile
|
|||
_.forEachRight($tooltipScope.rows, function (row, i, rows) {
|
||||
row.spacer = $sce.trustAsHtml(_.repeat(' ', row.depth));
|
||||
|
||||
var percent;
|
||||
let percent;
|
||||
if (row.item.percentOfGroup != null) {
|
||||
percent = row.item.percentOfGroup;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
import AggResponsePointSeriesAddToSiriProvider from 'ui/agg_response/point_series/_add_to_siri';
|
||||
describe('addToSiri', function () {
|
||||
var addToSiri;
|
||||
let addToSiri;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -6,11 +6,11 @@ import AggTypesAggTypeProvider from 'ui/agg_types/agg_type';
|
|||
import AggResponsePointSeriesFakeXAspectProvider from 'ui/agg_response/point_series/_fake_x_aspect';
|
||||
describe('makeFakeXAspect', function () {
|
||||
|
||||
var makeFakeXAspect;
|
||||
var Vis;
|
||||
var AggType;
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
let makeFakeXAspect;
|
||||
let Vis;
|
||||
let AggType;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -9,11 +9,11 @@ import AggResponsePointSeriesGetAspectsProvider from 'ui/agg_response/point_seri
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('getAspects', function () {
|
||||
|
||||
var Vis;
|
||||
var Table;
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var getAspects;
|
||||
let Vis;
|
||||
let Table;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let getAspects;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
@ -24,8 +24,8 @@ describe('getAspects', function () {
|
|||
indexPattern = Private(FixturesStubbedLogstashIndexPatternProvider);
|
||||
}));
|
||||
|
||||
var vis;
|
||||
var table;
|
||||
let vis;
|
||||
let table;
|
||||
|
||||
var date = _.memoize(function (n) {
|
||||
return moment().startOf('day').add(n, 'hour').valueOf();
|
||||
|
|
|
@ -5,7 +5,7 @@ import AggResponsePointSeriesGetPointProvider from 'ui/agg_response/point_series
|
|||
|
||||
describe('getPoint', function () {
|
||||
|
||||
var getPoint;
|
||||
let getPoint;
|
||||
|
||||
var truthFormatted = { fieldFormatter: _.constant(_.constant(true)) };
|
||||
var identFormatted = { fieldFormatter: _.constant(_.identity) };
|
||||
|
@ -16,10 +16,10 @@ describe('getPoint', function () {
|
|||
}));
|
||||
|
||||
describe('Without series aspect', function () {
|
||||
var seriesAspect;
|
||||
var xAspect;
|
||||
var yAspect;
|
||||
var yScale;
|
||||
let seriesAspect;
|
||||
let xAspect;
|
||||
let yAspect;
|
||||
let yScale;
|
||||
|
||||
beforeEach(function () {
|
||||
seriesAspect = null;
|
||||
|
@ -49,10 +49,10 @@ describe('getPoint', function () {
|
|||
});
|
||||
|
||||
describe('With series aspect', function () {
|
||||
var row;
|
||||
var xAspect;
|
||||
var yAspect;
|
||||
var yScale;
|
||||
let row;
|
||||
let xAspect;
|
||||
let yAspect;
|
||||
let yScale;
|
||||
|
||||
beforeEach(function () {
|
||||
row = [ { value: 1 }, { value: 2 }, { value: 3 }];
|
||||
|
|
|
@ -3,7 +3,7 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
import AggResponsePointSeriesGetSeriesProvider from 'ui/agg_response/point_series/_get_series';
|
||||
describe('getSeries', function () {
|
||||
var getSeries;
|
||||
let getSeries;
|
||||
|
||||
var agg = { fieldFormatter: _.constant(_.identity) };
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import ngMock from 'ng_mock';
|
|||
import AggResponsePointSeriesInitXAxisProvider from 'ui/agg_response/point_series/_init_x_axis';
|
||||
describe('initXAxis', function () {
|
||||
|
||||
var initXAxis;
|
||||
let initXAxis;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import ngMock from 'ng_mock';
|
|||
import AggResponsePointSeriesInitYAxisProvider from 'ui/agg_response/point_series/_init_y_axis';
|
||||
describe('initYAxis', function () {
|
||||
|
||||
var initYAxis;
|
||||
let initYAxis;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -11,10 +11,10 @@ describe('pointSeriesChartDataFromTable', function () {
|
|||
this.slow(1000);
|
||||
|
||||
|
||||
var pointSeriesChartDataFromTable;
|
||||
var indexPattern;
|
||||
var Table;
|
||||
var Vis;
|
||||
let pointSeriesChartDataFromTable;
|
||||
let indexPattern;
|
||||
let Table;
|
||||
let Vis;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('orderedDateAxis', function () {
|
|||
}
|
||||
};
|
||||
|
||||
var orderedDateAxis;
|
||||
let orderedDateAxis;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import ngMock from 'ng_mock';
|
|||
import AggResponsePointSeriesTooltipFormatterProvider from 'ui/agg_response/point_series/_tooltip_formatter';
|
||||
describe('tooltipFormatter', function () {
|
||||
|
||||
var tooltipFormatter;
|
||||
let tooltipFormatter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -37,7 +37,7 @@ export default function PointSeriesGetSeries(Private) {
|
|||
if (multiY) {
|
||||
series = _.sortBy(series, function (siri) {
|
||||
var firstVal = siri.values[0];
|
||||
var y;
|
||||
let y;
|
||||
|
||||
if (firstVal) {
|
||||
var agg = firstVal.aggConfigResult.aggConfig;
|
||||
|
|
|
@ -2,7 +2,7 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
import AggResponseTabifyBucketsProvider from 'ui/agg_response/tabify/_buckets';
|
||||
describe('Buckets wrapper', function () {
|
||||
var Buckets;
|
||||
let Buckets;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
|
|
@ -4,9 +4,9 @@ import AggResponseTabifyGetColumnsProvider from 'ui/agg_response/tabify/_get_col
|
|||
import VisProvider from 'ui/vis';
|
||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('get columns', function () {
|
||||
var getColumns;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let getColumns;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import VisProvider from 'ui/vis';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('tabifyAggResponse Integration', function () {
|
||||
|
||||
var Vis;
|
||||
var Buckets;
|
||||
var indexPattern;
|
||||
var tabifyAggResponse;
|
||||
let Vis;
|
||||
let Buckets;
|
||||
let indexPattern;
|
||||
let tabifyAggResponse;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
@ -46,12 +46,12 @@ describe('tabifyAggResponse Integration', function () {
|
|||
describe('transforms a complex response', function () {
|
||||
this.slow(1000);
|
||||
|
||||
var vis;
|
||||
var avg;
|
||||
var ext;
|
||||
var src;
|
||||
var os;
|
||||
var esResp;
|
||||
let vis;
|
||||
let avg;
|
||||
let ext;
|
||||
let src;
|
||||
let os;
|
||||
let esResp;
|
||||
|
||||
beforeEach(function () {
|
||||
vis = new Vis(indexPattern, {
|
||||
|
|
|
@ -10,14 +10,14 @@ import VisProvider from 'ui/vis';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('ResponseWriter class', function () {
|
||||
|
||||
var Vis;
|
||||
var Table;
|
||||
var Buckets;
|
||||
var Private;
|
||||
var TableGroup;
|
||||
var getColumns;
|
||||
var indexPattern;
|
||||
var ResponseWriter;
|
||||
let Vis;
|
||||
let Table;
|
||||
let Buckets;
|
||||
let Private;
|
||||
let TableGroup;
|
||||
let getColumns;
|
||||
let indexPattern;
|
||||
let ResponseWriter;
|
||||
|
||||
function defineSetup(stubGetColumns) {
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -4,7 +4,7 @@ import ngMock from 'ng_mock';
|
|||
import AggResponseTabifyTableProvider from 'ui/agg_response/tabify/_table';
|
||||
describe('Table class', function () {
|
||||
|
||||
var Table;
|
||||
let Table;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
import AggResponseTabifyTableGroupProvider from 'ui/agg_response/tabify/_table_group';
|
||||
describe('Table Group class', function () {
|
||||
var TableGroup;
|
||||
let TableGroup;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
|
|
@ -8,11 +8,11 @@ import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logsta
|
|||
import VisProvider from 'ui/vis';
|
||||
describe('AggTableGroup Directive', function () {
|
||||
|
||||
var $rootScope;
|
||||
var $compile;
|
||||
var tabifyAggResponse;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let $rootScope;
|
||||
let $compile;
|
||||
let tabifyAggResponse;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function ($injector, Private) {
|
||||
|
@ -24,7 +24,7 @@ describe('AggTableGroup Directive', function () {
|
|||
$compile = $injector.get('$compile');
|
||||
}));
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
beforeEach(function () {
|
||||
$scope = $rootScope.$new();
|
||||
});
|
||||
|
|
|
@ -9,11 +9,11 @@ import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logsta
|
|||
import VisProvider from 'ui/vis';
|
||||
describe('AggTable Directive', function () {
|
||||
|
||||
var $rootScope;
|
||||
var $compile;
|
||||
var tabifyAggResponse;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let $rootScope;
|
||||
let $compile;
|
||||
let tabifyAggResponse;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function ($injector, Private) {
|
||||
|
@ -25,7 +25,7 @@ describe('AggTable Directive', function () {
|
|||
$compile = $injector.get('$compile');
|
||||
}));
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
beforeEach(function () {
|
||||
$scope = $rootScope.$new();
|
||||
});
|
||||
|
@ -134,7 +134,7 @@ describe('AggTable Directive', function () {
|
|||
});
|
||||
|
||||
describe('aggTable.exportAsCsv()', function () {
|
||||
var origBlob;
|
||||
let origBlob;
|
||||
function FakeBlob(slices, opts) {
|
||||
this.slices = slices;
|
||||
this.opts = opts;
|
||||
|
|
|
@ -8,11 +8,11 @@ import AggTypesParamTypesOptionedProvider from 'ui/agg_types/param_types/optione
|
|||
import AggTypesParamTypesRegexProvider from 'ui/agg_types/param_types/regex';
|
||||
describe('AggParams class', function () {
|
||||
|
||||
var AggParams;
|
||||
var BaseAggParam;
|
||||
var FieldAggParam;
|
||||
var OptionedAggParam;
|
||||
var RegexAggParam;
|
||||
let AggParams;
|
||||
let BaseAggParam;
|
||||
let FieldAggParam;
|
||||
let OptionedAggParam;
|
||||
let RegexAggParam;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
// stub out the param classes before we get the AggParams
|
||||
|
|
|
@ -10,12 +10,12 @@ import AggTypesAggTypeProvider from 'ui/agg_types/agg_type';
|
|||
import VisAggConfigProvider from 'ui/vis/agg_config';
|
||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('AggType Class', function () {
|
||||
var AggType;
|
||||
var AggParams;
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var fieldFormat;
|
||||
var Vis;
|
||||
let AggType;
|
||||
let AggParams;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let fieldFormat;
|
||||
let Vis;
|
||||
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -8,12 +8,12 @@ import AggTypesIndexProvider from 'ui/agg_types/index';
|
|||
import VisAggConfigProvider from 'ui/vis/agg_config';
|
||||
import AggTypesBucketsBucketCountBetweenProvider from 'ui/agg_types/buckets/_bucket_count_between';
|
||||
describe('bucketCountBetween util', function () {
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var visTypes;
|
||||
var aggTypes;
|
||||
var AggConfig;
|
||||
var bucketCountBetween;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let visTypes;
|
||||
let aggTypes;
|
||||
let AggConfig;
|
||||
let bucketCountBetween;
|
||||
|
||||
// http://cwestblog.com/2014/02/25/javascript-testing-for-negative-zero/
|
||||
// works for -0 and +0
|
||||
|
|
|
@ -6,7 +6,7 @@ import AggParamWriterProvider from '../agg_param_writer';
|
|||
describe('Histogram Agg', function () {
|
||||
|
||||
describe('ordered', function () {
|
||||
var histogram;
|
||||
let histogram;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
@ -24,7 +24,7 @@ describe('Histogram Agg', function () {
|
|||
|
||||
|
||||
describe('params', function () {
|
||||
var paramWriter;
|
||||
let paramWriter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -11,9 +11,9 @@ describe('Range Agg', function () {
|
|||
|
||||
var buckets = values(resp.aggregations[1].buckets);
|
||||
|
||||
var range;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let range;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -12,16 +12,16 @@ import AggTypesBucketsIntervalOptionsProvider from 'ui/agg_types/buckets/_interv
|
|||
describe('AggConfig Filters', function () {
|
||||
describe('date_histogram', function () {
|
||||
|
||||
var vis;
|
||||
var agg;
|
||||
var field;
|
||||
var filter;
|
||||
var bucketKey;
|
||||
var bucketStart;
|
||||
var getIntervalStub;
|
||||
var intervalOptions;
|
||||
let vis;
|
||||
let agg;
|
||||
let field;
|
||||
let filter;
|
||||
let bucketKey;
|
||||
let bucketStart;
|
||||
let getIntervalStub;
|
||||
let intervalOptions;
|
||||
|
||||
var init;
|
||||
let init;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
@ -84,7 +84,7 @@ describe('AggConfig Filters', function () {
|
|||
|
||||
it('extends the filter edge to 1ms before the next bucket for all interval options', function () {
|
||||
intervalOptions.forEach(function (option) {
|
||||
var duration;
|
||||
let duration;
|
||||
if (option.val !== 'custom' && moment(1, option.val).isValid()) {
|
||||
duration = moment.duration(10, option.val);
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ import AggTypesBucketsCreateFilterDateRangeProvider from 'ui/agg_types/buckets/c
|
|||
|
||||
describe('AggConfig Filters', function () {
|
||||
describe('Date range', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -9,10 +9,10 @@ import AggTypesBucketsCreateFilterFiltersProvider from 'ui/agg_types/buckets/cre
|
|||
|
||||
describe('AggConfig Filters', function () {
|
||||
describe('filters', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -9,10 +9,10 @@ import AggTypesBucketsCreateFilterHistogramProvider from 'ui/agg_types/buckets/c
|
|||
|
||||
describe('AggConfig Filters', function () {
|
||||
describe('histogram', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import AggTypesBucketsCreateFilterIpRangeProvider from 'ui/agg_types/buckets/cre
|
|||
describe('AggConfig Filters', function () {
|
||||
|
||||
describe('IP range', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import AggTypesBucketsCreateFilterRangeProvider from 'ui/agg_types/buckets/creat
|
|||
describe('AggConfig Filters', function () {
|
||||
|
||||
describe('range', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import AggTypesBucketsCreateFilterTermsProvider from 'ui/agg_types/buckets/creat
|
|||
describe('AggConfig Filters', function () {
|
||||
|
||||
describe('terms', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -7,11 +7,11 @@ import VisProvider from 'ui/vis';
|
|||
import AggTypesBucketsIntervalOptionsProvider from 'ui/agg_types/buckets/_interval_options';
|
||||
describe('editor', function () {
|
||||
|
||||
var indexPattern;
|
||||
var vis;
|
||||
var agg;
|
||||
var render;
|
||||
var $scope;
|
||||
let indexPattern;
|
||||
let vis;
|
||||
let agg;
|
||||
let render;
|
||||
let $scope;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector, $compile) {
|
||||
|
@ -69,9 +69,9 @@ describe('editor', function () {
|
|||
}));
|
||||
|
||||
describe('random field/interval', function () {
|
||||
var params;
|
||||
var field;
|
||||
var interval;
|
||||
let params;
|
||||
let field;
|
||||
let interval;
|
||||
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
field = _.sample(indexPattern.fields);
|
||||
|
@ -97,7 +97,7 @@ describe('editor', function () {
|
|||
});
|
||||
|
||||
describe('interval "auto" and indexPattern timeField', function () {
|
||||
var params;
|
||||
let params;
|
||||
|
||||
beforeEach(function () {
|
||||
params = render({ field: indexPattern.timeFieldName, interval: 'auto' });
|
||||
|
|
|
@ -8,13 +8,13 @@ import AggTypesIndexProvider from 'ui/agg_types/index';
|
|||
import VisAggConfigProvider from 'ui/vis/agg_config';
|
||||
describe('params', function () {
|
||||
|
||||
var paramWriter;
|
||||
var writeInterval;
|
||||
let paramWriter;
|
||||
let writeInterval;
|
||||
|
||||
var aggTypes;
|
||||
var AggConfig;
|
||||
var setTimeBounds;
|
||||
var timeField;
|
||||
let aggTypes;
|
||||
let AggConfig;
|
||||
let setTimeBounds;
|
||||
let timeField;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private, $injector) {
|
||||
|
|
|
@ -7,9 +7,9 @@ import 'ui/number_list';
|
|||
describe('NumberList directive', function () {
|
||||
|
||||
|
||||
var $el;
|
||||
var $scope;
|
||||
var compile;
|
||||
let $el;
|
||||
let $scope;
|
||||
let compile;
|
||||
|
||||
function onlyValidValues() {
|
||||
return $el.find('[ng-model]').toArray().map(function (el) {
|
||||
|
|
|
@ -12,8 +12,8 @@ import AggTypesMetricsMetricAggTypeProvider from 'ui/agg_types/metrics/metric_ag
|
|||
describe('AggTypesComponent', function () {
|
||||
|
||||
describe('bucket aggs', function () {
|
||||
var bucketAggs;
|
||||
var BucketAggType;
|
||||
let bucketAggs;
|
||||
let BucketAggType;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
@ -29,8 +29,8 @@ describe('AggTypesComponent', function () {
|
|||
});
|
||||
|
||||
describe('metric aggs', function () {
|
||||
var metricAggs;
|
||||
var MetricAggType;
|
||||
let metricAggs;
|
||||
let MetricAggType;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -7,11 +7,11 @@ import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logsta
|
|||
import AggTypesParamTypesCalculateIntervalProvider from 'ui/agg_types/param_types/_calculate_interval';
|
||||
|
||||
describe('calculateInterval()', function () {
|
||||
var AggConfig;
|
||||
var indexPattern;
|
||||
var Vis;
|
||||
var createFilter;
|
||||
var calculateInterval;
|
||||
let AggConfig;
|
||||
let indexPattern;
|
||||
let Vis;
|
||||
let createFilter;
|
||||
let calculateInterval;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import AggTypesParamTypesBaseProvider from 'ui/agg_types/param_types/base';
|
|||
import AggTypesParamTypesFieldProvider from 'ui/agg_types/param_types/field';
|
||||
describe('Field', function () {
|
||||
|
||||
var BaseAggParam;
|
||||
var FieldAggParam;
|
||||
let BaseAggParam;
|
||||
let FieldAggParam;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
// fetch out deps
|
||||
|
|
|
@ -5,8 +5,8 @@ import AggTypesParamTypesBaseProvider from 'ui/agg_types/param_types/base';
|
|||
import AggTypesParamTypesOptionedProvider from 'ui/agg_types/param_types/optioned';
|
||||
describe('Optioned', function () {
|
||||
|
||||
var BaseAggParam;
|
||||
var OptionedAggParam;
|
||||
let BaseAggParam;
|
||||
let OptionedAggParam;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
// fetch out deps
|
||||
|
|
|
@ -7,11 +7,11 @@ import AggTypesParamTypesRawJsonProvider from 'ui/agg_types/param_types/raw_json
|
|||
|
||||
module.exports = describe('JSON', function () {
|
||||
var paramName = 'json_test';
|
||||
var BaseAggParam;
|
||||
var JsonAggParam;
|
||||
var aggParam;
|
||||
var aggConfig;
|
||||
var output;
|
||||
let BaseAggParam;
|
||||
let JsonAggParam;
|
||||
let aggParam;
|
||||
let aggConfig;
|
||||
let output;
|
||||
|
||||
function initAggParam(config) {
|
||||
config = config || {};
|
||||
|
|
|
@ -7,10 +7,10 @@ import VisProvider from 'ui/vis';
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
describe('Regex', function () {
|
||||
|
||||
var BaseAggParam;
|
||||
var RegexAggParam;
|
||||
var Vis;
|
||||
var indexPattern;
|
||||
let BaseAggParam;
|
||||
let RegexAggParam;
|
||||
let Vis;
|
||||
let indexPattern;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
// fetch out deps
|
||||
|
@ -34,8 +34,8 @@ describe('Regex', function () {
|
|||
});
|
||||
|
||||
describe('write results', function () {
|
||||
var aggParam;
|
||||
var aggConfig;
|
||||
let aggParam;
|
||||
let aggConfig;
|
||||
var output = { params: {} };
|
||||
var paramName = 'exclude';
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import AggTypesParamTypesStringProvider from 'ui/agg_types/param_types/string';
|
|||
|
||||
module.exports = describe('String', function () {
|
||||
var paramName = 'json_test';
|
||||
var BaseAggParam;
|
||||
var StringAggParam;
|
||||
var aggParam;
|
||||
var aggConfig;
|
||||
var output;
|
||||
let BaseAggParam;
|
||||
let StringAggParam;
|
||||
let aggParam;
|
||||
let aggConfig;
|
||||
let output;
|
||||
|
||||
function initAggParam(config) {
|
||||
config = config || {};
|
||||
|
|
|
@ -2,7 +2,7 @@ import CidrMask from 'ui/utils/cidr_mask';
|
|||
import buildRangeFilter from 'ui/filter_manager/lib/range';
|
||||
export default function createIpRangeFilterProvider() {
|
||||
return function (aggConfig, key) {
|
||||
var range;
|
||||
let range;
|
||||
if (aggConfig.params.ipRangeType === 'mask') {
|
||||
range = new CidrMask(key).getRange();
|
||||
} else {
|
||||
|
|
|
@ -45,7 +45,7 @@ export default function DateHistogramAggType(timefilter, config, Private) {
|
|||
},
|
||||
createFilter: createFilter,
|
||||
decorateAggConfig: function () {
|
||||
var buckets;
|
||||
let buckets;
|
||||
return {
|
||||
buckets: {
|
||||
configurable: true,
|
||||
|
|
|
@ -25,7 +25,7 @@ export default function RawJSONAggParamFactory(Private) {
|
|||
* @return {undefined}
|
||||
*/
|
||||
RawJSONAggParam.prototype.write = function (aggConfig, output) {
|
||||
var paramJSON;
|
||||
let paramJSON;
|
||||
var param = aggConfig.params[this.name];
|
||||
|
||||
if (!param) {
|
||||
|
|
|
@ -3,8 +3,8 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
describe('$scope.$bind', function () {
|
||||
|
||||
var $rootScope;
|
||||
var $scope;
|
||||
let $rootScope;
|
||||
let $scope;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function ($injector) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import Binder from 'ui/binder';
|
|||
import $ from 'jquery';
|
||||
|
||||
describe('Binder class', function () {
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function ($rootScope) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'ui/chrome';
|
|||
import '../app_switcher';
|
||||
|
||||
describe('appSwitcher directive', function () {
|
||||
var env;
|
||||
let env;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ uiModules
|
|||
|
||||
// Break the recursion loop by removing the contents
|
||||
var contents = element.contents().remove();
|
||||
var compiledContents;
|
||||
let compiledContents;
|
||||
return {
|
||||
pre: (link && link.pre) ? link.pre : null,
|
||||
/**
|
||||
|
|
|
@ -2,9 +2,9 @@ import expect from 'expect.js';
|
|||
import ngMock from 'ng_mock';
|
||||
import ConfigDefaultsProvider from 'ui/config/defaults';
|
||||
describe('config component', function () {
|
||||
var $scope;
|
||||
var config;
|
||||
var defaults;
|
||||
let $scope;
|
||||
let config;
|
||||
let defaults;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function ($injector, Private) {
|
||||
|
|
|
@ -12,7 +12,7 @@ export default function DelayedUpdaterFactory(Private, $rootScope, Promise) {
|
|||
var updater = this;
|
||||
var queue = [];
|
||||
var log = {};
|
||||
var timer;
|
||||
let timer;
|
||||
|
||||
updater.fire = function () {
|
||||
clearTimeout(timer);
|
||||
|
@ -21,8 +21,8 @@ export default function DelayedUpdaterFactory(Private, $rootScope, Promise) {
|
|||
if (updater.fired) return;
|
||||
updater.fired = true;
|
||||
|
||||
var method;
|
||||
var body;
|
||||
let method;
|
||||
let body;
|
||||
var updated = [];
|
||||
var deleted = [];
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module.service('config', function (Private, kbnVersion, kbnIndex, $rootScope, bu
|
|||
|
||||
// active or previous instance of DelayedUpdater. This will log and then process an
|
||||
// update once it is requested by calling #set() or #clear().
|
||||
var updater;
|
||||
let updater;
|
||||
|
||||
var DocSource = Private(DocSourceProvider);
|
||||
var doc = (new DocSource())
|
||||
|
@ -82,7 +82,7 @@ module.service('config', function (Private, kbnVersion, kbnIndex, $rootScope, bu
|
|||
});
|
||||
|
||||
config.get = function (key, defaultVal) {
|
||||
var keyVal;
|
||||
let keyVal;
|
||||
|
||||
if (vals[key] == null) {
|
||||
if (defaultVal == null) {
|
||||
|
|
|
@ -6,13 +6,13 @@ import DecorateQueryProvider from 'ui/courier/data_source/_decorate_query';
|
|||
|
||||
describe('Query decorator', function () {
|
||||
|
||||
var config;
|
||||
let config;
|
||||
|
||||
var indexPattern;
|
||||
let indexPattern;
|
||||
|
||||
var getComputedFields;
|
||||
let getComputedFields;
|
||||
|
||||
var fn;
|
||||
let fn;
|
||||
beforeEach(ngMock.module(
|
||||
'kibana',
|
||||
function ($provide) {
|
||||
|
|
|
@ -5,9 +5,9 @@ import NormalizeSortRequestProvider from 'ui/courier/data_source/_normalize_sort
|
|||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
|
||||
describe('SearchSource#normalizeSortRequest', function () {
|
||||
var normalizeSortRequest;
|
||||
var indexPattern;
|
||||
var normalizedSort;
|
||||
let normalizeSortRequest;
|
||||
let indexPattern;
|
||||
let normalizedSort;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(ngMock.inject(function (Private) {
|
||||
|
|
|
@ -33,7 +33,7 @@ export default function (Promise, Private, es) {
|
|||
doc._storeVersion(resp._version);
|
||||
doc.id(resp._id);
|
||||
|
||||
var docFetchProm;
|
||||
let docFetchProm;
|
||||
if (method !== 'index') {
|
||||
docFetchProm = doc.fetch();
|
||||
} else {
|
||||
|
|
|
@ -28,7 +28,7 @@ export default function normalizeSortRequest(config) {
|
|||
var indexField = indexPattern.fields.byName[sortField];
|
||||
|
||||
if (indexField && indexField.scripted && indexField.sortable) {
|
||||
var direction;
|
||||
let direction;
|
||||
if (_.isString(sortValue)) direction = sortValue;
|
||||
if (_.isObject(sortValue) && sortValue.order) direction = sortValue.order;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ export default function RootSearchSource(Private, $rootScope, timefilter, Notifi
|
|||
return timefilter.get(globalSource.get('index'));
|
||||
});
|
||||
|
||||
var appSource; // set in setAppSource()
|
||||
let appSource; // set in setAppSource()
|
||||
resetAppSource();
|
||||
|
||||
// when the route changes, clear the appSource
|
||||
|
|
|
@ -151,7 +151,7 @@ export default function SavedObjectFactory(es, kbnIndex, Promise, Private, Notif
|
|||
if (!self.searchSource) return;
|
||||
|
||||
// if we have a searchSource, set its state based on the searchSourceJSON field
|
||||
var state;
|
||||
let state;
|
||||
try {
|
||||
state = JSON.parse(searchSourceJson);
|
||||
} catch (e) {
|
||||
|
|
|
@ -3,9 +3,9 @@ import sinon from 'auto-release-sinon';
|
|||
import expect from 'expect.js';
|
||||
import ngMock from 'ng_mock';
|
||||
|
||||
var debounce;
|
||||
var $timeout;
|
||||
var $timeoutSpy;
|
||||
let debounce;
|
||||
let $timeout;
|
||||
let $timeoutSpy;
|
||||
|
||||
function init() {
|
||||
ngMock.module('kibana');
|
||||
|
@ -19,7 +19,7 @@ function init() {
|
|||
}
|
||||
|
||||
describe('debounce service', function () {
|
||||
var spy;
|
||||
let spy;
|
||||
beforeEach(function () {
|
||||
spy = sinon.spy(function () {});
|
||||
init();
|
||||
|
|
|
@ -7,10 +7,10 @@ var module = uiModules.get('kibana');
|
|||
|
||||
module.service('debounce', ['$timeout', function ($timeout) {
|
||||
return function (func, wait, options) {
|
||||
var timeout;
|
||||
var args;
|
||||
var self;
|
||||
var result;
|
||||
let timeout;
|
||||
let args;
|
||||
let self;
|
||||
let result;
|
||||
options = _.defaults(options || {}, {
|
||||
leading: false,
|
||||
trailing: true
|
||||
|
|
|
@ -5,8 +5,8 @@ import ngMock from 'ng_mock';
|
|||
import 'ui/directives/auto_select_if_only_one';
|
||||
|
||||
describe('Auto-select if only one directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var zeroOptions = [];
|
||||
var oneOption = [{label: 'foo'}];
|
||||
var multiOptions = [{label: 'foo'}, {label: 'bar'}];
|
||||
|
|
|
@ -7,11 +7,11 @@ import 'ui/directives/confirm_click';
|
|||
import 'plugins/kibana/discover/index';
|
||||
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
var $elem;
|
||||
let $elem;
|
||||
|
||||
var init = function (text) {
|
||||
// Load the application
|
||||
|
@ -47,7 +47,7 @@ describe('confirmClick directive', function () {
|
|||
|
||||
|
||||
describe('event handlers', function () {
|
||||
var events;
|
||||
let events;
|
||||
|
||||
beforeEach(function () {
|
||||
init();
|
||||
|
@ -71,7 +71,7 @@ describe('confirmClick directive', function () {
|
|||
|
||||
|
||||
describe('confirmed', function () {
|
||||
var confirmed;
|
||||
let confirmed;
|
||||
|
||||
beforeEach(function () {
|
||||
init();
|
||||
|
@ -98,7 +98,7 @@ describe('confirmClick directive', function () {
|
|||
});
|
||||
|
||||
describe('not confirmed', function () {
|
||||
var confirmed;
|
||||
let confirmed;
|
||||
|
||||
beforeEach(function () {
|
||||
init();
|
||||
|
|
|
@ -4,11 +4,11 @@ import ngMock from 'ng_mock';
|
|||
import $ from 'jquery';
|
||||
import 'plugins/kibana/discover/index';
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
var $elem;
|
||||
let $elem;
|
||||
|
||||
var init = function (expandable) {
|
||||
// Load the application
|
||||
|
|
|
@ -8,7 +8,7 @@ import Promise from 'bluebird';
|
|||
|
||||
describe('FixedScroll directive', function () {
|
||||
|
||||
var compile;
|
||||
let compile;
|
||||
var trash = [];
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
@ -112,10 +112,10 @@ describe('FixedScroll directive', function () {
|
|||
{ from: '$scroller', to: '$container' }
|
||||
].forEach(function (names) {
|
||||
describe('scroll events ' + JSON.stringify(names), function () {
|
||||
var spy;
|
||||
var els;
|
||||
var $from;
|
||||
var $to;
|
||||
let spy;
|
||||
let els;
|
||||
let $from;
|
||||
let $to;
|
||||
|
||||
beforeEach(function () {
|
||||
spy = sinon.spy($.fn, 'scrollLeft');
|
||||
|
|
|
@ -4,9 +4,9 @@ import ngMock from 'ng_mock';
|
|||
import 'ui/directives/inequality';
|
||||
|
||||
describe('greater_than model validator directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
var html;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
let html;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
|
@ -17,7 +17,7 @@ describe('greater_than model validator directive', function () {
|
|||
|
||||
// no value is the same as 0
|
||||
describe('without value', function () {
|
||||
var element;
|
||||
let element;
|
||||
beforeEach(function () {
|
||||
html = '<input type="text" ng-model="value" greater-than />';
|
||||
element = $compile(html)($rootScope);
|
||||
|
@ -44,7 +44,7 @@ describe('greater_than model validator directive', function () {
|
|||
|
||||
[0, 1, 10, 42, -12].forEach(function (num) {
|
||||
describe('with value ' + num, function () {
|
||||
var element;
|
||||
let element;
|
||||
beforeEach(function () {
|
||||
html = '<input type="text" ng-model="value" greater-than="' + num + '" />';
|
||||
element = $compile(html)($rootScope);
|
||||
|
|
|
@ -5,13 +5,13 @@ import $ from 'jquery';
|
|||
import 'ui/directives/input_focus';
|
||||
|
||||
describe('Input focus directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
var $timeout;
|
||||
var element;
|
||||
var $el;
|
||||
var selectedEl;
|
||||
var selectedText;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
let $timeout;
|
||||
let element;
|
||||
let $el;
|
||||
let selectedEl;
|
||||
let selectedText;
|
||||
var inputValue = 'Input Text Value';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -4,8 +4,8 @@ import ngMock from 'ng_mock';
|
|||
import 'ui/directives/input_whole_number';
|
||||
|
||||
describe('Whole number input directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input type="text" ng-model="value" input-whole-number />';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -5,10 +5,10 @@ import 'ui/directives/json_input';
|
|||
|
||||
|
||||
describe('JSON input validation', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input ng-model="value" json-input require-keys=true />';
|
||||
var element;
|
||||
let element;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
||||
|
|
|
@ -5,18 +5,18 @@ import ngMock from 'ng_mock';
|
|||
|
||||
// Load the kibana app dependencies.
|
||||
|
||||
var $rootScope;
|
||||
var $timeout;
|
||||
var $compile;
|
||||
var Promise;
|
||||
var Private;
|
||||
var config;
|
||||
var $elemScope;
|
||||
var $elem;
|
||||
let $rootScope;
|
||||
let $timeout;
|
||||
let $compile;
|
||||
let Promise;
|
||||
let Private;
|
||||
let config;
|
||||
let $elemScope;
|
||||
let $elem;
|
||||
|
||||
var cycleIndex = 0;
|
||||
var markup = '<input ng-model="mockModel" parse-query input-focus type="text">';
|
||||
var fromUser;
|
||||
let fromUser;
|
||||
import toUser from 'ui/parse_query/lib/to_user';
|
||||
import 'ui/parse_query';
|
||||
import ParseQueryLibFromUserProvider from 'ui/parse_query/lib/from_user';
|
||||
|
@ -102,7 +102,7 @@ describe('parse-query directive', function () {
|
|||
|
||||
describe('model presentation formatter', function () {
|
||||
it('should present undefined as empty string', function () {
|
||||
var notDefined;
|
||||
let notDefined;
|
||||
expect(toUser(notDefined)).to.be('');
|
||||
});
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ import 'plugins/kibana/discover/index';
|
|||
|
||||
// TODO: This should not be needed, timefilter is only included here, it should move
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
var $elem;
|
||||
let $elem;
|
||||
var anchor = '2014-01-01T06:06:06.666Z';
|
||||
var clock;
|
||||
let clock;
|
||||
|
||||
var init = function () {
|
||||
// Load the application
|
||||
|
@ -85,7 +85,7 @@ describe('timepicker directive', function () {
|
|||
});
|
||||
|
||||
describe('refresh interval', function () {
|
||||
var $courier;
|
||||
let $courier;
|
||||
beforeEach(function () {
|
||||
init();
|
||||
ngMock.inject(function (courier, $rootScope) {
|
||||
|
@ -232,7 +232,7 @@ describe('timepicker directive', function () {
|
|||
});
|
||||
|
||||
it('disables the submit button if the form is invalid', function (done) {
|
||||
var button;
|
||||
let button;
|
||||
button = $elem.find('button[disabled]');
|
||||
expect(button.length).to.be(0);
|
||||
|
||||
|
@ -359,7 +359,7 @@ describe('timepicker directive', function () {
|
|||
|
||||
describe('absolute mode', function () {
|
||||
|
||||
var inputs;
|
||||
let inputs;
|
||||
|
||||
beforeEach(function () {
|
||||
init();
|
||||
|
|
|
@ -5,11 +5,11 @@ import $ from 'jquery';
|
|||
import 'plugins/kibana/discover/index';
|
||||
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
var $elem;
|
||||
let $elem;
|
||||
|
||||
var init = function (text) {
|
||||
// Load the application
|
||||
|
|
|
@ -9,12 +9,12 @@ import 'plugins/kibana/discover/index';
|
|||
|
||||
var typeaheadHistoryCount = 10;
|
||||
var typeaheadName = 'unittest';
|
||||
var $parentScope;
|
||||
var $typeaheadScope;
|
||||
var $elem;
|
||||
var $typeaheadInputScope;
|
||||
var typeaheadCtrl;
|
||||
var PersistedLog;
|
||||
let $parentScope;
|
||||
let $typeaheadScope;
|
||||
let $elem;
|
||||
let $typeaheadInputScope;
|
||||
let typeaheadCtrl;
|
||||
let PersistedLog;
|
||||
|
||||
var markup = '<div class="typeahead" kbn-typeahead="' + typeaheadName + '">' +
|
||||
'<input type="text" placeholder="Filter..." class="form-control" ng-model="query" kbn-typeahead-input>' +
|
||||
|
|
|
@ -5,8 +5,8 @@ import 'ui/directives/validate_cidr_mask';
|
|||
|
||||
|
||||
describe('Validate CIDR mask directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input type="text" ng-model="value" validate-cidr-mask />';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -5,8 +5,8 @@ import 'ui/directives/validate_date_math';
|
|||
|
||||
|
||||
describe('Validate date math directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input type="text" ng-model="value" validate-date-math />';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -6,8 +6,8 @@ import 'ui/directives/validate_index_name';
|
|||
// Load the kibana app dependencies.
|
||||
|
||||
describe('Validate index name directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input type="text" ng-model="indexName" validate-index-name />';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -5,8 +5,8 @@ import 'ui/directives/validate_ip';
|
|||
|
||||
|
||||
describe('Validate IP directive', function () {
|
||||
var $compile;
|
||||
var $rootScope;
|
||||
let $compile;
|
||||
let $rootScope;
|
||||
var html = '<input type="text" ng-model="value" validate-ip />';
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -5,9 +5,9 @@ import 'ui/directives/validate_json';
|
|||
|
||||
// Load the kibana app dependencies.
|
||||
|
||||
var $parentScope;
|
||||
var $elemScope;
|
||||
var $elem;
|
||||
let $parentScope;
|
||||
let $elemScope;
|
||||
let $elem;
|
||||
var mockScope = '';
|
||||
|
||||
var input = {
|
||||
|
|
|
@ -10,7 +10,7 @@ module.directive('kbnInfiniteScroll', function () {
|
|||
},
|
||||
link: function ($scope, $element, attrs) {
|
||||
var $window = $(window);
|
||||
var checkTimer;
|
||||
let checkTimer;
|
||||
|
||||
function onScroll() {
|
||||
if (!$scope.more) return;
|
||||
|
|
|
@ -106,7 +106,7 @@ uiModules.get('kibana')
|
|||
var count = perPage ? Math.ceil($scope.list.length / perPage) : 1;
|
||||
|
||||
_.times(count, function (i) {
|
||||
var page;
|
||||
let page;
|
||||
|
||||
if (perPage) {
|
||||
var start = perPage * i;
|
||||
|
|
|
@ -23,7 +23,7 @@ module.directive('prettyDuration', function (config, quickRanges, timeUnits) {
|
|||
});
|
||||
|
||||
function stringify() {
|
||||
var text;
|
||||
let text;
|
||||
// If both parts are date math, try to look up a reasonable string
|
||||
if ($scope.from && $scope.to && !moment.isMoment($scope.from) && !moment.isMoment($scope.to)) {
|
||||
var tryLookup = lookupByRange[$scope.from.toString() + ' to ' + $scope.to.toString()];
|
||||
|
|
|
@ -38,7 +38,7 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr
|
|||
var currentFilter = $scope.filter;
|
||||
|
||||
// the most recently entered search/filter
|
||||
var prevSearch;
|
||||
let prevSearch;
|
||||
|
||||
// the list of hits, used to render display
|
||||
self.hits = [];
|
||||
|
|
|
@ -12,16 +12,16 @@ import FixturesStubbedSearchSourceProvider from 'fixtures/stubbed_search_source'
|
|||
// Load the kibana app dependencies.
|
||||
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
|
||||
var $timeout;
|
||||
let $timeout;
|
||||
|
||||
|
||||
var searchSource;
|
||||
let searchSource;
|
||||
|
||||
var init = function ($elem, props) {
|
||||
ngMock.inject(function ($rootScope, $compile, _$timeout_) {
|
||||
|
@ -47,7 +47,7 @@ var destroy = function () {
|
|||
};
|
||||
|
||||
describe('docTable', function () {
|
||||
var $elem;
|
||||
let $elem;
|
||||
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
beforeEach(function () {
|
||||
|
|
|
@ -3,7 +3,7 @@ var defaultSort = {time: 'desc'};
|
|||
import expect from 'expect.js';
|
||||
import ngMock from 'ng_mock';
|
||||
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';
|
||||
var indexPattern;
|
||||
let indexPattern;
|
||||
|
||||
describe('docTable', function () {
|
||||
beforeEach(ngMock.module('kibana'));
|
||||
|
|
|
@ -10,14 +10,14 @@ import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logsta
|
|||
|
||||
describe('Doc Table', function () {
|
||||
|
||||
var $parentScope;
|
||||
let $parentScope;
|
||||
|
||||
var $scope;
|
||||
let $scope;
|
||||
|
||||
var config;
|
||||
let config;
|
||||
|
||||
// Stub out a minimal mapping of 4 fields
|
||||
var mapping;
|
||||
let mapping;
|
||||
|
||||
beforeEach(ngMock.module('kibana', 'apps/discover'));
|
||||
beforeEach(ngMock.inject(function (_config_, $rootScope, Private) {
|
||||
|
@ -53,7 +53,7 @@ describe('Doc Table', function () {
|
|||
});
|
||||
|
||||
it('should be able to add and remove columns', function (done) {
|
||||
var childElems;
|
||||
let childElems;
|
||||
// Should include a column for toggling and the time column by default
|
||||
$parentScope.columns = ['bytes'];
|
||||
parentElem.scope().$digest();
|
||||
|
@ -245,7 +245,7 @@ describe('Doc Table', function () {
|
|||
});
|
||||
|
||||
describe('expanded', function () {
|
||||
var $details;
|
||||
let $details;
|
||||
beforeEach(function () {
|
||||
// Open the row
|
||||
$scope.toggleRow();
|
||||
|
@ -278,7 +278,7 @@ describe('Doc Table', function () {
|
|||
'index-pattern="indexPattern"' +
|
||||
'></tr>'
|
||||
);
|
||||
var $details;
|
||||
let $details;
|
||||
|
||||
beforeEach(function () {
|
||||
var row = getFakeRow(0, mapping);
|
||||
|
@ -312,10 +312,10 @@ describe('Doc Table', function () {
|
|||
});
|
||||
|
||||
describe('row diffing', function () {
|
||||
var $row;
|
||||
var $scope;
|
||||
var $root;
|
||||
var $before;
|
||||
let $row;
|
||||
let $scope;
|
||||
let $root;
|
||||
let $before;
|
||||
|
||||
beforeEach(ngMock.inject(function ($rootScope, $compile, Private) {
|
||||
$root = $rootScope;
|
||||
|
|
|
@ -46,10 +46,10 @@ module.directive('kbnTableRow', function ($compile) {
|
|||
};
|
||||
|
||||
// when we compile the details, we use this $scope
|
||||
var $detailsScope;
|
||||
let $detailsScope;
|
||||
|
||||
// when we compile the toggle button in the summary, we use this $scope
|
||||
var $toggleScope;
|
||||
let $toggleScope;
|
||||
|
||||
// toggle display of the rows details, a full list of the fields from each row
|
||||
$scope.toggleRow = function () {
|
||||
|
|
|
@ -8,8 +8,8 @@ import _ from 'lodash';
|
|||
*/
|
||||
function getSort(sort, indexPattern) {
|
||||
var sortObj = {};
|
||||
var field;
|
||||
var direction;
|
||||
let field;
|
||||
let direction;
|
||||
|
||||
function isSortable(field) {
|
||||
return (indexPattern.fields.byName[field] && indexPattern.fields.byName[field].sortable);
|
||||
|
|
|
@ -5,11 +5,11 @@ import ngMock from 'ng_mock';
|
|||
import DocTitleProvider from 'ui/doc_title';
|
||||
|
||||
describe('docTitle Service', function () {
|
||||
var initialDocTitle;
|
||||
let initialDocTitle;
|
||||
var MAIN_TITLE = 'Kibana 4';
|
||||
|
||||
var docTitle;
|
||||
var $rootScope;
|
||||
let docTitle;
|
||||
let $rootScope;
|
||||
|
||||
beforeEach(function () {
|
||||
initialDocTitle = document.title;
|
||||
|
@ -61,7 +61,7 @@ describe('docTitle Service', function () {
|
|||
});
|
||||
|
||||
describe('#change', function () {
|
||||
var getActiveTabStub;
|
||||
let getActiveTabStub;
|
||||
|
||||
beforeEach(function () {
|
||||
getActiveTabStub = sinon.stub(require('ui/chrome'), 'getActiveTab');
|
||||
|
|
|
@ -14,7 +14,7 @@ uiModules.get('kibana')
|
|||
var baseTitle = document.title;
|
||||
var self = this;
|
||||
|
||||
var lastChange;
|
||||
let lastChange;
|
||||
|
||||
function render() {
|
||||
lastChange = lastChange || [];
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'elasticsearch-browser';
|
|||
import _ from 'lodash';
|
||||
import uiModules from 'ui/modules';
|
||||
|
||||
var es; // share the client amoungst all apps
|
||||
let es; // share the client amoungst all apps
|
||||
uiModules
|
||||
.get('kibana', ['elasticsearch', 'kibana/config'])
|
||||
.service('es', function (esFactory, esUrl, $q, esApiVersion, esRequestTimeout) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue