karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [50/51] [partial] karaf-decanter git commit: KARAF-3624 - Add Kibana 4.x static feature and support
Date Mon, 15 Feb 2016 13:28:33 GMT
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/app.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/app.js b/kibana-3.x/src/main/resources/app/app.js
new file mode 100644
index 0000000..60a8c2b
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/app.js
@@ -0,0 +1,178 @@
+/**
+ * main app level module
+ */
+define([
+  'angular',
+  'jquery',
+  'lodash',
+  'require',
+  'elasticsearch',
+  'elasticjs',
+  'bootstrap',
+  'angular-sanitize',
+  'angular-strap',
+  'angular-dragdrop',
+  'angular-cookies',
+  'angular-resource',
+  'angular-route',
+  'extend-jquery',
+  'bindonce',
+],
+function (angular, $, _, appLevelRequire) {
+
+  "use strict";
+
+  var app = angular.module('kibana', []),
+    // we will keep a reference to each module defined before boot, so that we can
+    // go back and allow it to define new features later. Once we boot, this will be false
+    pre_boot_modules = [],
+    // these are the functions that we need to call to register different
+    // features if we define them after boot time
+    register_fns = {};
+
+  // This stores the Kibana revision number, @REV@ is replaced by grunt.
+  app.constant('kbnVersion',"@REV@");
+
+  // The minimum version that must be in the cluster
+  app.constant('esMinVersion','0.90.9');
+
+  // Use this for cache busting partials
+  app.constant('cacheBust',"cache-bust="+Date.now());
+
+  /**
+   * Tells the application to watch the module, once bootstraping has completed
+   * the modules controller, service, etc. functions will be overwritten to register directly
+   * with this application.
+   * @param  {[type]} module [description]
+   * @return {[type]}        [description]
+   */
+  app.useModule = function (module) {
+    if (pre_boot_modules) {
+      pre_boot_modules.push(module);
+    } else {
+      _.extend(module, register_fns);
+    }
+    return module;
+  };
+
+  app.safeApply = function ($scope, fn) {
+    switch($scope.$$phase) {
+    case '$apply':
+      // $digest hasn't started, we should be good
+      $scope.$eval(fn);
+      break;
+    case '$digest':
+      // waiting to $apply the changes
+      setTimeout(function () { app.safeApply($scope, fn); }, 10);
+      break;
+    default:
+      // clear to begin an $apply $$phase
+      $scope.$apply(fn);
+      break;
+    }
+  };
+
+  app.config(function ($routeProvider, $controllerProvider, $httpProvider, $compileProvider, $filterProvider, $provide) {
+
+
+    $httpProvider.interceptors.push(['$location', function($location) {
+      return {
+        responseError: function(resp) {
+          if (resp.status === 0) {
+            $location.path('/connectionFailed');
+            console.log(resp);
+          }
+        }
+      };
+    }]);
+
+    $routeProvider
+      .when('/connectionFailed', {
+        templateUrl: 'app/partials/connectionFailed.html',
+      })
+      .when('/dashboard', {
+        templateUrl: 'app/partials/dashboard.html',
+      })
+      .when('/dashboard/:kbnType/:kbnId', {
+        templateUrl: 'app/partials/dashboard.html',
+      })
+      .when('/dashboard/:kbnType/:kbnId/:params', {
+        templateUrl: 'app/partials/dashboard.html'
+      })
+      .otherwise({
+        redirectTo: 'dashboard'
+      });
+
+    // this is how the internet told me to dynamically add modules :/
+    register_fns.controller = $controllerProvider.register;
+    register_fns.directive  = $compileProvider.directive;
+    register_fns.factory    = $provide.factory;
+    register_fns.service    = $provide.service;
+    register_fns.filter     = $filterProvider.register;
+  });
+
+  var apps_deps = [
+    'elasticjs.service',
+    '$strap.directives',
+    'ngSanitize',
+    'ngDragDrop',
+    'ngCookies',
+    'ngResource',
+    'ngRoute',
+    'kibana',
+    'pasvaz.bindonce'
+  ];
+
+  _.each('controllers directives factories services filters'.split(' '),
+  function (type) {
+    var module_name = 'kibana.'+type;
+    // create the module
+    app.useModule(angular.module(module_name, []));
+    // push it into the apps dependencies
+    apps_deps.push(module_name);
+  });
+
+  app.panel_helpers = {
+    partial: function (name) {
+      return 'app/partials/'+name+'.html';
+    }
+  };
+
+  // load the core components
+  require([
+    'controllers/all',
+    'directives/all',
+    'filters/all'
+  ], function () {
+
+    // bootstrap the app
+    angular
+      .element(document)
+      .ready(function() {
+        $('html').attr('ng-controller', 'DashCtrl');
+        angular.bootstrap(document, apps_deps)
+          .invoke(['$rootScope', function ($rootScope) {
+            _.each(pre_boot_modules, function (module) {
+              _.extend(module, register_fns);
+            });
+            pre_boot_modules = false;
+
+            $rootScope.requireContext = appLevelRequire;
+            $rootScope.require = function (deps, fn) {
+              var $scope = this;
+              $scope.requireContext(deps, function () {
+                var deps = _.toArray(arguments);
+                // Check that this is a valid scope.
+                if($scope.$id) {
+                  $scope.$apply(function () {
+                    fn.apply($scope, deps);
+                  });
+                }
+              });
+            };
+          }]);
+      });
+  });
+
+  return app;
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/components/extend-jquery.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/components/extend-jquery.js b/kibana-3.x/src/main/resources/app/components/extend-jquery.js
new file mode 100644
index 0000000..7d81aa4
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/components/extend-jquery.js
@@ -0,0 +1,47 @@
+define(['jquery'],
+function ($) {
+  'use strict';
+
+  /**
+   * jQuery extensions
+   */
+  var $win = $(window);
+
+  $.fn.place_tt = (function () {
+    var defaults = {
+      offset: 5,
+      css: {
+        position : 'absolute',
+        top : -1000,
+        left : 0,
+        color : "#c8c8c8",
+        padding : '10px',
+        'font-size': '11pt',
+        'font-weight' : 200,
+        'background-color': '#1f1f1f',
+        'border-radius': '5px',
+        'z-index': 9999
+      }
+    };
+
+    return function (x, y, opts) {
+      opts = $.extend(true, {}, defaults, opts);
+      return this.each(function () {
+        var $tooltip = $(this), width, height;
+
+        $tooltip.css(opts.css);
+        if (!$.contains(document.body, $tooltip[0])) {
+          $tooltip.appendTo(document.body);
+        }
+
+        width = $tooltip.outerWidth(true);
+        height = $tooltip.outerHeight(true);
+
+        $tooltip.css('left', x + opts.offset + width > $win.width() ? x - opts.offset - width : x + opts.offset);
+        $tooltip.css('top', y + opts.offset + height > $win.height() ? y - opts.offset - height : y + opts.offset);
+      });
+    };
+  })();
+
+  return $;
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/components/kbn.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/components/kbn.js b/kibana-3.x/src/main/resources/app/components/kbn.js
new file mode 100644
index 0000000..a42e1cb
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/components/kbn.js
@@ -0,0 +1,632 @@
+define([
+  'jquery',
+  'lodash',
+  'moment',
+  'chromath'
+],
+function($, _, moment) {
+  'use strict';
+
+  var kbn = {};
+
+  kbn.get_object_fields = function(obj) {
+    var field_array = [];
+    obj = kbn.flatten_json(obj._source);
+    for (var field in obj) {
+      field_array.push(field);
+    }
+    return field_array.sort();
+  };
+
+  kbn.get_all_fields = function(data,flat) {
+    return _.uniq(_.without(_.reduce(data,function(memo,hit) {
+      return flat ? memo.concat(_.keys(kbn.flatten_json(hit._source))) : memo.concat(_.keys(hit._source));
+    },[]),'$$hashkey'));
+  };
+
+  kbn.has_field = function(obj,field) {
+    var obj_fields = kbn.get_object_fields(obj);
+    if (_.inArray(obj_fields,field) < 0) {
+      return false;
+    } else {
+      return true;
+    }
+  };
+
+  kbn.get_related_fields = function(docs,field) {
+    var field_array = [];
+    _.each(docs, function(doc) {
+      var keys = _.keys(doc);
+      if(_.contains(keys,field)) {
+        field_array = field_array.concat(keys);
+      }
+    });
+    var counts = _.countBy(_.without(field_array,field),function(field){return field;});
+    return _.map(counts, function(num, key){return {name:key,count:num};});
+  };
+
+  kbn.recurse_field_dots = function(object,field) {
+    var value = null;
+    var nested;
+    if (typeof object[field] !== 'undefined') {
+      value = object[field];
+    }
+    else if (nested = field.match(/(.*?)\.(.*)/)) {
+      if(typeof object[nested[1]] !== 'undefined') {
+        value = (typeof object[nested[1]][nested[2]] !== 'undefined') ?
+          object[nested[1]][nested[2]] : kbn.recurse_field_dots(
+            object[nested[1]],nested[2]);
+      }
+    }
+
+    return value;
+  };
+
+  kbn.top_field_values = function(docs,field,count,grouped) {
+    var all_values = _.pluck(docs,field),
+      groups = {},
+      counts,
+      hasArrays;
+    // manually grouping into pairs allows us to keep the original value,
+    _.each(all_values, function (value) {
+      var k;
+      if(_.isArray(value)) {
+        hasArrays =  true;
+      }
+      if(_.isArray(value) && !grouped) {
+        k = value;
+      } else {
+        k = _.isUndefined(value) ? '' : [value.toString()];
+      }
+      _.each(k, function(key) {
+        if (_.has(groups, key)) {
+          groups[key][1] ++;
+        } else {
+          groups[key] = [(grouped ? value : key), 1];
+        }
+      });
+    });
+
+    counts = _.values(groups).sort(function(a, b) {
+      return a[1] - b[1];
+    }).reverse().slice(0,count);
+
+    return {
+      counts: counts,
+      hasArrays : hasArrays
+    };
+  };
+
+   /**
+     * Calculate a graph interval
+     *
+     * from::           Date object containing the start time
+     * to::             Date object containing the finish time
+     * size::           Calculate to approximately this many bars
+     * user_interval::  User specified histogram interval
+     *
+     */
+  kbn.calculate_interval = function(from,to,size,user_interval) {
+    if(_.isObject(from)) {
+      from = from.valueOf();
+    }
+    if(_.isObject(to)) {
+      to = to.valueOf();
+    }
+    return user_interval === 0 ? kbn.round_interval((to - from)/size) : user_interval;
+  };
+
+  kbn.round_interval = function(interval) {
+    switch (true) {
+    // 0.5s
+    case (interval <= 500):
+      return 100;       // 0.1s
+    // 5s
+    case (interval <= 5000):
+      return 1000;      // 1s
+    // 7.5s
+    case (interval <= 7500):
+      return 5000;      // 5s
+    // 15s
+    case (interval <= 15000):
+      return 10000;     // 10s
+    // 45s
+    case (interval <= 45000):
+      return 30000;     // 30s
+    // 3m
+    case (interval <= 180000):
+      return 60000;     // 1m
+    // 9m
+    case (interval <= 450000):
+      return 300000;    // 5m
+    // 20m
+    case (interval <= 1200000):
+      return 600000;    // 10m
+    // 45m
+    case (interval <= 2700000):
+      return 1800000;   // 30m
+    // 2h
+    case (interval <= 7200000):
+      return 3600000;   // 1h
+    // 6h
+    case (interval <= 21600000):
+      return 10800000;  // 3h
+    // 24h
+    case (interval <= 86400000):
+      return 43200000;  // 12h
+    // 48h
+    case (interval <= 172800000):
+      return 86400000;  // 24h
+    // 1w
+    case (interval <= 604800000):
+      return 86400000;  // 24h
+    // 3w
+    case (interval <= 1814400000):
+      return 604800000; // 1w
+    // 2y
+    case (interval < 3628800000):
+      return 2592000000; // 30d
+    default:
+      return 31536000000; // 1y
+    }
+  };
+
+  kbn.secondsToHms = function(seconds){
+    var numyears = Math.floor(seconds / 31536000);
+    if(numyears){
+      return numyears + 'y';
+    }
+    var numdays = Math.floor((seconds % 31536000) / 86400);
+    if(numdays){
+      return numdays + 'd';
+    }
+    var numhours = Math.floor(((seconds % 31536000) % 86400) / 3600);
+    if(numhours){
+      return numhours + 'h';
+    }
+    var numminutes = Math.floor((((seconds % 31536000) % 86400) % 3600) / 60);
+    if(numminutes){
+      return numminutes + 'm';
+    }
+    var numseconds = (((seconds % 31536000) % 86400) % 3600) % 60;
+    if(numseconds){
+      return numseconds + 's';
+    }
+    return 'less then a second'; //'just now' //or other string you like;
+  };
+
+  kbn.to_percent = function(number,outof) {
+    return Math.floor((number/outof)*10000)/100 + "%";
+  };
+
+  kbn.addslashes = function(str) {
+    str = str.replace(/\\/g, '\\\\');
+    str = str.replace(/\'/g, '\\\'');
+    str = str.replace(/\"/g, '\\"');
+    str = str.replace(/\0/g, '\\0');
+    return str;
+  };
+
+  kbn.interval_regex = /(\d+(?:\.\d+)?)([Mwdhmsy])/;
+
+  // histogram & trends
+  kbn.intervals_in_seconds = {
+    y: 31536000,
+    M: 2592000,
+    w: 604800,
+    d: 86400,
+    h: 3600,
+    m: 60,
+    s: 1
+  };
+
+  kbn.describe_interval = function (string) {
+    var matches = string.match(kbn.interval_regex);
+    if (!matches || !_.has(kbn.intervals_in_seconds, matches[2])) {
+      throw new Error('Invalid interval string, expecting a number followed by one of "Mwdhmsy"');
+    } else {
+      return {
+        sec: kbn.intervals_in_seconds[matches[2]],
+        type: matches[2],
+        count: parseFloat(matches[1])
+      };
+    }
+  };
+
+  kbn.interval_to_ms = function(string) {
+    var info = kbn.describe_interval(string);
+    return Math.ceil(info.sec * 1000 * info.count);
+  };
+
+  kbn.interval_to_seconds = function (string) {
+    var info = kbn.describe_interval(string);
+    return Math.ceil(info.sec * info.count);
+  };
+
+  // This should go away, moment.js can do this
+  kbn.time_ago = function(string) {
+    return new Date(new Date().getTime() - (kbn.interval_to_ms(string)));
+  };
+
+  /* This is a simplified version of elasticsearch's date parser */
+  kbn.parseDate = function(text) {
+    if(_.isDate(text)) {
+      return text;
+    }
+    var time,
+      mathString = "",
+      index,
+      parseString;
+    if (text.substring(0,3) === "now") {
+      time = new Date();
+      mathString = text.substring("now".length);
+    } else {
+      index = text.indexOf("||");
+      parseString;
+      if (index === -1) {
+        parseString = text;
+        mathString = ""; // nothing else
+      } else {
+        parseString = text.substring(0, index);
+        mathString = text.substring(index + 2);
+      }
+      // We're going to just require ISO8601 timestamps, k?
+      time = new Date(parseString);
+    }
+
+    if (!mathString.length) {
+      return time;
+    }
+
+    //return [time,parseString,mathString];
+    return kbn.parseDateMath(mathString, time);
+  };
+
+  kbn.parseDateMath = function(mathString, time, roundUp) {
+    var dateTime = moment(time);
+    for (var i = 0; i < mathString.length; ) {
+      var c = mathString.charAt(i++),
+        type,
+        num,
+        unit;
+      if (c === '/') {
+        type = 0;
+      } else if (c === '+') {
+        type = 1;
+      } else if (c === '-') {
+        type = 2;
+      } else {
+        return false;
+      }
+
+      if (isNaN(mathString.charAt(i))) {
+        num = 1;
+      } else {
+        var numFrom = i;
+        while (!isNaN(mathString.charAt(i))) {
+          i++;
+        }
+        num = parseInt(mathString.substring(numFrom, i),10);
+      }
+      if (type === 0) {
+        // rounding is only allowed on whole numbers
+        if (num !== 1) {
+          return false;
+        }
+      }
+      unit = mathString.charAt(i++);
+      switch (unit) {
+      case 'y':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('year') : dateTime.startOf('year');
+        } else if (type === 1) {
+          dateTime.add('years',num);
+        } else if (type === 2) {
+          dateTime.subtract('years',num);
+        }
+        break;
+      case 'M':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('month') : dateTime.startOf('month');
+        } else if (type === 1) {
+          dateTime.add('months',num);
+        } else if (type === 2) {
+          dateTime.subtract('months',num);
+        }
+        break;
+      case 'w':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('week') : dateTime.startOf('week');
+        } else if (type === 1) {
+          dateTime.add('weeks',num);
+        } else if (type === 2) {
+          dateTime.subtract('weeks',num);
+        }
+        break;
+      case 'd':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('day') : dateTime.startOf('day');
+        } else if (type === 1) {
+          dateTime.add('days',num);
+        } else if (type === 2) {
+          dateTime.subtract('days',num);
+        }
+        break;
+      case 'h':
+      case 'H':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('hour') : dateTime.startOf('hour');
+        } else if (type === 1) {
+          dateTime.add('hours',num);
+        } else if (type === 2) {
+          dateTime.subtract('hours',num);
+        }
+        break;
+      case 'm':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('minute') : dateTime.startOf('minute');
+        } else if (type === 1) {
+          dateTime.add('minutes',num);
+        } else if (type === 2) {
+          dateTime.subtract('minutes',num);
+        }
+        break;
+      case 's':
+        if (type === 0) {
+          roundUp ? dateTime.endOf('second') : dateTime.startOf('second');
+        } else if (type === 1) {
+          dateTime.add('seconds',num);
+        } else if (type === 2) {
+          dateTime.subtract('seconds',num);
+        }
+        break;
+      default:
+        return false;
+      }
+    }
+    return dateTime.toDate();
+  };
+
+  // LOL. hahahahaha. DIE.
+  kbn.flatten_json = function(object,root,array) {
+    if (typeof array === 'undefined') {
+      array = {};
+    }
+    if (typeof root === 'undefined') {
+      root = '';
+    }
+    for(var index in object) {
+      var obj = object[index];
+      var rootname = root.length === 0 ? index : root + '.' + index;
+      if(typeof obj === 'object' ) {
+        if(_.isArray(obj)) {
+          if(obj.length > 0 && typeof obj[0] === 'object') {
+            var strval = '';
+            for (var objidx = 0, objlen = obj.length; objidx < objlen; objidx++) {
+              if (objidx > 0) {
+                strval = strval + ', ';
+              }
+
+              strval = strval + JSON.stringify(obj[objidx]);
+            }
+            array[rootname] = strval;
+          } else if(obj.length === 1 && _.isNumber(obj[0])) {
+            array[rootname] = parseFloat(obj[0]);
+          } else {
+            array[rootname] = typeof obj === 'undefined' ? null : obj;
+          }
+        } else {
+          kbn.flatten_json(obj,rootname,array);
+        }
+      } else {
+        array[rootname] = typeof obj === 'undefined' ? null : obj;
+      }
+    }
+    return kbn.sortObj(array);
+  };
+
+  kbn.xmlEnt = function(value) {
+    if(_.isString(value)) {
+      var stg1 = value.replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/\r\n/g, '<br/>')
+        .replace(/\r/g, '<br/>')
+        .replace(/\n/g, '<br/>')
+        .replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;')
+        .replace(/  /g, '&nbsp;&nbsp;')
+        .replace(/&lt;del&gt;/g, '<del>')
+        .replace(/&lt;\/del&gt;/g, '</del>');
+      return stg1;
+    } else {
+      return value;
+    }
+  };
+
+  kbn.sortObj = function(arr) {
+    // Setup Arrays
+    var sortedKeys = [];
+    var sortedObj = {};
+    var i;
+    // Separate keys and sort them
+    for (i in arr) {
+      sortedKeys.push(i);
+    }
+    sortedKeys.sort();
+
+    // Reconstruct sorted obj based on keys
+    for (i in sortedKeys) {
+      sortedObj[sortedKeys[i]] = arr[sortedKeys[i]];
+    }
+    return sortedObj;
+  };
+
+  kbn.query_color_dot = function (color, diameter) {
+    return '<div class="icon-circle" style="' + [
+        'display:inline-block',
+        'color:' + color,
+        'font-size:' + diameter + 'px',
+      ].join(';') + '"></div>';
+  };
+
+  kbn.colorSteps = function(col,steps) {
+
+    var _d = steps > 5 ? 1.6/steps : 0.25, // distance between steps
+      _p = []; // adjustment percentage
+
+    // Create a range of numbers between -0.8 and 0.8
+    for(var i = 1; i<steps+1; i+=1) {
+      _p.push(i%2 ? ((i-1)*_d*-1)/2 : i*_d/2);
+    }
+
+    // Create the color range
+    return _.map(_p.sort(function(a,b){return a-b;}),function(v) {
+      return v<0 ? Chromath.darken(col,v*-1).toString() : Chromath.lighten(col,v).toString();
+    });
+  };
+
+  // Find the smallest missing number in an array
+  kbn.smallestMissing = function(arr,start,end) {
+    start = start || 0;
+    end = end || arr.length-1;
+
+    if(start > end) {
+      return end + 1;
+    }
+    if(start !== arr[start]) {
+      return start;
+    }
+    var middle = Math.floor((start + end) / 2);
+
+    if (arr[middle] > middle) {
+      return kbn.smallestMissing(arr, start, middle);
+    } else {
+      return kbn.smallestMissing(arr, middle + 1, end);
+    }
+  };
+
+  kbn.byteFormat = function (size, decimals, min_resolution) {
+    var ext, steps = 0;
+
+    if (_.isUndefined(decimals)) {
+      decimals = 2;
+    }
+
+    if (_.isUndefined(min_resolution)) {
+      min_resolution = 0;
+    }
+
+
+    while (Math.abs(size) >= 1024) {
+      steps++;
+      size /= 1024;
+      min_resolution /= 1024;
+    }
+
+    switch (steps) {
+    case 0:
+      ext = " B";
+      break;
+    case 1:
+      ext = " KB";
+      break;
+    case 2:
+      ext = " MB";
+      break;
+    case 3:
+      ext = " GB";
+      break;
+    case 4:
+      ext = " TB";
+      break;
+    case 5:
+      ext = " PB";
+      break;
+    case 6:
+      ext = " EB";
+      break;
+    case 7:
+      ext = " ZB";
+      break;
+    case 8:
+      ext = " YB";
+      break;
+    }
+
+    if (min_resolution) {
+      min_resolution *= Math.pow(10, decimals);
+      while (min_resolution % 1 !== 0) {
+        decimals++;
+        min_resolution *= 10;
+      }
+    }
+
+    if (decimals === 0) {
+      decimals = undefined;
+    }
+
+    return (size.toFixed(decimals) + ext);
+  };
+
+  kbn.shortFormat = function (size, decimals, min_resolution) {
+    var ext, steps = 0;
+
+    if (_.isUndefined(decimals)) {
+      decimals = 2;
+    }
+    if (_.isUndefined(min_resolution)) {
+      min_resolution = 0;
+    }
+
+    while (Math.abs(size) >= 1000) {
+      steps++;
+      size /= 1000;
+      min_resolution /= 1000;
+    }
+
+    switch (steps) {
+    case 0:
+      ext = "";
+      break;
+    case 1:
+      ext = " K";
+      break;
+    case 2:
+      ext = " Mil";
+      break;
+    case 3:
+      ext = " Bil";
+      break;
+    case 4:
+      ext = " Tri";
+      break;
+    case 5:
+      ext = " Quadr";
+      break;
+    case 6:
+      ext = " Quint";
+      break;
+    case 7:
+      ext = " Sext";
+      break;
+    case 8:
+      ext = " Sept";
+      break;
+    }
+
+    if (min_resolution) {
+      min_resolution *= Math.pow(10, decimals);
+      while (min_resolution % 1 !== 0) {
+        decimals++;
+        min_resolution *= 10;
+      }
+    }
+
+    if (decimals === 0) {
+      decimals = undefined;
+    }
+
+    return (size.toFixed(decimals) + ext);
+  };
+
+  return kbn;
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/components/lodash.extended.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/components/lodash.extended.js b/kibana-3.x/src/main/resources/app/components/lodash.extended.js
new file mode 100644
index 0000000..fe9c3db
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/components/lodash.extended.js
@@ -0,0 +1,34 @@
+define([
+  'lodash-src'
+],
+function (_) {
+  'use strict';
+
+  /*
+    Mixins :)
+  */
+  _.mixin({
+    move: function (array, fromIndex, toIndex) {
+      array.splice(toIndex, 0, array.splice(fromIndex, 1)[0] );
+      return array;
+    },
+    remove: function (array, index) {
+      array.splice(index, 1);
+      return array;
+    },
+    // If variable is value, then return alt. If variable is anything else, return value;
+    toggle: function (variable, value, alt) {
+      return variable === value ? alt : value;
+    },
+    toggleInOut: function(array,value) {
+      if(_.contains(array,value)) {
+        array = _.without(array,value);
+      } else {
+        array.push(value);
+      }
+      return array;
+    }
+  });
+
+  return _;
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/components/require.config.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/components/require.config.js b/kibana-3.x/src/main/resources/app/components/require.config.js
new file mode 100644
index 0000000..5b0ff82
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/components/require.config.js
@@ -0,0 +1,112 @@
+/**
+ * Bootstrap require with the needed config, then load the app.js module.
+ */
+require.config({
+  baseUrl: 'app',
+  // urlArgs: 'r=@REV@',
+  paths: {
+    config:                   '../config',
+    settings:                 'components/settings',
+    kbn:                      'components/kbn',
+
+    vendor:                   '../vendor',
+    css:                      '../vendor/require/css',
+    text:                     '../vendor/require/text',
+    moment:                   '../vendor/moment',
+    blob:                     '../vendor/blob',
+    filesaver:                '../vendor/filesaver',
+    chromath:                 '../vendor/chromath',
+    angular:                  '../vendor/angular/angular',
+    'angular-cookies':        '../vendor/angular/angular-cookies',
+    'angular-dragdrop':       '../vendor/angular/angular-dragdrop',
+    'angular-strap':          '../vendor/angular/angular-strap',
+    'angular-sanitize':       '../vendor/angular/angular-sanitize',
+    'angular-resource':       '../vendor/angular/angular-resource',
+    'angular-route':          '../vendor/angular/angular-route',
+    'angular-loader':         '../vendor/angular/angular-loader',
+    timepicker:               '../vendor/angular/timepicker',
+    datepicker:               '../vendor/angular/datepicker',
+    bindonce:                 '../vendor/angular/bindonce',
+
+    lodash:                   'components/lodash.extended',
+    'lodash-src':             '../vendor/lodash',
+    'underscore.string':      '../vendor/underscore.string',
+    'simple_statistics':      '../vendor/simple_statistics',
+    bootstrap:                '../vendor/bootstrap/bootstrap',
+
+    jquery:                   '../vendor/jquery/jquery-1.8.0',
+    'jquery-ui':              '../vendor/jquery/jquery-ui-1.10.3',
+
+    'extend-jquery':          'components/extend-jquery',
+
+    'jquery.flot':            '../vendor/jquery/jquery.flot',
+    'jquery.flot.pie':        '../vendor/jquery/jquery.flot.pie',
+    'jquery.flot.events':     '../vendor/jquery/jquery.flot.events',
+    'jquery.flot.selection':  '../vendor/jquery/jquery.flot.selection',
+    'jquery.flot.stack':      '../vendor/jquery/jquery.flot.stack',
+    'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
+    'jquery.flot.time':       '../vendor/jquery/jquery.flot.time',
+    'jquery.flot.byte':       '../vendor/jquery/jquery.flot.byte',
+    'jquery.flot.threshold':  '../vendor/jquery/jquery.flot.threshold',
+     multiselect:             '../vendor/jquery/jquery.multiselect',
+
+
+    modernizr:                '../vendor/modernizr-2.6.1',
+    numeral:                  '../vendor/numeral',
+    jsonpath:                 '../vendor/jsonpath',
+    elasticjs:                '../vendor/elasticjs/elastic-angular-client',
+    elasticsearch:            '../vendor/elasticsearch.angular'
+  },
+  shim: {
+    angular: {
+      deps: ['jquery','config'],
+      exports: 'angular'
+    },
+
+    bootstrap: {
+      deps: ['jquery']
+    },
+
+    modernizr: {
+      exports: 'Modernizr'
+    },
+
+    jsonpath: {
+      exports: 'jsonPath'
+    },
+
+    jquery: {
+      exports: 'jQuery'
+    },
+
+    // simple dependency declaration
+    //
+    'jquery-ui':            ['jquery'],
+    'jquery.flot':          ['jquery'],
+    'jquery.flot.byte':     ['jquery', 'jquery.flot'],
+    '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.threshold':['jquery', 'jquery.flot'],
+
+    'angular-sanitize':     ['angular'],
+    'angular-cookies':      ['angular'],
+    'angular-dragdrop':     ['jquery','jquery-ui','angular'],
+    'angular-loader':       ['angular'],
+    'angular-mocks':        ['angular'],
+    'angular-resource':     ['angular'],
+    'angular-touch':        ['angular'],
+    'angular-route':        ['angular'],
+    'bindonce':             ['angular'],
+    'angular-strap':        ['angular', 'bootstrap','timepicker', 'datepicker'],
+
+    timepicker:             ['jquery', 'bootstrap'],
+    datepicker:             ['jquery', 'bootstrap'],
+    elasticsearch:          ['angular'],
+    elasticjs:              ['elasticsearch', '../vendor/elasticjs/elastic']
+  },
+  waitSeconds: 60,
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/components/settings.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/components/settings.js b/kibana-3.x/src/main/resources/app/components/settings.js
new file mode 100644
index 0000000..9a87544
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/components/settings.js
@@ -0,0 +1,31 @@
+define(['lodash'],
+function (_) {
+  "use strict";
+
+  return function Settings (options) {
+    /**
+     * To add a setting, you MUST define a default. Also,
+     * THESE ARE ONLY DEFAULTS.
+     * They are overridden by config.js in the root directory
+     * @type {Object}
+     */
+    var defaults = {
+      elasticsearch     : "http://"+window.location.hostname+":9200",
+      api_version       : "1.0",
+      sniff             : true,
+      request_timeout   : 30000,
+      panel_names       : [],
+      kibana_index      : 'kibana-int',
+      default_route     : '/dashboard/file/default.json'
+    };
+
+    // This initializes a new hash on purpose, to avoid adding parameters to
+    // config.js without providing sane defaults
+    var settings = {};
+    _.each(defaults, function(value, key) {
+      settings[key] = typeof options[key] !== 'undefined' ? options[key]  : defaults[key];
+    });
+
+    return settings;
+  };
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/controllers/all.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/controllers/all.js b/kibana-3.x/src/main/resources/app/controllers/all.js
new file mode 100644
index 0000000..05813c0
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/controllers/all.js
@@ -0,0 +1,6 @@
+define([
+  './dash',
+  './dashLoader',
+  './row',
+  './pulldown'
+], function () {});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/controllers/dash.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/controllers/dash.js b/kibana-3.x/src/main/resources/app/controllers/dash.js
new file mode 100644
index 0000000..5651745
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/controllers/dash.js
@@ -0,0 +1,114 @@
+define([
+  'angular',
+  'config',
+  'lodash',
+  'services/all'
+],
+function (angular, config, _) {
+  "use strict";
+
+  var module = angular.module('kibana.controllers');
+
+  module.controller('DashCtrl', function(
+    $scope, $route, ejsResource, fields, dashboard, alertSrv, panelMove, esVersion, kbnVersion) {
+
+    $scope.Math = Math;
+
+    $scope.editor = {
+      index: 0
+    };
+
+    // For moving stuff around the dashboard.
+    $scope.panelMoveDrop = panelMove.onDrop;
+    $scope.panelMoveStart = panelMove.onStart;
+    $scope.panelMoveStop = panelMove.onStop;
+    $scope.panelMoveOver = panelMove.onOver;
+    $scope.panelMoveOut = panelMove.onOut;
+
+    angular.element(window).bind('resize', function(){
+      $scope.$broadcast('render');
+    });
+
+    $scope.init = function() {
+      $scope.config = config;
+      $scope.kbnVersion = kbnVersion;
+      // Make stuff, including lodash available to views
+      $scope._ = _;
+      $scope.dashboard = dashboard;
+      $scope.dashAlerts = alertSrv;
+      $scope.esVersion = esVersion;
+
+      // Clear existing alerts
+      alertSrv.clearAll();
+
+      // Provide a global list of all seen fields
+      $scope.fields = fields;
+      $scope.reset_row();
+
+      $scope.ejs = ejsResource(config);
+    };
+
+    $scope.isPanel = function(obj) {
+      if(!_.isNull(obj) && !_.isUndefined(obj) && !_.isUndefined(obj.type)) {
+        return true;
+      } else {
+        return false;
+      }
+    };
+
+    $scope.add_row = function(dash,row) {
+      dash.rows.push(row);
+    };
+
+    $scope.reset_row = function() {
+      $scope.row = {
+        title: '',
+        height: '150px',
+        editable: true,
+      };
+    };
+
+    $scope.row_style = function(row) {
+      return { 'min-height': row.collapse ? '5px' : row.height };
+    };
+
+    $scope.panel_path =function(type) {
+      if(type) {
+        return 'app/panels/'+type.replace(".","/");
+      } else {
+        return false;
+      }
+    };
+
+    $scope.edit_path = function(type) {
+      var p = $scope.panel_path(type);
+      if(p) {
+        return p+'/editor.html';
+      } else {
+        return false;
+      }
+    };
+
+    $scope.pulldownTabStyle = function(i) {
+      var classes = ['bgPrimary','bgSuccess','bgWarning','bgDanger','bgInverse','bgInfo'];
+      i = i%classes.length;
+      return classes[i];
+    };
+
+    $scope.setEditorTabs = function(panelMeta) {
+      $scope.editorTabs = ['General','Panel'];
+      if(!_.isUndefined(panelMeta.editorTabs)) {
+        $scope.editorTabs =  _.union($scope.editorTabs,_.pluck(panelMeta.editorTabs,'title'));
+      }
+      return $scope.editorTabs;
+    };
+
+    // This is whoafully incomplete, but will do for now
+    $scope.parse_error = function(data) {
+      var _error = data.match("nested: (.*?);");
+      return _.isNull(_error) ? data : _error[1];
+    };
+
+    $scope.init();
+  });
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/controllers/dashLoader.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/controllers/dashLoader.js b/kibana-3.x/src/main/resources/app/controllers/dashLoader.js
new file mode 100644
index 0000000..045cdd0
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/controllers/dashLoader.js
@@ -0,0 +1,128 @@
+define([
+  'angular',
+  'lodash'
+],
+function (angular, _) {
+  'use strict';
+
+  var module = angular.module('kibana.controllers');
+
+  module.controller('dashLoader', function($scope, $http, timer, dashboard, alertSrv, $location) {
+    $scope.loader = dashboard.current.loader;
+
+    $scope.init = function() {
+      $scope.gist_pattern = /(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
+      $scope.gist = $scope.gist || {};
+      $scope.elasticsearch = $scope.elasticsearch || {};
+    };
+
+    $scope.showDropdown = function(type) {
+      if(_.isUndefined(dashboard.current.loader)) {
+        return true;
+      }
+
+      var _l = dashboard.current.loader;
+      if(type === 'load') {
+        return (_l.load_elasticsearch || _l.load_gist || _l.load_local);
+      }
+      if(type === 'save') {
+        return (_l.save_elasticsearch || _l.save_gist || _l.save_local || _l.save_default);
+      }
+      if(type === 'share') {
+        return (_l.save_temp);
+      }
+      return false;
+    };
+
+    $scope.set_default = function() {
+      if(dashboard.set_default($location.path())) {
+        alertSrv.set('Home Set','This page has been set as your default Kibana dashboard','success',5000);
+      } else {
+        alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000);
+      }
+    };
+
+    $scope.purge_default = function() {
+      if(dashboard.purge_default()) {
+        alertSrv.set('Local Default Clear','Your Kibana default dashboard has been reset to the default',
+          'success',5000);
+      } else {
+        alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000);
+      }
+    };
+
+    $scope.elasticsearch_save = function(type,ttl) {
+      dashboard.elasticsearch_save(
+        type,
+        ($scope.elasticsearch.title || dashboard.current.title),
+        ($scope.loader.save_temp_ttl_enable ? ttl : false)
+      ).then(
+        function(result) {
+        if(!_.isUndefined(result._id)) {
+          alertSrv.set('Dashboard Saved','This dashboard has been saved to Elasticsearch as "' +
+            result._id + '"','success',5000);
+          if(type === 'temp') {
+            $scope.share = dashboard.share_link(dashboard.current.title,'temp',result._id);
+          }
+        } else {
+          alertSrv.set('Save failed','Dashboard could not be saved to Elasticsearch','error',5000);
+        }
+      });
+    };
+
+    $scope.elasticsearch_delete = function(id) {
+      dashboard.elasticsearch_delete(id).then(
+        function(result) {
+          if(!_.isUndefined(result)) {
+            if(result.found) {
+              alertSrv.set('Dashboard Deleted',id+' has been deleted','success',5000);
+              // Find the deleted dashboard in the cached list and remove it
+              var toDelete = _.where($scope.elasticsearch.dashboards,{_id:id})[0];
+              $scope.elasticsearch.dashboards = _.without($scope.elasticsearch.dashboards,toDelete);
+            } else {
+              alertSrv.set('Dashboard Not Found','Could not find '+id+' in Elasticsearch','warning',5000);
+            }
+          } else {
+            alertSrv.set('Dashboard Not Deleted','An error occurred deleting the dashboard','error',5000);
+          }
+        }
+      );
+    };
+
+    $scope.elasticsearch_dblist = function(query) {
+      dashboard.elasticsearch_list(query,$scope.loader.load_elasticsearch_size).then(
+        function(result) {
+        if(!_.isUndefined(result.hits)) {
+          $scope.hits = result.hits.total;
+          $scope.elasticsearch.dashboards = result.hits.hits;
+        }
+      });
+    };
+
+    $scope.save_gist = function() {
+      dashboard.save_gist($scope.gist.title).then(
+        function(link) {
+        if(!_.isUndefined(link)) {
+          $scope.gist.last = link;
+          alertSrv.set('Gist saved','You will be able to access your exported dashboard file at '+
+            '<a href="'+link+'">'+link+'</a> in a moment','success');
+        } else {
+          alertSrv.set('Save failed','Gist could not be saved','error',5000);
+        }
+      });
+    };
+
+    $scope.gist_dblist = function(id) {
+      dashboard.gist_list(id).then(
+        function(files) {
+        if(files && files.length > 0) {
+          $scope.gist.files = files;
+        } else {
+          alertSrv.set('Gist Failed','Could not retrieve dashboard list from gist','error',5000);
+        }
+      });
+    };
+
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/controllers/pulldown.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/controllers/pulldown.js b/kibana-3.x/src/main/resources/app/controllers/pulldown.js
new file mode 100644
index 0000000..9534298
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/controllers/pulldown.js
@@ -0,0 +1,45 @@
+define([
+  'angular',
+  'app',
+  'lodash'
+],
+function (angular, app, _) {
+  'use strict';
+
+  var module = angular.module('kibana.controllers');
+
+  module.controller('PulldownCtrl', function($scope, $rootScope, $timeout,ejsResource, querySrv) {
+      var _d = {
+        collapse: false,
+        notice: false,
+        enable: true
+      };
+
+      _.defaults($scope.pulldown,_d);
+
+      $scope.init = function() {
+        $scope.querySrv = querySrv;
+
+        // Provide a combined skeleton for panels that must interact with panel and row.
+        // This might create name spacing issues.
+        $scope.panel = $scope.pulldown;
+        $scope.row = $scope.pulldown;
+      };
+
+      $scope.toggle_pulldown = function(pulldown) {
+        pulldown.collapse = pulldown.collapse ? false : true;
+        if (!pulldown.collapse) {
+          $timeout(function() {
+            $scope.$broadcast('render');
+          });
+        } else {
+          $scope.row.notice = false;
+        }
+      };
+
+      $scope.init();
+
+    }
+  );
+
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/controllers/row.js
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/controllers/row.js b/kibana-3.x/src/main/resources/app/controllers/row.js
new file mode 100644
index 0000000..de5ff8c
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/controllers/row.js
@@ -0,0 +1,117 @@
+define([
+  'angular',
+  'app',
+  'lodash'
+],
+function (angular, app, _) {
+  'use strict';
+
+  var module = angular.module('kibana.controllers');
+
+  module.controller('RowCtrl', function($scope, $rootScope, $timeout,ejsResource, querySrv) {
+      var _d = {
+        title: "Row",
+        height: "150px",
+        collapse: false,
+        collapsable: true,
+        editable: true,
+        panels: [],
+        notice: false
+      };
+
+      _.defaults($scope.row,_d);
+
+      $scope.init = function() {
+        $scope.querySrv = querySrv;
+        $scope.reset_panel();
+      };
+
+      $scope.toggle_row = function(row) {
+        if(!row.collapsable) {
+          return;
+        }
+        row.collapse = row.collapse ? false : true;
+        if (!row.collapse) {
+          $timeout(function() {
+            $scope.$broadcast('render');
+          });
+        } else {
+          row.notice = false;
+        }
+      };
+
+      $scope.rowSpan = function(row) {
+        var panels = _.filter(row.panels, function(p) {
+          return $scope.isPanel(p);
+        });
+        return _.reduce(_.pluck(panels,'span'), function(p,v) {
+          return p+v;
+        },0);
+      };
+
+      // This can be overridden by individual panels
+      $scope.close_edit = function() {
+        $scope.$broadcast('render');
+      };
+
+      $scope.add_panel = function(row,panel) {
+        $scope.row.panels.push(panel);
+      };
+
+      $scope.duplicate_panel = function(panel) {
+        var clone = angular.copy(panel);
+        $scope.row.panels.push(clone);
+      };
+
+      /** @scratch /panels/0
+       * [[panels]]
+       * = Panels
+       *
+       * [partintro]
+       * --
+       * *Kibana* dashboards are made up of blocks called +panels+. Panels are organized into rows
+       * and can serve many purposes, though most are designed to provide the results of a query or
+       * multiple queries as a visualization. Other panels may show collections of documents or
+       * allow you to insert instructions for your users.
+       *
+       * Panels can be configured easily via the Kibana web interface. For more advanced usage, such
+       * as templated or scripted dashboards, documentation of panel properties is available in this
+       * section. You may find settings here which are not exposed via the web interface.
+       *
+       * Each panel type has its own properties, hover there are several that are shared.
+       *
+      */
+
+      $scope.reset_panel = function(type) {
+        var
+          defaultSpan = 4,
+          _as = 12-$scope.rowSpan($scope.row);
+
+        $scope.panel = {
+          error   : false,
+          /** @scratch /panels/1
+           * span:: A number, 1-12, that describes the width of the panel.
+           */
+          span    : _as < defaultSpan && _as > 0 ? _as : defaultSpan,
+          /** @scratch /panels/1
+           * editable:: Enable or disable the edit button the the panel
+           */
+          editable: true,
+          /** @scratch /panels/1
+           * type:: The type of panel this object contains. Each panel type will require additional
+           * properties. See the panel types list to the right.
+           */
+          type    : type
+        };
+      };
+
+      /** @scratch /panels/2
+       * --
+       */
+
+      $scope.init();
+
+    }
+  );
+
+});

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/dashboards/activemq.json
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/dashboards/activemq.json b/kibana-3.x/src/main/resources/app/dashboards/activemq.json
new file mode 100644
index 0000000..c43c8f3
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/dashboards/activemq.json
@@ -0,0 +1,754 @@
+{
+  "title": "ActiveMQ",
+  "services": {
+    "query": {
+      "list": {
+        "0": {
+          "query": "ObjectName:org.apache.activemq*",
+          "alias": "",
+          "color": "#7EB26D",
+          "id": 0,
+          "pin": false,
+          "type": "lucene",
+          "enable": true
+        },
+        "1": {
+          "id": 1,
+          "color": "#EAB839",
+          "alias": "Log",
+          "pin": false,
+          "type": "lucene",
+          "enable": true,
+          "query": "loggerName:org.apache.activemq*"
+        }
+      },
+      "ids": [
+        0,
+        1
+      ]
+    },
+    "filter": {
+      "list": {
+        "0": {
+          "type": "time",
+          "field": "@timestamp",
+          "from": "now-5m",
+          "to": "now",
+          "mandate": "must",
+          "active": true,
+          "alias": "",
+          "id": 0
+        }
+      },
+      "ids": [
+        0
+      ]
+    }
+  },
+  "rows": [
+    {
+      "title": "Broker",
+      "height": "250px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "span": 6,
+          "editable": true,
+          "type": "multifieldhistogram",
+          "loadingEditor": false,
+          "values": [
+            {
+              "mode": "mean",
+              "value_field": "ConsumerCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#584477",
+              "alias": "Consumers"
+            },
+            {
+              "mode": "mean",
+              "value_field": "ProducerCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#890F02",
+              "alias": "Producers"
+            },
+            {
+              "mode": "mean",
+              "value_field": "CurrentConnectionsCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#6ED0E0",
+              "alias": "Connections"
+            }
+          ],
+          "time_field": "@timestamp",
+          "x-axis": true,
+          "y-axis": true,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": true,
+          "resolution": 100,
+          "interval": "1s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": true,
+          "fill": 0,
+          "linewidth": 1,
+          "points": false,
+          "pointradius": 2,
+          "stack": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Connections"
+        },
+        {
+          "span": 6,
+          "editable": true,
+          "type": "multifieldhistogram",
+          "loadingEditor": false,
+          "values": [
+            {
+              "mode": "mean",
+              "value_field": "MemoryPercentUsage",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#7EB26D",
+              "alias": "Memory"
+            },
+            {
+              "mode": "mean",
+              "value_field": "StorePercentUsage",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#EAB839",
+              "alias": "Store"
+            },
+            {
+              "mode": "mean",
+              "value_field": "TempPercentUsage",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#6ED0E0",
+              "alias": "Temp"
+            },
+            {
+              "mode": "mean",
+              "value_field": "CursorPercentUsage",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#EF843C",
+              "alias": "Cursor"
+            },
+            {
+              "mode": "mean",
+              "value_field": "Size",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#E24D42",
+              "alias": "Size"
+            }
+          ],
+          "time_field": "@timestamp",
+          "x-axis": true,
+          "y-axis": true,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": true,
+          "resolution": 100,
+          "interval": "1s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": true,
+          "fill": 0,
+          "linewidth": 3,
+          "points": false,
+          "pointradius": 5,
+          "stack": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Usages"
+        }
+      ],
+      "notice": false
+    },
+    {
+      "title": "Messages",
+      "height": "250px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "span": 4,
+          "editable": true,
+          "type": "multifieldhistogram",
+          "loadingEditor": false,
+          "values": [
+            {
+              "mode": "mean",
+              "value_field": "EnqueueCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#7EB26D",
+              "alias": "Enqueue"
+            },
+            {
+              "mode": "mean",
+              "value_field": "DequeueCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#EAB839",
+              "alias": "Dequeue"
+            }
+          ],
+          "time_field": "@timestamp",
+          "x-axis": true,
+          "y-axis": true,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": true,
+          "resolution": 100,
+          "interval": "1s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": true,
+          "fill": 0,
+          "linewidth": 1,
+          "points": false,
+          "pointradius": 5,
+          "stack": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Enqueue/Dequeue"
+        },
+        {
+          "error": false,
+          "span": 4,
+          "editable": true,
+          "type": "terms",
+          "loadingEditor": false,
+          "field": "Name",
+          "exclude": [],
+          "missing": false,
+          "other": false,
+          "size": 1,
+          "order": "mean",
+          "style": {
+            "font-size": "10pt"
+          },
+          "donut": false,
+          "tilt": false,
+          "labels": true,
+          "arrangement": "horizontal",
+          "chart": "pie",
+          "counter_pos": "above",
+          "spyable": true,
+          "queries": {
+            "mode": "all",
+            "ids": [
+              0,
+              1
+            ]
+          },
+          "multiterms": [],
+          "fmode": "normal",
+          "tmode": "terms_stats",
+          "tstat": "mean",
+          "valuefield": "QueueSize",
+          "title": "Message/Destination"
+        },
+        {
+          "span": 4,
+          "editable": true,
+          "type": "multifieldhistogram",
+          "loadingEditor": false,
+          "values": [
+            {
+              "mode": "mean",
+              "value_field": "ActiveTransactionCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#7EB26D",
+              "alias": "Transactions"
+            },
+            {
+              "mode": "mean",
+              "value_field": "DiscardedCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#EAB839",
+              "alias": "Discarded"
+            },
+            {
+              "mode": "mean",
+              "value_field": "DispatchCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#6ED0E0",
+              "alias": "Dispatch"
+            },
+            {
+              "mode": "mean",
+              "value_field": "ExpiredCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#EF843C",
+              "alias": "Expired"
+            },
+            {
+              "mode": "mean",
+              "value_field": "ForwardCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#E24D42",
+              "alias": "Forward"
+            },
+            {
+              "mode": "mean",
+              "value_field": "InFlightCount",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#1F78C1",
+              "alias": "Inflight"
+            }
+          ],
+          "time_field": "@timestamp",
+          "x-axis": true,
+          "y-axis": true,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": true,
+          "resolution": 100,
+          "interval": "1s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": true,
+          "fill": 0,
+          "linewidth": 1,
+          "points": false,
+          "pointradius": 5,
+          "stack": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Count"
+        }
+      ],
+      "notice": false
+    },
+    {
+      "title": "Events",
+      "height": "650px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "error": false,
+          "span": 6,
+          "editable": true,
+          "type": "table",
+          "loadingEditor": false,
+          "size": 100,
+          "pages": 5,
+          "offset": 0,
+          "sort": [
+            "_score",
+            "desc"
+          ],
+          "overflow": "min-height",
+          "fields": [],
+          "highlight": [],
+          "sortable": true,
+          "header": true,
+          "paging": true,
+          "field_list": false,
+          "all_fields": false,
+          "trimFactor": 300,
+          "localTime": false,
+          "timeField": "@timestamp",
+          "spyable": true,
+          "exportable": true,
+          "queries": {
+            "mode": "selected",
+            "ids": [
+              1
+            ]
+          },
+          "style": {
+            "font-size": "9pt"
+          },
+          "normTimes": true,
+          "title": "Log Messages"
+        },
+        {
+          "error": false,
+          "span": 6,
+          "editable": true,
+          "group": [
+            "default"
+          ],
+          "type": "table",
+          "size": 100,
+          "pages": 5,
+          "offset": 0,
+          "sort": [
+            "_score",
+            "desc"
+          ],
+          "style": {
+            "font-size": "9pt"
+          },
+          "overflow": "min-height",
+          "fields": [],
+          "highlight": [],
+          "sortable": true,
+          "header": true,
+          "paging": true,
+          "spyable": true,
+          "queries": {
+            "mode": "selected",
+            "ids": [
+              0
+            ]
+          },
+          "field_list": false,
+          "status": "Stable",
+          "trimFactor": 300,
+          "normTimes": true,
+          "title": "Monitoring Events",
+          "all_fields": false,
+          "localTime": false,
+          "timeField": "@timestamp",
+          "exportable": true
+        }
+      ],
+      "notice": false
+    }
+  ],
+  "editable": true,
+  "index": {
+    "interval": "none",
+    "pattern": "[logstash-]YYYY.MM.DD",
+    "default": "_all",
+    "warm_fields": false
+  },
+  "style": "dark",
+  "failover": false,
+  "panel_hints": true,
+  "loader": {
+    "save_gist": false,
+    "save_elasticsearch": true,
+    "save_local": true,
+    "save_default": true,
+    "save_temp": true,
+    "save_temp_ttl_enable": true,
+    "save_temp_ttl": "30d",
+    "load_gist": true,
+    "load_elasticsearch": true,
+    "load_elasticsearch_size": 20,
+    "load_local": true,
+    "hide": false
+  },
+  "pulldowns": [
+    {
+      "type": "query",
+      "collapse": true,
+      "notice": false,
+      "query": "*",
+      "pinned": true,
+      "history": [
+        "loggerName:org.apache.activemq*",
+        "type:\"jmx-activemq\"",
+        "level:\"INFO\"",
+        "level:*",
+        "*",
+        "ProducerCount:*",
+        "ObjectName:org.apache.activemq*",
+        "ObjectName:org.apache.activemq"
+      ],
+      "remember": 10,
+      "enable": true,
+      "values": [
+        {
+          "sem": "_type",
+          "comp_list": [
+            "ne",
+            "eq"
+          ],
+          "select_comp": "eq",
+          "input": ""
+        }
+      ],
+      "generate": false
+    },
+    {
+      "type": "filtering",
+      "collapse": true,
+      "notice": true,
+      "enable": true
+    }
+  ],
+  "nav": [
+    {
+      "type": "timepicker",
+      "collapse": false,
+      "notice": false,
+      "status": "Stable",
+      "time_options": [
+        "5m",
+        "15m",
+        "1h",
+        "6h",
+        "12h",
+        "24h",
+        "2d",
+        "7d",
+        "30d"
+      ],
+      "refresh_intervals": [
+        "5s",
+        "10s",
+        "30s",
+        "1m",
+        "5m",
+        "15m",
+        "30m",
+        "1h",
+        "2h",
+        "1d"
+      ],
+      "timefield": "@timestamp",
+      "enable": true,
+      "now": true,
+      "filter_id": 0
+    }
+  ],
+  "refresh": false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/dashboards/blank.json
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/dashboards/blank.json b/kibana-3.x/src/main/resources/app/dashboards/blank.json
new file mode 100644
index 0000000..614712e
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/dashboards/blank.json
@@ -0,0 +1,32 @@
+{
+  "title": "New Dashboard",
+  "services": {
+    "query": {
+      "list": {
+        "0": {
+          "query": "*",
+          "alias": "",
+          "color": "#7EB26D",
+          "id": 0
+        }
+      },
+      "ids": [
+        0
+      ]
+    },
+    "filter": {
+      "list": {},
+      "ids": []
+    }
+  },
+  "rows": [
+  ],
+  "editable": true,
+  "failover": false,
+  "index": {
+    "interval": "none",
+    "pattern": "[logstash-]YYYY.MM.DD",
+    "default": "_all",
+    "warm_fields": false
+  }
+}

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/dashboards/camel.json
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/dashboards/camel.json b/kibana-3.x/src/main/resources/app/dashboards/camel.json
new file mode 100644
index 0000000..877e74a
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/dashboards/camel.json
@@ -0,0 +1,688 @@
+{
+  "title": "Camel",
+  "services": {
+    "query": {
+      "list": {
+        "0": {
+          "query": "RouteId:\"test\"",
+          "alias": "Test",
+          "color": "#7EB26D",
+          "id": 0,
+          "pin": false,
+          "type": "lucene",
+          "enable": true
+        },
+        "1": {
+          "id": 1,
+          "color": "#EAB839",
+          "alias": "Other",
+          "pin": false,
+          "type": "lucene",
+          "enable": true,
+          "query": "RouteId:\"other\""
+        },
+        "2": {
+          "id": 2,
+          "color": "#6ED0E0",
+          "alias": "Camel Log",
+          "pin": false,
+          "type": "lucene",
+          "enable": true,
+          "query": "loggerName:org.apache.camel*"
+        },
+        "3": {
+          "id": 3,
+          "color": "#EF843C",
+          "alias": "tracer",
+          "pin": false,
+          "type": "lucene",
+          "enable": true,
+          "query": "type:\"camelTracer\""
+        }
+      },
+      "ids": [
+        0,
+        1,
+        2,
+        3
+      ]
+    },
+    "filter": {
+      "list": {
+        "0": {
+          "type": "time",
+          "field": "@timestamp",
+          "from": "now-5m",
+          "to": "now",
+          "mandate": "must",
+          "active": true,
+          "alias": "",
+          "id": 0
+        }
+      },
+      "ids": [
+        0
+      ]
+    }
+  },
+  "rows": [
+    {
+      "title": "Warning",
+      "height": "50px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "error": false,
+          "span": 12,
+          "editable": true,
+          "type": "text",
+          "loadingEditor": false,
+          "mode": "markdown",
+          "content": "Don't forget to update and add the queries corresponding to the Camel RouteId that you want to monitor in the Query panel.",
+          "style": {},
+          "title": "Warning !!"
+        }
+      ],
+      "notice": false
+    },
+    {
+      "title": "Exchanges",
+      "height": "250px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "span": 4,
+          "editable": true,
+          "type": "histogram",
+          "loadingEditor": false,
+          "mode": "mean",
+          "time_field": "@timestamp",
+          "value_field": "ExchangesTotal",
+          "x-axis": true,
+          "y-axis": true,
+          "scale": 1,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "queries": {
+            "mode": "selected",
+            "check": [],
+            "threshold": {},
+            "ids": [
+              0,
+              1
+            ]
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": false,
+          "resolution": 100,
+          "interval": "60s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": false,
+          "fill": 0,
+          "linewidth": 3,
+          "points": false,
+          "pointradius": 5,
+          "bars": true,
+          "stack": false,
+          "threshold": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "zerofill": true,
+          "derivative": false,
+          "tooltip": {
+            "value_type": "individual",
+            "query_as_alias": true
+          },
+          "title": "Exchanges Total"
+        },
+        {
+          "span": 4,
+          "editable": true,
+          "type": "histogram",
+          "loadingEditor": false,
+          "mode": "mean",
+          "time_field": "@timestamp",
+          "value_field": "ExchangesFailed",
+          "x-axis": true,
+          "y-axis": true,
+          "scale": 1,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "queries": {
+            "mode": "selected",
+            "check": [],
+            "threshold": {},
+            "ids": [
+              0,
+              1
+            ]
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": false,
+          "resolution": 100,
+          "interval": "60s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": false,
+          "fill": 0,
+          "linewidth": 3,
+          "points": false,
+          "pointradius": 5,
+          "bars": true,
+          "stack": false,
+          "threshold": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "zerofill": true,
+          "derivative": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Exchanges Failed"
+        },
+        {
+          "span": 4,
+          "editable": true,
+          "type": "histogram",
+          "loadingEditor": false,
+          "mode": "mean",
+          "time_field": "@timestamp",
+          "value_field": "InflightExchanges",
+          "x-axis": true,
+          "y-axis": true,
+          "scale": 1,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "queries": {
+            "mode": "selected",
+            "check": [],
+            "threshold": {},
+            "ids": [
+              0,
+              1
+            ]
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": false,
+          "resolution": 100,
+          "interval": "10s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": false,
+          "fill": 0,
+          "linewidth": 3,
+          "points": false,
+          "pointradius": 5,
+          "bars": true,
+          "stack": false,
+          "threshold": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "zerofill": true,
+          "derivative": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Inflight Exchanges"
+        }
+      ],
+      "notice": false
+    },
+    {
+      "title": "Processing",
+      "height": "250px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "span": 6,
+          "editable": true,
+          "type": "multifieldhistogram",
+          "loadingEditor": false,
+          "values": [
+            {
+              "mode": "mean",
+              "value_field": "LastProcessingTime",
+              "scale": 1,
+              "zerofill": false,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                0
+              ],
+              "color": "#7EB26D",
+              "alias": "Test"
+            },
+            {
+              "mode": "mean",
+              "value_field": "LastProcessingTime",
+              "scale": 1,
+              "zerofill": true,
+              "yaxisposition": "left",
+              "derivative": false,
+              "queries": [
+                1
+              ],
+              "color": "#EAB839",
+              "alias": "Other"
+            }
+          ],
+          "time_field": "@timestamp",
+          "x-axis": true,
+          "y-axis": true,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": true,
+          "resolution": 100,
+          "interval": "1s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": true,
+          "fill": 0,
+          "linewidth": 1,
+          "points": true,
+          "pointradius": 2,
+          "stack": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Last Processing"
+        },
+        {
+          "span": 6,
+          "editable": true,
+          "type": "histogram",
+          "loadingEditor": false,
+          "mode": "mean",
+          "time_field": "@timestamp",
+          "value_field": "MaxProcessingTime",
+          "x-axis": true,
+          "y-axis": true,
+          "scale": 1,
+          "y_format": "none",
+          "grid": {
+            "max": null,
+            "min": 0
+          },
+          "queries": {
+            "mode": "selected",
+            "check": [],
+            "threshold": {},
+            "ids": [
+              0,
+              1
+            ]
+          },
+          "annotate": {
+            "enable": false,
+            "query": "*",
+            "size": 20,
+            "field": "_type",
+            "sort": [
+              "_score",
+              "desc"
+            ]
+          },
+          "auto_int": false,
+          "resolution": 100,
+          "interval": "60s",
+          "intervals": [
+            "auto",
+            "1s",
+            "1m",
+            "5m",
+            "10m",
+            "30m",
+            "1h",
+            "3h",
+            "12h",
+            "1d",
+            "1w",
+            "1y"
+          ],
+          "lines": false,
+          "fill": 0,
+          "linewidth": 3,
+          "points": false,
+          "pointradius": 5,
+          "bars": true,
+          "stack": false,
+          "threshold": false,
+          "spyable": true,
+          "zoomlinks": true,
+          "options": true,
+          "legend": true,
+          "show_query": true,
+          "interactive": true,
+          "legend_counts": false,
+          "timezone": "browser",
+          "percentage": false,
+          "zerofill": true,
+          "derivative": false,
+          "tooltip": {
+            "value_type": "cumulative",
+            "query_as_alias": true
+          },
+          "title": "Max Processing"
+        }
+      ],
+      "notice": false
+    },
+    {
+      "title": "Events",
+      "height": "650px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": true,
+      "panels": [
+        {
+          "error": false,
+          "span": 6,
+          "editable": true,
+          "group": [
+            "default"
+          ],
+          "type": "table",
+          "size": 100,
+          "pages": 5,
+          "offset": 0,
+          "sort": [
+            "ObjectName",
+            "asc"
+          ],
+          "style": {
+            "font-size": "9pt"
+          },
+          "overflow": "min-height",
+          "fields": [],
+          "highlight": [],
+          "sortable": true,
+          "header": true,
+          "paging": true,
+          "spyable": true,
+          "queries": {
+            "mode": "selected",
+            "ids": [
+              2
+            ]
+          },
+          "field_list": false,
+          "status": "Stable",
+          "trimFactor": 300,
+          "normTimes": true,
+          "title": "Log Messages",
+          "all_fields": false,
+          "localTime": false,
+          "timeField": "@timestamp",
+          "exportable": true
+        },
+        {
+          "error": false,
+          "span": 6,
+          "editable": true,
+          "type": "table",
+          "loadingEditor": false,
+          "size": 100,
+          "pages": 5,
+          "offset": 0,
+          "sort": [
+            "_score",
+            "desc"
+          ],
+          "overflow": "min-height",
+          "fields": [],
+          "highlight": [],
+          "sortable": true,
+          "header": true,
+          "paging": true,
+          "field_list": false,
+          "all_fields": false,
+          "trimFactor": 300,
+          "localTime": false,
+          "timeField": "@timestamp",
+          "spyable": true,
+          "exportable": true,
+          "queries": {
+            "mode": "selected",
+            "ids": [
+              3
+            ]
+          },
+          "style": {
+            "font-size": "9pt"
+          },
+          "normTimes": true,
+          "title": "Tracer"
+        }
+      ],
+      "notice": false
+    }
+  ],
+  "editable": true,
+  "index": {
+    "interval": "none",
+    "pattern": "[logstash-]YYYY.MM.DD",
+    "default": "_all",
+    "warm_fields": false
+  },
+  "style": "dark",
+  "failover": false,
+  "panel_hints": true,
+  "loader": {
+    "save_gist": false,
+    "save_elasticsearch": true,
+    "save_local": true,
+    "save_default": true,
+    "save_temp": true,
+    "save_temp_ttl_enable": true,
+    "save_temp_ttl": "30d",
+    "load_gist": true,
+    "load_elasticsearch": true,
+    "load_elasticsearch_size": 20,
+    "load_local": true,
+    "hide": false
+  },
+  "pulldowns": [
+    {
+      "type": "query",
+      "collapse": false,
+      "notice": false,
+      "query": "*",
+      "pinned": true,
+      "history": [
+        "type:\"camelTracer\"",
+        "loggerName:org.apache.camel*",
+        "RouteId:\"other\"",
+        "RouteId:\"test\"",
+        "type=\"camel-tracer\"",
+        "*",
+        "MDC.bundle.name:*camel*",
+        "MDC.bundle.name:\"*camel*\"",
+        "type:\"log\"",
+        "RouteId:\"test\" AND MeanProcessingTime:\"*\""
+      ],
+      "remember": 10,
+      "enable": true,
+      "values": [],
+      "generate": false
+    },
+    {
+      "type": "filtering",
+      "collapse": true,
+      "notice": true,
+      "enable": true
+    }
+  ],
+  "nav": [
+    {
+      "type": "timepicker",
+      "collapse": false,
+      "notice": false,
+      "status": "Stable",
+      "time_options": [
+        "5m",
+        "15m",
+        "1h",
+        "6h",
+        "12h",
+        "24h",
+        "2d",
+        "7d",
+        "30d"
+      ],
+      "refresh_intervals": [
+        "5s",
+        "10s",
+        "30s",
+        "1m",
+        "5m",
+        "15m",
+        "30m",
+        "1h",
+        "2h",
+        "1d"
+      ],
+      "timefield": "@timestamp",
+      "enable": true,
+      "now": true,
+      "filter_id": 0
+    }
+  ],
+  "refresh": false
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0bcbfc59/kibana-3.x/src/main/resources/app/dashboards/default.json
----------------------------------------------------------------------
diff --git a/kibana-3.x/src/main/resources/app/dashboards/default.json b/kibana-3.x/src/main/resources/app/dashboards/default.json
new file mode 100644
index 0000000..07cb719
--- /dev/null
+++ b/kibana-3.x/src/main/resources/app/dashboards/default.json
@@ -0,0 +1,76 @@
+{
+  "title": "Decanter Dashboards",
+  "services": {
+    "query": {
+      "list": {
+        "0": {
+          "query": "*",
+          "alias": "",
+          "color": "#7EB26D",
+          "id": 0,
+          "pin": false,
+          "type": "lucene"
+        }
+      },
+      "ids": [
+        0
+      ]
+    },
+    "filter": {
+      "list": {},
+      "ids": []
+    }
+  },
+  "rows": [
+    {
+      "title": "Decanter",
+      "height": "100px",
+      "editable": true,
+      "collapse": false,
+      "collapsable": false,
+      "panels": [
+        {
+          "error": false,
+          "span": 12,
+          "editable": true,
+          "group": [
+            "default"
+          ],
+          "type": "text",
+          "mode": "markdown",
+          "title": "Decanter Kibana", 
+          "content": "### Welcome to Decanter. \n\nDecanter provides ready to use dashboards. You can change and update these dashboards to match your needs. \n\n 1. [Karaf](index.html#/dashboard/file/karaf.json) *Provide details about Karaf container* \n 2. [Camel](index.html#/dashboard/file/camel.json) *Provide details about Camel routes* \n 3. [ActiveMQ](index.html#/dashboard/file/activemq.json) *Provide details about ActiveMQ brokers* \n 4. [OperatingSystem](index.html#/dashboard/file/system.json) *Provide detail about Operating System using the system collector and system scripts* \n\n You can also create your own dashboards from scratch, for monitoring of your own application, BAM, etc. \n To do this, you can start from: \n 1. [Blank dashboard](index.html#/dashboard/file/blank.json) \n 2. [Simple dashboard](index.html#/dashboard/file/guided.json)",
+          "style": {},
+          "status": "Stable"
+        }
+      ]
+    }
+  ],
+  "editable": false,
+  "index": {
+    "interval": "none",
+    "pattern": "[logstash-]YYYY.MM.DD",
+    "default": "_all",
+    "warm_fields": false
+  },
+  "style": "dark",
+  "failover": false,
+  "panel_hints": true,
+  "pulldowns": [],
+  "nav": [],
+  "loader": {
+    "save_gist": false,
+    "save_elasticsearch": true,
+    "save_local": true,
+    "save_default": true,
+    "save_temp": true,
+    "save_temp_ttl_enable": true,
+    "save_temp_ttl": "30d",
+    "load_gist": true,
+    "load_elasticsearch": true,
+    "load_elasticsearch_size": 20,
+    "load_local": true,
+    "hide": false
+  },
+  "refresh": false
+}


Mime
View raw message