mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Switch from underscore to lodash, #659
This commit is contained in:
parent
c3a6ae1622
commit
23c9f973cc
@ -4,7 +4,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'underscore',
|
'lodash',
|
||||||
'require',
|
'require',
|
||||||
'config',
|
'config',
|
||||||
'bootstrap',
|
'bootstrap',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
define(['jquery','underscore','moment'],
|
define(['jquery','lodash','moment'],
|
||||||
function($, _, moment) {
|
function($, _, moment) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore-src'
|
'lodash-src'
|
||||||
],
|
],
|
||||||
function () {
|
function () {
|
||||||
'use strict';
|
'use strict';
|
@ -23,8 +23,8 @@ require.config({
|
|||||||
crypto: '../vendor/crypto.min',
|
crypto: '../vendor/crypto.min',
|
||||||
spectrum: '../vendor/spectrum',
|
spectrum: '../vendor/spectrum',
|
||||||
|
|
||||||
underscore: 'components/underscore.extended',
|
lodash: 'components/lodash.extended',
|
||||||
'underscore-src': '../vendor/underscore',
|
'lodash-src': '../vendor/lodash',
|
||||||
bootstrap: '../vendor/bootstrap/bootstrap',
|
bootstrap: '../vendor/bootstrap/bootstrap',
|
||||||
|
|
||||||
jquery: '../vendor/jquery/jquery-1.8.0',
|
jquery: '../vendor/jquery/jquery-1.8.0',
|
||||||
@ -46,9 +46,6 @@ require.config({
|
|||||||
|
|
||||||
},
|
},
|
||||||
shim: {
|
shim: {
|
||||||
underscore: {
|
|
||||||
exports: '_'
|
|
||||||
},
|
|
||||||
|
|
||||||
spectrum: {
|
spectrum: {
|
||||||
deps: ['jquery']
|
deps: ['jquery']
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore',
|
'lodash',
|
||||||
'crypto',
|
'crypto',
|
||||||
],
|
],
|
||||||
function (_, crypto) {
|
function (_, crypto) {
|
||||||
|
@ -2,7 +2,7 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'config',
|
'config',
|
||||||
'underscore',
|
'lodash',
|
||||||
'services/all',
|
'services/all',
|
||||||
],
|
],
|
||||||
function (angular, $, config, _) {
|
function (angular, $, config, _) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'moment',
|
'moment',
|
||||||
'config',
|
'config',
|
||||||
'filesaver'
|
'filesaver'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'config',
|
'config',
|
||||||
'underscore',
|
'lodash',
|
||||||
],
|
],
|
||||||
function (angular, config, _) {
|
function (angular, config, _) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config',
|
'config',
|
||||||
'../services/graphite/gfunc',
|
'../services/graphite/gfunc',
|
||||||
'../services/graphite/parser'
|
'../services/graphite/parser'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config'
|
'config'
|
||||||
],
|
],
|
||||||
function (angular, _, config) {
|
function (angular, _, config) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn'
|
'kbn'
|
||||||
],
|
],
|
||||||
function (angular, _, kbn) {
|
function (angular, _, kbn) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config'
|
'config'
|
||||||
],
|
],
|
||||||
function (angular, _, config) {
|
function (angular, _, config) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config',
|
'config',
|
||||||
'jquery'
|
'jquery'
|
||||||
],
|
],
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
'../services/graphite/gfunc',
|
'../services/graphite/gfunc',
|
||||||
],
|
],
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery'
|
'jquery'
|
||||||
],
|
],
|
||||||
function (angular, _, $) {
|
function (angular, _, $) {
|
||||||
|
@ -3,7 +3,7 @@ define([
|
|||||||
'jquery',
|
'jquery',
|
||||||
'kbn',
|
'kbn',
|
||||||
'moment',
|
'moment',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, $, kbn, moment, _) {
|
function (angular, $, kbn, moment, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'underscore',
|
'lodash',
|
||||||
],
|
],
|
||||||
function (angular, $) {
|
function (angular, $) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, _) {
|
function (angular, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
],
|
],
|
||||||
function (angular, _, $) {
|
function (angular, _, $) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
],
|
],
|
||||||
function (angular, _, $) {
|
function (angular, _, $) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
define(['angular', 'jquery', 'underscore', 'moment'], function (angular, $, _, moment) {
|
define(['angular', 'jquery', 'lodash', 'moment'], function (angular, $, _, moment) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var module = angular.module('grafana.filters');
|
var module = angular.module('grafana.filters');
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore',
|
'lodash',
|
||||||
'./editor'
|
'./editor'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, app, _) {
|
function (angular, app, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -15,7 +15,7 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'jquery',
|
'jquery',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn',
|
'kbn',
|
||||||
'moment',
|
'moment',
|
||||||
'./timeSeries',
|
'./timeSeries',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn'
|
'kbn'
|
||||||
],
|
],
|
||||||
function (_, kbn) {
|
function (_, kbn) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore',
|
'lodash',
|
||||||
'require',
|
'require',
|
||||||
'services/filterSrv'
|
'services/filterSrv'
|
||||||
],
|
],
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'app',
|
'app',
|
||||||
'underscore',
|
'lodash',
|
||||||
'moment',
|
'moment',
|
||||||
'kbn'
|
'kbn'
|
||||||
],
|
],
|
||||||
|
@ -2,7 +2,7 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'config',
|
'config',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, $, config, _) {
|
function (angular, $, config, _) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -2,7 +2,7 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'config',
|
'config',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn',
|
'kbn',
|
||||||
'moment'
|
'moment'
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, _) {
|
function (angular, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'moment'
|
'moment'
|
||||||
], function (angular, _, moment) {
|
], function (angular, _, moment) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -2,7 +2,7 @@ define([
|
|||||||
'angular',
|
'angular',
|
||||||
'jquery',
|
'jquery',
|
||||||
'kbn',
|
'kbn',
|
||||||
'underscore',
|
'lodash',
|
||||||
'../timer',
|
'../timer',
|
||||||
],
|
],
|
||||||
function (angular, $, kbn, _) {
|
function (angular, $, kbn, _) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config',
|
'config',
|
||||||
'./graphite/graphiteDatasource',
|
'./graphite/graphiteDatasource',
|
||||||
'./influxdb/influxdbDatasource',
|
'./influxdb/influxdbDatasource',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
'config',
|
'config',
|
||||||
'kbn',
|
'kbn',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config',
|
'config',
|
||||||
'kbn'
|
'kbn'
|
||||||
], function (angular, _, config, kbn) {
|
], function (angular, _, config, kbn) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (_) {
|
function (_) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
'config',
|
'config',
|
||||||
'kbn',
|
'kbn',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore'
|
'lodash'
|
||||||
], function(_) {
|
], function(_) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
define([
|
define([
|
||||||
'underscore',
|
'lodash',
|
||||||
],
|
],
|
||||||
function (_) {
|
function (_) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn',
|
'kbn',
|
||||||
'./influxSeries'
|
'./influxSeries'
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn'
|
'kbn'
|
||||||
],
|
],
|
||||||
function (angular, _, kbn) {
|
function (angular, _, kbn) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, _) {
|
function (angular, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'jquery',
|
'jquery',
|
||||||
],
|
],
|
||||||
function (angular, _, $) {
|
function (angular, _, $) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'kbn'
|
'kbn'
|
||||||
],
|
],
|
||||||
function (angular, _, kbn) {
|
function (angular, _, kbn) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore'
|
'lodash'
|
||||||
],
|
],
|
||||||
function (angular, _) {
|
function (angular, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'angular',
|
'angular',
|
||||||
'underscore',
|
'lodash',
|
||||||
'config',
|
'config',
|
||||||
],
|
],
|
||||||
function(angular, _, config) {
|
function(angular, _, config) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
define([
|
define([
|
||||||
'mocks/dashboard-mock',
|
'mocks/dashboard-mock',
|
||||||
'underscore',
|
'lodash',
|
||||||
'services/filterSrv'
|
'services/filterSrv'
|
||||||
], function(dashboardMock, _) {
|
], function(dashboardMock, _) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -10,7 +10,7 @@ define([
|
|||||||
var _dashboard;
|
var _dashboard;
|
||||||
|
|
||||||
beforeEach(module('grafana.services'));
|
beforeEach(module('grafana.services'));
|
||||||
beforeEach(module(function(){
|
beforeEach(module(function() {
|
||||||
_dashboard = dashboardMock.create();
|
_dashboard = dashboardMock.create();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ require.config({
|
|||||||
kbn: 'components/kbn',
|
kbn: 'components/kbn',
|
||||||
|
|
||||||
settings: 'components/settings',
|
settings: 'components/settings',
|
||||||
underscore: 'components/underscore.extended',
|
lodash: 'components/lodash.extended',
|
||||||
'underscore-src': '../vendor/underscore',
|
'lodash-src': '../vendor/lodash',
|
||||||
|
|
||||||
moment: '../vendor/moment',
|
moment: '../vendor/moment',
|
||||||
chromath: '../vendor/chromath',
|
chromath: '../vendor/chromath',
|
||||||
@ -47,10 +47,6 @@ require.config({
|
|||||||
},
|
},
|
||||||
|
|
||||||
shim: {
|
shim: {
|
||||||
underscore: {
|
|
||||||
exports: '_'
|
|
||||||
},
|
|
||||||
|
|
||||||
bootstrap: {
|
bootstrap: {
|
||||||
deps: ['jquery']
|
deps: ['jquery']
|
||||||
},
|
},
|
||||||
|
6785
src/vendor/lodash.js
vendored
Normal file
6785
src/vendor/lodash.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1246
src/vendor/underscore.js
vendored
1246
src/vendor/underscore.js
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user