Commit f2d87ad5 by Spencer Alger

Merge branch 'master' into build-tweaks

Conflicts:
	dist/app/components/require.config.js
	src/app/components/require.config.js
parents ab93bcec 7b284831
......@@ -17,7 +17,7 @@ The dashboard storage format has changed in Kibana 3 milestone 3. Existing dashb
* Index configuration has been moved from the timepicker, to the main dashboard editor
* The stringquery panel has been replaced with a more polished 'query' panel
More information about Kibana 3 can be found at [http://three.kibana.org](http://three.kibana.org)
More information about Kibana 3 can be found at [http://www.elasticsearch.org/overview/kibana/](http://www.elasticsearch.org/overview/kibana/)
## Overview
......@@ -28,19 +28,19 @@ flexible and powerful
### Requirements
* A modern web browser. The latest version of Chrome, Safari and Firefox have all been tested to
work. IE8 is not currently supported
work. IE9 and greater should work. IE8 does not.
* A webserver. No extensions are required, as long as it can serve plain html it will work
* A browser reachable Elasticsearch server. Port 9200 must be open, or a proxy configured to allow
access to it.
### Installation
1. Copy the entire Kibana directory to your webserver
2. Edit config.js to point to your elasticsearch server. This should __not be
1. Copy the contents of the dist/ directory to your webserver
2. Edit config.js in your deployed directory to point to your elasticsearch server. This should __not be
http://localhost:9200__, but rather the fully qualified domain name of your elasticsearch server.
The url entered here _must be reachable_ by your browser.
3. Point your browser at your installation. If you're using Logstash with the default indexing
configuration the default Kibana dashboard should work nicely.
configuration the included Kibana logstash interface should work nicely.
### FAQ
__Q__: Why doesnt it work? I have http://localhost:9200 in my config.js, my webserver and elasticsearch
......@@ -55,5 +55,4 @@ __A__: A simple nginx virtual host and proxy configuration can be found in the s
### Support
Introduction videos can be found at [http://three.kibana.org/about.html](http://three.kibana.org/about.html)
If you have questions or comments the best place to reach me is #logstash or #elasticsearch on irc.freenode.net
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
require.config({baseUrl:"app",urlArgs:"r=6c07338",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"]}});
\ No newline at end of file
require.config({baseUrl:"app",urlArgs:"r=ab93bce",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:"../vendor/jquery/jquery-1.8.0","extend-jquery":"components/extend-jquery","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:{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"]}});
\ No newline at end of file
......@@ -137,7 +137,7 @@ dashboard.rows[0].panels = [
// Add a filtering panel to the 3rd row
dashboard.rows[1].panels = [
{
type: 'Query'
type: 'query'
}
];
......
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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")}})});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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(/.*\//,"")}}})});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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))}}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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(){}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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()})}}}])});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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()})}}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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()}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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,"&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("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")}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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()})}}}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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)}])});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* 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")}}])});
\ No newline at end of file
......@@ -2,7 +2,6 @@
app/app.js
----------------
vendor/jquery/jquery-1.8.0.js
app/components/jquery.extended.js
vendor/angular/angular.js
vendor/underscore.js
app/components/underscore.extended.js
......@@ -13,6 +12,7 @@ vendor/angular/angular-sanitize.js
vendor/angular/timepicker.js
vendor/angular/datepicker.js
vendor/angular/angular-strap.js
app/components/extend-jquery.js
app/components/settings.js
app/services/alertSrv.js
vendor/modernizr-2.6.1.js
......
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
var saveAs=saveAs||navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=a.URL||a.webkitURL||a,e=b.createElementNS("http://www.w3.org/1999/xhtml","a"),f=!a.externalHost&&"download"in e,g=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=[],n=function(){for(var a=m.length;a--;){var b=m[a];"string"==typeof b?d.revokeObjectURL(b):b.remove()}m.length=0},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(b,d){var j,n,p,q=this,r=b.type,s=!1,t=function(){var a=c().createObjectURL(b);return m.push(a),a},u=function(){o(q,"writestart progress write writeend".split(" "))},v=function(){(s||!j)&&(j=t(b)),n?n.location.href=j:window.open(j,"_blank"),q.readyState=q.DONE,u()},w=function(a){return function(){return q.readyState!==q.DONE?a.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return q.readyState=q.INIT,d||(d="download"),f?(j=t(b),e.href=j,e.download=d,g(e),q.readyState=q.DONE,u(),void 0):(a.chrome&&r&&r!==k&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,k),s=!0),h&&"download"!==d&&(d+=".download"),(r===k||h)&&(n=a),i?(l+=b.size,i(a.TEMPORARY,l,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(d,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){n.location.href=a.toURL(),m.push(a),q.readyState=q.DONE,o(q,"writeend",b)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),v)}),v)};a.getFile(d,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v),void 0):(v(),void 0))},q=p.prototype,r=function(a,b){return new p(a,b)};return q.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,a.addEventListener("unload",n,!1),r}(self);
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
define(function(){function a(a,b){var d=c.readFileSync(a,"utf8");0===d.indexOf("")&&(d=d.substring(1)),b(d)}function b(a){return a.replace(/[\r\n]+/g," ").replace(/[\t]/g," ")}var c=require.nodeRequire("fs"),d={},e=!1,f={load:function(c,e,f,g){f(!0),a(g.baseUrl+c,function(a){d[c]=b(a)})},write:function(a,b,c){e||(e=!0,c("define('"+a+"-embed', function()\n{\n"+" function embed_css(content)\n"+" {\n"+" var head = document.getElementsByTagName('head')[0],\n"+" style = document.createElement('style'),\n"+" rules = document.createTextNode(content);\n"+" style.type = 'text/css';\n"+" if(style.styleSheet)\n"+" style.styleSheet.cssText = rules.nodeValue;\n"+" else style.appendChild(rules);\n"+" head.appendChild(style);\n"+" }\n"+" return embed_css;\n"+"});\n")),c("define('"+a+"!"+b+"', ['"+a+"-embed'], \n"+"function(embed)\n{\n"+" embed(\n '"+d[b].replace(/'/g,"\\'")+"'\n );\n"+" return true;\n"+"});\n")},writeFile:function(){},onLayerEnd:function(){}};return f});
\ No newline at end of file
/*! kibana - v3.0.0m3pre - 2013-09-13
/*! kibana - v3.0.0m3pre - 2013-09-15
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
define(["module"],function(a){var b=a.config&&a.config()||{};return{load:function(a,c,d){var e=c.toUrl(a);c(["text!"+a],function(a){b.registerTemplate&&b.registerTemplate(e,a),d(a)})}}});
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<head>
<title>Kibana 3</title>
<link rel="stylesheet" href="common/css/timepicker.css">
<link rel="stylesheet" href="common/css/animate.min.css">
<link rel="stylesheet" href="common/css/normalize.min.css">
<!-- project dependency libs -->
<script src="common/lib/LAB.min.js"></script>
<script src="common/lib/underscore.min.js"></script>
<script src="common/lib/settings.js"></script>
<script src="config.js"></script>
<script src="js/app.js"></script>
<style>
</style>
<style>/* add your css style rules here */
body {
color:#c8c8c8;
background-color:#272b30;
font-family: 'Open Sans', sans-serif;
}
.title1 {
font-weight: 800;
line-height: .9;
font-size: 98px
}
</head>
.title2 {
font-weight: 800;
line-height: .9;
font-size: 60px
}
<body ng-controller="DashCtrl" ng-cloak>
.title3 {
font-weight: 800;
font-size: 25px;
line-height: 1.1;
}
<link rel="stylesheet" ng-href="common/css/bootstrap.{{dashboard.current.style||'dark'}}.min.css">
<link rel="stylesheet" href="common/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="common/css/font-awesome.min.css">
.lowercase {
text-transform: lowercase;
}
<div ng-repeat='alert in dashAlerts.list' class="alert-{{alert.severity}} dashboard-notice" ng-show="$last">
<button type="button" class="close" ng-click="dashAlerts.clear(alert)" style="padding-right:50px">&times;</button>
<strong>{{alert.title}}</strong> <span ng-bind-html-unsafe='alert.text'></span> <div style="padding-right:10px" class='pull-right small'> {{$index + 1}} alert(s) </div>
</div>
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<span class="brand">{{dashboard.current.title}}</span>
<ul class="nav" ng-show='dashboard.current.editable'>
<li>
<a href='#' bs-modal="'partials/dasheditor.html'"><i class='icon-cog pointer'></i></a>
</li>
</ul>
<ul class="nav pull-right" ng-controller='dashLoader' ng-init="init()" ng-include="'partials/dashLoader.html'">
</ul>
</div>
</div>
</div>
<div class="container-fluid main">
<div class="row-fluid">
<div ng-view></div>
</div>
.uppercase {
text-transform: uppercase;
}
.light {
font-weight: 200;
}
.big { text-transform: uppercase; margin: 0; padding: 0; }
.bold { font-weight: 800; }
.orange {
color: #FF9640;
}
.yellow {
color: #FFDD68;
}
.teal {
color: #63ABB5;
}
.green {
color: #629153;
}
.purple {
color: #645068;
}
.white {
color: #fff;
}
</style>
</head>
<body ng-controller="DashCtrl" ng-cloak>
<img src='dist/img/kibana.png' style="float:right;margin-right:30px;"><p>
<div class="title2">
<span class="orange">Oops.</span> Looks like you've upgraded from an old version
</div>
<div class="title3">No worries. <span class="light">Kibana has a new build system. Now its faster and lighter than ever before.</span></div>
<p>
<div class="white title3 uppercase">To fix this</div>
<div class="title3 light">Instead of copying the entire kibana repository, you need only copy the contents of the <a href="dist/index.html" class="teal">dist/</a> folder. After upgrading you may need to clear your browsers cache to see all of the new features.</div>
</body>
</html>
......@@ -10,7 +10,8 @@ define([
'elasticjs',
'bootstrap',
'angular-sanitize',
'angular-strap'
'angular-strap',
'extend-jquery'
],
function (angular, $, _, appLevelRequire) {
"use strict";
......
define(['jquery-src'],
define(['jquery'],
function ($) {
'use strict';
......
......@@ -24,8 +24,10 @@ require.config({
'underscore-src': '../vendor/underscore',
bootstrap: '../vendor/bootstrap/bootstrap',
jquery: 'components/jquery.extended',
'jquery-src': '../vendor/jquery/jquery-1.8.0',
jquery: '../vendor/jquery/jquery-1.8.0',
'extend-jquery': 'components/extend-jquery',
'jquery.flot': '../vendor/jquery/jquery.flot',
'jquery.flot.pie': '../vendor/jquery/jquery.flot.pie',
'jquery.flot.selection': '../vendor/jquery/jquery.flot.selection',
......@@ -53,7 +55,7 @@ require.config({
exports: 'Modernizr'
},
'jquery-src': {
jquery: {
exports: 'jQuery'
},
......
......@@ -137,7 +137,7 @@ dashboard.rows[0].panels = [
// Add a filtering panel to the 3rd row
dashboard.rows[1].panels = [
{
type: 'Query'
type: 'query'
}
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment