The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/test/test-main.js

181 lines
5.9 KiB

require.config({
baseUrl: 'http://localhost:9876/base/',
paths: {
config: 'app/components/config',
kbn: 'app/components/kbn',
store: 'app/components/store',
settings: 'app/components/settings',
lodash: 'app/components/lodash.extended',
'lodash-src': 'vendor/lodash',
moment: 'vendor/moment',
chromath: 'vendor/chromath',
filesaver: 'vendor/filesaver',
angular: 'vendor/angular/angular',
'angular-route': 'vendor/angular-route/angular-route',
'angular-sanitize': 'vendor/angular-sanitize/angular-sanitize',
angularMocks: 'vendor/angular-mocks/angular-mocks',
'angular-dragdrop': 'vendor/angular-native-dragdrop/draganddrop',
'angular-ui': 'vendor/angular-ui/tabs',
'angular-strap': 'vendor/angular-other/angular-strap',
timepicker: 'vendor/angular-other/timepicker',
datepicker: 'vendor/angular-other/datepicker',
bindonce: 'vendor/angular-bindonce/bindonce',
crypto: 'vendor/crypto.min',
spectrum: 'vendor/spectrum',
jquery: 'vendor/jquery/dist/jquery',
bootstrap: 'vendor/bootstrap/bootstrap',
'bootstrap-tagsinput': 'vendor/tagsinput/bootstrap-tagsinput',
'extend-jquery': 'app/components/extend-jquery',
'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',
modernizr: 'vendor/modernizr-2.6.1',
'aws-sdk': 'vendor/aws-sdk/dist/aws-sdk.min',
},
shim: {
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'],
'jquery.flot.crosshair':['jquery', 'jquery.flot'],
'jquery.flot.fillbelow':['jquery', 'jquery.flot'],
'angular-route': ['angular'],
'angular-sanitize': ['angular'],
'angular-ui': ['angular'],
'angular-dragdrop': ['jquery', 'angular'],
'angular-mocks': ['angular'],
'angular-strap': ['angular', 'bootstrap','timepicker', 'datepicker'],
'bindonce': ['angular'],
'bootstrap-tagsinput': ['jquery'],
timepicker: ['jquery', 'bootstrap'],
datepicker: ['jquery', 'bootstrap'],
}
});
function file2moduleName(filePath) {
'use strict';
return filePath.replace(/\\/g, '/')
.replace(/^\/base\//, '')
.replace(/\.\w*$/, '');
}
require([
'angular',
'angularMocks',
'app/app',
], function(angular) {
'use strict';
var specs = [];
for (var file in window.__karma__.files) {
if (/base\/test\/specs.*/.test(file)) {
console.log(file);
file = file2moduleName(file);
console.log(file);
specs.push(file);
//file = file.replace(/^\/base\/test/, '');
//specs.push(file);
//window.tests.push();
}
}
require(specs, function() {
window.__karma__.start();
});
angular.module('grafana', ['ngRoute']);
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
angular.module('grafana.panels', []);
angular.module('grafana.filters', []);
angular.module('grafana.routes', ['ngRoute']);
// var specs = [
// 'specs/lexer-specs',
// 'specs/parser-specs',
// 'specs/gfunc-specs',
// 'specs/timeSeries-specs',
// 'specs/row-ctrl-specs',
// 'specs/graphiteTargetCtrl-specs',
// 'specs/graphiteDatasource-specs',
// 'specs/influxSeries-specs',
// 'specs/influxSeries08-specs',
// 'specs/influxQueryBuilder-specs',
// 'specs/influx09-querybuilder-specs',
// // 'specs/influxdb-datasource-specs',
// 'specs/influxdbQueryCtrl-specs',
// // 'specs/kairosdb-datasource-specs',
// 'specs/graph-ctrl-specs',
// 'specs/graph-specs',
// 'specs/graph-tooltip-specs',
// 'specs/seriesOverridesCtrl-specs',
// 'specs/shareModalCtrl-specs',
// 'specs/timeSrv-specs',
// 'specs/panelSrv-specs',
// 'specs/templateSrv-specs',
// 'specs/templateValuesSrv-specs',
// 'specs/kbn-format-specs',
// 'specs/dashboardSrv-specs',
// 'specs/dashboardViewStateSrv-specs',
// 'specs/singlestat-specs',
// 'specs/dynamicDashboardSrv-specs',
// 'specs/unsavedChangesSrv-specs',
// 'specs/value_select_dropdown_specs',
// 'specs/opentsdbDatasource-specs',
// 'specs/cloudwatch-datasource-specs',
// 'specs/elasticsearch-specs',
// 'specs/elasticsearch-querybuilder-specs',
// 'specs/elasticsearch-queryctrl-specs',
// 'specs/elasticsearch-indexPattern-specs',
// 'specs/elasticsearch-response-specs',
// 'specs/core/utils/datemath_specs',
// ];
//
// var pluginSpecs = (config.plugins.specs || []).map(function (spec) {
// return '../plugins/' + spec;
// });
});