working on graphite target editor
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
define([
|
||||
'angular',
|
||||
'underscore'
|
||||
],
|
||||
function (angular) {
|
||||
function (angular, _) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('kibana.controllers');
|
||||
@@ -9,7 +10,19 @@ function (angular) {
|
||||
module.controller('GraphiteTargetCtrl', function($scope) {
|
||||
|
||||
$scope.init = function() {
|
||||
console.log('target:', $scope.target);
|
||||
$scope.segments = [];
|
||||
var strSegments = $scope.target.target.split('.');
|
||||
_.each(strSegments, function (segment, index) {
|
||||
if (segment === '*') {
|
||||
segment = '<i class="icon-asterisk"><i>';
|
||||
}
|
||||
|
||||
$scope.segments[index] = { val: segment };
|
||||
});
|
||||
};
|
||||
|
||||
$scope.setSegmentStar = function (index) {
|
||||
$scope.segments[index] = {val: '<i class="icon-asterisk"><i>' };
|
||||
};
|
||||
|
||||
$scope.targetChanged = function() {
|
||||
|
||||
Reference in New Issue
Block a user