refactoring: more moving stuff around

This commit is contained in:
Torkel Ödegaard 2015-10-30 14:44:40 +01:00
parent 1665cb4282
commit 6cf46b1635
27 changed files with 38 additions and 49 deletions

View File

@ -3,7 +3,6 @@ require.config({
baseUrl: 'public', baseUrl: 'public',
paths: { paths: {
kbn: 'app/components/kbn',
'extend-jquery': 'app/components/extend-jquery', 'extend-jquery': 'app/components/extend-jquery',
lodash: 'app/components/lodash.extended', lodash: 'app/components/lodash.extended',

View File

@ -1,8 +1,8 @@
define([ define([
'kbn',
'../core_module', '../core_module',
'app/core/utils/kbn',
], ],
function (kbn, coreModule) { function (coreModule, kbn) {
'use strict'; 'use strict';
coreModule.directive('dashUpload', function(timer, alertSrv, $location) { coreModule.directive('dashUpload', function(timer, alertSrv, $location) {

View File

@ -1,9 +1,9 @@
define([ define([
'angular', 'angular',
'kbn',
'../core_module', '../core_module',
'app/core/utils/kbn',
], ],
function (angular, kbn, coreModule) { function (angular, coreModule, kbn) {
'use strict'; 'use strict';
coreModule.directive('tip', function($compile) { coreModule.directive('tip', function($compile) {

View File

@ -1,9 +1,9 @@
define([ define([
'kbn', '../core_module',
'app/core/core_module', 'app/core/utils/kbn',
'app/core/utils/rangeutil', 'app/core/utils/rangeutil',
], ],
function (kbn, coreModule, rangeUtil) { function (coreModule, kbn, rangeUtil) {
'use strict'; 'use strict';
coreModule.directive('ngModelOnblur', function() { coreModule.directive('ngModelOnblur', function() {

View File

@ -1,6 +1,6 @@
define([ define([
'lodash', 'lodash',
'kbn' 'app/core/utils/kbn'
], ],
function (_, kbn) { function (_, kbn) {
'use strict'; 'use strict';

View File

@ -3,7 +3,7 @@ define([
'moment', 'moment',
'lodash', 'lodash',
'jquery', 'jquery',
'kbn', 'app/core/utils/kbn',
'app/core/utils/datemath', 'app/core/utils/datemath',
], ],
function (angular, moment, _, $, kbn, dateMath) { function (angular, moment, _, $, kbn, dateMath) {

View File

@ -1,11 +1,10 @@
define([ define([
'angular', 'angular',
'jquery', 'jquery',
'kbn',
'lodash', 'lodash',
'moment', 'moment',
], ],
function (angular, $, kbn, _, moment) { function (angular, $, _, moment) {
'use strict'; 'use strict';
var module = angular.module('grafana.services'); var module = angular.module('grafana.services');

View File

@ -1,7 +1,7 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn' 'app/core/utils/kbn'
], ],
function (angular, _, kbn) { function (angular, _, kbn) {
'use strict'; 'use strict';

View File

@ -1,8 +1,7 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn', 'app/core/utils/kbn',
'app/core/store'
], ],
function (angular, _, kbn) { function (angular, _, kbn) {
'use strict'; 'use strict';

View File

@ -1,11 +1,11 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn',
'moment', 'moment',
'app/core/config', 'app/core/config',
'app/core/utils/kbn',
'app/core/utils/datemath' 'app/core/utils/datemath'
], function (angular, _, kbn, moment, config, dateMath) { ], function (angular, _, moment, config, kbn, dateMath) {
'use strict'; 'use strict';
var module = angular.module('grafana.services'); var module = angular.module('grafana.services');

View File

@ -4,7 +4,7 @@
import angular = require('angular'); import angular = require('angular');
import _ = require('lodash'); import _ = require('lodash');
import moment = require('moment'); import moment = require('moment');
import kbn = require('kbn'); import kbn = require('app/core/utils/kbn');
import dateMath = require('app/core/utils/datemath'); import dateMath = require('app/core/utils/datemath');
import rangeUtil = require('app/core/utils/rangeutil'); import rangeUtil = require('app/core/utils/rangeutil');

View File

@ -1,12 +1,12 @@
define([ define([
'angular', 'angular',
'lodash',
'jquery',
'app/core/utils/kbn',
'app/core/utils/datemath', 'app/core/utils/datemath',
'app/core/utils/rangeutil', 'app/core/utils/rangeutil',
'lodash',
'kbn',
'jquery',
], ],
function (angular, dateMath, rangeUtil, _, kbn, $) { function (angular, _, $, kbn, dateMath, rangeUtil) {
'use strict'; 'use strict';
var module = angular.module('grafana.services'); var module = angular.module('grafana.services');

View File

@ -1,9 +1,9 @@
define([ define([
'angular', 'angular',
'kbn',
'lodash', 'lodash',
'app/core/utils/kbn',
], ],
function (angular, kbn, _) { function (angular, _, kbn) {
'use strict'; 'use strict';
angular angular

View File

@ -1,7 +1,7 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn', 'app/core/utils/kbn',
], ],
function (angular, _, kbn) { function (angular, _, kbn) {
'use strict'; 'use strict';

View File

@ -9,7 +9,7 @@ declare module 'app/core/config' {
export = config; export = config;
} }
declare module 'kbn' { declare module 'app/core/utils/kbn' {
var kbn : any; var kbn : any;
export = kbn; export = kbn;
} }

View File

@ -1,9 +1,9 @@
define([ define([
'angular', 'angular',
'jquery', 'jquery',
'kbn',
'moment', 'moment',
'lodash', 'lodash',
'app/core/utils/kbn',
'./graph.tooltip', './graph.tooltip',
'jquery.flot', 'jquery.flot',
'jquery.flot.events', 'jquery.flot.events',
@ -14,7 +14,7 @@ define([
'jquery.flot.fillbelow', 'jquery.flot.fillbelow',
'jquery.flot.crosshair' 'jquery.flot.crosshair'
], ],
function (angular, $, kbn, moment, _, GraphTooltip) { function (angular, $, moment, _, kbn, GraphTooltip) {
'use strict'; 'use strict';
var module = angular.module('grafana.directives'); var module = angular.module('grafana.directives');

View File

@ -1,12 +1,11 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn',
'jquery', 'jquery',
'jquery.flot', 'jquery.flot',
'jquery.flot.time', 'jquery.flot.time',
], ],
function (angular, _, kbn, $) { function (angular, _, $) {
'use strict'; 'use strict';
var module = angular.module('grafana.panels.graph'); var module = angular.module('grafana.panels.graph');

View File

@ -1,16 +1,15 @@
define([ define([
'angular', 'angular',
'jquery',
'lodash', 'lodash',
'kbn',
'moment', 'moment',
'app/core/utils/kbn',
'app/core/time_series', 'app/core/time_series',
'app/features/panel/panel_meta', 'app/features/panel/panel_meta',
'./seriesOverridesCtrl', './seriesOverridesCtrl',
'./graph', './graph',
'./legend', './legend',
], ],
function (angular, $, _, kbn, moment, TimeSeries, PanelMeta) { function (angular, _, moment, kbn, TimeSeries, PanelMeta) {
'use strict'; 'use strict';
var module = angular.module('grafana.panels.graph'); var module = angular.module('grafana.panels.graph');
@ -42,9 +41,9 @@ function (angular, $, _, kbn, moment, TimeSeries, PanelMeta) {
var _d = { var _d = {
// datasource name, null = default datasource // datasource name, null = default datasource
datasource: null, datasource: null,
// sets client side (flot) or native graphite png renderer (png) // sets client side (flot) or native graphite png renderer (png)
renderer: 'flot', renderer: 'flot',
// Show/hide the x-axis // Show/hide the x-axis
'x-axis' : true, 'x-axis' : true,
// Show/hide y-axis // Show/hide y-axis
'y-axis' : true, 'y-axis' : true,
@ -179,8 +178,8 @@ function (angular, $, _, kbn, moment, TimeSeries, PanelMeta) {
var series = new TimeSeries({ var series = new TimeSeries({
datapoints: datapoints, datapoints: datapoints,
alias: alias, alias: alias,
color: color, color: color,
}); });
if (datapoints && datapoints.length > 0) { if (datapoints && datapoints.length > 0) {

View File

@ -2,7 +2,7 @@ define([
'angular', 'angular',
'app/app', 'app/app',
'lodash', 'lodash',
'kbn', 'app/core/utils/kbn',
'app/core/time_series', 'app/core/time_series',
'app/features/panel/panel_meta', 'app/features/panel/panel_meta',
'./singleStatPanel', './singleStatPanel',

View File

@ -2,7 +2,7 @@ define([
'angular', 'angular',
'lodash', 'lodash',
'moment', 'moment',
'kbn', 'app/core/utils/kbn',
'./query_builder', './query_builder',
'./index_pattern', './index_pattern',
'./elastic_response', './elastic_response',

View File

@ -2,7 +2,7 @@ define([
'angular', 'angular',
'lodash', 'lodash',
'app/core/utils/datemath', 'app/core/utils/datemath',
'kbn', 'app/core/utils/kbn',
'./queryCtrl', './queryCtrl',
'./directives', './directives',
], ],

View File

@ -1,7 +1,7 @@
define([ define([
'angular', 'angular',
'lodash', 'lodash',
'kbn' 'app/core/utils/kbn'
], ],
function (angular, _, kbn) { function (angular, _, kbn) {
'use strict'; 'use strict';

View File

@ -1,7 +1,5 @@
define([ define([
'angular', 'angular',
'lodash',
'kbn',
], ],
function (angular) { function (angular) {
'use strict'; 'use strict';

View File

@ -1,8 +1,7 @@
define([ define([
'kbn',
'lodash', 'lodash',
'app/core/utils/datemath', 'app/core/utils/datemath',
], function(kbn, _, dateMath) { ], function(_, dateMath) {
'use strict'; 'use strict';
function ControllerTestContext() { function ControllerTestContext() {

View File

@ -1,5 +1,5 @@
define([ define([
'kbn', 'app/core/utils/kbn',
'app/core/utils/datemath' 'app/core/utils/datemath'
], function(kbn, dateMath) { ], function(kbn, dateMath) {
'use strict'; 'use strict';

View File

@ -2,9 +2,6 @@ require.config({
baseUrl: 'http://localhost:9876/base/', baseUrl: 'http://localhost:9876/base/',
paths: { paths: {
kbn: 'app/components/kbn',
settings: 'app/components/settings',
lodash: 'app/components/lodash.extended', lodash: 'app/components/lodash.extended',
'lodash-src': 'vendor/lodash', 'lodash-src': 'vendor/lodash',