karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [15/30] karaf-decanter git commit: Add kibana embedded dashboard and feature
Date Wed, 04 Feb 2015 16:35:59 GMT
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/table/micropanel.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/table/micropanel.html b/kibana/src/main/resources/app/panels/table/micropanel.html
new file mode 100644
index 0000000..509c960
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/table/micropanel.html
@@ -0,0 +1,3 @@
+<a class="close" ng-click="dismiss()" href="">×</a><style></style><span><i class="pointer icon-search" ng-click="fieldExists(micropanel.field,'must');dismiss();" bs-tooltip="'Find events with this field'"></i> <i class="pointer icon-ban-circle" ng-click="fieldExists(micropanel.field,'mustNot');dismiss();" bs-tooltip="'Find events without this field'"></i> <strong>Micro Analysis of {{micropanel.field}} <span ng-if="micropanel.type">({{micropanel.type}})</span></strong> <span ng-show="micropanel.hasArrays">as <a class="link" ng-class="{'strong':micropanel.grouped}" ng-click="toggle_micropanel(micropanel.field,true)">Groups</a> / <a class="link" ng-class="{'strong':!micropanel.grouped}" ng-click="toggle_micropanel(micropanel.field,false)">Singles</a></span></span><table style="width:100%;table-layout:fixed" class="table table-striped table-unpadded"><thead><th style="width:15px"></th><th style="width:260px">Value</th><th style="width:40px">Action</th><th style="width:100px;text-align:
 right">Count / {{micropanel.count}} events</th></thead><tbody><tr ng-repeat="field in micropanel.values"><td>{{$index+1}}.</td><td style="word-wrap:break-word">{{{true: "__blank__", false:field[0] }[(field[0] == '' || field[0] == undefined) && field[0] != 0]|tableTruncate:panel.trimFactor:3}}</td><td><i class="pointer icon-search" ng-click="build_search(micropanel.field,field[0]);dismiss();"></i> <i class="pointer icon-ban-circle" ng-click="build_search(micropanel.field,field[0],true);dismiss();"></i></td><td class="progress" style="position:relative"><style scoped="">.progress {
+            overflow: visible;
+          }</style><div bs-tooltip="percent(field[1],data.length)" class="bar" ng-class="micropanelColor($index)" ng-style="{width: (field[1]/data.length) > 1 ? '100%' : percent(field[1],data.length)}"></div><span style="position:absolute;right:20px">{{field[1]}}</span></td></tr></tbody></table><div class="progress nomargin" ng-show="micropanel.grouped"><div ng-repeat="field in micropanel.values" bs-tooltip="$index+1+'. ('+percent(field[1],data.length)+')'" class="bar {{micropanelColor($index)}}" ng-style="{width: percent(field[1],data.length)};"></div></div><div><span ng-repeat="field in micropanel.related|orderBy:'count':true|limitTo:micropanel.limit track by $index"><a ng-click="toggle_field(field.name)" bs-tooltip="'Toggle {{field.name}} column'">{{field.name}}</a> ({{Math.round((field.count / micropanel.count) * 100)}}%),</span> <a class="link" ng-show="micropanel.related.length > micropanel.limit" ng-click="micropanel.limit = micropanel.limit + 10">More <i class="icon-caret-ri
 ght"></i></a></div><div class="row-fluid"><div class="span12"><div class="btn-group"><a class="btn dropdown-toggle pointer" data-toggle="dropdown"><i class="icon-list-ol"></i> Terms <span class="caret"></span></a><ul class="dropdown-menu"><li><a ng-click="termsModal(field,'bar');dismiss();">Bar</a></li><li><a ng-click="termsModal(field,'pie');dismiss();">Pie</a></li><li><a ng-click="termsModal(field,'table');dismiss();">Table</a></li></ul></div><div class="btn-group" ng-show="micropanel.hasStats"><a class="btn dropdown-toggle pointer" ng-click="statsModal(field);dismiss();"><i class="icon-list-ol"></i> Stats</a></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/table/modal.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/table/modal.html b/kibana/src/main/resources/app/panels/table/modal.html
new file mode 100644
index 0000000..e418fbf
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/table/modal.html
@@ -0,0 +1,31 @@
+<div class="modal-body"><style>.timepicker-to-column {
+        margin-top: 10px;
+      }
+
+      .timepicker-input input {
+        outline: 0 !important;
+        border: 0px !important;
+        -webkit-box-shadow: 0;
+        -moz-box-shadow: 0;
+        box-shadow: 0;
+        position: relative;
+      }
+
+      .timepicker-input input::-webkit-outer-spin-button,
+      .timepicker-input input::-webkit-inner-spin-button {
+          -webkit-appearance: none;
+          margin: 0;
+      }
+
+      input.timepicker-date {
+        width: 90px;
+      }
+      input.timepicker-hms {
+        width: 20px;
+      }
+      input.timepicker-ms {
+        width: 25px;
+      }
+      div.timepicker-now {
+        float: right;
+      }</style><h4>Top 10 terms in field {{modalField}}</h4><kibana-simple-panel ng-click="dismiss();" type="'{{facetType}}'" panel="{{facetPanel}}" ng-cloak=""></kibana-simple-panel></div><div class="modal-footer"><form name="input" style="margin-bottom:0"><button ng-click="dismiss();" class="btn btn-danger">Close</button></form></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/table/module.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/table/module.html b/kibana/src/main/resources/app/panels/table/module.html
new file mode 100644
index 0000000..f81a64d
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/table/module.html
@@ -0,0 +1,52 @@
+<div ng-controller="table" ng-init="init()"><style>.table-doc-table {
+      margin-left: 0px !important;
+      overflow-y: auto;
+    }
+    .table-sidebar {
+      width: 200px;
+      display: table-cell;
+      padding-right: 10px;
+    }
+    .table-main {
+      width: 100%;
+      display: table-cell;
+    }
+    .table-container {
+      display: table;
+      height: 100px;
+      width: 100%;
+      table-layout: fixed;
+    }
+    .table-fieldname {
+      white-space: nowrap;
+    }
+
+    .table-fieldname a {
+      word-wrap:break-word;
+      white-space: normal;
+    }
+
+    .table-details {
+      table-layout: fixed;
+    }
+
+    .table-details-field {
+      width: 200px;
+    }
+
+    .table-details-action {
+      width: 60px;
+      text-align: center;
+    }
+
+    .table-details-value {
+    }
+
+    .table-field-value {
+      white-space: pre-wrap;
+    }
+
+    .table-facet {
+      padding: 10px;
+      border: 1px solid #666;
+    }</style><div class="table-container"><div bindonce="" ng-class="{'table-sidebar':panel.field_list}" ng-if="panel.field_list"><div style="{{panel.overflow}}:{{panel.height||row.height}};overflow-y:auto"><strong>Fields <i class="icon-chevron-sign-left pointer" ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Hide field list'"></i></strong><p><div class="small"><span class="link small" ng-click="panel.all_fields = true;" ng-if="fields.list.length" ng-class="{strong:panel.all_fields}">All ({{fields.list.length}})</span> / <span class="link small" ng-click="panel.all_fields = false;" ng-class="{strong:!panel.all_fields}">Current ({{current_fields.length || 0}})</span></div><div><input type="text" class="input-medium" placeholder="Type to filter..." ng-model="fieldFilter"></div><div ng-show="panel.all_fields" class="small muted" style="margin-bottom:10px"><strong>Note</strong> These fields have been<br>extracted from your mapping.<br>Not all fields may be available<br>in 
 your source document.</div><ul class="unstyled" ng-if="panel.all_fields"><li class="table-fieldname" ng-style="panel.style" ng-repeat="field in fields.list|filter:fieldFilter|orderBy:identity"><i class="pointer" ng-class="{'icon-check': columns[field],'icon-check-empty': _.isUndefined(columns[field])}" ng-click="toggle_field(field)"></i> <a class="pointer" data-unique="1" bs-popover="'app/panels/table/micropanel.html'" data-placement="rightTop" ng-click="toggle_micropanel(field,true)" ng-class="{label: columns[field]}" bo-text="field"></a></li></ul><ul class="unstyled" ng-if="!panel.all_fields"><li class="table-fieldname" ng-style="panel.style" ng-repeat="field in current_fields|filter:fieldFilter|orderBy:identity"><i class="pointer" ng-class="{'icon-check': columns[field],'icon-check-empty': _.isUndefined(columns[field])}" ng-click="toggle_field(field)"></i> <a class="pointer" data-unique="1" bs-popover="'app/panels/table/micropanel.html'" data-placement="rightTop" ng-click="toggle
 _micropanel(field,true)" ng-class="{label: columns[field]}" bo-text="field"></a></li></ul></p></div></div><div ng-class="{'table-main':panel.field_list}" class="table-doc-table"><div style="{{panel.overflow}}:{{panel.height||row.height}};overflow-y:auto"><div class="table-facet" ng-if="modalField"><h4><button class="btn btn-mini btn-danger" ng-click="closeFacet();">close</button> {{adhocOpts.title}} <span class="pointer ng-scope ng-pristine ng-valid ui-draggable" bs-tooltip="'Drag to add to dashboard'" data-drag="true" data-jqyoui-options="kbnJqUiDraggableOptions" jqyoui-draggable="{animate:false,mutate:false,onStart:'panelMoveStart',onStop:'panelMoveStop',embedded:true}" ng-model="adhocOpts" data-original-title="" title="" aria-disabled="false" style="position: relative"><i class="icon-move"></i></span></h4><kibana-simple-panel type="'{{facetType}}'" panel="{{facetPanel}}" ng-cloak=""></kibana-simple-panel></div><i class="pull-left icon-chevron-sign-right pointer" ng-click="panel.f
 ield_list = !panel.field_list" bs-tooltip="'Show field list'" ng-show="!panel.field_list"></i><div class="row-fluid" ng-show="panel.paging"><div class="span1 offset1" style="text-align:right"><i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class="icon-circle-arrow-left pointer"></i> <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class="icon-arrow-left pointer"></i></div><div class="span8" style="text-align:center"><strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong> <small>of {{data.length}} available for paging</small></div><div class="span1" style="text-align:left"><i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class="icon-arrow-right pointer"></i></div></div><table class="table-hover table table-condensed" ng-style="panel.style"><thead ng-show="panel.header"><th ng-show="panel.fields.length<1">_source 
 (select columns from the list to the left)</th><th style="white-space:nowrap" ng-repeat="field in panel.fields"><i ng-show="!$first" class="pointer link icon-caret-left" ng-click="_.move(panel.fields,$index,$index-1)"></i> <span class="pointer" ng-click="set_sort(field)" ng-show="panel.sortable">{{field}} <i ng-show="field == panel.sort[0]" class="pointer link" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i></span> <span ng-show="!panel.sortable">{{field}}</span> <i ng-show="!$last" class="pointer link icon-caret-right" ng-click="_.move(panel.fields,$index,$index+1)"></i></th></thead><tbody bindonce="" ng-repeat="event in data| slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'"><tr ng-click="toggle_details(event)" class="pointer"><td ng-if="panel.fields.length<1" bo-text="event._source|stringify|tableTruncate:panel.trimFactor:1"></td><td ng-show="panel.fields.length>0" ng-repeat="field in panel.fields"><span ng-i
 f="!panel.localTime || panel.timeField != field" bo-html="(event.kibana.highlight[field]||event.kibana._source[field]) |tableHighlight | tableTruncate:panel.trimFactor:panel.fields.length" class="table-field-value"></span> <span ng-if="panel.localTime && panel.timeField == field" bo-html="event.sort[1]|tableLocalTime:event" class="table-field-value"></span></td></tr><tr ng-if="event.kibana.details"><td colspan="{{panel.fields.length}}" ng-switch="event.kibana.view"><span>View: <a class="link" ng-class="{'strong':event.kibana.view == 'table'}" ng-click="event.kibana.view = 'table'">Table</a> / <a class="link" ng-class="{'strong':event.kibana.view == 'json'}" ng-click="event.kibana.view = 'json'">JSON</a> / <a class="link" ng-class="{'strong':event.kibana.view == 'raw'}" ng-click="event.kibana.view = 'raw'">Raw</a> <i class="link pull-right icon-chevron-up" ng-click="toggle_details(event)"></i></span><table class="table table-bordered table-condensed table-details" ng-switch-when="tab
 le"><thead><th class="table-details-field">Field</th><th class="table-details-action">Action</th><th class="table-details-value">Value</th></thead><tr ng-repeat="(key,value) in event.kibana._source track by $index" ng-class-odd="'odd'"><td style="word-wrap:break-word" bo-text="key"></td><td style="white-space:nowrap"><i class="icon-search pointer" ng-click="build_search(key,value)" bs-tooltip="'Add filter to match this value'"></i> <i class="icon-ban-circle pointer" ng-click="build_search(key,value,true)" bs-tooltip="'Add filter to NOT match this value'"></i> <i class="pointer icon-th" ng-click="toggle_field(key)" bs-tooltip="'Toggle table column'"></i></td><td style="white-space:pre-wrap;word-wrap:break-word" bo-html="value|noXml|urlLink|stringify"></td></tr></table><pre style="white-space:pre-wrap;word-wrap:break-word" bo-html="without_kibana(event)|tableJson:2" ng-switch-when="json"></pre><pre bo-html="without_kibana(event)|tableJson:1" ng-switch-when="raw"></pre></td></tr></tbod
 y></table><div class="row-fluid" ng-show="panel.paging"><div class="span1 offset3" style="text-align:right"><i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class="icon-circle-arrow-left pointer"></i> <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class="icon-arrow-left pointer"></i></div><div class="span4" style="text-align:center"><strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong> <small>of {{data.length}} available for paging</small></div><div class="span1" style="text-align:left"><i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class="icon-arrow-right pointer"></i></div></div></div></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/table/module.js
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/table/module.js b/kibana/src/main/resources/app/panels/table/module.js
new file mode 100644
index 0000000..467aaea
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/table/module.js
@@ -0,0 +1,4 @@
+/*! kibana - v3.1.1 - 2014-10-02
+ * Copyright (c) 2014 Rashid Khan; Licensed Apache License */
+
+function jsonPath(obj,expr,arg){var P={resultType:arg&&arg.resultType||"VALUE",result:[],normalize:function(a){var b=[];return a.replace(/[\['](\??\(.*?\))[\]']/g,function(a,c){return"[#"+(b.push(c)-1)+"]"}).replace(/'?\.'?|\['?/g,";").replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"").replace(/#([0-9]+)/g,function(a,c){return b[c]})},asPath:function(a){for(var b=a.split(";"),c="$",d=1,e=b.length;e>d;d++)c+=/^[0-9*]+$/.test(b[d])?"["+b[d]+"]":"['"+b[d]+"']";return c},store:function(a,b){return a&&(P.result[P.result.length]="PATH"==P.resultType?P.asPath(a):b),!!a},trace:function(a,b,c){if(a){var d=a.split(";"),e=d.shift();if(d=d.join(";"),b&&b.hasOwnProperty(e))P.trace(d,b[e],c+";"+e);else if("*"===e)P.walk(e,d,b,c,function(a,b,c,d,e){P.trace(a+";"+c,d,e)});else if(".."===e)P.trace(d,b,c),P.walk(e,d,b,c,function(a,b,c,d,e){"object"==typeof d[a]&&P.trace("..;"+c,d[a],e+";"+a)});else if(/,/.test(e))for(var f=e.split(/'?,'?/),g=0,h=f.length;h>g;g++)P.trace(f[g]+";"+d,b,c);else/^\(.*?\)
 $/.test(e)?P.trace(P.eval(e,b,c.substr(c.lastIndexOf(";")+1))+";"+d,b,c):/^\?\(.*?\)$/.test(e)?P.walk(e,d,b,c,function(a,b,c,d,e){P.eval(b.replace(/^\?\((.*?)\)$/,"$1"),d[a],a)&&P.trace(a+";"+c,d,e)}):/^(-?[0-9]*):(-?[0-9]*):?([0-9]*)$/.test(e)&&P.slice(e,d,b,c)}else P.store(c,b)},walk:function(a,b,c,d,e){if(c instanceof Array)for(var f=0,g=c.length;g>f;f++)f in c&&e(f,a,b,c,d);else if("object"==typeof c)for(var h in c)c.hasOwnProperty(h)&&e(h,a,b,c,d)},slice:function(a,b,c,d){if(c instanceof Array){var e=c.length,f=0,g=e,h=1;a.replace(/^(-?[0-9]*):(-?[0-9]*):?(-?[0-9]*)$/g,function(a,b,c,d){f=parseInt(b||f),g=parseInt(c||g),h=parseInt(d||h)}),f=0>f?Math.max(0,f+e):Math.min(e,f),g=0>g?Math.max(0,g+e):Math.min(e,g);for(var i=f;g>i;i+=h)P.trace(i+";"+b,c,d)}},eval:function(x,_v,_vname){try{return $&&_v&&eval(x.replace(/@/g,"_v"))}catch(e){throw new SyntaxError("jsonPath: "+e.message+": "+x.replace(/@/g,"_v").replace(/\^/g,"_a"))}}},$=obj;return expr&&obj&&("VALUE"==P.resultType||"PATH
 "==P.resultType)?(P.trace(P.normalize(expr).replace(/^\$;/,""),obj,"$"),P.result.length?P.result:!1):void 0}define("jsonpath",function(a){return function(){var b;return b||a.jsonPath}}(this)),define("panels/table/module",["angular","app","lodash","kbn","moment","jsonpath"],function(a,b,c,d,e){var f=a.module("kibana.panels.table",[]);b.useModule(f),f.controller("table",["$rootScope","$scope","$modal","$q","$compile","$timeout","fields","querySrv","dashboard","filterSrv",function(b,e,f,g,h,i,j,k,l,m){e.panelMeta={modals:[{description:"Inspect",icon:"icon-info-sign",partial:"app/partials/inspector.html",show:e.panel.spyable}],editorTabs:[{title:"Paging",src:"app/panels/table/pagination.html"},{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"A paginated table of records matching your query or queries. Click on a row to expand it and review all of the fields associated with that document. <p>"};var n={size:100,pages:5,offset:0,sort:["_score","desc"],ove
 rflow:"min-height",fields:[],highlight:[],sortable:!0,header:!0,paging:!0,field_list:!0,all_fields:!1,trimFactor:300,localTime:!1,timeField:"@timestamp",spyable:!0,queries:{mode:"all",ids:[]},style:{"font-size":"9pt"},normTimes:!0};c.defaults(e.panel,n),e.init=function(){e.columns={},c.each(e.panel.fields,function(a){e.columns[a]=!0}),e.Math=Math,e.identity=a.identity,e.$on("refresh",function(){e.get_data()}),e.fields=j,e.get_data()},e.percent=d.to_percent,e.closeFacet=function(){e.modalField&&delete e.modalField},e.termsModal=function(b,c){e.closeFacet(),i(function(){e.modalField=b,e.adhocOpts={height:"200px",chart:c,field:b,span:e.panel.span,type:"terms",title:"Top 10 terms in field "+b},o(a.toJson(e.adhocOpts),"terms")},0)},e.statsModal=function(b){e.closeFacet(),i(function(){e.modalField=b,e.adhocOpts={height:"200px",field:b,mode:"mean",span:e.panel.span,type:"stats",title:"Statistics for "+b},o(a.toJson(e.adhocOpts),"stats")},0)};var o=function(a,b){e.facetPanel=a,e.facetType=b
 };e.toggle_micropanel=function(a,b){var f=c.map(e.data,function(a){return a.kibana._source}),g=d.top_field_values(f,a,10,b);e.micropanel={field:a,grouped:b,values:g.counts,hasArrays:g.hasArrays,related:d.get_related_fields(f,a),limit:10,count:c.countBy(f,function(b){return c.contains(c.keys(b),a)})["true"]};var h=e.ejs.client.get("/"+l.indices+"/_mapping/field/"+a,void 0,void 0,function(a,b){console.log(b)});return h.then(function(a){var b=c.uniq(jsonPath(a,"*.*.*.*.mapping.*.type"));c.isArray(b)&&(e.micropanel.type=b.join(", ")),c.intersection(b,["long","float","integer","double"]).length>0&&(e.micropanel.hasStats=!0)})},e.micropanelColor=function(a){var b=["bar-success","bar-warning","bar-danger","bar-info","bar-primary"];return a>b.length?"":b[a]},e.set_sort=function(a){e.panel.sort[0]===a?e.panel.sort[1]="asc"===e.panel.sort[1]?"desc":"asc":e.panel.sort[0]=a,e.get_data()},e.toggle_field=function(a){c.indexOf(e.panel.fields,a)>-1?(e.panel.fields=c.without(e.panel.fields,a),delete
  e.columns[a]):(e.panel.fields.push(a),e.columns[a]=!0)},e.toggle_highlight=function(a){c.indexOf(e.panel.highlight,a)>-1?e.panel.highlight=c.without(e.panel.highlight,a):e.panel.highlight.push(a)},e.toggle_details=function(a){a.kibana.details=a.kibana.details?!1:!0,a.kibana.view=a.kibana.view||"table"},e.page=function(a){e.panel.offset=a*e.panel.size,e.get_data()},e.build_search=function(b,d,f){var g;c.isArray(d)?g="("+c.map(d,function(b){return a.toJson(b)}).join(" AND ")+")":c.isUndefined(d)?(g="*",f=!f):g=a.toJson(d),e.panel.offset=0,m.set({type:"field",field:b,query:g,mandate:f?"mustNot":"must"})},e.fieldExists=function(a,b){m.set({type:"exists",field:a,mandate:b})},e.get_data=function(a,b){var f,g,h,i,j;e.panel.error=!1,0!==l.indices.length&&(j=[e.ejs.Sort(e.panel.sort[0]).order(e.panel.sort[1]).ignoreUnmapped(!0)],e.panel.localTime&&j.push(e.ejs.Sort(e.panel.timeField).order(e.panel.sort[1]).ignoreUnmapped(!0)),e.panelMeta.loading=!0,f=c.isUndefined(a)?0:a,e.segment=f,g=e.ejs
 .Request().indices(l.indices[f]),e.panel.queries.ids=k.idsByMode(e.panel.queries),i=k.getQueryObjs(e.panel.queries.ids),h=e.ejs.BoolQuery(),c.each(i,function(a){h=h.should(k.toEjsObj(a))}),g=g.query(e.ejs.FilteredQuery(h,m.getBoolFilter(m.ids()))).highlight(e.ejs.Highlight(e.panel.highlight).fragmentSize(2147483647).preTags("@start-highlight@").postTags("@end-highlight@")).size(e.panel.size*e.panel.pages).sort(j),e.populate_modal(g),g.doSearch().then(function(a){return e.panelMeta.loading=!1,0===f&&(e.panel.offset=0,e.hits=0,e.data=[],e.current_fields=[],b=e.query_id=(new Date).getTime()),c.isUndefined(a.error)?(e.query_id===b&&(e.data=e.data.concat(c.map(a.hits.hits,function(a){var b=c.clone(a),f=c.omit(a,"_source","sort","_score");return b.kibana={_source:c.extend(d.flatten_json(a._source),f),highlight:d.flatten_json(a.highlight||{})},e.current_fields=e.current_fields.concat(c.keys(b.kibana._source)),b})),e.current_fields=c.uniq(e.current_fields),e.hits+=a.hits.total,e.data=c.sort
 By(e.data,function(a){return c.isUndefined(a.sort)?a._score:a.sort[0]}),"desc"===e.panel.sort[1]&&e.data.reverse(),e.data=e.data.slice(0,e.panel.size*e.panel.pages),(e.data.length<e.panel.size*e.panel.pages||!c.contains(m.timeField(),e.panel.sort[0])||"desc"!==e.panel.sort[1])&&f+1<l.indices.length&&e.get_data(f+1,e.query_id)),void 0):(e.panel.error=e.parse_error(a.error),void 0)}))},e.populate_modal=function(b){e.inspector=a.toJson(JSON.parse(b.toString()),!0)},e.without_kibana=function(a){var b=c.clone(a);return delete b.kibana,b},e.set_refresh=function(a){e.refresh=a},e.close_edit=function(){e.refresh&&e.get_data(),e.columns=[],c.each(e.panel.fields,function(a){e.columns[a]=!0}),e.refresh=!1},e.locate=function(a,b){b=b.split(".");for(var c=/(.+)\[(\d+)\]/,d=0;d<b.length;d++){var e=c.exec(b[d]);a=e?a[e[1]][parseInt(e[2],10)]:a[b[d]]}return a}}]),f.filter("tableHighlight",function(){return function(a){return!c.isUndefined(a)&&!c.isNull(a)&&a.toString().length>0?a.toString().replace
 (/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n/g,"<br/>").replace(/@start-highlight@/g,'<code class="highlight">').replace(/@end-highlight@/g,"</code>"):""}}),f.filter("tableTruncate",function(){return function(a,b,d){return!c.isUndefined(a)&&!c.isNull(a)&&a.toString().length>0?a.length>b/d?a.substr(0,b/d)+"...":a:""}}),f.filter("tableJson",function(){var b;return function(d,e){return!c.isUndefined(d)&&!c.isNull(d)&&d.toString().length>0?(b=a.toJson(d,e>0?!0:!1),b=b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e>1&&(b=b.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,function(a){var b="number";return/^"/.test(a)?b=/:$/.test(a)?"key strong":"":/true|false/.test(a)?b="boolean":/null/.test(a)&&(b="null"),'<span class="'+b+'">'+a+"</span>"})),b):""}}),f.filter("tableLocalTime",function(){return function(a,b){return e(b.sort[1]).format("YYYY-MM-DDTHH:mm:ss.SSSZ")}})});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/table/pagination.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/table/pagination.html b/kibana/src/main/resources/app/panels/table/pagination.html
new file mode 100644
index 0000000..f5dd12a
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/table/pagination.html
@@ -0,0 +1 @@
+<div class="editor-row"><div class="section"><div class="editor-option"><h6>Show Controls</h6><input type="checkbox" ng-model="panel.paging" ng-checked="panel.paging"></div><div class="editor-option"><h6>Overflow</h6><select class="input-small" ng-model="panel.overflow" ng-options="f.value as f.key for f in [{key:'scroll',value:'height'},{key:'expand',value:'min-height'}]"></select></div></div><div class="section"><div class="editor-option"><h6>Per Page</h6><input type="number" class="input-mini" ng-model="panel.size" ng-change="get_data()"></div><div class="editor-option"><h6>&nbsp;</h6><center><i class="icon-remove"></i><center></center></center></div><div class="editor-option"><h6>Page limit</h6><input type="number" class="input-mini" ng-model="panel.pages" ng-change="get_data()"></div><div class="editor-option large"><h6>Pageable</h6><strong class="large">= {{panel.size * panel.pages}}</strong></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/terms/editor.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/terms/editor.html b/kibana/src/main/resources/app/panels/terms/editor.html
new file mode 100644
index 0000000..61634c8
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/terms/editor.html
@@ -0,0 +1 @@
+<div class="editor-row"><div class="section"><h5>Parameters</h5><div class="editor-option"><label class="small">Terms mode</label><select class="input-medium" ng-model="panel.tmode" ng-options="f for f in ['terms','terms_stats']" ng-change="set_refresh(true)"></select></div><div class="editor-option" ng-show="panel.tmode == 'terms_stats'"><label class="small">Stats type</label><select class="input-medium" ng-model="panel.tstat" ng-options="f for f in ['count', 'total_count', 'min', 'max', 'total', 'mean']"></select></div><div class="editor-option"><label class="small">Field</label><input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.field" ng-change="set_refresh(true)"></div><div class="editor-option" ng-show="panel.tmode == 'terms_stats'"><label class="small">Value field</label><input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.valuefield" ng-change="set_refresh(true)"></div><div class="editor-option"><label class="small">
 Length</label><input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)"></div><div class="editor-option"><label class="small">Order</label><select class="input-medium" ng-model="panel.order" ng-options="f for f in ['count','term','reverse_count','reverse_term']" ng-change="set_refresh(true)" ng-show="panel.tmode == 'terms'"></select><select class="input-medium" ng-model="panel.order" ng-options="f for f in ['term', 'reverse_term', 'count', 'reverse_count', 'total', 'reverse_total', 'min', 'reverse_min', 'max', 'reverse_max', 'mean', 'reverse_mean']" ng-change="set_refresh(true)" ng-show="panel.tmode == 'terms_stats'"></select></div><div class="editor-option" ng-show="panel.tmode == 'terms'"><label class="small">Exclude Terms(s) (comma separated)</label><input array-join="" type="text" ng-model="panel.exclude"></div></div></div><div class="editor-row"><div class="section"><h5>View Options</h5><div class="editor-option"><label class="small">Style</la
 bel><select class="input-small" ng-model="panel.chart" ng-options="f for f in ['bar','pie','table']"></select></div><div class="editor-option" ng-show="panel.chart == 'table'"><label class="small">Font Size</label><select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="editor-option" ng-show="panel.chart == 'bar' || panel.chart == 'pie'"><label class="small">Legend</label><select class="input-small" ng-model="panel.counter_pos" ng-options="f for f in ['above','below','none']"></select></div><div class="editor-option" ng-show="panel.chart != 'table' && panel.counter_pos != 'none'"><label class="small">Legend Format</label><select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></div><div class="editor-option"><label class="small">Missing</label>
 <input type="checkbox" ng-model="panel.missing" ng-checked="panel.missing"></div><div class="editor-option"><label class="small">Other</label><input type="checkbox" ng-model="panel.other" ng-checked="panel.other"></div><div class="editor-option" ng-show="panel.chart == 'pie'"><label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut"></div><div class="editor-option" ng-show="panel.chart == 'pie'"><label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt"></div><div class="editor-option" ng-show="panel.chart == 'pie'"><label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels"></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/terms/module.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/terms/module.html b/kibana/src/main/resources/app/panels/terms/module.html
new file mode 100644
index 0000000..a109acd
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/terms/module.html
@@ -0,0 +1,24 @@
+<div ng-controller="terms" ng-init="init()"><style>.pieLabel { pointer-events: none }
+    .terms-legend-term {
+      word-break: break-all;
+    }
+
+    .terms-remaining {
+      bottom:0;
+      top:0;
+      background-color: #f00;
+    }
+
+    .terms-wrapper {
+      display: table;
+      width: 100%;
+    }
+
+    .terms-legend {
+      display: table-row;
+      height: 0;
+    }
+
+    .terms-legend {
+      display: table-row;
+    }</style><div class="terms-wrapper"><div class="terms-legend" ng-show="panel.counter_pos == 'above' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="term in legend"><td><i class="icon-circle" ng-style="{color:term.color}"></i></td><td class="terms-legend-term" style="padding-right:10px;padding-left:10px">{{term.label}}</td><td>{{term.data[0][1]}}</td></tr></table><span class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="term in legend" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:term.color}"></i> <span class="terms-legend-term">{{term.label}}</span> ({{term.data[0][1]}})</span></span> <span class="small pull-left" ng-show="panel.tmode == 'terms_stats'">&nbsp | {{ panel.tstat }} of <strong>{{ panel.valuefield }}</strong></span></div><div style="clear:both"></div><div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" term
 s-chart="" params="{{panel}}" style="position:relative" class="pointer terms-chart"></div><div class="terms-legend" ng-show="panel.counter_pos == 'below' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="term in legend"><td><i class="icon-circle" ng-style="{color:term.color}"></i></td><td class="terms-legend-term" style="padding-right:10px;padding-left:10px">{{term.label}}</td><td>{{term.data[0][1]}}</td></tr></table><span class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="term in legend" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:term.color}"></i> <span class="terms-legend-term">{{term.label}}</span> ({{term.data[0][1]}})</span></span> <span class="small pull-left" ng-show="panel.tmode == 'terms_stats'">&nbsp | {{ panel.tstat }} of <strong>{{ panel.valuefield }}</strong></span><div style="clear:both"></div></div><table ng-styl
 e="panel.style" class="table table-striped table-condensed" ng-show="panel.chart == 'table'"><thead><th>Term</th><th>{{ panel.tmode == 'terms_stats' ? panel.tstat : 'Count' }}</th><th>Action</th></thead><tr ng-repeat="term in data" ng-show="showMeta(term)"><td class="terms-legend-term">{{term.label}}</td><td>{{term.data[0][1]}}</td><td><span ng-hide="term.meta == 'other'"><i class="icon-search pointer" ng-click="build_search(term)"></i> <i class="icon-ban-circle pointer" ng-click="build_search(term,true)"></i></span></td></tr></table></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/terms/module.js
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/terms/module.js b/kibana/src/main/resources/app/panels/terms/module.js
new file mode 100644
index 0000000..8530c1e
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/terms/module.js
@@ -0,0 +1,4 @@
+/*! kibana - v3.1.1 - 2014-10-02
+ * Copyright (c) 2014 Rashid Khan; Licensed Apache License */
+
+define("panels/terms/module",["angular","app","lodash","jquery","kbn"],function(a,b,c,d,e){var f=a.module("kibana.panels.terms",[]);b.useModule(f),f.controller("terms",["$scope","querySrv","dashboard","filterSrv","fields",function(b,d,e,f,g){b.panelMeta={modals:[{description:"Inspect",icon:"icon-info-sign",partial:"app/partials/inspector.html",show:b.panel.spyable}],editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"Displays the results of an elasticsearch facet as a pie chart, bar chart, or a table"};var h={field:"_type",exclude:[],missing:!0,other:!0,size:10,order:"count",style:{"font-size":"10pt"},donut:!1,tilt:!1,labels:!0,arrangement:"horizontal",chart:"bar",counter_pos:"above",spyable:!0,queries:{mode:"all",ids:[]},tmode:"terms",tstat:"total",valuefield:""};c.defaults(b.panel,h),b.init=function(){b.hits=0,b.$on("refresh",function(){b.get_data()}),b.get_data()},b.get_data=function(){if(0!==e.indices.length){b.panelMeta.loading=!0;var
  h,i,j,k;b.field=c.contains(g.list,b.panel.field+".raw")?b.panel.field+".raw":b.panel.field,h=b.ejs.Request().indices(e.indices),b.panel.queries.ids=d.idsByMode(b.panel.queries),k=d.getQueryObjs(b.panel.queries.ids),j=b.ejs.BoolQuery(),c.each(k,function(a){j=j.should(d.toEjsObj(a))}),"terms"===b.panel.tmode&&(h=h.facet(b.ejs.TermsFacet("terms").field(b.field).size(b.panel.size).order(b.panel.order).exclude(b.panel.exclude).facetFilter(b.ejs.QueryFilter(b.ejs.FilteredQuery(j,f.getBoolFilter(f.ids()))))).size(0)),"terms_stats"===b.panel.tmode&&(h=h.facet(b.ejs.TermStatsFacet("terms").valueField(b.panel.valuefield).keyField(b.field).size(b.panel.size).order(b.panel.order).facetFilter(b.ejs.QueryFilter(b.ejs.FilteredQuery(j,f.getBoolFilter(f.ids()))))).size(0)),b.inspector=a.toJson(JSON.parse(h.toString()),!0),i=h.doSearch(),i.then(function(a){b.panelMeta.loading=!1,"terms"===b.panel.tmode&&(b.hits=a.hits.total),b.results=a,b.$emit("render")})}},b.build_search=function(a,d){if(c.isUndef
 ined(a.meta))f.set({type:"terms",field:b.field,value:a.label,mandate:d?"mustNot":"must"});else{if("missing"!==a.meta)return;f.set({type:"exists",field:b.field,mandate:d?"must":"mustNot"})}},b.set_refresh=function(a){b.refresh=a},b.close_edit=function(){b.refresh&&b.get_data(),b.refresh=!1,b.$emit("render")},b.showMeta=function(a){return c.isUndefined(a.meta)?!0:"other"!==a.meta||b.panel.other?"missing"!==a.meta||b.panel.missing?!0:!1:!1}}]),f.directive("termsChart",["querySrv",function(a){return{restrict:"A",link:function(b,f){function g(){var a=0;b.data=[],c.each(b.results.facets.terms.terms,function(c){var d;"terms"===b.panel.tmode&&(d={label:c.term,data:[[a,c.count]],actions:!0}),"terms_stats"===b.panel.tmode&&(d={label:c.term,data:[[a,c[b.panel.tstat]]],actions:!0}),b.data.push(d),a+=1}),b.data.push({label:"Missing field",data:[[a,b.results.facets.terms.missing]],meta:"missing",color:"#aaa",opacity:0}),"terms"===b.panel.tmode&&b.data.push({label:"Other values",data:[[a+1,b.resul
 ts.facets.terms.other]],meta:"other",color:"#444"})}function h(){var e;g(),f.css({height:b.panel.height||b.row.height}),e=c.clone(b.data),e=b.panel.missing?e:c.without(e,c.findWhere(e,{meta:"missing"})),e=b.panel.other?e:c.without(e,c.findWhere(e,{meta:"other"})),require(["jquery.flot.pie"],function(){try{if("bar"===b.panel.chart&&(i=d.plot(f,e,{legend:{show:!1},series:{lines:{show:!1},bars:{show:!0,fill:1,barWidth:.8,horizontal:!1},shadowSize:1},yaxis:{show:!0,min:0,color:"#c8c8c8"},xaxis:{show:!1},grid:{borderWidth:0,borderColor:"#c8c8c8",color:"#c8c8c8",hoverable:!0,clickable:!0},colors:a.colors})),"pie"===b.panel.chart){var c=function(a,b){return"<div ng-click=\"build_search(panel.field,'"+a+'\') "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+a+"<br/>"+Math.round(b.percent)+"%</div>"};i=d.plot(f,e,{legend:{show:!1},series:{pie:{innerRadius:b.panel.donut?.4:0,tilt:b.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},lab
 el:{show:b.panel.labels,radius:2/3,formatter:c,threshold:.1}}},grid:{hoverable:!0,clickable:!0,color:"#c8c8c8"},colors:a.colors})}f.is(":visible")&&setTimeout(function(){b.legend=i.getData(),b.$$phase||b.$apply()})}catch(g){f.text(g)}})}var i;b.$on("render",function(){h()}),f.bind("plotclick",function(a,c,d){d&&b.build_search(b.data[d.seriesIndex])});var j=d("<div>");f.bind("plothover",function(a,c,d){if(d){var f="bar"===b.panel.chart?d.datapoint[1]:d.datapoint[1][0][1];j.html(e.query_color_dot(d.series.color,20)+" "+d.series.label+" ("+f.toFixed(0)+")").place_tt(c.pageX,c.pageY)}else j.remove()})}}}])});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/text/editor.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/text/editor.html b/kibana/src/main/resources/app/panels/text/editor.html
new file mode 100644
index 0000000..68a4392
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/text/editor.html
@@ -0,0 +1 @@
+<div><div class="row-fluid"><div class="span4"><label class="small">Mode</label><select class="input-medium" ng-model="panel.mode" ng-options="f for f in ['html','markdown','text']"></select></div><div class="span2" ng-show="panel.mode == 'text'"><label class="small">Font Size</label><select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div></div><label class="small">Content <span ng-show="panel.mode == 'html'">(This area uses HTML sanitized via AngularJS's <a href="http://docs.angularjs.org/api/ngSanitize.$sanitize">$sanitize</a> service)</span> <span ng-show="panel.mode == 'markdown'">(This area uses <a target="_blank" href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>. HTML is not supported)</span></label><textarea ng-model="panel.content" rows="6" style="width:95%"></textarea></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/text/module.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/text/module.html b/kibana/src/main/resources/app/panels/text/module.html
new file mode 100644
index 0000000..61a725f
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/text/module.html
@@ -0,0 +1 @@
+<div ng-controller="text" ng-init="init()"><markdown ng-show="ready && panel.mode == 'markdown'">{{panel.content}}</markdown><p ng-show="panel.mode == 'text'" ng-style="panel.style" ng-bind-html="panel.content | striphtml | newlines"></p><p ng-show="panel.mode == 'html'" ng-bind-html="panel.content"></p></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/text/module.js
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/text/module.js b/kibana/src/main/resources/app/panels/text/module.js
new file mode 100644
index 0000000..7c3957a
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/text/module.js
@@ -0,0 +1,4 @@
+/*! kibana - v3.1.1 - 2014-10-02
+ * Copyright (c) 2014 Rashid Khan; Licensed Apache License */
+
+var Showdown={extensions:{}},forEach=Showdown.forEach=function(a,b){if("function"==typeof a.forEach)a.forEach(b);else{var c,d=a.length;for(c=0;d>c;c++)b(a[c],c,a)}},stdExtName=function(a){return a.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(a){var b,c,d,e=0,f=[],g=[];if("undefind"!=typeof module&&"undefined"!=typeof exports&&"undefind"!=typeof require){var h=require("fs");if(h){var i=h.readdirSync((__dirname||".")+"/extensions").filter(function(a){return~a.indexOf(".js")}).map(function(a){return a.replace(/\.js$/,"")});Showdown.forEach(i,function(a){var b=stdExtName(a);Showdown.extensions[b]=require("./extensions/"+a)})}}if(this.makeHtml=function(a){return b={},c={},d=[],a=a.replace(/~/g,"~T"),a=a.replace(/\$/g,"~D"),a=a.replace(/\r\n/g,"\n"),a=a.replace(/\r/g,"\n"),a="\n\n"+a+"\n\n",a=M(a),a=a.replace(/^[ \t]+$/gm,""),Showdown.forEach(f,function(b){a=l(b,a)}),a=z(a),a=n(a),a=m(a),a=p(a),a=K(a),a=a.replace(/~D/g,"$$"),a=a.replace(/~T/g,"~"),Showdown.forEach(g,
 function(b){a=l(b,a)}),a},a&&a.extensions){var j=this;Showdown.forEach(a.extensions,function(a){if("string"==typeof a&&(a=Showdown.extensions[stdExtName(a)]),"function"!=typeof a)throw"Extension '"+a+"' could not be loaded.  It was either not found or is not a valid extension.";Showdown.forEach(a(j),function(a){a.type?"language"===a.type||"lang"===a.type?f.push(a):("output"===a.type||"html"===a.type)&&g.push(a):g.push(a)})})}var k,l=function(a,b){if(a.regex){var c=new RegExp(a.regex,"g");return b.replace(c,a.replace)}return a.filter?a.filter(b):void 0},m=function(a){return a+="~0",a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(a,d,e,f,g){return d=d.toLowerCase(),b[d]=G(e),f?f+g:(g&&(c[d]=g.replace(/"/g,"&quot;")),"")}),a=a.replace(/~0/,"")},n=function(a){a=a.replace(/\n/g,"\n\n");return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?
 \n<\/\2>[ \t]*(?=\n+))/gm,o),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,o),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/\n\n/g,"\n")},o=function(a,b){var c=b;return c=c.replace(/\n\n/g,"\n"),c=c.replace(/^\n/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(d.push(c)-1)+"K\n\n"},p=function(a){a=w(a);var b=A("<hr />");return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,b),a=x(a),a=y(a),a=E(a),a=n(a),a=F(a)},q=function(a){return a=B(a),a=r(a),a=H(a),a=u(a),a=s(a),a=I(a),a=G(a),a=D(a),a=a.replace(/  +\n/g," <br />\n")},r=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])
 *>|<!(--.*?--\s*)+>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=N(b,"\\`*_")})},s=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,t),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,t),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,t)},t=function(a,d,e,f,g,h,i,j){void 0==j&&(j="");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(""==n)if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0!=b[m])n=b[m],void 0!=c[m]&&(o=c[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}n=N(n,"*_");var p='<a href="'+n+'"';return""!=o&&(o=o.replace(/"/g,"&quot;"),o=N(o,"*_"),p+=' title="'+o+'"'),p+=">"+l+"</a>"},u=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,v),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,v)},v=function(a,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;i
 f(o||(o=""),""==n){if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0==b[m])return k;n=b[m],void 0!=c[m]&&(o=c[m])}l=l.replace(/"/g,"&quot;"),n=N(n,"*_");var p='<img src="'+n+'" alt="'+l+'"';return o=o.replace(/"/g,"&quot;"),o=N(o,"*_"),p+=' title="'+o+'"',p+=" />"},w=function(a){function b(a){return a.replace(/[^\w]/g,"").toLowerCase()}return a=a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(a,c){return A('<h1 id="'+b(c)+'">'+q(c)+"</h1>")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return A('<h2 id="'+b(c)+'">'+q(c)+"</h2>")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return A("<h"+e+' id="'+b(d)+'">'+q(d)+"</h"+e+">")})},x=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return e?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?"ul":"ol";d=d.replace(/\n{2,}/g,"\n\n\n");var f=k(d);return f=f.replace(/\s+$/,""),f="<"+e+">"+f+"</"+e+"
 >\n"}):(b=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",f=f.replace(/\n{2,}/g,"\n\n\n"),h=k(f);return h=e+"<"+g+">\n"+h+"</"+g+">\n"})),a=a.replace(/~0/,"")};k=function(a){return e++,a=a.replace(/\n{2,}$/,"\n"),a+="~0",a=a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(a,b,c,d,e){var f=e,g=b;return g||f.search(/\n{2,}/)>-1?f=p(L(f)):(f=x(L(f)),f=f.replace(/\n$/,""),f=q(f)),"<li>"+f+"</li>\n"}),a=a.replace(/~0/g,""),e--,a};var y=function(a){return a+="~0",a=a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=C(L(d)),d=M(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="<pre><code>"+d+"\n</code></pre>",A(d)+e}),a=a.replace(/~0/,"")},z=function(a){return a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,b,c){var
  d=b,e=c;return e=C(e),e=M(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="<pre><code"+(d?' class="'+d+'"':"")+">"+e+"\n</code></pre>",A(e)}),a=a.replace(/~0/,"")},A=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(d.push(a)-1)+"K\n\n"},B=function(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d){var e=d;return e=e.replace(/^([ \t]*)/g,""),e=e.replace(/[ \t]*$/g,""),e=C(e),b+"<code>"+e+"</code>"})},C=function(a){return a=a.replace(/&/g,"&amp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/>/g,"&gt;"),a=N(a,"*_{}[]\\",!1)},D=function(a){return a=a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>"),a=a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>")},E=function(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=p(c),c=c.replace(/(^|\n)/g,"$1  "),c=c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(a,b){v
 ar c=b;return c=c.replace(/^  /gm,"~0"),c=c.replace(/~0/g,"")}),A("<blockquote>\n"+c+"\n</blockquote>")})},F=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");for(var b=a.split(/\n{2,}/g),c=[],e=b.length,f=0;e>f;f++){var g=b[f];g.search(/~K(\d+)K/g)>=0?c.push(g):g.search(/\S/)>=0&&(g=q(g),g=g.replace(/^([ \t]*)/g,"<p>"),g+="</p>",c.push(g))}e=c.length;for(var f=0;e>f;f++)for(;c[f].search(/~K(\d+)K/)>=0;){var h=d[RegExp.$1];h=h.replace(/\$/g,"$$$$"),c[f]=c[f].replace(/~K\d+K/,h)}return c.join("\n\n")},G=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),a=a.replace(/<(?![a-z\/?\$!])/gi,"&lt;")},H=function(a){return a=a.replace(/\\(\\)/g,O),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,O)},I=function(a){return a=a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>'),a=a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(a,b){return J(K(b))})},J=function(a){var b=[function(a){return"&#"+a.charCodeAt(0)+";"},functio
 n(a){return"&#x"+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if("@"==a)a=b[Math.floor(2*Math.random())](a);else if(":"!=a){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a='<a href="'+a+'">'+a+"</a>",a=a.replace(/">.+:/g,'">')},K=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})},L=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,"")},M=function(a){return a=a.replace(/\t(?=\t)/g,"    "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b){for(var c=b,d=4-c.length%4,e=0;d>e;e++)c+=" ";return c}),a=a.replace(/~A/g,"    "),a=a.replace(/~B/g,"")},N=function(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,O)},O=function(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}},"undefined"!=typeof module&&(module.exports=Showdown),"function"==typeof define&&d
 efine.amd&&define("panels/text/lib/showdown",[],function(){return Showdown}),define("panels/text/module",["angular","app","lodash","require"],function(a,b,c,d){var e=a.module("kibana.panels.text",[]);b.useModule(e),e.controller("text",["$scope",function(a){a.panelMeta={status:"Stable",description:"A static text panel that can use plain text, markdown, or (sanitized) HTML"};var b={mode:"markdown",content:"",style:{}};c.defaults(a.panel,b),a.init=function(){a.ready=!1}}]),e.directive("markdown",function(){return{restrict:"E",link:function(a,b){function c(){d(["./lib/showdown"],function(c){a.ready=!0;var d=new c.converter,e=a.panel.content.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;"),f=d.makeHtml(e);b.html(f),a.$$phase||a.$apply()})}a.$on("render",function(){c()}),c()}}}),e.filter("newlines",function(){return function(a){return a.replace(/\n/g,"<br/>")}}),e.filter("striphtml",function(){return function(a){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/<
 /g,"&lt;")}})});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/timepicker/custom.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/timepicker/custom.html b/kibana/src/main/resources/app/panels/timepicker/custom.html
new file mode 100644
index 0000000..4117e9f
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/timepicker/custom.html
@@ -0,0 +1,31 @@
+<div class="modal-body"><style>.timepicker-to-column {
+        margin-top: 10px;
+      }
+
+      .timepicker-input input {
+        outline: 0 !important;
+        border: 0px !important;
+        -webkit-box-shadow: 0;
+        -moz-box-shadow: 0;
+        box-shadow: 0;
+        position: relative;
+      }
+
+      .timepicker-input input::-webkit-outer-spin-button,
+      .timepicker-input input::-webkit-inner-spin-button {
+          -webkit-appearance: none;
+          margin: 0;
+      }
+
+      input.timepicker-date {
+        width: 90px;
+      }
+      input.timepicker-hms {
+        width: 20px;
+      }
+      input.timepicker-ms {
+        width: 25px;
+      }
+      div.timepicker-now {
+        float: right;
+      }</style><div class="timepicker form-horizontal"><form name="input"><div class="timepicker-from-column"><label class="small">From</label><div class="fake-input timepicker-input"><input class="timepicker-date" type="text" ng-change="validate(temptime)" ng-model="temptime.from.date" data-date-format="yyyy-mm-dd" required="" bs-datepicker="">@<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.from.hour" required="" ng-pattern="patterns.hour" onclick="this.select()">:<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.from.minute" required="" ng-pattern="patterns.minute" onclick="this.select()">:<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.from.second" required="" ng-pattern="patterns.second" onclick="this.select()">.<input class="timepicker-ms" type="text" maxlength="3" ng-change="validate(temptime)" ng-model="te
 mptime.from.millisecond" required="" ng-pattern="patterns.millisecond" onclick="this.select()"></div></div><div class="timepicker-to-column"><label class="small">To (<a class="link" ng-class="{'strong':panel.now}" ng-click="setNow();panel.now=true">now</a>)</label><div class="fake-input timepicker-input"><div ng-hide="panel.now"><input class="timepicker-date" type="text" ng-change="validate(temptime)" ng-model="temptime.to.date" data-date-format="yyyy-mm-dd" required="" bs-datepicker="">@<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.to.hour" required="" ng-pattern="patterns.hour" onclick="this.select()">:<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.to.minute" required="" ng-pattern="patterns.minute" onclick="this.select()">:<input class="timepicker-hms" type="text" maxlength="2" ng-change="validate(temptime)" ng-model="temptime.to.second" required="" ng-pattern="p
 atterns.second" onclick="this.select()">.<input class="timepicker-ms" type="text" maxlength="3" ng-change="validate(temptime)" ng-model="temptime.to.millisecond" required="" ng-pattern="patterns.millisecond" onclick="this.select()"></div><span type="text" ng-show="panel.now" ng-disabled="panel.now">&nbsp <i class="pointer icon-remove-sign" ng-click="setNow();panel.now=false"></i> Right Now<input type="text" name="dummy" style="visibility:hidden"></span></div></div></form><div class="clearfix"></div></div></div><div class="modal-footer"><form name="input" style="margin-bottom:0"><span class="" ng-hide="input.$valid">Invalid date or range</span> <button ng-click="setAbsoluteTimeFilter(validate(temptime));dismiss();" ng-disabled="!input.$valid" class="btn btn-success">Apply</button> <button ng-click="dismiss();" class="btn btn-danger">Cancel</button></form></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/timepicker/editor.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/timepicker/editor.html b/kibana/src/main/resources/app/panels/timepicker/editor.html
new file mode 100644
index 0000000..71f4b2e
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/timepicker/editor.html
@@ -0,0 +1 @@
+<div class="editor-row"><div class="section"><div class="editor-option"><label class="small">Relative time options <small>comma separated</small></label><input type="text" array-join="" class="input-large" ng-model="panel.time_options"></div><div class="editor-option"><label class="small">Auto-refresh options <small>comma separated</small></label><input type="text" array-join="" class="input-large" ng-model="panel.refresh_intervals"></div><div class="editor-option"><label class="small">Time Field</label><input type="text" class="input-small" ng-model="panel.timefield"></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/timepicker/module.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/timepicker/module.html b/kibana/src/main/resources/app/panels/timepicker/module.html
new file mode 100644
index 0000000..1823b96
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/timepicker/module.html
@@ -0,0 +1,3 @@
+<div ng-controller="timepicker" ng-init="init()"><style>.timepicker-timestring {
+      font-weight: normal;
+    }</style><form name="input" style="margin:3px 0 0 0"><ul class="nav nav-pills timepicker-dropdown"><li class="dropdown"><a class="dropdown-toggle timepicker-dropdown" data-toggle="dropdown" href="" bs-tooltip="time.from.date ? (time.from.date | date:'yyyy-MM-dd HH:mm:ss.sss') + ' <br>to<br>' +(time.to.date | date:'yyyy-MM-dd HH:mm:ss.sss') : 'Click to set a time filter'" data-placement="bottom" ng-click="dismiss();"><span ng-show="filterSrv.idsByType('time').length"><span class="pointer" ng-hide="panel.now">{{time.from.date | date:'MMM d, y HH:mm:ss'}}</span> <span class="pointer" ng-show="panel.now">{{time.from.date | moment:'ago'}}</span> to <span class="pointer" ng-hide="panel.now">{{time.to.date | date:'MMM d, y HH:mm:ss'}}</span> <span class="pointer" ng-show="panel.now">{{time.to.date | moment:'ago'}}</span></span> <span ng-hide="filterSrv.idsByType('time').length">Time filter</span> <span ng-show="dashboard.current.refresh" class="text-warning">refreshed every {{dashboard
 .current.refresh}}</span> <i class="icon-caret-down"></i></a><ul class="dropdown-menu"><li ng-repeat="timespan in panel.time_options track by $index"><a ng-click="setRelativeFilter(timespan)">Last {{timespan}}</a></li><li class="dropdown-submenu"><a>Auto-Refresh</a><ul class="dropdown-menu"><li><a ng-click="dashboard.set_interval(false)">Off</a></li><li ng-repeat="interval in panel.refresh_intervals track by $index"><a ng-click="dashboard.set_interval(interval)">Every {{interval}}</a></li></ul></li><li><a ng-click="customTime()">Custom</a></li></ul></li><li><a ng-click="dashboard.refresh()"><i class="icon-refresh"></i></a></li></ul></form></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/timepicker/module.js
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/timepicker/module.js b/kibana/src/main/resources/app/panels/timepicker/module.js
new file mode 100644
index 0000000..778b396
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/timepicker/module.js
@@ -0,0 +1,4 @@
+/*! kibana - v3.1.1 - 2014-10-02
+ * Copyright (c) 2014 Rashid Khan; Licensed Apache License */
+
+define("panels/timepicker/module",["angular","app","lodash","moment","kbn"],function(a,b,c,d,e){var f=a.module("kibana.panels.timepicker",[]);b.useModule(f),f.controller("timepicker",["$scope","$modal","$q","filterSrv",function(a,b,f,g){a.panelMeta={status:"Stable",description:"A panel for controlling the time range filters. If you have time based data,  or if you're using time stamped indices, you need one of these"};var h={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"};c.defaults(a.panel,h);var i=b({template:"./app/panels/timepicker/custom.html",persist:!0,show:!1,scope:a,keyboard:!1});a.filterSrv=g,a.patterns={date:/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/,hour:/^([01]?[0-9]|2[0-3])$/,minute:/^[0-5][0-9]$/,second:/^[0-5][0-9]$/,millisecond:/^[0-9]*$/},a.$on("refresh",function(){a.init()}),a.init=function(){var b=g.timeRange("last");b&&(a.panel.now="now"===g.ti
 meRange(!1).to?!0:!1,a.time=l(b.from,b.to))},a.customTime=function(){a.input.$setValidity("dummy",!0),a.temptime=k(a.time),a.temptime.from.date.setHours(0,0,0,0),a.temptime.to.date.setHours(0,0,0,0),(new Date).getTimezoneOffset()<0&&(a.temptime.from.date=d(a.temptime.from.date).add("days",1).toDate(),a.temptime.to.date=d(a.temptime.to.date).add("days",1).toDate()),f.when(i).then(function(a){a.modal("show")})},a.validate=function(b){a.input.$setValidity("dummy",!0);var c=n(b.from.date),d=n(b.to.date),e=b;return a.input.$valid?(c.setHours(e.from.hour,e.from.minute,e.from.second,e.from.millisecond),d.setHours(e.to.hour,e.to.minute,e.to.second,e.to.millisecond),isNaN(c.getTime())||isNaN(d.getTime())||c.getTime()>=d.getTime()?(a.input.$setValidity("dummy",!1),!1):{from:c,to:d}):!1},a.setNow=function(){a.time.to=m(new Date)},a.setAbsoluteTimeFilter=function(b){var d=c.clone(b);return d.type="time",d.field=a.panel.timefield,a.panel.now&&(d.to="now"),g.removeByType("time",!0),a.panel.filter
 _id=g.set(d),a.time=l(b.from,b.to),a.panel.filter_id},a.setRelativeFilter=function(b){a.panel.now=!0;var c={type:"time",field:a.panel.timefield,from:"now-"+b,to:"now"};return g.removeByType("time",!0),a.panel.filter_id=g.set(c),a.time=l(e.parseDate(c.from),new Date),a.panel.filter_id};var j=function(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a},k=function(a){var b={from:c.clone(a.from),to:c.clone(a.to)};return b.from.date=new Date(b.from.date),b.to.date=new Date(b.to.date),b},l=function(a,b){return{from:m(a),to:m(b)}},m=function(a){return{date:new Date(a),hour:j(a.getHours(),2),minute:j(a.getMinutes(),2),second:j(a.getSeconds(),2),millisecond:j(a.getMilliseconds(),3)}},n=function(a){return a=d(a).clone().toDate(),d(new Date(a.getTime()+6e4*a.getTimezoneOffset())).toDate()}}])});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/timepicker/refreshctrl.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/timepicker/refreshctrl.html b/kibana/src/main/resources/app/panels/timepicker/refreshctrl.html
new file mode 100644
index 0000000..5550689
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/timepicker/refreshctrl.html
@@ -0,0 +1 @@
+<form name="refreshPopover" class="form-inline input-append" style="margin:0px"><label><small>Interval (seconds)</small></label><br><input type="number" class="input-mini" ng-model="refresh_interval"><button type="button" class="btn" ng-click="set_interval(refresh_interval);dismiss()"><i class="icon-ok"></i></button></form>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/trends/editor.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/trends/editor.html b/kibana/src/main/resources/app/panels/trends/editor.html
new file mode 100644
index 0000000..9ca7aa1
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/trends/editor.html
@@ -0,0 +1 @@
+<div><h4>Settings</h4><div class="row-fluid"><div class="editor-option"><label class="small">Time Ago<tip>Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)</tip></label><input type="text" class="input-small" ng-model="panel.ago" ng-change="set_refresh(true)"></div><div class="editor-option"><label class="small">Font Size</label><select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="editor-option"><label class="small">List Format</label><select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></div><div class="editor-option"><label class="small">Reverse Colors<tip>Use green for down, and red for up instead</tip></label><input type="checkbox" ng-model="panel.reverse" ng-checked="panel.reverse"></div></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/trends/module.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/trends/module.html b/kibana/src/main/resources/app/panels/trends/module.html
new file mode 100644
index 0000000..88ac49d
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/trends/module.html
@@ -0,0 +1,9 @@
+<div ng-controller="trends" ng-init="init()"><style>div.trends-horizontal {
+      display:inline-block;
+      padding-right: 5px;
+    }</style><div ng-class="{'trends-horizontal':panel.arrangement == 'horizontal'}" ng-style="panel.style" style="line-height:{{panel.style['font-size']}}" ng-repeat="query in trends"><i class="icon-circle" style="color:{{query.info.color}}"></i> <span bs-tooltip="'Then: '+query.hits.old+', Now: '+query.hits.new" ng-class="
+            {
+                'text-success': (query.hits.new >= query.hits.old && panel.reverse === false) || (query.hits.new < query.hits.old && panel.reverse === true), 
+                'text-error': (query.hits.old > query.hits.new && panel.reverse === false) || (query.hits.old <= query.hits.new && panel.reverse === true)
+            }
+        " class="pointer strong"><i class="large" ng-class="{'icon-caret-up': query.hits.new >= query.hits.old, 'icon-caret-down': query.hits.old > query.hits.new}"></i>{{query.percent}}%</span> <span class="tiny light" ng-show="query.info.alias != ''">({{query.info.alias}})</span></div></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/panels/trends/module.js
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/panels/trends/module.js b/kibana/src/main/resources/app/panels/trends/module.js
new file mode 100644
index 0000000..c8a8d2b
--- /dev/null
+++ b/kibana/src/main/resources/app/panels/trends/module.js
@@ -0,0 +1,4 @@
+/*! kibana - v3.1.1 - 2014-10-02
+ * Copyright (c) 2014 Rashid Khan; Licensed Apache License */
+
+define("panels/trends/module",["angular","app","lodash","kbn"],function(a,b,c,d){var e=a.module("kibana.panels.trends",[]);b.useModule(e),e.controller("trends",["$scope","kbnIndex","querySrv","dashboard","filterSrv",function(b,e,f,g,h){function i(a,b){return 0===a?null:100*(b-a)/a}b.panelMeta={modals:[{description:"Inspect",icon:"icon-info-sign",partial:"app/partials/inspector.html",show:b.panel.spyable}],editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Beta",description:'A stock-ticker style representation of how queries are moving over time. For example, if the time is 1:10pm, your time picker was set to "Last 10m", and the "Time Ago" parameter was set to \'1h\', the panel would show how much the query results have changed since 12:00-12:10pm'};var j={ago:"1d",arrangement:"vertical",reverse:!1,spyable:!0,queries:{mode:"all",ids:[]},style:{"font-size":"14pt"}};c.defaults(b.panel,j),b.init=function(){b.hits=0,b.$on("refresh",function(){b.get_data()}),b.get_
 data()},b.get_data=function(i,j){if(delete b.panel.error,b.panelMeta.loading=!0,0!==g.indices.length){b.index=i>0?b.index:g.indices;var l=c.uniq(c.pluck(h.getByType("time"),"field"));if(l.length>1)return b.panel.error="Time field must be consistent amongst time filters",void 0;if(0===l.length)return b.panel.error="A time filter must exist for this panel to function",void 0;l=l[0],b.time=h.timeRange("last"),b.old_time={from:new Date(b.time.from.getTime()-d.interval_to_ms(b.panel.ago)).valueOf(),to:new Date(b.time.to.getTime()-d.interval_to_ms(b.panel.ago)).valueOf()};var m=c.isUndefined(i)?0:i,n=b.ejs.Request(),o=c.difference(h.ids,h.idsByType("time"));b.panel.queries.ids=f.idsByMode(b.panel.queries);var p=f.getQueryObjs(b.panel.queries.ids);c.each(p,function(a){var c=b.ejs.FilteredQuery(f.toEjsObj(a),h.getBoolFilter(h.ids()));n=n.facet(b.ejs.QueryFacet(a.id).query(c)).size(0)}),c.each(p,function(a){var c=b.ejs.FilteredQuery(f.toEjsObj(a),h.getBoolFilter(o).must(b.ejs.RangeFilter(l).
 from(b.old_time.from).to(b.old_time.to)));n=n.facet(b.ejs.QueryFacet("old_"+a.id).query(c)).size(0)}),b.inspector=a.toJson(JSON.parse(n.toString()),!0),0===m?e.indices(b.old_time.from,b.old_time.to,g.current.index.pattern,g.current.index.interval).then(function(a){b.index=c.union(a,b.index),n=n.indices(b.index[m]),k(n.doSearch(),m,j)}):k(n.indices(b.index[m]).doSearch(),m,j)}};var k=function(a,d,e){a.then(function(a){if(b.panelMeta.loading=!1,0===d&&(b.hits={},b.data=[],e=b.query_id=(new Date).getTime()),!c.isUndefined(a.error))return b.panel.error=b.parse_error(a.error),void 0;if(b.query_id===e){var g=0,h=f.getQueryObjs(b.panel.queries.ids);c.each(h,function(e){var f=a.facets[e.id].count,h=a.facets["old_"+e.id].count,j={"new":c.isUndefined(b.data[g])||0===d?f:b.data[g].hits.new+f,old:c.isUndefined(b.data[g])||0===d?h:b.data[g].hits.old+h};b.hits.new+=f,b.hits.old+=h;var k=null==i(j.old,j.new)?"?":Math.round(100*i(j.old,j.new))/100;b.data[g]={info:e,hits:{"new":j.new,old:j.old},perc
 ent:k},g++}),b.$emit("render"),d<b.index.length-1?b.get_data(d+1,e):b.trends=b.data}})};b.set_refresh=function(a){b.refresh=a},b.close_edit=function(){b.refresh&&b.get_data(),b.refresh=!1,b.$emit("render")}}])});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/partials/connectionFailed.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/partials/connectionFailed.html b/kibana/src/main/resources/app/partials/connectionFailed.html
new file mode 100644
index 0000000..ffe667f
--- /dev/null
+++ b/kibana/src/main/resources/app/partials/connectionFailed.html
@@ -0,0 +1 @@
+<p><div class="row"><div class="container-fluid main"><div class="kibana-container container"><div class="span12"><h1>Connection Failed</h1><h5>Possibility #1: Your elasticsearch server is down or unreachable</h5>This can be caused by a network outage, or a failure of the Elasticsearch process. If you have recently run a query that required a <i>terms</i> facet to be executed it is possible the process has run out of memory and stopped. Be sure to check your Elasticsearch logs for any sign of memory pressure.<h5>Possibility #2: You are running Elasticsearch 1.4 or higher</h5>Elasticsearch 1.4 ships with a security setting that prevents Kibana from connecting. You will need to set <i>http.cors.allow-origin</i> in your <i>elasticsearch.yml</i> to the correct protocol, hostname, and port (if not 80) that your access Kibana from. Note that if you are running Kibana in a sub-url, you should exclude the sub-url path and only include the protocol, hostname and port. For example, <i>http://
 mycompany.com:8080</i>, not <i>http://mycompany.com:8080/kibana</i>.<h5>Click back, or the home button, when you have resolved the connection issue</h5></div></div></div></div></p>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/partials/dashLoader.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/partials/dashLoader.html b/kibana/src/main/resources/app/partials/dashLoader.html
new file mode 100644
index 0000000..97a35c9
--- /dev/null
+++ b/kibana/src/main/resources/app/partials/dashLoader.html
@@ -0,0 +1,3 @@
+<style>.noarrow>a:after {
+    display: none !important;
+  }</style><li ng-repeat="pulldown in dashboard.current.nav" ng-controller="PulldownCtrl" ng-show="pulldown.enable"><kibana-simple-panel type="pulldown.type" ng-cloak=""></kibana-simple-panel></li><li ng-if="dashboard.current.loader.show_home !== false"><a bs-tooltip="'Goto saved default'" data-placement="bottom" href="#/dashboard"><i class="icon-home"></i></a></li><li class="dropdown" ng-show="showDropdown('load')"><a href="#" bs-tooltip="'Load'" data-placement="bottom" class="dropdown-toggle" data-toggle="dropdown" ng-click="elasticsearch_dblist('title:'+elasticsearch.query+'*')"><i class="icon-folder-open"></i></a><ul class="dropdown-menu" style="padding:10px"><li ng-if="dashboard.current.loader.load_elasticsearch != false"><form class="nomargin"><input type="text" ng-model="elasticsearch.query" ng-change="elasticsearch_dblist('title:'+elasticsearch.query+'*')" placeholder="Type to filter"></form><h6 ng-hide="elasticsearch.dashboards.length">No dashboards matching your query foun
 d</h6><table class="table table-condensed table-striped"><tr bindonce="" ng-repeat="row in elasticsearch.dashboards | orderBy:['_id']"><td><a confirm-click="elasticsearch_delete(row._id)" confirmation="Are you sure you want to delete the {{row._id}} dashboard"><i class="icon-remove"></i></a></td><td><a href="#/dashboard/elasticsearch/{{row._id}}" bo-text="row._id"></a></td><td><a><i class="icon-share" ng-click="share = dashboard.share_link(row._id,'elasticsearch',row._id)" bs-modal="'app/partials/dashLoaderShare.html'"></i></a></td></tr></table></li><li class="dropdown-submenu noarrow" ng-show="dashboard.current.loader.load_gist || dashboard.current.loader.load_local"><a tabindex="-1" class="small" style="padding:0"><i class="icon-caret-left"></i> Advanced</a><ul class="dropdown-menu" style="padding:10px"><li ng-show="dashboard.current.loader.load_local"><h5>Local File<tip>Load dashboard JSON layout from file</tip></h5><form><input type="file" id="dashupload" dash-upload=""><br></fo
 rm></li><li ng-show="dashboard.current.loader.load_gist"><h5>Gist<tip>Enter a gist number or url</tip></h5><form><input type="text" ng-model="gist.url" placeholder="Gist number or URL"><br><button class="btn" ng-click="gist_dblist(dashboard.gist_id(gist.url))" ng-show="dashboard.is_gist(gist.url)"><i class="icon-github-alt"></i> Get gist:{{gist.url | gistid}}</button><h6 ng-show="gist.files.length">Dashboards in gist:{{gist.url | gistid}} <small>click to load</small></h6><h6 ng-hide="gist.files.length || !gist.url.length">No gist dashboards found</h6><table class="table table-condensed table-striped"><tr ng-repeat="file in gist.files"><td><a ng-click="dashboard.dash_load(file)">{{file.title}}</a></td></tr></table></form></li></ul></li></ul></li><li class="dropdown" ng-show="showDropdown('save')"><a href="#" bs-tooltip="'Save'" data-placement="bottom" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-save"></i></a><ul class="dropdown-menu" style="padding:10px"><li ng-show
 ="dashboard.current.loader.save_elasticsearch != false"><form class="input-prepend nomargin"><button class="btn" ng-click="elasticsearch_save('dashboard')"><i class="icon-save"></i></button><input class="input-medium" ng-model="dashboard.current.title" type="text" ng-model="elasticsearch.title"></form></li><li class="dropdown-submenu noarrow" ng-show="dashboard.current.loader.save_local != false || dashboard.current.loader.save_gist != false || dashboard.current.loader.save_default != false"><a tabindex="-1" class="small" style="padding:0"><i class="icon-caret-left"></i> Advanced</a><ul class="dropdown-menu"><li ng-show="dashboard.current.loader.save_default != false"><a class="link" ng-click="set_default()">Save as Home</a></li><li ng-show="dashboard.current.loader.save_default != false"><a class="link" ng-click="purge_default()">Reset Home</a></li><li ng-show="dashboard.current.loader.save_local != false"><a class="link" ng-click="dashboard.to_file()">Export schema</a></li><li ng-
 show="dashboard.current.loader.save_gist" style="margin:10px"><h6>Gist</h6><form class="input-append"><input class="input-medium" placeholder="Title" type="text" ng-model="gist.title"><button class="btn" ng-click="save_gist()"><i class="icon-github-alt"></i></button></form><br><small ng-show="gist.last">Last gist: <a target="_blank" href="{{gist.last}}">{{gist.last}}</a></small></li></ul></li></ul></li><li ng-show="showDropdown('share')"><a bs-tooltip="'Share'" data-placement="bottom" ng-click="elasticsearch_save('temp',dashboard.current.loader.save_temp_ttl)" bs-modal="'app/partials/dashLoaderShare.html'"><i class="icon-share"></i></a></li><li ng-show="dashboard.current.editable" bs-tooltip="'Configure dashboard'" data-placement="bottom"><a class="link" config-modal="app/partials/dasheditor.html" kbn-model="dashboard"><i class="icon-cog"></i></a></li>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/partials/dashLoaderShare.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/partials/dashLoaderShare.html b/kibana/src/main/resources/app/partials/dashLoaderShare.html
new file mode 100644
index 0000000..b4989b1
--- /dev/null
+++ b/kibana/src/main/resources/app/partials/dashLoaderShare.html
@@ -0,0 +1 @@
+<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>{{share.title}} <small>shareable link</small></h3></div><div class="modal-body"><label>Share this dashboard with this URL</label><input ng-model="share.link" type="text" style="width:90%" onclick="this.select()" onfocus="this.select()" ng-change="share = dashboard.share_link(share.title,share.type,share.id)"></div><div class="modal-footer"><button type="button" class="btn btn-success" ng-click="dismiss();$broadcast('render')">Close</button></div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/7560f657/kibana/src/main/resources/app/partials/dashboard.html
----------------------------------------------------------------------
diff --git a/kibana/src/main/resources/app/partials/dashboard.html b/kibana/src/main/resources/app/partials/dashboard.html
new file mode 100644
index 0000000..fa82935
--- /dev/null
+++ b/kibana/src/main/resources/app/partials/dashboard.html
@@ -0,0 +1 @@
+<nil ng-repeat="pulldown in dashboard.current.pulldowns" ng-controller="PulldownCtrl" ng-show="pulldown.enable"><div class="top-row-close pointer pull-left" ng-class="pulldownTabStyle($index)" ng-click="toggle_pulldown(pulldown);dismiss();" bs-tooltip="'Toggle '+pulldown.type" data-placement="bottom"><span class="small">{{pulldown.type}}</span> <i class="small" ng-class="{'icon-caret-left':pulldown.collapse,'icon-caret-right':!pulldown.collapse}"></i> <i class="small icon-star" ng-show="row.notice && pulldown.collapse"></i></div><div class="clearfix bgNav" ng-hide="pulldown.collapse"></div><div class="top-row-open" ng-hide="pulldown.collapse"><kibana-simple-panel type="pulldown.type" ng-cloak=""></kibana-simple-panel></div></nil><div class="clearfix bgNav"></div><div class="container-fluid main"><div><div class="kibana-container container"><div class="kibana-row" ng-controller="RowCtrl" ng-repeat="(row_name, row) in dashboard.current.rows" ng-style="row_style(row)"><div class="row-c
 ontrol"><div class="" style="padding:0px;margin:0px;position:relative"><div class="row-close" ng-show="row.collapse" data-placement="bottom"><span class="row-button bgWarning" config-modal="app/partials/roweditor.html" kbn-model="row" class="pointer"><i bs-tooltip="'Configure row'" data-placement="right" ng-show="row.editable" class="icon-cog pointer"></i></span> <span class="row-button bgPrimary" ng-click="toggle_row(row)" ng-show="row.collapsable"><i bs-tooltip="'Expand row'" data-placement="right" ng-show="row.collapsable" class="icon-caret-left pointer"></i></span> <span class="row-button row-text" ng-click="toggle_row(row)" ng-class="{'pointer':row.collapsable}">{{row.title || 'Row '+$index}}</span></div><div style="text-align:center" class="row-open" ng-show="!row.collapse"><div ng-show="row.collapsable" class="row-tab bgPrimary" ng-click="toggle_row(row)"><i bs-tooltip="'Collapse row'" data-placement="right" class="icon-caret-right"></i><br></div><div config-modal="app/partia
 ls/roweditor.html" kbn-model="row" class="row-tab bgWarning" ng-show="row.editable"><i bs-tooltip="'Configure row'" data-placement="right" class="icon-cog pointer"></i><br></div><div class="bgSuccess row-tab" ng-click="editor.index = 2" config-modal="app/partials/roweditor.html" kbn-model="row" ng-show="row.editable"><i class="icon-plus-sign" bs-tooltip="'Add Panel'" data-placement="right"></i><br></div></div></div><div style="padding-top:0px" ng-if="!row.collapse"><div ng-repeat="(name, panel) in row.panels|filter:isPanel" ng-cloak="" ng-hide="panel.hide" kibana-panel="" type="panel.type" resizable="" class="panel nospace" ng-class="{'dragInProgress':dashboard.panelDragging}" style="position:relative" ng-style="{'width':!panel.span?'100%':((panel.span/1.2)*10)+'%'}" data-drop="true" ng-model="row.panels" data-jqyoui-options="" jqyoui-droppable="{index:$index,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver(true)',onOut:'panelMoveOut'}"></div><div ng-show="dashboard.panelDr
 agging && row.panels.length == 0" class="panel panel-filler" style="" ng-class="{'dragInProgress':dashboard.panelDragging}" ng-style="{height:row.height}" data-drop="true" ng-model="row.panels" data-jqyoui-options="" jqyoui-droppable="{index:row.panels.length,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver',onOut:'panelMoveOut'}"><h1>Drop here to add to this row</h1>Or drop on top of any other panel to insert in that row</div><span config-modal="app/partials/roweditor.html" kbn-model="row" ng-show="row.editable && !dashboard.panelDragging"><span ng-click="editor.index = 2" style="margin-top: 3px; margin-left: 5px" ng-show="row.panels.length==0" class="btn btn-mini">Add panel to empty row</span></span><div class="clearfix"></div></div></div></div><div class="row-fluid" ng-show="dashboard.current.editable"><div class="span12" style="text-align:right"><span class="pointer btn btn-mini row-add-button" config-modal="app/partials/dasheditor.html" kbn-model="dashboard"><span ng-c
 lick="editor.index = 2"><i class="icon-plus-sign"></i> ADD A ROW</span></span></div></div></div></div></div>
\ No newline at end of file


Mime
View raw message