mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Trying to organize code more around features than the standard controllers, services structure
This commit is contained in:
parent
f9b0a01c74
commit
8268c65c57
@ -10,7 +10,6 @@ define([
|
||||
'./graphiteImport',
|
||||
'./playlistCtrl',
|
||||
'./inspectCtrl',
|
||||
'./opentsdbTargetCtrl',
|
||||
'./annotationsEditorCtrl',
|
||||
'./templateEditorCtrl',
|
||||
'./sharePanelCtrl',
|
||||
|
@ -2,4 +2,6 @@ define([
|
||||
'./panellinkeditor/module',
|
||||
'./graphite/datasource',
|
||||
'./influxdb/datasource',
|
||||
'./opentsdb/datasource',
|
||||
'./elasticsearch/datasource',
|
||||
], function () {});
|
||||
|
@ -24,7 +24,7 @@ function (angular, _, config, kbn, moment) {
|
||||
this.saveTemp = _.isUndefined(datasource.save_temp) ? true : datasource.save_temp;
|
||||
this.saveTempTTL = _.isUndefined(datasource.save_temp_ttl) ? '30d' : datasource.save_temp_ttl;
|
||||
|
||||
this.annotationEditorSrc = 'app/partials/elasticsearch/annotation_editor.html';
|
||||
this.annotationEditorSrc = 'app/features/elasticsearch/partials/annotations.editor.html';
|
||||
this.supportAnnotations = true;
|
||||
this.supportMetrics = false;
|
||||
}
|
@ -28,7 +28,7 @@ function (angular, _, $, config, kbn, moment) {
|
||||
this.supportAnnotations = true;
|
||||
this.supportMetrics = true;
|
||||
this.editorSrc = 'app/features/graphite/partials/query.editor.html';
|
||||
this.annotationEditorSrc = 'app/features/graphite/partials/annotation.editor.html';
|
||||
this.annotationEditorSrc = 'app/features/graphite/partials/annotations.editor.html';
|
||||
}
|
||||
|
||||
GraphiteDatasource.prototype.query = function(options) {
|
||||
|
@ -2,7 +2,8 @@ define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'kbn',
|
||||
'moment'
|
||||
'moment',
|
||||
'./queryCtrl',
|
||||
],
|
||||
function (angular, _, kbn) {
|
||||
'use strict';
|
||||
@ -13,7 +14,7 @@ function (angular, _, kbn) {
|
||||
|
||||
function OpenTSDBDatasource(datasource) {
|
||||
this.type = 'opentsdb';
|
||||
this.editorSrc = 'app/partials/opentsdb/editor.html';
|
||||
this.editorSrc = 'app/features/opentsdb/partials/query.editor.html';
|
||||
this.url = datasource.url;
|
||||
this.name = datasource.name;
|
||||
this.supportMetrics = true;
|
@ -2,7 +2,7 @@
|
||||
<div ng-repeat="target in panel.targets"
|
||||
class="grafana-target"
|
||||
ng-class="{'grafana-target-hidden': target.hide}"
|
||||
ng-controller="OpenTSDBTargetCtrl"
|
||||
ng-controller="OpenTSDBQueryCtrl"
|
||||
ng-init="init()">
|
||||
|
||||
<div class="grafana-target-inner-wrapper">
|
@ -8,7 +8,7 @@ function (angular, _, kbn) {
|
||||
|
||||
var module = angular.module('grafana.controllers');
|
||||
|
||||
module.controller('OpenTSDBTargetCtrl', function($scope, $timeout) {
|
||||
module.controller('OpenTSDBQueryCtrl', function($scope, $timeout) {
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.target.errors = validateTarget($scope.target);
|
@ -2,8 +2,6 @@ define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'config',
|
||||
'./opentsdb/opentsdbDatasource',
|
||||
'./elasticsearch/es-datasource',
|
||||
],
|
||||
function (angular, _, config) {
|
||||
'use strict';
|
||||
|
Loading…
Reference in New Issue
Block a user