2014-01-01 18:40:25 +01:00
|
|
|
require.config({
|
2015-03-29 13:06:53 +02:00
|
|
|
baseUrl: 'http://localhost:9876/base/public/app',
|
2014-01-05 10:17:53 +01:00
|
|
|
|
|
|
|
|
paths: {
|
2014-02-08 16:38:17 +01:00
|
|
|
specs: '../test/specs',
|
2014-03-22 13:45:02 +01:00
|
|
|
mocks: '../test/mocks',
|
2014-12-23 12:01:50 -08:00
|
|
|
helpers: '../test/specs/helpers',
|
2015-03-13 11:11:31 +01:00
|
|
|
config: 'components/config',
|
2014-02-08 16:38:17 +01:00
|
|
|
kbn: 'components/kbn',
|
2014-08-16 13:13:26 +02:00
|
|
|
store: 'components/store',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
|
|
|
|
settings: 'components/settings',
|
2014-08-07 14:35:19 +02:00
|
|
|
lodash: 'components/lodash.extended',
|
|
|
|
|
'lodash-src': '../vendor/lodash',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
|
|
|
|
moment: '../vendor/moment',
|
2014-05-01 11:18:23 +02:00
|
|
|
chromath: '../vendor/chromath',
|
|
|
|
|
filesaver: '../vendor/filesaver',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
2015-06-13 21:14:08 +02:00
|
|
|
angular: '../vendor/angular/angular',
|
|
|
|
|
'angular-route': '../vendor/angular-route/angular-route',
|
|
|
|
|
'angular-sanitize': '../vendor/angular-sanitize/angular-sanitize',
|
|
|
|
|
angularMocks: '../vendor/angular-mocks/angular-mocks',
|
2015-06-13 22:16:07 +02:00
|
|
|
'angular-dragdrop': '../vendor/angular-native-dragdrop/draganddrop',
|
2015-07-17 09:51:34 +02:00
|
|
|
'angular-ui': '../vendor/angular-ui/angular-bootstrap',
|
2015-06-13 21:14:08 +02:00
|
|
|
'angular-strap': '../vendor/angular-other/angular-strap',
|
|
|
|
|
timepicker: '../vendor/angular-other/timepicker',
|
|
|
|
|
datepicker: '../vendor/angular-other/datepicker',
|
2015-06-13 22:20:39 +02:00
|
|
|
bindonce: '../vendor/angular-bindonce/bindonce',
|
2014-02-08 16:38:17 +01:00
|
|
|
crypto: '../vendor/crypto.min',
|
|
|
|
|
spectrum: '../vendor/spectrum',
|
|
|
|
|
|
2015-06-13 20:53:08 +02:00
|
|
|
jquery: '../vendor/jquery/dist/jquery',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
2014-05-03 17:00:48 +02:00
|
|
|
bootstrap: '../vendor/bootstrap/bootstrap',
|
|
|
|
|
'bootstrap-tagsinput': '../vendor/tagsinput/bootstrap-tagsinput',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
|
|
|
|
'extend-jquery': 'components/extend-jquery',
|
|
|
|
|
|
2015-06-13 20:53:08 +02:00
|
|
|
'jquery.flot': '../vendor/flot/jquery.flot',
|
|
|
|
|
'jquery.flot.pie': '../vendor/flot/jquery.flot.pie',
|
|
|
|
|
'jquery.flot.events': '../vendor/flot/jquery.flot.events',
|
|
|
|
|
'jquery.flot.selection': '../vendor/flot/jquery.flot.selection',
|
|
|
|
|
'jquery.flot.stack': '../vendor/flot/jquery.flot.stack',
|
|
|
|
|
'jquery.flot.stackpercent':'../vendor/flot/jquery.flot.stackpercent',
|
|
|
|
|
'jquery.flot.time': '../vendor/flot/jquery.flot.time',
|
|
|
|
|
'jquery.flot.crosshair': '../vendor/flot/jquery.flot.crosshair',
|
|
|
|
|
'jquery.flot.fillbelow': '../vendor/flot/jquery.flot.fillbelow',
|
2014-02-08 16:38:17 +01:00
|
|
|
|
|
|
|
|
modernizr: '../vendor/modernizr-2.6.1',
|
2014-01-05 10:17:53 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
shim: {
|
2014-02-08 16:38:17 +01:00
|
|
|
bootstrap: {
|
|
|
|
|
deps: ['jquery']
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
modernizr: {
|
|
|
|
|
exports: 'Modernizr'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
angular: {
|
|
|
|
|
deps: ['jquery', 'config'],
|
|
|
|
|
exports: 'angular'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
angularMocks: {
|
|
|
|
|
deps: ['angular'],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
crypto: {
|
|
|
|
|
exports: 'Crypto'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
'jquery.flot': ['jquery'],
|
|
|
|
|
'jquery.flot.pie': ['jquery', 'jquery.flot'],
|
|
|
|
|
'jquery.flot.events': ['jquery', 'jquery.flot'],
|
|
|
|
|
'jquery.flot.selection':['jquery', 'jquery.flot'],
|
|
|
|
|
'jquery.flot.stack': ['jquery', 'jquery.flot'],
|
|
|
|
|
'jquery.flot.stackpercent':['jquery', 'jquery.flot'],
|
|
|
|
|
'jquery.flot.time': ['jquery', 'jquery.flot'],
|
2014-09-23 13:51:59 +02:00
|
|
|
'jquery.flot.crosshair':['jquery', 'jquery.flot'],
|
2014-10-15 10:55:46 -04:00
|
|
|
'jquery.flot.fillbelow':['jquery', 'jquery.flot'],
|
2014-02-08 16:38:17 +01:00
|
|
|
|
2014-08-06 10:53:45 +02:00
|
|
|
'angular-route': ['angular'],
|
2014-11-27 14:46:01 +01:00
|
|
|
'angular-sanitize': ['angular'],
|
2015-07-17 09:51:34 +02:00
|
|
|
'angular-ui': ['angular'],
|
2014-10-09 20:30:23 -04:00
|
|
|
'angular-dragdrop': ['jquery', 'angular'],
|
2014-02-08 16:38:17 +01:00
|
|
|
'angular-mocks': ['angular'],
|
|
|
|
|
'angular-strap': ['angular', 'bootstrap','timepicker', 'datepicker'],
|
2014-11-27 14:46:01 +01:00
|
|
|
'bindonce': ['angular'],
|
2014-02-08 16:38:17 +01:00
|
|
|
|
2014-05-03 17:00:48 +02:00
|
|
|
'bootstrap-tagsinput': ['jquery'],
|
|
|
|
|
|
2014-02-08 16:38:17 +01:00
|
|
|
timepicker: ['jquery', 'bootstrap'],
|
|
|
|
|
datepicker: ['jquery', 'bootstrap'],
|
2014-01-05 10:17:53 +01:00
|
|
|
}
|
2014-01-01 18:40:25 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
require([
|
2014-03-22 13:45:02 +01:00
|
|
|
'angular',
|
2014-12-23 12:01:50 -08:00
|
|
|
'config',
|
2014-03-22 13:45:02 +01:00
|
|
|
'angularMocks',
|
2014-08-06 15:57:40 +02:00
|
|
|
'app',
|
2014-12-23 12:01:50 -08:00
|
|
|
], function(angular, config) {
|
2014-04-06 10:47:14 +02:00
|
|
|
'use strict';
|
2014-03-22 13:45:02 +01:00
|
|
|
|
2014-08-06 16:11:17 +02:00
|
|
|
for (var file in window.__karma__.files) {
|
|
|
|
|
if (/spec\.js$/.test(file)) {
|
|
|
|
|
window.tests.push(file.replace(/^\/base\//, 'http://localhost:9876/base/'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-08-06 10:53:45 +02:00
|
|
|
angular.module('grafana', ['ngRoute']);
|
|
|
|
|
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
|
2014-07-28 18:11:52 +02:00
|
|
|
angular.module('grafana.panels', []);
|
|
|
|
|
angular.module('grafana.filters', []);
|
2014-12-31 12:54:12 +01:00
|
|
|
angular.module('grafana.routes', ['ngRoute']);
|
2014-03-22 13:45:02 +01:00
|
|
|
|
2014-12-31 12:54:12 +01:00
|
|
|
var specs = [
|
2014-03-22 13:45:02 +01:00
|
|
|
'specs/lexer-specs',
|
|
|
|
|
'specs/parser-specs',
|
|
|
|
|
'specs/gfunc-specs',
|
2014-08-20 10:27:30 +02:00
|
|
|
'specs/timeSeries-specs',
|
2014-08-11 15:59:03 +02:00
|
|
|
'specs/row-ctrl-specs',
|
2014-08-07 10:42:05 +02:00
|
|
|
'specs/graphiteTargetCtrl-specs',
|
2014-09-02 20:59:54 +02:00
|
|
|
'specs/graphiteDatasource-specs',
|
2014-09-02 07:05:24 +02:00
|
|
|
'specs/influxSeries-specs',
|
2015-05-18 15:01:05 +02:00
|
|
|
'specs/influxSeries08-specs',
|
2014-09-02 07:05:24 +02:00
|
|
|
'specs/influxQueryBuilder-specs',
|
2015-03-26 13:51:29 +01:00
|
|
|
'specs/influx09-querybuilder-specs',
|
2014-08-08 17:33:00 +02:00
|
|
|
'specs/influxdb-datasource-specs',
|
2015-05-15 15:58:07 +02:00
|
|
|
'specs/influxdbQueryCtrl-specs',
|
2015-04-19 23:40:48 +09:00
|
|
|
'specs/kairosdb-datasource-specs',
|
2014-08-07 18:17:26 +02:00
|
|
|
'specs/graph-ctrl-specs',
|
2014-11-12 11:58:04 +01:00
|
|
|
'specs/graph-specs',
|
2014-09-29 16:57:05 +02:00
|
|
|
'specs/graph-tooltip-specs',
|
2014-08-19 10:46:08 +02:00
|
|
|
'specs/seriesOverridesCtrl-specs',
|
2015-03-29 14:30:03 +02:00
|
|
|
'specs/shareModalCtrl-specs',
|
2014-08-27 16:29:48 +02:00
|
|
|
'specs/timeSrv-specs',
|
2015-08-16 11:24:25 +02:00
|
|
|
'specs/panelSrv-specs',
|
2014-08-27 17:58:49 +02:00
|
|
|
'specs/templateSrv-specs',
|
2014-08-28 12:44:01 +02:00
|
|
|
'specs/templateValuesSrv-specs',
|
2014-05-03 17:00:48 +02:00
|
|
|
'specs/kbn-format-specs',
|
2014-08-08 13:45:42 +02:00
|
|
|
'specs/dashboardSrv-specs',
|
2014-12-31 12:54:12 +01:00
|
|
|
'specs/dashboardViewStateSrv-specs',
|
2015-05-11 09:57:10 +02:00
|
|
|
'specs/singlestat-specs',
|
2015-04-27 17:20:32 +02:00
|
|
|
'specs/dynamicDashboardSrv-specs',
|
2015-04-28 13:45:59 +02:00
|
|
|
'specs/unsavedChangesSrv-specs',
|
2015-06-09 10:06:36 +02:00
|
|
|
'specs/valueSelectDropdown-specs',
|
2015-06-30 15:32:31 +02:00
|
|
|
'specs/opentsdbDatasource-specs',
|
2014-12-23 12:01:50 -08:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
var pluginSpecs = (config.plugins.specs || []).map(function (spec) {
|
|
|
|
|
return '../plugins/' + spec;
|
2014-03-22 13:45:02 +01:00
|
|
|
});
|
|
|
|
|
|
2014-12-23 12:01:50 -08:00
|
|
|
require(specs.concat(pluginSpecs), function () {
|
|
|
|
|
window.__karma__.start();
|
|
|
|
|
});
|
2014-03-22 13:45:02 +01:00
|
|
|
});
|