From 4a0396ca8f4affcd31e576e84364dde77539e9aa Mon Sep 17 00:00:00 2001 From: Court Ewing Date: Mon, 1 Feb 2016 19:49:23 -0500 Subject: [PATCH] Use const/let in spyModes plugin --- src/plugins/spyModes/public/reqRespStatsSpyMode.js | 12 ++++++------ src/plugins/spyModes/public/tableSpyMode.js | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/spyModes/public/reqRespStatsSpyMode.js b/src/plugins/spyModes/public/reqRespStatsSpyMode.js index 471026beca368..59b42509f5f8d 100644 --- a/src/plugins/spyModes/public/reqRespStatsSpyMode.js +++ b/src/plugins/spyModes/public/reqRespStatsSpyMode.js @@ -1,8 +1,8 @@ define(function (require) { - var _ = require('lodash'); - var reqRespStatsHTML = require('plugins/spyModes/reqRespStatsSpyMode.html'); + const _ = require('lodash'); + const reqRespStatsHTML = require('plugins/spyModes/reqRespStatsSpyMode.html'); - var linkReqRespStats = function ($scope, config) { + const linkReqRespStats = function ($scope, config) { $scope.$bind('req', 'searchSource.history[searchSource.history.length - 1]'); $scope.$watchMulti([ 'req', @@ -12,9 +12,9 @@ define(function (require) { ], function () { if (!$scope.searchSource || !$scope.req) return; - var req = $scope.req; - var resp = $scope.req.resp; - var stats = $scope.stats = []; + const req = $scope.req; + const resp = $scope.req.resp; + const stats = $scope.stats = []; if (resp && resp.took != null) stats.push(['Query Duration', resp.took + 'ms']); if (req && req.ms != null) stats.push(['Request Duration', req.ms + 'ms']); diff --git a/src/plugins/spyModes/public/tableSpyMode.js b/src/plugins/spyModes/public/tableSpyMode.js index b18c4ae437f83..d7a2981623d45 100644 --- a/src/plugins/spyModes/public/tableSpyMode.js +++ b/src/plugins/spyModes/public/tableSpyMode.js @@ -1,10 +1,10 @@ define(function (require) { function VisSpyTableProvider(Notifier, $filter, $rootScope, config, Private) { - var _ = require('lodash'); - var saveAs = require('@spalger/filesaver').saveAs; - var tabifyAggResponse = Private(require('ui/agg_response/tabify/tabify')); + const _ = require('lodash'); + const saveAs = require('@spalger/filesaver').saveAs; + const tabifyAggResponse = Private(require('ui/agg_response/tabify/tabify')); - var PER_PAGE_DEFAULT = 10; + const PER_PAGE_DEFAULT = 10; require('ui/agg_table');