+26
-16
@@ -30,13 +30,7 @@ module.exports = function (grunt) {
|
||||
'panels/bettermap/leaflet/*.png'
|
||||
],
|
||||
dest: '<%= tempDir %>'
|
||||
}//,
|
||||
// dist_to_temp: {
|
||||
// cwd: '<%= destDir %>',
|
||||
// expand: true,
|
||||
// src: '**/*',
|
||||
// dest: '<%= tempDir %>'
|
||||
// }
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
// just lint the source dir
|
||||
@@ -111,19 +105,13 @@ module.exports = function (grunt) {
|
||||
modules: [], // populated below
|
||||
mainConfigFile: '<%= tempDir %>/app/components/require.config.js',
|
||||
keepBuildDir: true,
|
||||
optimize: 'uglify',
|
||||
optimize: 'none',
|
||||
optimizeCss: 'none',
|
||||
uglify: {
|
||||
max_line_length: 1000,
|
||||
// beautify: true, // uncomment for easier debugging
|
||||
indent_level: 2,
|
||||
},
|
||||
preserveLicenseComments: false,
|
||||
findNestedDependencies: true,
|
||||
normalizeDirDefines: "none",
|
||||
inlineText: true,
|
||||
skipPragmas: true,
|
||||
// stubModules: ["text"],
|
||||
optimizeAllPluginResources: false,
|
||||
removeCombined: true,
|
||||
fileExclusionRegExp: /^\./,
|
||||
@@ -147,6 +135,20 @@ module.exports = function (grunt) {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
dest: {
|
||||
expand: true,
|
||||
src: ['**/*.js', '!config.js', '!app/dashboards/*.js'],
|
||||
dest: '<%= destDir %>',
|
||||
cwd: '<%= destDir %>',
|
||||
options: {
|
||||
quite: true,
|
||||
compress: true,
|
||||
preserveComments: false,
|
||||
banner: '<%= meta.banner %>',
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -173,7 +175,8 @@ module.exports = function (grunt) {
|
||||
'services/all',
|
||||
'jquery.flot',
|
||||
'jquery.flot.pie',
|
||||
'text'
|
||||
'text',
|
||||
'settings'
|
||||
]
|
||||
}
|
||||
];
|
||||
@@ -186,6 +189,12 @@ module.exports = function (grunt) {
|
||||
});
|
||||
});
|
||||
|
||||
// exclude the literal config definition from all modules
|
||||
requireModules.forEach(function (module) {
|
||||
module.excludeShallow = module.excludeShallow || [];
|
||||
module.excludeShallow.push('config');
|
||||
});
|
||||
|
||||
config.requirejs.compile_temp.options.modules = requireModules;
|
||||
|
||||
// load plugins
|
||||
@@ -213,7 +222,8 @@ module.exports = function (grunt) {
|
||||
'copy:everthing_left_in_src',
|
||||
'ngmin',
|
||||
'requirejs:compile_temp',
|
||||
'clean:after_require'
|
||||
'clean:after_require',
|
||||
'uglify:dest'
|
||||
]);
|
||||
|
||||
};
|
||||
+19
-483
File diff suppressed because one or more lines are too long
+4
-2
@@ -1,2 +1,4 @@
|
||||
require.config({baseUrl:"app",paths:{settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"components/jquery.extended","jquery-src":"../vendor/jquery/jquery-1.8.0","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"
|
||||
},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},"jquery-src":{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
require.config({baseUrl:"app",paths:{config:"../config",settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"components/jquery.extended","jquery-src":"../vendor/jquery/jquery-1.8.0","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},"jquery-src":{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
|
||||
+3
-1
@@ -1 +1,3 @@
|
||||
;
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
|
||||
+7
-117
File diff suppressed because one or more lines are too long
+4
-32
File diff suppressed because one or more lines are too long
+8
-123
File diff suppressed because one or more lines are too long
+4
-2
@@ -1,2 +1,4 @@
|
||||
define("panels/column/module",["angular","app","underscore","config"],function(e,t,n,r){var i=e.module("kibana.panels.column",[]);t.useModule(i),i.controller("column",["$scope","$rootScope","$timeout",function(e,t,r){e.panelMeta={status:"Stable",description:"A pseudo panel that lets you add other panels to be arranged in a column withdefined heights."};var i={panels:[]};n.defaults(e.panel,i),e.init=function(){e.reset_panel()},e.toggle_row=function(t){t.collapse=t.collapse?!1:!0,t.collapse||r(function(){e.send_render()})},e.send_render=function(){e.$broadcast("render")},e.add_panel=function(t){e.panel.panels.push(t)},e.reset_panel=function(t){e.new_panel={loading:!1,error:!1,sizeable:!1,span:12,height:"150px",editable:!0,type:t}}}]),i.directive("columnEdit",["$compile","$timeout",function(t,r){return{scope:{new_panel:"=panel",row:"=",config:"=",dashboards:"=",type:"=type"},link:function(i,s){i.$on("render",function(){r(function(){i.panel=i.new_panel;var r="<div ng-include src=\"partial('panelgeneral')\"></div>"
|
||||
;!n.isUndefined(i.type)&&i.type!==""&&(r=r+"<div ng-include src=\"'app/panels/"+i.type+"/editor.html'\"></div>"),s.html(t(e.element(r))(i))})})}}}]),i.filter("withoutColumn",function(){return function(){return n.without(r.panel_names,"column")}})});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/column/module",["angular","app","underscore","config"],function(a,b,c,d){var e=a.module("kibana.panels.column",[]);b.useModule(e),e.controller("column",["$scope","$rootScope","$timeout",function(a,b,d){a.panelMeta={status:"Stable",description:"A pseudo panel that lets you add other panels to be arranged in a column withdefined heights."};var e={panels:[]};c.defaults(a.panel,e),a.init=function(){a.reset_panel()},a.toggle_row=function(b){b.collapse=b.collapse?!1:!0,b.collapse||d(function(){a.send_render()})},a.send_render=function(){a.$broadcast("render")},a.add_panel=function(b){a.panel.panels.push(b)},a.reset_panel=function(b){a.new_panel={loading:!1,error:!1,sizeable:!1,span:12,height:"150px",editable:!0,type:b}}}]),e.directive("columnEdit",["$compile","$timeout",function(b,d){return{scope:{new_panel:"=panel",row:"=",config:"=",dashboards:"=",type:"=type"},link:function(e,f){e.$on("render",function(){d(function(){e.panel=e.new_panel;var d="<div ng-include src=\"partial('panelgeneral')\"></div>";c.isUndefined(e.type)||""===e.type||(d=d+"<div ng-include src=\"'app/panels/"+e.type+"/editor.html'\"></div>"),f.html(b(a.element(d))(e))})})}}}]),e.filter("withoutColumn",function(){return function(){return c.without(d.panel_names,"column")}})});
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/dashcontrol/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.dashcontrol",[]);t.useModule(r),r.controller("dashcontrol",["$scope","$http","timer","dashboard","alertSrv",function(e,t,r,i,s){e.panelMeta={status:"Deprecated",description:"This panel has been moved to the navigation bar. See the dashboard setting editor to configure it."},e.panel=e.panel||{};var o={save:{gist:!1,elasticsearch:!0,local:!0,"default":!0},load:{gist:!0,elasticsearch:!0,local:!0},hide_control:!1,elasticsearch_size:20,temp:!0,ttl_enable:!0,temp_ttl:"30d"};n.defaults(e.panel,o),e.init=function(){e.gist_pattern=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,e.gist={},e.elasticsearch={}},e.set_default=function(){i.set_default()?s.set("Local Default Set",i.current.title+" has been set as your local default","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.purge_default=function(){i
|
||||
.purge_default()?s.set("Local Default Clear","Your local default dashboard has been cleared","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.elasticsearch_save=function(t,r){i.elasticsearch_save(t,e.elasticsearch.title||i.current.title,e.panel.ttl_enable?r:!1).then(function(r){n.isUndefined(r._id)?s.set("Save failed","Dashboard could not be saved to Elasticsearch","error",5e3):(s.set("Dashboard Saved",'This dashboard has been saved to Elasticsearch as "'+r._id+'"',"success",5e3),t==="temp"&&(e.share=i.share_link(i.current.title,"temp",r._id)))})},e.elasticsearch_delete=function(t){i.elasticsearch_delete(t).then(function(r){if(!n.isUndefined(r))if(r.found){s.set("Dashboard Deleted",t+" has been deleted","success",5e3);var i=n.where(e.elasticsearch.dashboards,{_id:t})[0];e.elasticsearch.dashboards=n.without(e.elasticsearch.dashboards,i)}else s.set("Dashboard Not Found","Could not find "+t+" in Elasticsearch","warning",5e3);else s
|
||||
.set("Dashboard Not Deleted","An error occurred deleting the dashboard","error",5e3)})},e.elasticsearch_dblist=function(t){i.elasticsearch_list(t,e.panel.elasticsearch_size).then(function(t){n.isUndefined(t.hits)||(e.panel.error=!1,e.hits=t.hits.total,e.elasticsearch.dashboards=t.hits.hits)})},e.save_gist=function(){i.save_gist(e.gist.title).then(function(t){n.isUndefined(t)?s.set("Save failed","Gist could not be saved","error",5e3):(e.gist.last=t,s.set("Gist saved",'You will be able to access your exported dashboard file at <a href="'+t+'">'+t+"</a> in a moment","success"))})},e.gist_dblist=function(t){i.gist_list(t).then(function(t){t&&t.length>0?e.gist.files=t:s.set("Gist Failed","Could not retrieve dashboard list from gist","error",5e3)})}}]),r.directive("dashUpload",["timer","dashboard","alertSrv",function(e,t,n){return{restrict:"A",link:function(e){function r(n){var r=n.target.files,i=function(){return function(n){t.dash_load(JSON.parse(n.target.result)),e.$apply()}};for(var s=0,o
|
||||
;o=r[s];s++){var u=new FileReader;u.onload=i(o),u.readAsText(o)}}window.File&&window.FileReader&&window.FileList&&window.Blob?document.getElementById("dashupload").addEventListener("change",r,!1):n.set("Oops","Sorry, the HTML5 File APIs are not fully supported in this browser.","error")}}}]),r.filter("gistid",function(){var e=/(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;return function(t){if(!n.isUndefined(t)){var r=t.match(e);if(!n.isNull(r)&&!n.isUndefined(r))return r[0].replace(/.*\//,"")}}})});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/dashcontrol/module",["angular","app","underscore"],function(a,b,c){var d=a.module("kibana.panels.dashcontrol",[]);b.useModule(d),d.controller("dashcontrol",["$scope","$http","timer","dashboard","alertSrv",function(a,b,d,e,f){a.panelMeta={status:"Deprecated",description:"This panel has been moved to the navigation bar. See the dashboard setting editor to configure it."},a.panel=a.panel||{};var g={save:{gist:!1,elasticsearch:!0,local:!0,"default":!0},load:{gist:!0,elasticsearch:!0,local:!0},hide_control:!1,elasticsearch_size:20,temp:!0,ttl_enable:!0,temp_ttl:"30d"};c.defaults(a.panel,g),a.init=function(){a.gist_pattern=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,a.gist={},a.elasticsearch={}},a.set_default=function(){e.set_default()?f.set("Local Default Set",e.current.title+" has been set as your local default","success",5e3):f.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},a.purge_default=function(){e.purge_default()?f.set("Local Default Clear","Your local default dashboard has been cleared","success",5e3):f.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},a.elasticsearch_save=function(b,d){e.elasticsearch_save(b,a.elasticsearch.title||e.current.title,a.panel.ttl_enable?d:!1).then(function(d){c.isUndefined(d._id)?f.set("Save failed","Dashboard could not be saved to Elasticsearch","error",5e3):(f.set("Dashboard Saved",'This dashboard has been saved to Elasticsearch as "'+d._id+'"',"success",5e3),"temp"===b&&(a.share=e.share_link(e.current.title,"temp",d._id)))})},a.elasticsearch_delete=function(b){e.elasticsearch_delete(b).then(function(d){if(c.isUndefined(d))f.set("Dashboard Not Deleted","An error occurred deleting the dashboard","error",5e3);else if(d.found){f.set("Dashboard Deleted",b+" has been deleted","success",5e3);var e=c.where(a.elasticsearch.dashboards,{_id:b})[0];a.elasticsearch.dashboards=c.without(a.elasticsearch.dashboards,e)}else f.set("Dashboard Not Found","Could not find "+b+" in Elasticsearch","warning",5e3)})},a.elasticsearch_dblist=function(b){e.elasticsearch_list(b,a.panel.elasticsearch_size).then(function(b){c.isUndefined(b.hits)||(a.panel.error=!1,a.hits=b.hits.total,a.elasticsearch.dashboards=b.hits.hits)})},a.save_gist=function(){e.save_gist(a.gist.title).then(function(b){c.isUndefined(b)?f.set("Save failed","Gist could not be saved","error",5e3):(a.gist.last=b,f.set("Gist saved",'You will be able to access your exported dashboard file at <a href="'+b+'">'+b+"</a> in a moment","success"))})},a.gist_dblist=function(b){e.gist_list(b).then(function(b){b&&b.length>0?a.gist.files=b:f.set("Gist Failed","Could not retrieve dashboard list from gist","error",5e3)})}}]),d.directive("dashUpload",["timer","dashboard","alertSrv",function(a,b,c){return{restrict:"A",link:function(a){function d(c){for(var d,e=c.target.files,f=function(){return function(c){b.dash_load(JSON.parse(c.target.result)),a.$apply()}},g=0;d=e[g];g++){var h=new FileReader;h.onload=f(d),h.readAsText(d)}}window.File&&window.FileReader&&window.FileList&&window.Blob?document.getElementById("dashupload").addEventListener("change",d,!1):c.set("Oops","Sorry, the HTML5 File APIs are not fully supported in this browser.","error")}}}]),d.filter("gistid",function(){var a=/(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;return function(b){if(!c.isUndefined(b)){var d=b.match(a);if(!c.isNull(d)&&!c.isUndefined(d))return d[0].replace(/.*\//,"")}}})});
|
||||
+4
-3
@@ -1,3 +1,4 @@
|
||||
define("panels/derivequeries/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.derivequeries",[]);t.useModule(r),r.controller("derivequeries",["$scope","$rootScope","querySrv","fields","dashboard","filterSrv",function(t,r,i,s,o,u){t.panelMeta={status:"Experimental",description:"Creates a new set of queries using the Elasticsearch terms facet. For example, you might want to create 5 queries showing the most frequent HTTP response codes. Be careful not to select a high cardinality field, as Elasticsearch must load all unique values into memory."};var a={loading:!1,label:"Search",query:"*",ids:[],field:"_type",fields:[],spyable:!0,rest:!1,size:5,mode:"terms only",exclude:[],history:[],remember:10};n.defaults(t.panel,a),t.init=function(){t.editing=!1,t.panel.fields=s.list},t.get_data=function(){f(t.panel.query);if(o.indices.length===0)return;t.panelMeta.loading=!0;var e=t.ejs.Request().indices(o.indices);e=e.facet(t.ejs.TermsFacet("query").field(t.panel.field
|
||||
).size(t.panel.size).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(t.ejs.QueryStringQuery(t.panel.query||"*"),u.getBoolFilter(u.ids))))).size(0),t.populate_modal(e);var r=e.doSearch();r.then(function(e){t.panelMeta.loading=!1;var r;t.panel.query===""||t.panel.mode==="terms only"?r="":t.panel.mode==="AND"?r=" AND ("+t.panel.query+")":t.panel.mode==="OR"&&(r=" OR ("+t.panel.query+")");var s=[],u=e.facets.query.terms,a=[];n.each(u,function(e){var n=t.panel.field+':"'+e.term+'"'+r,o=i.findQuery(n);o?s.push(o.id):s.push(i.set({alias:e.term,query:n})),a.push("NOT ("+n+")")});if(t.panel.rest){var f=a.join(" AND "),l=i.findQuery(f);l?s.push(l.id):s.push(i.set({alias:"other",query:f}))}n.each(n.difference(t.panel.ids,s),function(e){i.remove(e)}),t.panel.ids=s,o.refresh()})},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1},t.populate_modal=function(n){t.inspector=e.toJson(JSON.parse(n.toString()),!0)};var f=function(
|
||||
e){e=n.isArray(e)?e:[e];if(t.panel.remember>0){t.panel.history=n.union(e.reverse(),t.panel.history);var r=t.panel.history.length;r>t.panel.remember&&(t.panel.history=t.panel.history.slice(0,t.panel.remember))}}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/derivequeries/module",["angular","app","underscore"],function(a,b,c){var d=a.module("kibana.panels.derivequeries",[]);b.useModule(d),d.controller("derivequeries",["$scope","$rootScope","querySrv","fields","dashboard","filterSrv",function(b,d,e,f,g,h){b.panelMeta={status:"Experimental",description:"Creates a new set of queries using the Elasticsearch terms facet. For example, you might want to create 5 queries showing the most frequent HTTP response codes. Be careful not to select a high cardinality field, as Elasticsearch must load all unique values into memory."};var i={loading:!1,label:"Search",query:"*",ids:[],field:"_type",fields:[],spyable:!0,rest:!1,size:5,mode:"terms only",exclude:[],history:[],remember:10};c.defaults(b.panel,i),b.init=function(){b.editing=!1,b.panel.fields=f.list},b.get_data=function(){if(j(b.panel.query),0!==g.indices.length){b.panelMeta.loading=!0;var a=b.ejs.Request().indices(g.indices);a=a.facet(b.ejs.TermsFacet("query").field(b.panel.field).size(b.panel.size).exclude(b.panel.exclude).facetFilter(b.ejs.QueryFilter(b.ejs.FilteredQuery(b.ejs.QueryStringQuery(b.panel.query||"*"),h.getBoolFilter(h.ids))))).size(0),b.populate_modal(a);var d=a.doSearch();d.then(function(a){b.panelMeta.loading=!1;var d;""===b.panel.query||"terms only"===b.panel.mode?d="":"AND"===b.panel.mode?d=" AND ("+b.panel.query+")":"OR"===b.panel.mode&&(d=" OR ("+b.panel.query+")");var f=[],h=a.facets.query.terms,i=[];if(c.each(h,function(a){var c=b.panel.field+':"'+a.term+'"'+d,g=e.findQuery(c);g?f.push(g.id):f.push(e.set({alias:a.term,query:c})),i.push("NOT ("+c+")")}),b.panel.rest){var j=i.join(" AND "),k=e.findQuery(j);k?f.push(k.id):f.push(e.set({alias:"other",query:j}))}c.each(c.difference(b.panel.ids,f),function(a){e.remove(a)}),b.panel.ids=f,g.refresh()})}},b.set_refresh=function(a){b.refresh=a},b.close_edit=function(){b.refresh&&b.get_data(),b.refresh=!1},b.populate_modal=function(c){b.inspector=a.toJson(JSON.parse(c.toString()),!0)};var j=function(a){if(a=c.isArray(a)?a:[a],b.panel.remember>0){b.panel.history=c.union(a.reverse(),b.panel.history);var d=b.panel.history.length;d>b.panel.remember&&(b.panel.history=b.panel.history.slice(0,b.panel.remember))}}}])});
|
||||
+4
-1
@@ -1 +1,4 @@
|
||||
define("panels/fields/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.fields",[]);t.useModule(r),r.controller("fields",["$scope",function(e){e.panelMeta={status:"Deprecated",description:"You should not use this table, it does not work anymore. The table panel nowintegrates a field selector. This module will soon be removed."};var t={style:{},arrange:"vertical",micropanel_position:"right"};n.defaults(e.panel,t),e.init=function(){}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/fields/module",["angular","app","underscore"],function(a,b,c){var d=a.module("kibana.panels.fields",[]);b.useModule(d),d.controller("fields",["$scope",function(a){a.panelMeta={status:"Deprecated",description:"You should not use this table, it does not work anymore. The table panel nowintegrates a field selector. This module will soon be removed."};var b={style:{},arrange:"vertical",micropanel_position:"right"};c.defaults(a.panel,b),a.init=function(){}}])});
|
||||
+4
-1
@@ -1 +1,4 @@
|
||||
define("panels/filtering/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.filtering",[]);t.useModule(r),r.controller("filtering",["$scope","filterSrv","$rootScope","dashboard",function(e,t,r,i){e.panelMeta={status:"Beta",description:"A controllable list of all filters currently applied to the dashboard. You almost certainly want one of these on your dashboard somewhere."};var s={};n.defaults(e.panel,s),e.init=function(){e.filterSrv=t},e.remove=function(e){t.remove(e),i.refresh()},e.toggle=function(e){t.list[e].active=!t.list[e].active,i.refresh()},e.refresh=function(){r.$broadcast("refresh")},e.render=function(){r.$broadcast("render")},e.show_key=function(e){return!n.contains(["type","id","alias","mandate","active","editing"],e)},e.isEditable=function(e){var t=["time"];return n.contains(t,e.type)?!1:!0}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/filtering/module",["angular","app","underscore"],function(a,b,c){var d=a.module("kibana.panels.filtering",[]);b.useModule(d),d.controller("filtering",["$scope","filterSrv","$rootScope","dashboard",function(a,b,d,e){a.panelMeta={status:"Beta",description:"A controllable list of all filters currently applied to the dashboard. You almost certainly want one of these on your dashboard somewhere."};var f={};c.defaults(a.panel,f),a.init=function(){a.filterSrv=b},a.remove=function(a){b.remove(a),e.refresh()},a.toggle=function(a){b.list[a].active=!b.list[a].active,e.refresh()},a.refresh=function(){d.$broadcast("refresh")},a.render=function(){d.$broadcast("render")},a.show_key=function(a){return!c.contains(["type","id","alias","mandate","active","editing"],a)},a.isEditable=function(a){var b=["time"];return c.contains(b,a.type)?!1:!0}}])});
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div ng-controller="histogram" ng-init="init()" style="height:{{panel.height || row.height}}"><style>.histogram-legend {
|
||||
<div ng-controller="histogram" ng-init="init()" style="min-height:{{panel.height || row.height}}"><style>.histogram-legend {
|
||||
display:inline-block;
|
||||
padding-right:5px
|
||||
}
|
||||
|
||||
+4
-17
File diff suppressed because one or more lines are too long
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/hits/module",["angular","app","underscore","jquery","kbn","jquery.flot","jquery.flot.pie"],function(e,t,n,r,i){var s=e.module("kibana.panels.hits",[]);t.useModule(s),s.controller("hits",["$scope","querySrv","dashboard","filterSrv",function(t,r,i,s){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"The total hits for a query or set of queries. Can be a pie chart, bar chart, list, or absolute total of all queries combined"};var o={queries:{mode:"all",ids:[]},style:{"font-size":"10pt"},arrangement:"horizontal",chart:"bar",counter_pos:"above",donut:!1,tilt:!1,labels:!0,spyable:!0};n.defaults(t.panel,o),t.init=function(){t.hits=0,t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_data=function(o,u){delete t.panel.error,t.panelMeta.loading=!0;if(i.indices.length===0)return;var a=n.isUndefined(o)?0:o,f=t.ejs.Request().indices(i.indices[a]);t.panel.queries.ids=r.idsByMode(t.panel.queries),n.each(t.panel.queries
|
||||
.ids,function(e){var n=t.ejs.FilteredQuery(r.getEjsObj(e),s.getBoolFilter(s.ids));f=f.facet(t.ejs.QueryFacet(e).query(n)).size(0)}),t.inspector=e.toJson(JSON.parse(f.toString()),!0);var l=f.doSearch();l.then(function(e){t.panelMeta.loading=!1,a===0&&(t.hits=0,t.data=[],u=t.query_id=(new Date).getTime());if(!n.isUndefined(e.error)){t.panel.error=t.parse_error(e.error);return}var s=n.map(n.keys(e.facets),function(e){return parseInt(e,10)});if(t.query_id===u&&n.intersection(s,t.panel.queries.ids).length===t.panel.queries.ids.length){var o=0;n.each(t.panel.queries.ids,function(i){var s=e.facets[i],u=n.isUndefined(t.data[o])||a===0?s.count:t.data[o].hits+s.count;t.hits+=s.count,t.data[o]={info:r.list[i],id:i,hits:u,data:[[o,u]]},o++}),t.$emit("render"),a<i.indices.length-1&&t.get_data(a+1,u)}})},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")}}]),s.directive("hitsChart",["querySrv",function(t){return{restrict:"A",link:function(
|
||||
s,o){function u(){o.css({height:s.panel.height||s.row.height});try{n.each(s.data,function(e){e.label=e.info.alias,e.color=e.info.color})}catch(e){return}try{s.panel.chart==="bar"&&(s.plot=r.plot(o,s.data,{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:"#eee",color:"#eee",hoverable:!0},colors:t.colors})),s.panel.chart==="pie"&&(s.plot=r.plot(o,s.data,{legend:{show:!1},series:{pie:{innerRadius:s.panel.donut?.4:0,tilt:s.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:s.panel.labels,radius:2/3,formatter:function(e,t){return"<div ng-click=\"build_search(panel.query.field,'"+e+"')"+' "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+e+"<br/>"+Math.round(t.percent)+"%</div>"},threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:t.colors}))}catch(e){o.text(e)}}s.$on("render",function(
|
||||
){u()}),e.element(window).bind("resize",function(){u()});var a=r("<div>");o.bind("plothover",function(e,t,n){if(n){var r=s.panel.chart==="bar"?n.datapoint[1]:n.datapoint[1][0][1];a.html(i.query_color_dot(n.series.color,20)+" "+r.toFixed(0)).place_tt(t.pageX,t.pageY)}else a.remove()})}}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/hits/module",["angular","app","underscore","jquery","kbn","jquery.flot","jquery.flot.pie"],function(a,b,c,d,e){var f=a.module("kibana.panels.hits",[]);b.useModule(f),f.controller("hits",["$scope","querySrv","dashboard","filterSrv",function(b,d,e,f){b.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"The total hits for a query or set of queries. Can be a pie chart, bar chart, list, or absolute total of all queries combined"};var g={queries:{mode:"all",ids:[]},style:{"font-size":"10pt"},arrangement:"horizontal",chart:"bar",counter_pos:"above",donut:!1,tilt:!1,labels:!0,spyable:!0};c.defaults(b.panel,g),b.init=function(){b.hits=0,b.$on("refresh",function(){b.get_data()}),b.get_data()},b.get_data=function(g,h){if(delete b.panel.error,b.panelMeta.loading=!0,0!==e.indices.length){var i=c.isUndefined(g)?0:g,j=b.ejs.Request().indices(e.indices[i]);b.panel.queries.ids=d.idsByMode(b.panel.queries),c.each(b.panel.queries.ids,function(a){var c=b.ejs.FilteredQuery(d.getEjsObj(a),f.getBoolFilter(f.ids));j=j.facet(b.ejs.QueryFacet(a).query(c)).size(0)}),b.inspector=a.toJson(JSON.parse(j.toString()),!0);var k=j.doSearch();k.then(function(a){if(b.panelMeta.loading=!1,0===i&&(b.hits=0,b.data=[],h=b.query_id=(new Date).getTime()),!c.isUndefined(a.error))return b.panel.error=b.parse_error(a.error),void 0;var f=c.map(c.keys(a.facets),function(a){return parseInt(a,10)});if(b.query_id===h&&c.intersection(f,b.panel.queries.ids).length===b.panel.queries.ids.length){var g=0;c.each(b.panel.queries.ids,function(e){var f=a.facets[e],h=c.isUndefined(b.data[g])||0===i?f.count:b.data[g].hits+f.count;b.hits+=f.count,b.data[g]={info:d.list[e],id:e,hits:h,data:[[g,h]]},g++}),b.$emit("render"),i<e.indices.length-1&&b.get_data(i+1,h)}})}},b.set_refresh=function(a){b.refresh=a},b.close_edit=function(){b.refresh&&b.get_data(),b.refresh=!1,b.$emit("render")}}]),f.directive("hitsChart",["querySrv",function(b){return{restrict:"A",link:function(f,g){function h(){g.css({height:f.panel.height||f.row.height});try{c.each(f.data,function(a){a.label=a.info.alias,a.color=a.info.color})}catch(a){return}try{"bar"===f.panel.chart&&(f.plot=d.plot(g,f.data,{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:"#eee",color:"#eee",hoverable:!0},colors:b.colors})),"pie"===f.panel.chart&&(f.plot=d.plot(g,f.data,{legend:{show:!1},series:{pie:{innerRadius:f.panel.donut?.4:0,tilt:f.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:f.panel.labels,radius:2/3,formatter:function(a,b){return"<div ng-click=\"build_search(panel.query.field,'"+a+"')"+' "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+a+"<br/>"+Math.round(b.percent)+"%</div>"},threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:b.colors}))}catch(a){g.text(a)}}f.$on("render",function(){h()}),a.element(window).bind("resize",function(){h()});var i=d("<div>");g.bind("plothover",function(a,b,c){if(c){var d="bar"===f.panel.chart?c.datapoint[1]:c.datapoint[1][0][1];i.html(e.query_color_dot(c.series.color,20)+" "+d.toFixed(0)).place_tt(b.pageX,b.pageY)}else i.remove()})}}}])});
|
||||
+4
-43
File diff suppressed because one or more lines are too long
+4
-38
File diff suppressed because one or more lines are too long
+4
-80
File diff suppressed because one or more lines are too long
+5
-36
File diff suppressed because one or more lines are too long
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/pie/module",["angular","app","underscore","jquery","kbn","config"],function(e,t,n,r,i,s){var o=e.module("kibana.panels.pie",[]);t.useModule(o),o.controller("pie",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(t,r,i,o,u){t.panelMeta={status:"Deprecated",description:"Uses an Elasticsearch terms facet to create a pie chart. You should really only point this at not_analyzed fields for that reason. This panel is going away soon, it has <strong>been replaced by the terms panel</strong>. Please use that one instead."};var a={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],query:{field:"_type",goal:100},queries:{mode:"all",ids:[]},size:10,exclude:[],donut:!1,tilt:!1,legend:"above",labels:!0,mode:"terms",default_field:"DEFAULT",spyable:!0};n.defaults(t.panel,a),t.init=function(){t.$on("refresh",function(){t.get_data()}),t.get_data()},t.set_mode=function(e){switch(e){case"terms":t.panel.query={field:"_all"};break;case"goal":t.panel.query={goal
|
||||
:100}}},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")},t.get_data=function(){if(o.indices.length===0)return;t.panelMeta.loading=!0;var e=t.ejs.Request().indices(o.indices);t.panel.queries.ids=i.idsByMode(t.panel.queries);var r=t.ejs.BoolQuery();n.each(t.panel.queries.ids,function(e){r=r.should(i.getEjsObj(e))});var s;t.panel.mode==="terms"?(e=e.facet(t.ejs.TermsFacet("pie").field(t.panel.query.field||t.panel.default_field).size(t.panel.size).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(r,u.getBoolFilter(u.ids))))).size(0),t.populate_modal(e),s=e.doSearch(),s.then(function(e){t.panelMeta.loading=!1,t.hits=e.hits.total,t.data=[];var r=0;n.each(e.facets.pie.terms,function(e){var n={label:e.term,data:e.count};t.data.push(),t.data.push(n),r+=1}),t.$emit("render")})):(e=e.query(r).filter(u.getBoolFilter(u.ids)).size(0),t.populate_modal(e),s=e.doSearch(),s.then(function(e){t.panelMeta.loading=!1
|
||||
;var n=e.hits.total,r=t.panel.query.goal-n;t.data=[{label:"Complete",data:n,color:"#BF6730"},{data:r,color:"#e2d0c4"}],t.$emit("render")}))},t.populate_modal=function(n){t.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+s.elasticsearch+"/"+o.indices+"/_search?pretty -d'\n"+e.toJson(JSON.parse(n.toString()),!0)+"'</pre>"}}}]),o.directive("pie",["querySrv","filterSrv","dashboard",function(t,s,o){return{restrict:"A",link:function(u,a){function f(){a.css({height:u.panel.height||u.row.height});var e;u.panel.mode==="goal"?e={show:u.panel.labels,radius:0,formatter:function(e,t){var r=parseInt(u.row.height.replace("px",""),10)/8+String("px");return n.isUndefined(e)?"":'<div style="font-size:'+r+';font-weight:bold;text-align:center;padding:2px;color:#fff;">'+Math.round(t.percent)+"%</div>"}}:e={show:u.panel.labels,radius:2/3,formatter:function(e,t){return'<div "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+e+"<br/>"+Math.round(t.percent)+"%</div>"
|
||||
},threshold:.1};var i={series:{pie:{innerRadius:u.panel.donut?.45:0,tilt:u.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},label:e,stroke:{width:0}}},grid:{backgroundColor:null,hoverable:!0,clickable:!0},legend:{show:!1},colors:t.colors};a.is(":visible")&&require(["vendor/jquery/jquery.flot.pie.js"],function(){u.legend=r.plot(a,u.data,i).getData(),u.$$phase||u.$apply()})}a.html('<center><img src="img/load_big.gif"></center>'),u.$on("render",function(){f()}),e.element(window).bind("resize",function(){f()}),a.bind("plotclick",function(e,t,n){if(!n)return;u.panel.mode==="terms"&&(s.set({type:"terms",field:u.panel.query.field,value:n.series.label}),o.refresh())});var l=r("<div>");a.bind("plothover",function(e,t,n){n?l.html([i.query_color_dot(n.series.color,15),n.series.label||"",parseFloat(n.series.percent).toFixed(1)+"%"].join(" ")).place_tt(t.pageX,t.pageY,{offset:10}):l.remove()})}}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/pie/module",["angular","app","underscore","jquery","kbn","config"],function(a,b,c,d,e,f){var g=a.module("kibana.panels.pie",[]);b.useModule(g),g.controller("pie",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(b,d,e,g,h){b.panelMeta={status:"Deprecated",description:"Uses an Elasticsearch terms facet to create a pie chart. You should really only point this at not_analyzed fields for that reason. This panel is going away soon, it has <strong>been replaced by the terms panel</strong>. Please use that one instead."};var i={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],query:{field:"_type",goal:100},queries:{mode:"all",ids:[]},size:10,exclude:[],donut:!1,tilt:!1,legend:"above",labels:!0,mode:"terms",default_field:"DEFAULT",spyable:!0};c.defaults(b.panel,i),b.init=function(){b.$on("refresh",function(){b.get_data()}),b.get_data()},b.set_mode=function(a){switch(a){case"terms":b.panel.query={field:"_all"};break;case"goal":b.panel.query={goal:100}}},b.set_refresh=function(a){b.refresh=a},b.close_edit=function(){b.refresh&&b.get_data(),b.refresh=!1,b.$emit("render")},b.get_data=function(){if(0!==g.indices.length){b.panelMeta.loading=!0;var a=b.ejs.Request().indices(g.indices);b.panel.queries.ids=e.idsByMode(b.panel.queries);var d=b.ejs.BoolQuery();c.each(b.panel.queries.ids,function(a){d=d.should(e.getEjsObj(a))});var f;"terms"===b.panel.mode?(a=a.facet(b.ejs.TermsFacet("pie").field(b.panel.query.field||b.panel.default_field).size(b.panel.size).exclude(b.panel.exclude).facetFilter(b.ejs.QueryFilter(b.ejs.FilteredQuery(d,h.getBoolFilter(h.ids))))).size(0),b.populate_modal(a),f=a.doSearch(),f.then(function(a){b.panelMeta.loading=!1,b.hits=a.hits.total,b.data=[];var d=0;c.each(a.facets.pie.terms,function(a){var c={label:a.term,data:a.count};b.data.push(),b.data.push(c),d+=1}),b.$emit("render")})):(a=a.query(d).filter(h.getBoolFilter(h.ids)).size(0),b.populate_modal(a),f=a.doSearch(),f.then(function(a){b.panelMeta.loading=!1;var c=a.hits.total,d=b.panel.query.goal-c;b.data=[{label:"Complete",data:c,color:"#BF6730"},{data:d,color:"#e2d0c4"}],b.$emit("render")}))}},b.populate_modal=function(c){b.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+f.elasticsearch+"/"+g.indices+"/_search?pretty -d'\n"+a.toJson(JSON.parse(c.toString()),!0)+"'</pre>"}}}]),g.directive("pie",["querySrv","filterSrv","dashboard",function(b,f,g){return{restrict:"A",link:function(h,i){function j(){i.css({height:h.panel.height||h.row.height});var a;a="goal"===h.panel.mode?{show:h.panel.labels,radius:0,formatter:function(a,b){var d=parseInt(h.row.height.replace("px",""),10)/8+String("px");return c.isUndefined(a)?"":'<div style="font-size:'+d+';font-weight:bold;text-align:center;padding:2px;color:#fff;">'+Math.round(b.percent)+"%</div>"}}:{show:h.panel.labels,radius:2/3,formatter:function(a,b){return'<div "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+a+"<br/>"+Math.round(b.percent)+"%</div>"},threshold:.1};var e={series:{pie:{innerRadius:h.panel.donut?.45:0,tilt:h.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},label:a,stroke:{width:0}}},grid:{backgroundColor:null,hoverable:!0,clickable:!0},legend:{show:!1},colors:b.colors};i.is(":visible")&&require(["vendor/jquery/jquery.flot.pie.js"],function(){h.legend=d.plot(i,h.data,e).getData(),h.$$phase||h.$apply()})}i.html('<center><img src="img/load_big.gif"></center>'),h.$on("render",function(){j()}),a.element(window).bind("resize",function(){j()}),i.bind("plotclick",function(a,b,c){c&&"terms"===h.panel.mode&&(f.set({type:"terms",field:h.panel.query.field,value:c.series.label}),g.refresh())});var k=d("<div>");i.bind("plothover",function(a,b,c){c?k.html([e.query_color_dot(c.series.color,15),c.series.label||"",parseFloat(c.series.percent).toFixed(1)+"%"].join(" ")).place_tt(b.pageX,b.pageY,{offset:10}):k.remove()})}}}])});
|
||||
+4
-2
@@ -1,2 +1,4 @@
|
||||
define("css",{load:function(e,t,n,r){function i(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("link");n.href=e,n.rel="stylesheet",n.type="text/css",t.appendChild(n)}i(requirejs.toUrl(e)),n(!0)},pluginBuilder:"../vendor/require/css-build"}),define("css-embed",function(){function e(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),r=document.createTextNode(e);n.type="text/css",n.styleSheet?n.styleSheet.cssText=r.nodeValue:n.appendChild(r),t.appendChild(n)}return e}),define("css!panels/query/query.css",["css-embed"],function(e){return e(".short-query{display:inline-block;margin-right:10px}.begin-query{position:absolute;left:13px;top:5px}.end-query{position:absolute;right:15px;top:5px}.panel-query{padding-left:35px!important;height:31px!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-search:hover .has-remove{padding-left:50px!important}.remove-query{opacity:0}.last-query{padding-right:45px!important}.form-search:hover .remove-query{opacity:1}.query-panel .pins{text-decoration:underline}.query-panel .pinned{margin-right:5px}"
|
||||
),!0}),define("panels/query/module",["angular","app","underscore","css!./query.css"],function(e,t,n){var r=e.module("kibana.panels.query",[]);t.useModule(r),r.controller("query",["$scope","querySrv","$rootScope",function(e,t,r){e.panelMeta={status:"Stable",description:"Manage all of the queries on the dashboard. You almost certainly need one of these somewhere. This panel allows you to add, remove, label, pin and color queries"};var i={label:"Search",query:"*",pinned:!0,history:[],remember:10};n.defaults(e.panel,i),e.querySrv=t,e.init=function(){},e.refresh=function(){s(n.pluck(e.querySrv.list,"query")),r.$broadcast("refresh")},e.render=function(){r.$broadcast("render")},e.toggle_pin=function(e){t.list[e].pin=t.list[e].pin?!1:!0};var s=function(t){if(e.panel.remember>0){e.panel.history=n.union(t.reverse(),e.panel.history);var r=e.panel.history.length;r>e.panel.remember&&(e.panel.history=e.panel.history.slice(0,e.panel.remember))}};e.init()}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("css",{load:function(a,b,c){function d(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("link");c.href=a,c.rel="stylesheet",c.type="text/css",b.appendChild(c)}d(requirejs.toUrl(a)),c(!0)},pluginBuilder:"../vendor/require/css-build"}),define("css-embed",function(){function a(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("style"),d=document.createTextNode(a);c.type="text/css",c.styleSheet?c.styleSheet.cssText=d.nodeValue:c.appendChild(d),b.appendChild(c)}return a}),define("css!panels/query/query.css",["css-embed"],function(a){return a(".short-query{display:inline-block;margin-right:10px}.begin-query{position:absolute;left:13px;top:5px}.end-query{position:absolute;right:15px;top:5px}.panel-query{padding-left:35px!important;height:31px!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-search:hover .has-remove{padding-left:50px!important}.remove-query{opacity:0}.last-query{padding-right:45px!important}.form-search:hover .remove-query{opacity:1}.query-panel .pins{text-decoration:underline}.query-panel .pinned{margin-right:5px}"),!0}),define("panels/query/module",["angular","app","underscore","css!./query.css"],function(a,b,c){var d=a.module("kibana.panels.query",[]);b.useModule(d),d.controller("query",["$scope","querySrv","$rootScope",function(a,b,d){a.panelMeta={status:"Stable",description:"Manage all of the queries on the dashboard. You almost certainly need one of these somewhere. This panel allows you to add, remove, label, pin and color queries"};var e={label:"Search",query:"*",pinned:!0,history:[],remember:10};c.defaults(a.panel,e),a.querySrv=b,a.init=function(){},a.refresh=function(){f(c.pluck(a.querySrv.list,"query")),d.$broadcast("refresh")},a.render=function(){d.$broadcast("render")},a.toggle_pin=function(a){b.list[a].pin=b.list[a].pin?!1:!0};var f=function(b){if(a.panel.remember>0){a.panel.history=c.union(b.reverse(),a.panel.history);var d=a.panel.history.length;d>a.panel.remember&&(a.panel.history=a.panel.history.slice(0,a.panel.remember))}};a.init()}])});
|
||||
+4
-5
@@ -1,5 +1,4 @@
|
||||
define("panels/table/module",["angular","app","underscore","kbn","moment"],function(e,t,n,r,i){var s=e.module("kibana.panels.table",[]);t.useModule(s),s.controller("table",["$rootScope","$scope","fields","querySrv","dashboard","filterSrv",function(t,i,s,o,u,a){i.panelMeta={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 f={status:"Stable",queries:{mode:"all",ids:[]},size:100,pages:5,offset:0,sort:["_score","desc"],group:"default",style:{"font-size":"9pt"},overflow:"min-height",fields:[],highlight:[],sortable:!0,header:!0,paging:!0,field_list:!0,trimFactor:300,normTimes:!0,spyable:!0};n.defaults(i.panel,f),i.init=function(){i.Math=Math,i.$on("refresh",function(){i.get_data()}),i.fields=s,i.get_data()},i.percent=r.to_percent,i.toggle_micropanel=
|
||||
function(e){var t=n.pluck(i.data,"_source");i.micropanel={field:e,values:r.top_field_values(t,e,10),related:r.get_related_fields(t,e),count:n.countBy(t,function(t){return n.contains(n.keys(t),e)})["true"]}},i.micropanelColor=function(e){var t=["bar-success","bar-warning","bar-danger","bar-info","bar-primary"];return e>t.length?"":t[e]},i.set_sort=function(e){i.panel.sort[0]===e?i.panel.sort[1]=i.panel.sort[1]==="asc"?"desc":"asc":i.panel.sort[0]=e,i.get_data()},i.toggle_field=function(e){n.indexOf(i.panel.fields,e)>-1?i.panel.fields=n.without(i.panel.fields,e):i.panel.fields.push(e)},i.toggle_highlight=function(e){n.indexOf(i.panel.highlight,e)>-1?i.panel.highlight=n.without(i.panel.highlight,e):i.panel.highlight.push(e)},i.toggle_details=function(e){e.kibana=e.kibana||{},e.kibana.details=e.kibana.details?!1:i.without_kibana(e)},i.page=function(e){i.panel.offset=e*i.panel.size,i.get_data()},i.build_search=function(t,r,s){var o;n.isArray(r)?o="("+n.map(r,function(t){return e.toJson(t)}).
|
||||
join(" AND ")+")":n.isUndefined(r)?(o="*",s=!s):o=e.toJson(r),a.set({type:"field",field:t,query:o,mandate:s?"mustNot":"must"}),i.panel.offset=0,u.refresh()},i.fieldExists=function(e,t){a.set({type:"exists",field:e,mandate:t}),u.refresh()},i.get_data=function(e,t){i.panel.error=!1;if(u.indices.length===0)return;i.panelMeta.loading=!0,i.panel.queries.ids=o.idsByMode(i.panel.queries);var s=n.isUndefined(e)?0:e;i.segment=s;var f=i.ejs.Request().indices(u.indices[s]),l=i.ejs.BoolQuery();n.each(i.panel.queries.ids,function(e){l=l.should(o.getEjsObj(e))}),f=f.query(i.ejs.FilteredQuery(l,a.getBoolFilter(a.ids))).highlight(i.ejs.Highlight(i.panel.highlight).fragmentSize(2147483647).preTags("@start-highlight@").postTags("@end-highlight@")).size(i.panel.size*i.panel.pages).sort(i.panel.sort[0],i.panel.sort[1]),i.populate_modal(f);var c=f.doSearch();c.then(function(e){i.panelMeta.loading=!1,s===0&&(i.hits=0,i.data=[],t=i.query_id=(new Date).getTime());if(!n.isUndefined(e.error)){i.panel.error=i.parse_error
|
||||
(e.error);return}if(i.query_id!==t)return;i.data=i.data.concat(n.map(e.hits.hits,function(e){return{_source:r.flatten_json(e._source),highlight:r.flatten_json(e.highlight||{}),_type:e._type,_index:e._index,_id:e._id,_sort:e.sort}})),i.hits+=e.hits.total,i.data=n.sortBy(i.data,function(e){return e._sort[0]}),i.panel.sort[1]==="desc"&&i.data.reverse(),i.data=i.data.slice(0,i.panel.size*i.panel.pages),(i.data.length<i.panel.size*i.panel.pages||!n.contains(a.timeField(),i.panel.sort[0])||i.panel.sort[1]!=="desc")&&s+1<u.indices.length&&i.get_data(s+1,i.query_id)})},i.populate_modal=function(t){i.inspector=e.toJson(JSON.parse(t.toString()),!0)},i.without_kibana=function(e){return{_source:e._source,highlight:e.highlight}},i.set_refresh=function(e){i.refresh=e},i.close_edit=function(){i.refresh&&i.get_data(),i.refresh=!1}}]),s.filter("tableHighlight",function(){return function(e){return!n.isUndefined(e)&&!n.isNull(e)&&e.toString().length>0?e.toString().replace(/&/g,"&").replace(/</g,"<"
|
||||
).replace(/>/g,">").replace(/\r?\n/g,"<br/>").replace(/@start-highlight@/g,'<code class="highlight">').replace(/@end-highlight@/g,"</code>"):""}}),s.filter("tableTruncate",function(){return function(e,t,r){return!n.isUndefined(e)&&!n.isNull(e)&&e.toString().length>0?e.length>t/r?e.substr(0,t/r)+"...":e:""}}),s.filter("tableFieldFormat",["fields",function(e){return function(t,r,s,o){var u;if(!n.isUndefined(e.mapping[s._index])&&!n.isUndefined(e.mapping[s._index][s._type])){u=e.mapping[s._index][s._type][r].type;if(u==="date"&&o.panel.normTimes)return i(t).format("YYYY-MM-DD HH:mm:ss")}return t}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/table/module",["angular","app","underscore","kbn","moment"],function(a,b,c,d,e){var f=a.module("kibana.panels.table",[]);b.useModule(f),f.controller("table",["$rootScope","$scope","fields","querySrv","dashboard","filterSrv",function(b,e,f,g,h,i){e.panelMeta={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 j={status:"Stable",queries:{mode:"all",ids:[]},size:100,pages:5,offset:0,sort:["_score","desc"],group:"default",style:{"font-size":"9pt"},overflow:"min-height",fields:[],highlight:[],sortable:!0,header:!0,paging:!0,field_list:!0,trimFactor:300,normTimes:!0,spyable:!0};c.defaults(e.panel,j),e.init=function(){e.Math=Math,e.$on("refresh",function(){e.get_data()}),e.fields=f,e.get_data()},e.percent=d.to_percent,e.toggle_micropanel=function(a){var b=c.pluck(e.data,"_source");e.micropanel={field:a,values:d.top_field_values(b,a,10),related:d.get_related_fields(b,a),count:c.countBy(b,function(b){return c.contains(c.keys(b),a)})["true"]}},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):e.panel.fields.push(a)},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=a.kibana||{},a.kibana.details=a.kibana.details?!1:e.without_kibana(a)},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),i.set({type:"field",field:b,query:g,mandate:f?"mustNot":"must"}),e.panel.offset=0,h.refresh()},e.fieldExists=function(a,b){i.set({type:"exists",field:a,mandate:b}),h.refresh()},e.get_data=function(a,b){if(e.panel.error=!1,0!==h.indices.length){e.panelMeta.loading=!0,e.panel.queries.ids=g.idsByMode(e.panel.queries);var f=c.isUndefined(a)?0:a;e.segment=f;var j=e.ejs.Request().indices(h.indices[f]),k=e.ejs.BoolQuery();c.each(e.panel.queries.ids,function(a){k=k.should(g.getEjsObj(a))}),j=j.query(e.ejs.FilteredQuery(k,i.getBoolFilter(i.ids))).highlight(e.ejs.Highlight(e.panel.highlight).fragmentSize(2147483647).preTags("@start-highlight@").postTags("@end-highlight@")).size(e.panel.size*e.panel.pages).sort(e.panel.sort[0],e.panel.sort[1]),e.populate_modal(j);var l=j.doSearch();l.then(function(a){return e.panelMeta.loading=!1,0===f&&(e.hits=0,e.data=[],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){return{_source:d.flatten_json(a._source),highlight:d.flatten_json(a.highlight||{}),_type:a._type,_index:a._index,_id:a._id,_sort:a.sort}})),e.hits+=a.hits.total,e.data=c.sortBy(e.data,function(a){return 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(i.timeField(),e.panel.sort[0])||"desc"!==e.panel.sort[1])&&f+1<h.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){return{_source:a._source,highlight:a.highlight}},e.set_refresh=function(a){e.refresh=a},e.close_edit=function(){e.refresh&&e.get_data(),e.refresh=!1}}]),f.filter("tableHighlight",function(){return function(a){return!c.isUndefined(a)&&!c.isNull(a)&&a.toString().length>0?a.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").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("tableFieldFormat",["fields",function(a){return function(b,d,f,g){var h;return c.isUndefined(a.mapping[f._index])||c.isUndefined(a.mapping[f._index][f._type])||(h=a.mapping[f._index][f._type][d].type,"date"!==h||!g.panel.normTimes)?b:e(b).format("YYYY-MM-DD HH:mm:ss")}}])});
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/terms/module",["angular","app","underscore","jquery","kbn"],function(e,t,n,r,i){var s=e.module("kibana.panels.terms",[]);t.useModule(s),s.controller("terms",["$scope","querySrv","dashboard","filterSrv",function(t,r,i,s){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Beta",description:"Displays the results of an elasticsearch facet as a pie chart, bar chart, or a table"};var o={queries:{mode:"all",ids:[]},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};n.defaults(t.panel,o),t.init=function(){t.hits=0,t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_data=function(){if(i.indices.length===0)return;t.panelMeta.loading=!0;var o,u,a;o=t.ejs.Request().indices(i.indices),t.panel.queries.ids=r.idsByMode(t.panel.queries),a=t.ejs.BoolQuery(),n.each(t.panel.queries.ids,function(e){a=a.should(
|
||||
r.getEjsObj(e))}),o=o.facet(t.ejs.TermsFacet("terms").field(t.panel.field).size(t.panel.size).order(t.panel.order).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(a,s.getBoolFilter(s.ids))))).size(0),t.inspector=e.toJson(JSON.parse(o.toString()),!0),u=o.doSearch(),u.then(function(e){var r=0;t.panelMeta.loading=!1,t.hits=e.hits.total,t.data=[],n.each(e.facets.terms.terms,function(e){var n={label:e.term,data:[[r,e.count]],actions:!0};t.data.push(n),r+=1}),t.data.push({label:"Missing field",data:[[r,e.facets.terms.missing]],meta:"missing",color:"#aaa",opacity:0}),t.data.push({label:"Other values",data:[[r+1,e.facets.terms.other]],meta:"other",color:"#444"}),t.$emit("render")})},t.build_search=function(e,r){if(n.isUndefined(e.meta))s.set({type:"terms",field:t.panel.field,value:e.label,mandate:r?"mustNot":"must"});else{if(e.meta!=="missing")return;s.set({type:"exists",field:t.panel.field,mandate:r?"must":"mustNot"})}i.refresh()},t.set_refresh=function(e){t.refresh=
|
||||
e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")},t.showMeta=function(e){return n.isUndefined(e.meta)?!0:e.meta==="other"&&!t.panel.other?!1:e.meta==="missing"&&!t.panel.missing?!1:!0}}]),s.directive("termsChart",["querySrv",function(t){return{restrict:"A",link:function(s,o){function u(){var e,i;o.css({height:s.panel.height||s.row.height}),i=n.clone(s.data),i=s.panel.missing?i:n.without(i,n.findWhere(i,{meta:"missing"})),i=s.panel.other?i:n.without(i,n.findWhere(i,{meta:"other"})),require(["jquery.flot.pie"],function(){try{s.panel.chart==="bar"&&(e=r.plot(o,i,{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:"#eee",color:"#eee",hoverable:!0,clickable:!0},colors:t.colors}));if(s.panel.chart==="pie"){var n=function(e,t){return"<div ng-click=\"build_search(panel.field,'"+e+"')"+' "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+
|
||||
e+"<br/>"+Math.round(t.percent)+"%</div>"};e=r.plot(o,i,{legend:{show:!1},series:{pie:{innerRadius:s.panel.donut?.4:0,tilt:s.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:s.panel.labels,radius:2/3,formatter:n,threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:t.colors})}o.is(":visible")&&setTimeout(function(){s.legend=e.getData(),s.$$phase||s.$apply()})}catch(u){o.text(u)}})}s.$on("render",function(){u()}),e.element(window).bind("resize",function(){u()}),o.bind("plotclick",function(e,t,n){n&&s.build_search(s.data[n.seriesIndex])});var a=r("<div>");o.bind("plothover",function(e,t,n){if(n){var r=s.panel.chart==="bar"?n.datapoint[1]:n.datapoint[1][0][1];a.html(i.query_color_dot(n.series.color,20)+" "+n.series.label+" ("+r.toFixed(0)+")").place_tt(t.pageX,t.pageY)}else a.remove()})}}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/terms/module",["angular","app","underscore","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",function(b,d,e,f){b.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Beta",description:"Displays the results of an elasticsearch facet as a pie chart, bar chart, or a table"};var g={queries:{mode:"all",ids:[]},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};c.defaults(b.panel,g),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 g,h,i;g=b.ejs.Request().indices(e.indices),b.panel.queries.ids=d.idsByMode(b.panel.queries),i=b.ejs.BoolQuery(),c.each(b.panel.queries.ids,function(a){i=i.should(d.getEjsObj(a))}),g=g.facet(b.ejs.TermsFacet("terms").field(b.panel.field).size(b.panel.size).order(b.panel.order).exclude(b.panel.exclude).facetFilter(b.ejs.QueryFilter(b.ejs.FilteredQuery(i,f.getBoolFilter(f.ids))))).size(0),b.inspector=a.toJson(JSON.parse(g.toString()),!0),h=g.doSearch(),h.then(function(a){var d=0;b.panelMeta.loading=!1,b.hits=a.hits.total,b.data=[],c.each(a.facets.terms.terms,function(a){var c={label:a.term,data:[[d,a.count]],actions:!0};b.data.push(c),d+=1}),b.data.push({label:"Missing field",data:[[d,a.facets.terms.missing]],meta:"missing",color:"#aaa",opacity:0}),b.data.push({label:"Other values",data:[[d+1,a.facets.terms.other]],meta:"other",color:"#444"}),b.$emit("render")})}},b.build_search=function(a,d){if(c.isUndefined(a.meta))f.set({type:"terms",field:b.panel.field,value:a.label,mandate:d?"mustNot":"must"});else{if("missing"!==a.meta)return;f.set({type:"exists",field:b.panel.field,mandate:d?"must":"mustNot"})}e.refresh()},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(b){return{restrict:"A",link:function(f,g){function h(){var a,e;g.css({height:f.panel.height||f.row.height}),e=c.clone(f.data),e=f.panel.missing?e:c.without(e,c.findWhere(e,{meta:"missing"})),e=f.panel.other?e:c.without(e,c.findWhere(e,{meta:"other"})),require(["jquery.flot.pie"],function(){try{if("bar"===f.panel.chart&&(a=d.plot(g,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:"#eee",color:"#eee",hoverable:!0,clickable:!0},colors:b.colors})),"pie"===f.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>"};a=d.plot(g,e,{legend:{show:!1},series:{pie:{innerRadius:f.panel.donut?.4:0,tilt:f.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:f.panel.labels,radius:2/3,formatter:c,threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:b.colors})}g.is(":visible")&&setTimeout(function(){f.legend=a.getData(),f.$$phase||f.$apply()})}catch(h){g.text(h)}})}f.$on("render",function(){h()}),a.element(window).bind("resize",function(){h()}),g.bind("plotclick",function(a,b,c){c&&f.build_search(f.data[c.seriesIndex])});var i=d("<div>");g.bind("plothover",function(a,b,c){if(c){var d="bar"===f.panel.chart?c.datapoint[1]:c.datapoint[1][0][1];i.html(e.query_color_dot(c.series.color,20)+" "+c.series.label+" ("+d.toFixed(0)+")").place_tt(b.pageX,b.pageY)}else i.remove()})}}}])});
|
||||
+4
-11
File diff suppressed because one or more lines are too long
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/timepicker/module",["angular","app","underscore","moment","kbn"],function(e,t,n,r,i){var s=e.module("kibana.panels.timepicker",[]);t.useModule(s),s.controller("timepicker",["$scope","$rootScope","$timeout","timer","$http","dashboard","filterSrv",function(e,t,s,o,u,a,f){function h(t){return t.type="time",f.removeByType("time"),e.panel.filter_id=f.set(p(t)),e.panel.filter_id}function p(e){return e=n.clone(e),e.from=e.from.toDate(),e.to=e.to.toDate(),e}function d(t,n){e.timepicker={from:{time:t.format("HH:mm:ss"),date:t.format("MM/DD/YYYY")},to:{time:n.format("HH:mm:ss"),date:n.format("MM/DD/YYYY")}}}e.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 l={status:"Stable",mode:"relative",time_options:["5m","15m","1h","6h","12h","24h","2d","7d","30d"],timespan:"15m",timefield:"@timestamp",timeformat:"",refresh:{enable:!1,interval:30,min:3}};n.
|
||||
defaults(e.panel,l),e.init=function(){e.refresh_interval=e.panel.refresh.interval,e.filterSrv=f;switch(e.panel.mode){case"absolute":e.time={from:r(e.panel.time.from,"MM/DD/YYYY HH:mm:ss")||r(i.time_ago(e.panel.timespan)),to:r(e.panel.time.to,"MM/DD/YYYY HH:mm:ss")||r()};break;case"since":e.time={from:r(e.panel.time.from,"MM/DD/YYYY HH:mm:ss")||r(i.time_ago(e.panel.timespan)),to:r()};break;case"relative":e.time={from:r(i.time_ago(e.panel.timespan)),to:r()}}e.time.field=e.panel.timefield,d(e.time.from,e.time.to),c(),e.panel.mode!=="absolute"&&h(e.time),a.refresh(),e.panel.refresh.enable&&e.set_interval(e.panel.refresh.interval),e.$on("refresh",function(){if(f.idsByType("time").length>0){var t=f.timeRange("min");if(e.time.from.diff(r.utc(t.from),"seconds")!==0||e.time.to.diff(r.utc(t.to),"seconds")!==0)e.set_mode("absolute"),d(r(t.from),r(t.to)),e.time=e.time_calc(),c()}})},e.set_interval=function(t){e.panel.refresh.interval=t;if(n.isNumber(e.panel.refresh.interval)){if(e.panel.refresh.interval<
|
||||
e.panel.refresh.min){e.panel.refresh.interval=e.panel.refresh.min,o.cancel(e.refresh_timer);return}o.cancel(e.refresh_timer),e.refresh()}else o.cancel(e.refresh_timer)},e.refresh=function(){e.panel.refresh.enable?(o.cancel(e.refresh_timer),e.refresh_timer=o.register(s(function(){e.refresh(),e.time_apply()},e.panel.refresh.interval*1e3))):o.cancel(e.refresh_timer)};var c=function(){e.panel.mode!=="relative"?e.panel.time={from:e.time.from.format("MM/DD/YYYY HH:mm:ss"),to:e.time.to.format("MM/DD/YYYY HH:mm:ss")}:delete e.panel.time};e.set_mode=function(t){e.panel.mode=t,e.panel.refresh.enable=t==="absolute"?!1:e.panel.refresh.enable,c()},e.to_now=function(){e.timepicker.to={time:r().format("HH:mm:ss"),date:r().format("MM/DD/YYYY")}},e.set_timespan=function(t){e.panel.timespan=t,e.timepicker.from={time:r(i.time_ago(t)).format("HH:mm:ss"),date:r(i.time_ago(t)).format("MM/DD/YYYY")},e.time_apply()},e.close_edit=function(){e.time_apply()},e.time_calc=function(){var t,o;return n.isUndefined(e.timepicker
|
||||
)?(t=e.panel.mode==="relative"?r(i.time_ago(e.panel.timespan)):e.time.from,o=e.panel.mode!=="absolute"?r():e.time.to):(t=e.panel.mode==="relative"?r(i.time_ago(e.panel.timespan)):r(r(e.timepicker.from.date).format("MM/DD/YYYY")+" "+e.timepicker.from.time,"MM/DD/YYYY HH:mm:ss"),o=e.panel.mode!=="absolute"?r():r(r(e.timepicker.to.date).format("MM/DD/YYYY")+" "+e.timepicker.to.time,"MM/DD/YYYY HH:mm:ss")),t.valueOf()>=o.valueOf()&&(t=r(o.valueOf()-1e3)),s(function(){d(t,o)}),{from:t,to:o}},e.time_apply=function(){e.panel.error="",f.removeByType("time"),e.time=e.time_calc(),e.time.field=e.panel.timefield,c(),h(e.time),a.refresh()},e.$watch("panel.mode",e.time_apply)}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/timepicker/module",["angular","app","underscore","moment","kbn"],function(a,b,c,d,e){var f=a.module("kibana.panels.timepicker",[]);b.useModule(f),f.controller("timepicker",["$scope","$rootScope","$timeout","timer","$http","dashboard","filterSrv",function(a,b,f,g,h,i,j){function k(b){return b.type="time",j.removeByType("time"),a.panel.filter_id=j.set(l(b)),a.panel.filter_id}function l(a){return a=c.clone(a),a.from=a.from.toDate(),a.to=a.to.toDate(),a}function m(b,c){a.timepicker={from:{time:b.format("HH:mm:ss"),date:b.format("MM/DD/YYYY")},to:{time:c.format("HH:mm:ss"),date:c.format("MM/DD/YYYY")}}}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 n={status:"Stable",mode:"relative",time_options:["5m","15m","1h","6h","12h","24h","2d","7d","30d"],timespan:"15m",timefield:"@timestamp",timeformat:"",refresh:{enable:!1,interval:30,min:3}};c.defaults(a.panel,n),a.init=function(){switch(a.refresh_interval=a.panel.refresh.interval,a.filterSrv=j,a.panel.mode){case"absolute":a.time={from:d(a.panel.time.from,"MM/DD/YYYY HH:mm:ss")||d(e.time_ago(a.panel.timespan)),to:d(a.panel.time.to,"MM/DD/YYYY HH:mm:ss")||d()};break;case"since":a.time={from:d(a.panel.time.from,"MM/DD/YYYY HH:mm:ss")||d(e.time_ago(a.panel.timespan)),to:d()};break;case"relative":a.time={from:d(e.time_ago(a.panel.timespan)),to:d()}}a.time.field=a.panel.timefield,m(a.time.from,a.time.to),o(),"absolute"!==a.panel.mode&&k(a.time),i.refresh(),a.panel.refresh.enable&&a.set_interval(a.panel.refresh.interval),a.$on("refresh",function(){if(j.idsByType("time").length>0){var b=j.timeRange("min");(0!==a.time.from.diff(d.utc(b.from),"seconds")||0!==a.time.to.diff(d.utc(b.to),"seconds"))&&(a.set_mode("absolute"),m(d(b.from),d(b.to)),a.time=a.time_calc(),o())}})},a.set_interval=function(b){if(a.panel.refresh.interval=b,c.isNumber(a.panel.refresh.interval)){if(a.panel.refresh.interval<a.panel.refresh.min)return a.panel.refresh.interval=a.panel.refresh.min,g.cancel(a.refresh_timer),void 0;g.cancel(a.refresh_timer),a.refresh()}else g.cancel(a.refresh_timer)},a.refresh=function(){a.panel.refresh.enable?(g.cancel(a.refresh_timer),a.refresh_timer=g.register(f(function(){a.refresh(),a.time_apply()},1e3*a.panel.refresh.interval))):g.cancel(a.refresh_timer)};var o=function(){"relative"!==a.panel.mode?a.panel.time={from:a.time.from.format("MM/DD/YYYY HH:mm:ss"),to:a.time.to.format("MM/DD/YYYY HH:mm:ss")}:delete a.panel.time};a.set_mode=function(b){a.panel.mode=b,a.panel.refresh.enable="absolute"===b?!1:a.panel.refresh.enable,o()},a.to_now=function(){a.timepicker.to={time:d().format("HH:mm:ss"),date:d().format("MM/DD/YYYY")}},a.set_timespan=function(b){a.panel.timespan=b,a.timepicker.from={time:d(e.time_ago(b)).format("HH:mm:ss"),date:d(e.time_ago(b)).format("MM/DD/YYYY")},a.time_apply()},a.close_edit=function(){a.time_apply()},a.time_calc=function(){var b,g;return c.isUndefined(a.timepicker)?(b="relative"===a.panel.mode?d(e.time_ago(a.panel.timespan)):a.time.from,g="absolute"!==a.panel.mode?d():a.time.to):(b="relative"===a.panel.mode?d(e.time_ago(a.panel.timespan)):d(d(a.timepicker.from.date).format("MM/DD/YYYY")+" "+a.timepicker.from.time,"MM/DD/YYYY HH:mm:ss"),g="absolute"!==a.panel.mode?d():d(d(a.timepicker.to.date).format("MM/DD/YYYY")+" "+a.timepicker.to.time,"MM/DD/YYYY HH:mm:ss")),b.valueOf()>=g.valueOf()&&(b=d(g.valueOf()-1e3)),f(function(){m(b,g)}),{from:b,to:g}},a.time_apply=function(){a.panel.error="",j.removeByType("time"),a.time=a.time_calc(),a.time.field=a.panel.timefield,o(),k(a.time),i.refresh()},a.$watch("panel.mode",a.time_apply)}])});
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
define("panels/trends/module",["angular","app","underscore","kbn"],function(e,t,n,r){var i=e.module("kibana.panels.trends",[]);t.useModule(i),i.controller("trends",["$scope","kbnIndex","querySrv","dashboard","filterSrv",function(e,t,i,s,o){function f(e,t){return e===0?null:100*(t-e)/e}e.panelMeta={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 u={queries:{mode:"all",ids:[]},style:{"font-size":"14pt"},ago:"1d",arrangement:"vertical"};n.defaults(e.panel,u),e.init=function(){e.hits=0,e.$on("refresh",function(){e.get_data()}),e.get_data()},e.get_data=function(u,f){delete e.panel.error,e.panelMeta.loading=!0;if(s.indices.length===0)return;e.index=u>0?e.index:s.indices
|
||||
,e.panel.queries.ids=i.idsByMode(e.panel.queries);var l=n.uniq(n.pluck(o.getByType("time"),"field"));if(l.length>1){e.panel.error="Time field must be consistent amongst time filters";return}if(l.length===0){e.panel.error="A time filter must exist for this panel to function";return}l=l[0],e.time=o.timeRange("min"),e.old_time={from:new Date(e.time.from.getTime()-r.interval_to_seconds(e.panel.ago)*1e3),to:new Date(e.time.to.getTime()-r.interval_to_seconds(e.panel.ago)*1e3)};var c=n.isUndefined(u)?0:u,h=e.ejs.Request(),p=n.difference(o.ids,o.idsByType("time"));n.each(e.panel.queries.ids,function(t){var n=e.ejs.FilteredQuery(i.getEjsObj(t),o.getBoolFilter(p).must(e.ejs.RangeFilter(l).from(e.time.from).to(e.time.to)));h=h.facet(e.ejs.QueryFacet(t).query(n)).size(0)}),n.each(e.panel.queries.ids,function(t){var n=e.ejs.FilteredQuery(i.getEjsObj(t),o.getBoolFilter(p).must(e.ejs.RangeFilter(l).from(e.old_time.from).to(e.old_time.to)));h=h.facet(e.ejs.QueryFacet("old_"+t).query(n)).size(0)}),c===0?
|
||||
t.indices(e.old_time.from,e.old_time.to,s.current.index.pattern,s.current.index.interval).then(function(t){e.index=n.union(t,e.index),h=h.indices(e.index[c]),a(h.doSearch(),c,f)}):a(h.indices(e.index[c]).doSearch(),c,f)};var a=function(t,r,s){t.then(function(t){e.panelMeta.loading=!1,r===0&&(e.hits={},e.data=[],s=e.query_id=(new Date).getTime());if(!n.isUndefined(t.error)){e.panel.error=e.parse_error(t.error);return}var o=n.map(n.keys(t.facets),function(e){if(!isNaN(e))return parseInt(e,10)});if(e.query_id===s&&n.intersection(o,e.panel.queries.ids).length===e.panel.queries.ids.length){var u=0;n.each(e.panel.queries.ids,function(s){var o=t.facets[s].count,a=t.facets["old_"+s].count,l={"new":n.isUndefined(e.data[u])||r===0?o:e.data[u].hits.new+o,old:n.isUndefined(e.data[u])||r===0?a:e.data[u].hits.old+a};e.hits.new+=o,e.hits.old+=a;var c=f(l.old,l.new)==null?"?":Math.round(f(l.old,l.new)*100)/100;e.data[u]={info:i.list[s],hits:{"new":l.new,old:l.old},percent:c},u++}),e.$emit("render"),r<e
|
||||
.index.length-1?e.get_data(r+1,s):e.trends=e.data}})};e.set_refresh=function(t){e.refresh=t},e.close_edit=function(){e.refresh&&e.get_data(),e.refresh=!1,e.$emit("render")}}])});
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-13
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
define("panels/trends/module",["angular","app","underscore","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(a,b,e,f,g){function h(a,b){return 0===a?null:100*(b-a)/a}a.panelMeta={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 i={queries:{mode:"all",ids:[]},style:{"font-size":"14pt"},ago:"1d",arrangement:"vertical"};c.defaults(a.panel,i),a.init=function(){a.hits=0,a.$on("refresh",function(){a.get_data()}),a.get_data()},a.get_data=function(h,i){if(delete a.panel.error,a.panelMeta.loading=!0,0!==f.indices.length){a.index=h>0?a.index:f.indices,a.panel.queries.ids=e.idsByMode(a.panel.queries);var k=c.uniq(c.pluck(g.getByType("time"),"field"));if(k.length>1)return a.panel.error="Time field must be consistent amongst time filters",void 0;if(0===k.length)return a.panel.error="A time filter must exist for this panel to function",void 0;k=k[0],a.time=g.timeRange("min"),a.old_time={from:new Date(a.time.from.getTime()-1e3*d.interval_to_seconds(a.panel.ago)),to:new Date(a.time.to.getTime()-1e3*d.interval_to_seconds(a.panel.ago))};var l=c.isUndefined(h)?0:h,m=a.ejs.Request(),n=c.difference(g.ids,g.idsByType("time"));c.each(a.panel.queries.ids,function(b){var c=a.ejs.FilteredQuery(e.getEjsObj(b),g.getBoolFilter(n).must(a.ejs.RangeFilter(k).from(a.time.from).to(a.time.to)));m=m.facet(a.ejs.QueryFacet(b).query(c)).size(0)}),c.each(a.panel.queries.ids,function(b){var c=a.ejs.FilteredQuery(e.getEjsObj(b),g.getBoolFilter(n).must(a.ejs.RangeFilter(k).from(a.old_time.from).to(a.old_time.to)));m=m.facet(a.ejs.QueryFacet("old_"+b).query(c)).size(0)}),0===l?b.indices(a.old_time.from,a.old_time.to,f.current.index.pattern,f.current.index.interval).then(function(b){a.index=c.union(b,a.index),m=m.indices(a.index[l]),j(m.doSearch(),l,i)}):j(m.indices(a.index[l]).doSearch(),l,i)}};var j=function(b,d,f){b.then(function(b){if(a.panelMeta.loading=!1,0===d&&(a.hits={},a.data=[],f=a.query_id=(new Date).getTime()),!c.isUndefined(b.error))return a.panel.error=a.parse_error(b.error),void 0;var g=c.map(c.keys(b.facets),function(a){return isNaN(a)?void 0:parseInt(a,10)});if(a.query_id===f&&c.intersection(g,a.panel.queries.ids).length===a.panel.queries.ids.length){var i=0;c.each(a.panel.queries.ids,function(f){var g=b.facets[f].count,j=b.facets["old_"+f].count,k={"new":c.isUndefined(a.data[i])||0===d?g:a.data[i].hits.new+g,old:c.isUndefined(a.data[i])||0===d?j:a.data[i].hits.old+j};a.hits.new+=g,a.hits.old+=j;var l=null==h(k.old,k.new)?"?":Math.round(100*h(k.old,k.new))/100;a.data[i]={info:e.list[f],hits:{"new":k.new,old:k.old},percent:l},i++}),a.$emit("render"),d<a.index.length-1?a.get_data(d+1,f):a.trends=a.data}})};a.set_refresh=function(b){a.refresh=b},a.close_edit=function(){a.refresh&&a.get_data(),a.refresh=!1,a.$emit("render")}}])});
|
||||
-1
@@ -14,7 +14,6 @@ vendor/angular/timepicker.js
|
||||
vendor/angular/datepicker.js
|
||||
vendor/angular/angular-strap.js
|
||||
app/components/settings.js
|
||||
app/config.js
|
||||
app/services/alertSrv.js
|
||||
vendor/modernizr-2.6.1.js
|
||||
app/services/dashboard.js
|
||||
|
||||
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* These is the app's configuration, If you need to configure
|
||||
* the default dashboard, please see dashboards/default
|
||||
*/
|
||||
define(['settings'],
|
||||
function (Settings) {
|
||||
|
||||
|
||||
return new Settings({
|
||||
|
||||
/**
|
||||
* URL to your elasticsearch server. You almost certainly don't
|
||||
* want 'http://localhost:9200' here. Even if Kibana and ES are on
|
||||
* the same host
|
||||
*
|
||||
* By default this will attempt to reach ES at the same host you have
|
||||
* elasticsearch installed on. You probably want to set it to the FQDN of your
|
||||
* elasticsearch host
|
||||
* @type {String}
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
|
||||
/**
|
||||
* The default ES index to use for storing Kibana specific object
|
||||
* such as stored dashboards
|
||||
* @type {String}
|
||||
*/
|
||||
kibana_index: "kibana-int",
|
||||
|
||||
/**
|
||||
* Panel modules available. Panels will only be loaded when they are defined in the
|
||||
* dashboard, but this list is used in the "add panel" interface.
|
||||
* @type {Array}
|
||||
*/
|
||||
panel_names: [
|
||||
'histogram',
|
||||
'map',
|
||||
'pie',
|
||||
'table',
|
||||
'filtering',
|
||||
'timepicker',
|
||||
'text',
|
||||
'fields',
|
||||
'hits',
|
||||
'dashcontrol',
|
||||
'column',
|
||||
'derivequeries',
|
||||
'trends',
|
||||
'bettermap',
|
||||
'query',
|
||||
'terms'
|
||||
]
|
||||
});
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user