Merge pull request #502 from spenceralger/fix-js-dashboards
Fixed dashboard scripts
This commit is contained in:
commit
efaff8405d
5 files changed
+16
-12
No files matched your search
Vendored
+5
-4
@@ -12,7 +12,8 @@ Dc.$inject=["$locale"];var Id=p(Rc),Jd=p(Sc);Gc.$inject=["$parse"];var Kd=p({res
|
||||
},boostTerms:function(b){return null==b?c.mlt_field[a].boost_terms:(c.mlt_field[a].boost_terms=b,this)},boost:function(b){return null==b?c.mlt_field[a].boost:(c.mlt_field[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.MoreLikeThisQuery=function(a,b){var c={mlt:{like_text:b,fields:[]}};if(f(a))c.mlt.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.mlt.fields=a}return{fields:function(a){if(null==a)return c.mlt.fields;if(f(a))c.mlt.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be a string or array");c.mlt.fields=a}return this},likeText:function(a){return null==a?c.mlt.like_text:(c.mlt.like_text=a,this)},percentTermsToMatch:function(a){return null==a?c.mlt.percent_terms_to_match:(c.mlt.percent_terms_to_match=a,this)},minTermFreq:function(a){return null==a?c.mlt.min_term_freq:(c.mlt.min_term_freq=a,this)},maxQueryTerms:function(a){return null==a?c.mlt.max_query_terms:(c.mlt.max_query_terms=a,this)},stopWords:function(a){return null==a?c.mlt.stop_words:(c.mlt.stop_words=a,this)},minDocFreq:function(a){return null==a?c.mlt.min_doc_freq:(c.mlt.min_doc_freq=a,this)},maxDocFreq:function(a){return null==a?c.mlt.max_doc_freq:(c.mlt.max_doc_freq=a,this)},minWordLen:function(a){return null==a?c.mlt.min_word_len:(c.mlt.min_word_len=a,this)},maxWordLen:function(a){return null==a?c.mlt.max_word_len:(c.mlt.max_word_len=a,this)},analyzer:function(a){return null==a?c.mlt.analyzer:(c.mlt.analyzer=a,this)},boostTerms:function(a){return null==a?c.mlt.boost_terms:(c.mlt.boost_terms=a,this)},boost:function(a){return null==a?c.mlt.boost:(c.mlt.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.MultiMatchQuery=function(a,b){var c={multi_match:{query:b,fields:[]}};if(f(a))c.multi_match.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.multi_match.fields=a}return{fields:function(a){if(null==a)return c.multi_match.fields;if(f(a))c.multi_match.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.multi_match.fields=a}return this},useDisMax:function(a){return null==a?c.multi_match.use_dis_max:(c.multi_match.use_dis_max=a,this)},tieBreaker:function(a){return null==a?c.multi_match.tie_breaker:(c.multi_match.tie_breaker=a,this)},cutoffFrequency:function(a){return null==a?c.multi_match.cutoff_frequency:(c.multi_match.cutoff_frequency=a,this)},minimumShouldMatch:function(a){return null==a?c.multi_match.minimum_should_match:(c.multi_match.minimum_should_match=a,this)},rewrite:function(a){return null==a?c.multi_match.rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(c.multi_match.rewrite=a),this)},fuzzyRewrite:function(a){return null==a?c.multi_match.fuzzy_rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(c.multi_match.fuzzy_rewrite=a),this)},lenient:function(a){return null==a?c.multi_match.lenient:(c.multi_match.lenient=a,this)},boost:function(a){return null==a?c.multi_match.boost:(c.multi_match.boost=a,this)},query:function(a){return null==a?c.multi_match.query:(c.multi_match.query=a,this)},type:function(a){return null==a?c.multi_match.type:(a=a.toLowerCase(),("boolean"===a||"phrase"===a||"phrase_prefix"===a)&&(c.multi_match.type=a),this)},fuzziness:function(a){return null==a?c.multi_match.fuzziness:(c.multi_match.fuzziness=a,this)},prefixLength:function(a){return null==a?c.multi_match.prefix_length:(c.multi_match.prefix_length=a,this)},maxExpansions:function(a){return null==a?c.multi_match.max_expansions:(c.multi_match.max_expansions=a,this)},operator:function(a){return null==a?c.multi_match.operator:(a=a.toLowerCase(),("and"===a||"or"===a)&&(c.multi_match.operator=a),this)},slop:function(a){return null==a?c.multi_match.slop:(c.multi_match.slop=a,this)},analyzer:function(a){return null==a?c.multi_match.analyzer:(c.multi_match.analyzer=a,this)},zeroTermsQuery:function(a){return null==a?c.multi_match.zero_terms_query:(a=a.toLowerCase(),("all"===a||"none"===a)&&(c.multi_match.zero_terms_query=a),this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.NestedQuery=function(a){var b={nested:{path:a}};return{path:function(a){return null==a?b.nested.path:(b.nested.path=a,this)},query:function(a){if(null==a)return b.nested.query;if(!j(a))throw new TypeError("Argument must be a Query");return b.nested.query=a._self(),this},filter:function(a){if(null==a)return b.nested.filter;if(!k(a))throw new TypeError("Argument must be a Filter");return b.nested.filter=a._self(),this},scoreMode:function(a){return null==a?b.nested.scoLine truncated
|
||||
if(t(c))b[a].phrase.direct_generator.push(c._self());else{if(!d(c))throw new TypeError("Argument must be a Generator or array of Generators");for(b[a].phrase.direct_generator=[],e=0,f=c.length;f>e;e++){if(!t(c[e]))throw new TypeError("Argument must be an array of Generators");b[a].phrase.direct_generator.push(c[e]._self())}}return this},toString:function(){return JSON.stringify(b)},_type:function(){return"suggest"},_self:function(){return b}}},u.TermSuggester=function(a){var b={},d=u.DirectSettingsMixin();return b[a]={term:d._self()},c(d,{text:function(c){return null==c?b[a].text:(b[a].text=c,this)},analyzer:function(c){return null==c?b[a].term.analyzer:(b[a].term.analyzer=c,this)},field:function(c){return null==c?b[a].term.field:(b[a].term.field=c,this)},size:function(c){return null==c?b[a].term.size:(b[a].term.size=c,this)},shardSize:function(c){return null==c?b[a].term.shard_size:(b[a].term.shard_size=c,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"suggest"},_self:function(){return b}})},u.noConflict=function(){return v.ejs=w,this}}.call(this),define("../vendor/elasticjs/elastic",function(){}),angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(a){return function(b){var c=window.ejs||{},d=function(a,b,c){return a.then(function(a){return(b||angular.noop)(a.data),a.data},function(a){return(c||angular.noop)(a.data),a.data})};return null==b&&(b=""),c.client={server:function(a){return null==a?b:(b=a,this)},post:function(c,e,f,g){return c=b+c,d(a.post(c,e),f,g)},get:function(c,e,f,g){return c=b+c,d(a.get(c,e),f,g)},put:function(c,e,f,g){return c=b+c,d(a.put(c,e),f,g)},del:function(c,e,f,g){return c=b+c,d(a.delete(c,e),f,g)},head:function(c,d,e,f){return c=b+c,a.head(c,d).then(function(a){return(e||angular.noop)(a.headers()),a.headers()},function(){return(f||angular.noop)(void 0),void 0})}},c}}]),define("elasticjs",function(){}),!function(a){a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$Line truncated
|
||||
b.module("ngSanitize",[]).value("$sanitize",h),b.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(a){return function(b,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtml),b.$watch(d.ngBindHtml,function(b){b=a(b),c.html(b||"")})}}]),b.module("ngSanitize").filter("linky",function(){var a=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,b=/^mailto:/;return function(c){if(!c)return c;for(var d,e,f,h=c,i=[],j=g(i);d=h.match(a);)e=d[0],d[2]==d[3]&&(e="mailto:"+e),f=d.index,j.chars(h.substr(0,f)),j.start("a",{href:e}),j.chars(d[0].replace(b,"")),j.end("a"),h=h.substring(f+d[0].length);return j.chars(h),i.join("")}})}(window,window.angular),define("angular-sanitize",function(){}),function(a,b,c,d){var e=function(b,c){this.widget="",this.$element=a(b),this.defaultTime=c.defaultTime,this.disableFocus=c.disableFocus,this.isOpen=c.isOpen,this.minuteStep=c.minuteStep,this.modalBackdrop=c.modalBackdrop,this.secondStep=c.secondStep,this.showInputs=c.showInputs,this.showMeridian=c.showMeridian,this.showSeconds=c.showSeconds,this.template=c.template,this.appendWidgetTo=c.appendWidgetTo,this._init()};e.prototype={constructor:e,_init:function(){var b=this;this.$element.parent().hasClass("input-append")||this.$element.parent().hasClass("input-prepend")?(this.$element.parent(".input-append, .input-prepend").find(".add-on").on({"click.timepicker":a.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this)})):this.template?this.$element.on({"focus.timepicker":a.proxy(this.showWidget,this),"click.timepicker":a.proxy(this.showWidget,this),"blur.timepicker":a.proxy(this.blurElement,this)}):this.$element.on({"focus.timepicker":a.proxy(this.highlightUnit,this),"click.timepicker":a.proxy(this.highlightUnit,this),"keydown.timepicker":a.proxy(this.elementKeydown,this),"blur.timepicker":a.proxy(this.blurElement,this)}),this.$widget=this.template!==!1?a(this.getTemplate()).prependTo(this.$element.parents(this.appendWidgetTo)).on("click",a.proxy(this.widgetClick,this)):!1,this.showInputs&&this.$widget!==!1&&this.$widget.find("input").each(function(){a(this).on({"click.timepicker":function(){a(this).select()},"keydown.timepicker":a.proxy(b.widgetKeydown,b)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=d,this.updateFromElementVal()},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else 0===this.hour?this.hour=23:this.hour--;this.update()},decrementMinute:function(a){var b;b=a?this.minute-a:this.minute-this.minuteStep,0>b?(this.decrementHour(),this.minute=b+60):this.minute=b,this.update()},decrementSecond:function(){var a=this.second-this.secondStep;0>a?(this.decrementMinute(!0),this.second=a+60):this.second=a,this.update()},elementKeydown:function(a){switch(a.keyCode){case 9:switch(this.updateFromElementVal(),this.highlightedUnit){case"hour":a.preventDefault(),this.highlightNextUnit();break;case"minute":(this.showMeridian||this.showSeconds)&&(a.preventDefault(),this.highlightNextUnit());break;case"second":this.showMeridian&&(a.preventDefault(),this.highlightNextUnit())}break;case 27:this.updateFromElementVal();break;case 37:a.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}break;case 39:a.preventDefault(),this.updateFromElementVal(),this.highlightNextUnit();break;case 40:switch(a.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}}},formatTime:function(a,b,c,d){return a=10>a?"0"+a:a,b=10>b?"0"+b:b,c=10>c?"0"+c:c,a+":"+b+(this.showSeconds?":"+c:"")+(this.showMeridian?" "+d:"")},getCursorPosition:function(){var a=this.$element.get(0);if("selectionStart"in a)return a.selectionStart;if(c.selection){a.focus();var b=c.selection.createRange(),d=c.selection.createRange().text.length;return b.moveStart("character",-a.value.length),b.text.length-d}},getTemplate:function(){var a,b,c,d,e,f;switch(this.showInputs?(b='<input type="text" name="hour" class="bootstrap-timepicker-hour" maxlength="2"/>',c='<input type="text" name="minute" class="bootstrap-timepicker-minute" maxlength="2"/>',d='<input type="text" name="second" class="bootstrap-timepickeLine truncated
|
||||
return a},d:function(a,b){return a.setUTCDate(b)}};q.M=q.MM=q.mm=q.m,q.dd=q.d,e=b(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0);var r=f.parts.slice();if(k.length!=r.length&&(r=a(r).filter(function(b,c){return-1!==a.inArray(c,p)}).toArray()),k.length==r.length){for(var l=0,s=r.length;s>l;l++){if(m=parseInt(k[l],10),h=r[l],isNaN(m))switch(h){case"MM":n=a(d[g].months).filter(function(){var a=this.slice(0,k[l].length),b=k[l].slice(0,a.length);return a==b}),m=a.inArray(n[0],d[g].months)+1;break;case"M":n=a(d[g].monthsShort).filter(function(){var a=this.slice(0,k[l].length),b=k[l].slice(0,a.length);return a==b}),m=a.inArray(n[0],d[g].monthsShort)+1}o[h]=m}for(var t,l=0;l<p.length;l++)t=p[l],t in o&&!isNaN(o[t])&&q[t](e,o[t])}return e},formatDate:function(b,c,e){var f={d:b.getUTCDate(),D:d[e].daysShort[b.getUTCDay()],DD:d[e].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:d[e].monthsShort[b.getUTCMonth()],MM:d[e].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};f.dd=(f.d<10?"0":"")+f.d,f.mm=(f.m<10?"0":"")+f.m;for(var b=[],g=a.extend([],c.separators),h=0,i=c.parts.length;i>h;h++)g.length&&b.push(g.shift()),b.push(f[c.parts[h]]);return b.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};e.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+e.headTemplate+"<tbody></tbody>"+e.footTemplate+"</table>"+"</div>"+'<div class="datepicker-months">'+'<table class="table-condensed">'+e.headTemplate+e.contTemplate+e.footTemplate+"</table>"+"</div>"+'<div class="datepicker-years">'+'<table class="table-condensed">'+e.headTemplate+e.contTemplate+e.footTemplate+"</table>"+"</div>"+"</div>",a.fn.datepicker.DPGlobal=e}(window.jQuery),define("datepicker",function(){}),angular.module("$strap.config",[]).value("$strapConfig",{}),angular.module("$strap.filters",["$strap.config"]),angular.module("$strap.directives",["$strap.config"]),angular.module("$strap",["$strap.filters","$strap.directives","$strap.config"]),angular.module("$strap.directives").directive("bsAlert",["$parse","$timeout","$compile",function(a,b,c){return{restrict:"A",link:function(d,e,f){var g=a(f.bsAlert),h=(g.assign,g(d)),i=function(a){b(function(){e.alert("close")},1*a)};f.bsAlert?d.$watch(f.bsAlert,function(a,b){h=a,e.html((a.title?"<strong>"+a.title+"</strong> ":"")+a.content||""),a.closed&&e.hide(),c(e.contents())(d),(a.type||b.type)&&(b.type&&e.removeClass("alert-"+b.type),a.type&&e.addClass("alert-"+a.type)),angular.isDefined(a.closeAfter)?i(a.closeAfter):f.closeAfter&&i(f.closeAfter),(angular.isUndefined(f.closeButton)||"0"!==f.closeButton&&"false"!==f.closeButton)&&e.prepend('<button type="button" class="close" data-dismiss="alert">×</button>')},!0):((angular.isUndefined(f.closeButton)||"0"!==f.closeButton&&"false"!==f.closeButton)&&e.prepend('<button type="button" class="close" data-dismiss="alert">×</button>'),f.closeAfter&&i(f.closeAfter)),e.addClass("alert").alert(),e.hasClass("fade")&&(e.removeClass("in"),setTimeout(function(){e.addClass("in")}));var j=f.ngRepeat&&f.ngRepeat.split(" in ").pop();e.on("close",function(a){var b;j?(a.preventDefault(),e.removeClass("in"),b=function(){e.trigger("closed"),d.$parent&&d.$parent.$apply(function(){for(var a=j.split("."),b=d.$parent,c=0;c<a.length;++c)b&&(b=b[a[c]]);b&&b.splice(d.$index,1)})},$.support.transition&&e.hasClass("fade")?e.on($.support.transition.end,b):b()):h&&(a.preventDefault(),e.removeClass("in"),b=function(){e.trigger("closed"),d.$apply(function(){h.closed=!0})},$.support.transition&&e.hasClass("fade")?e.on($.support.transition.end,b):b())})}}}]),angular.module("$strap.directives").directive("bsButton",["$parse","$timeout",function(a){return{restrict:"A",require:"?ngModel",link:function(b,c,d,e){if(e){c.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length||c.attr("data-toggle","button");var f=!!b.$eval(d.ngModel);f&&c.addClass("active"),b.$watch(d.ngModel,function(a,b){var d=!!a,e=!!b;d!==e?$.fn.button.Constructor.prototype.toggle.call(g):d&&!f&&c.addClass("active")})}c.hasClass("btn")||c.on("click.button.data-api",function(){c.button("toggle")}),c.button();var g=c.data("button");g.toggle=function(){if(!e)return $.fn.button.Constructor.prototype.toggle.call(this);var d=c.parent('[data-toggle="buttons-radio"]');d.length?(c.siblings("[ng-model]").each(function(c,d){a($(d).attr("ng-model")).assign(b,!1)}),b.$digest(),e.$modelValue||(e.$setViewValue(!e.$modelValue),b.$digest())):b.$apply(function(){e.$setViewValue(!e.$modelValue)})}}}}]).directive("bsButtonsCheckbox",["$parse",function(){return{restrict:"A",require:"?ngModel",compile:function(a){a.attr("data-toggle","buttons-checkbox").find("a, button").eLine truncated
|
||||
c(j?a.yep:a.nope,!!k),k&&c(k)}var j,l,n=this.yepnope.loader;if(e(a))g(a,0,n,0);else if(y(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,n,0):y(l)?m(l):Object(l)===l&&i(l,n);else Object(a)===a&&i(a,n)},m.addPrefix=function(a,b){B[a]=b},m.addFilter=function(a){z.push(a)},m.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",l=function(){b.removeEventListener("DOMContentLoaded",l,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k,l,n=b.createElement("script"),e=e||m.errorTimeout;n.src=a;for(l in d)n.setAttribute(l,d[l]);c=j?h:c||f,n.onreadystatechange=n.onload=function(){!k&&g(n.readyState)&&(k=1,c(),n.onload=n.onreadystatechange=null)},o(function(){k||(k=1,c(1))},e),i?n.onload():p.parentNode.insertBefore(n,p)},a.yepnope.injectCss=function(a,c,d,e,g,i){var j,e=b.createElement("link"),c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(p.parentNode.insertBefore(e,p),o(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},define("modernizr",function(a){return function(){var b;return b||a.Modernizr}}(this)),define("services/dashboard",["angular","underscore","config","modernizr"],function(a,b,c,d){var e=a.module("kibana.services");e.service("dashboard",["$routeParams","$http","$rootScope","$injector","ejsResource","timer","kbnIndex","alertSrv",function(e,f,g,h,i,j,k,l){var m,n,o={title:"",style:"dark",editable:!0,failover:!1,rows:[],services:{},loader:{save_gist:!1,save_elasticsearch:!0,save_local:!0,save_default:!0,save_temp:!0,save_temp_ttl_enable:!0,save_temp_ttl:"30d",load_gist:!0,load_elasticsearch:!0,load_elasticsearch_size:20,load_local:!0,hide:!1},index:{interval:"none",pattern:"_all","default":"INDEX_MISSING"}},p=i(c.elasticsearch),q=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,r=this;this.current=b.clone(o),this.last={},g.$on("$routeChangeSuccess",function(){r.current={},r.indices=[],s()});var s=function(){if(b.isUndefined(e.kbnType)||b.isUndefined(e.kbnId))if(d.localstorage&&!b.isUndefined(window.localStorage.dashboard)&&""!==window.localStorage.dashboard){var a=JSON.parse(window.localStorage.dashboard);r.dash_load(a)}else r.file_load("default.json");else{var c=e.kbnType,f=e.kbnId;switch(c){case"elasticsearch":r.elasticsearch_load("dashboard",f);break;case"temp":r.elasticsearch_load("temp",f);break;case"file":r.file_load(f);break;case"script":r.script_load(f);break;default:r.file_load("default.json")}}};this.refresh=function(){if("none"!==r.current.index.interval)if(m.idsByType("time").length>0){var a=m.timeRange("min");k.indices(a.from,a.to,r.current.index.pattern,r.current.index.interval).then(function(a){if(a.length>0)r.indices=a;else{if(!r.current.failover)return!1;r.indices=[r.current.index.default]}g.$broadcast("refresh")})}else r.current.failover?(r.indices=[r.current.index.default],g.$broadcast("refresh")):l.set("No time filter","Timestamped indices are configured without a failover. Waiting for time filter.","info",5e3);else r.indices=[r.current.index.default],g.$broadcast("refresh")};var t=function(a){return b.defaults(a,o),b.defaults(a.index,o.index),b.defaults(a.loader,o.loader),a};this.dash_load=function(a){return j.cancel_all(),a=t(a),"none"===a.index.interval&&(r.indices=[a.index.default]),r.current=b.clone(a),n=h.get("querySrv"),m=h.get("filterSrv"),n.init(),m.init(),"none"!==a.index.interval&&0===m.idsByType("time").length&&r.refresh(),!0},this.gist_id=function(a){return r.is_gist(a)?a.match(q)[0].replace(/.*\//,""):void 0},this.is_gist=function(a){return b.isUndefined(a)||""===a||b.isNull(a.match(q))?!1:a.match(q).length>0?!0:!1},this.to_file=function(){var b=new Blob([a.toJson(r.current,!0)],{type:"application/json;charset=utf-8"});return window.saveAs(b,r.current.title+"-"+(new Date).getTime()),!0},this.set_default=function(b){return d.localstorage?(window.localStorage.dashboard=a.toJson(b||r.current),!0):!1},this.purge_default=function(){return d.localstorage?(window.localStorage.dashboard="",!0):!1},this.share_link=function(a,b,c){return{location:window.location.href.replace(window.location.hash,""),type:b,id:c,link:window.location.href.replace(window.location.hash,"")+"#dashboard/"+b+"/"+c,title:a}};var u=function(c,d){var e;b.templateSettings={interpolate:/\{\{(.+?)\}\}/g};var f=b.template(c),g=f({ARGS:d});try{e=a.fromJson(g)}catch(h){e=!1}return e};this.file_load=function(a){return f({url:"app/dashboards/"+a,method:"GET",transformResponse:function(a){return u(a,e)}}).then(function(a){return a?(r.dash_load(t(a.data)),!0):!1},function(){return l.set("Error","Could not load <i>dashboards/"+a+"</i>. Please make sure it exists","error"),!1})},this.elasticsearch_load=function(b,d){return f({url:c.elasticsearch+"/"+c.kibana_index+"/"+b+"/"+d,method:"GET",transformResponse:function(b){return u(a.fromJson(b)._source.dashboard,e)}}).error(funcLine truncated
|
||||
default:return b.isUndefined(a.query)?!1:f.QueryStringQuery(a.query||"*")}},this.findQuery=function(a){return b.findWhere(h.list,{query:a})},this.idsByMode=function(a){switch(a.mode){case"all":return h.ids;case"pinned":return b.pluck(b.where(h.list,{pin:!0}),"id");case"unpinned":return b.difference(h.ids,b.pluck(b.where(h.list,{pin:!0}),"id"));case"selected":return b.intersection(h.ids,a.ids);default:return h.ids}};var i=function(){return g.idQueue.length>0?g.idQueue.shift():h.ids.length},j=function(a){return h.colors[a%h.colors.length]};h.init()}])}),define("services/timer",["angular","underscore"],function(a,b){var c=a.module("kibana.services");c.service("timer",["$timeout",function(a){var c=[];this.register=function(a){return c.push(a),a},this.cancel=function(d){c=b.without(c,d),a.cancel(d)},this.cancel_all=function(){b.each(c,function(b){a.cancel(b)}),c=[]}}])}),define("services/all",["./alertSrv","./dashboard","./fields","./filterSrv","./kbnIndex","./querySrv","./timer"],function(){}),define("controllers/dash",["angular","config","underscore","services/all"],function(a,b,c){var d=a.module("kibana.controllers");d.controller("DashCtrl",["$scope","$route","ejsResource","fields","dashboard","alertSrv",function(a,d,e,f,g,h){a.editor={index:0},a.init=function(){a.config=b,a._=c,a.dashboard=g,a.dashAlerts=h,h.clearAll(),a.fields=f,a.reset_row(),a.ejs=e(b.elasticsearch)},a.add_row=function(a,b){a.rows.push(b)},a.reset_row=function(){a.row={title:"",height:"150px",editable:!0}},a.row_style=function(a){return{"min-height":a.collapse?"5px":a.height}},a.edit_path=function(a){return a?"app/panels/"+a+"/editor.html":!1},a.setEditorTabs=function(b){return a.editorTabs=["General","Panel"],c.isUndefined(b.editorTabs)||(a.editorTabs=c.union(a.editorTabs,c.pluck(b.editorTabs,"title"))),a.editorTabs},a.parse_error=function(a){var b=a.match("nested: (.*?);");return c.isNull(b)?a:b[1]},a.init()}])}),define("controllers/dashLoader",["angular","underscore"],function(a,b){var c=a.module("kibana.controllers");c.controller("dashLoader",["$scope","$http","timer","dashboard","alertSrv",function(a,c,d,e,f){a.loader=e.current.loader,a.init=function(){a.gist_pattern=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,a.gist=a.gist||{},a.elasticsearch=a.elasticsearch||{}},a.showDropdown=function(b){var c=a.loader;return"load"===b?c.load_elasticsearch||c.load_gist||c.load_local:"save"===b?c.save_elasticsearch||c.save_gist||c.local_local||c.save_default:"share"===b?c.save_temp:!1},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(c,d){e.elasticsearch_save(c,a.elasticsearch.title||e.current.title,a.loader.save_temp_ttl_enable?d:!1).then(function(d){b.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"===c&&(a.share=e.share_link(e.current.title,"temp",d._id)))})},a.elasticsearch_delete=function(c){e.elasticsearch_delete(c).then(function(d){if(b.isUndefined(d))f.set("Dashboard Not Deleted","An error occurred deleting the dashboard","error",5e3);else if(d.found){f.set("Dashboard Deleted",c+" has been deleted","success",5e3);var e=b.where(a.elasticsearch.dashboards,{_id:c})[0];a.elasticsearch.dashboards=b.without(a.elasticsearch.dashboards,e)}else f.set("Dashboard Not Found","Could not find "+c+" in Elasticsearch","warning",5e3)})},a.elasticsearch_dblist=function(c){e.elasticsearch_list(c,a.loader.load_elasticsearch_size).then(function(c){b.isUndefined(c.hits)||(a.hits=c.hits.total,a.elasticsearch.dashboards=c.hits.hits)})},a.save_gist=function(){e.save_gist(a.gist.title).then(function(c){b.isUndefined(c)?f.set("Save failed","Gist could not be saved","error",5e3):(a.gist.last=c,f.set("Gist saved",'You will be able to access your exported dashboard file at <a href="'+c+'">'+c+"</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)})}}])}),define("controllers/row",["angular","app","underscore"],function(a,b,c){var d=a.module("kibana.controllers");d.controller("RowCtrl",["$scope","$rootScope","$timeout","ejsResource","querySrv",function(a,b,d,e,f){var g={title:"Row",height:"150px",collapse:!1,collapsable:!0,editable:!0,panels:[]};c.defaults(a.row,g),a.init=function(){a.querySrv=f,a.reset_panel()},a.toggle_row=function(b){b.collapsable&&(b.collapse=b.collapse?!1:!0,b.collapse||d(function(){a.$broLine truncated
|
||||
break}if(a[f]||(c="x"==b?kb[0]:lb[0],d=a[b+"1"],e=a[b+"2"]),null!=d&&null!=e&&d>e){var i=d;d=e,e=i}return{from:d,to:e,axis:c}}function I(){ib.save(),ib.translate(mb.left,mb.top),ib.fillStyle=cb(eb.grid.backgroundColor,ob,0,"rgba(255, 255, 255, 0)"),ib.fillRect(0,0,nb,ob),ib.restore()}function J(){var b,c,d,e;ib.save(),ib.translate(mb.left,mb.top);var f=eb.grid.markings;if(f)for(a.isFunction(f)&&(c=qb.getAxes(),c.xmin=c.xaxis.min,c.xmax=c.xaxis.max,c.ymin=c.yaxis.min,c.ymax=c.yaxis.max,f=f(c)),b=0;b<f.length;++b){var g=f[b],h=H(g,"x"),i=H(g,"y");null==h.from&&(h.from=h.axis.min),null==h.to&&(h.to=h.axis.max),null==i.from&&(i.from=i.axis.min),null==i.to&&(i.to=i.axis.max),h.to<h.axis.min||h.from>h.axis.max||i.to<i.axis.min||i.from>i.axis.max||(h.from=Math.max(h.from,h.axis.min),h.to=Math.min(h.to,h.axis.max),i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),(h.from!=h.to||i.from!=i.to)&&(h.from=h.axis.p2c(h.from),h.to=h.axis.p2c(h.to),i.from=i.axis.p2c(i.from),i.to=i.axis.p2c(i.to),h.from==h.to||i.from==i.to?(ib.beginPath(),ib.strokeStyle=g.color||eb.grid.markingsColor,ib.lineWidth=g.lineWidth||eb.grid.markingsLineWidth,ib.moveTo(h.from,i.from),ib.lineTo(h.to,i.to),ib.stroke()):(ib.fillStyle=g.color||eb.grid.markingsColor,ib.fillRect(h.from,i.to,h.to-h.from,i.from-i.to))))}c=n(),d=eb.grid.borderWidth;for(var j=0;j<c.length;++j){var k,l,m,o,p=c[j],q=p.box,r=p.tickLength;if(p.show&&0!=p.ticks.length){for(ib.lineWidth=1,"x"==p.direction?(k=0,l="full"==r?"top"==p.position?0:ob:q.top-mb.top+("top"==p.position?q.height:0)):(l=0,k="full"==r?"left"==p.position?0:nb:q.left-mb.left+("left"==p.position?q.width:0)),p.innermost||(ib.strokeStyle=p.options.color,ib.beginPath(),m=o=0,"x"==p.direction?m=nb+1:o=ob+1,1==ib.lineWidth&&("x"==p.direction?l=Math.floor(l)+.5:k=Math.floor(k)+.5),ib.moveTo(k,l),ib.lineTo(k+m,l+o),ib.stroke()),ib.strokeStyle=p.options.tickColor,ib.beginPath(),b=0;b<p.ticks.length;++b){var s=p.ticks[b].v;m=o=0,isNaN(s)||s<p.min||s>p.max||"full"==r&&("object"==typeof d&&d[p.position]>0||d>0)&&(s==p.min||s==p.max)||("x"==p.direction?(k=p.p2c(s),o="full"==r?-ob:r,"top"==p.position&&(o=-o)):(l=p.p2c(s),m="full"==r?-nb:r,"left"==p.position&&(m=-m)),1==ib.lineWidth&&("x"==p.direction?k=Math.floor(k)+.5:l=Math.floor(l)+.5),ib.moveTo(k,l),ib.lineTo(k+m,l+o))}ib.stroke()}}d&&(e=eb.grid.borderColor,"object"==typeof d||"object"==typeof e?("object"!=typeof d&&(d={top:d,right:d,bottom:d,left:d}),"object"!=typeof e&&(e={top:e,right:e,bottom:e,left:e}),d.top>0&&(ib.strokeStyle=e.top,ib.lineWidth=d.top,ib.beginPath(),ib.moveTo(0-d.left,0-d.top/2),ib.lineTo(nb,0-d.top/2),ib.stroke()),d.right>0&&(ib.strokeStyle=e.right,ib.lineWidth=d.right,ib.beginPath(),ib.moveTo(nb+d.right/2,0-d.top),ib.lineTo(nb+d.right/2,ob),ib.stroke()),d.bottom>0&&(ib.strokeStyle=e.bottom,ib.lineWidth=d.bottom,ib.beginPath(),ib.moveTo(nb+d.right,ob+d.bottom/2),ib.lineTo(0,ob+d.bottom/2),ib.stroke()),d.left>0&&(ib.strokeStyle=e.left,ib.lineWidth=d.left,ib.beginPath(),ib.moveTo(0-d.left/2,ob+d.bottom),ib.lineTo(0-d.left/2,0),ib.stroke())):(ib.lineWidth=d,ib.strokeStyle=eb.grid.borderColor,ib.strokeRect(-d/2,-d/2,nb+d,ob+d))),ib.restore()}function K(){a.each(n(),function(a,b){if(b.show&&0!=b.ticks.length){var c,d,e,f,g,h=b.box,i=b.direction+"Axis "+b.direction+b.n+"Axis",j="flot-"+b.direction+"-axis flot-"+b.direction+b.n+"-axis "+i,k=b.options.font||"flot-tick-label tickLabel";fb.removeText(j);for(var l=0;l<b.ticks.length;++l)c=b.ticks[l],!c.label||c.v<b.min||c.v>b.max||("x"==b.direction?(f="center",d=mb.left+b.p2c(c.v),"bottom"==b.position?e=h.top+h.padding:(e=h.top+h.height-h.padding,g="bottom")):(g="middle",e=mb.top+b.p2c(c.v),"left"==b.position?(d=h.left+h.width-h.padding,f="right"):d=h.left+h.padding),fb.addText(j,d,e,c.label,k,null,null,f,g))}})}function L(a){a.lines.show&&M(a),a.bars.show&&P(a),a.points.show&&N(a)}function M(a){function b(a,b,c,d,e){var f=a.points,g=a.pointsize,h=null,i=null;ib.beginPath();for(var j=g;j<f.length;j+=g){var k=f[j-g],l=f[j-g+1],m=f[j],n=f[j+1];if(null!=k&&null!=m){if(n>=l&&l<e.min){if(n<e.min)continue;k=(e.min-l)/(n-l)*(m-k)+k,l=e.min}else if(l>=n&&n<e.min){if(l<e.min)continue;m=(e.min-l)/(n-l)*(m-k)+k,n=e.min}if(l>=n&&l>e.max){if(n>e.max)continue;k=(e.max-l)/(n-l)*(m-k)+k,l=e.max}else if(n>=l&&n>e.max){if(l>e.max)continue;m=(e.max-l)/(n-l)*(m-k)+k,n=e.max}if(m>=k&&k<d.min){if(m<d.min)continue;l=(d.min-k)/(m-k)*(n-l)+l,k=d.min}else if(k>=m&&m<d.min){if(k<d.min)continue;n=(d.min-k)/(m-k)*(n-l)+l,m=d.min}if(k>=m&&k>d.max){if(m>d.max)continue;l=(d.max-k)/(m-k)*(n-l)+l,k=d.max}else if(m>=k&&m>d.max){if(k>d.max)continue;n=(d.max-k)/(m-k)*(n-l)+l,m=d.max}(k!=h||l!=i)&&ib.moveTo(d.p2c(k)+b,e.p2c(l)+c),h=m,i=n,ib.lineTo(d.p2c(m)+b,e.p2c(n)+c)}}ib.stroke()}function c(a,b,c){for(var d=a.points,e=a.pointsize,f=Math.min(Math.max(0,c.min),c.max),g=0,h=!1,i=1,j=0,k=0;;){if(e>0&&g>d.length+e)break;g+=e;var l=d[g-e],m=d[g-e+i],n=d[g],o=d[g+i];if(h){if(e>0&&null!=l&&null==n){k=g,e=-e,i=2;continue}if(0>e&&g==j+e){Line truncated
|
||||
return a},d:function(a,b){return a.setUTCDate(b)}};q.M=q.MM=q.mm=q.m,q.dd=q.d,e=b(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0);var r=f.parts.slice();if(k.length!=r.length&&(r=a(r).filter(function(b,c){return-1!==a.inArray(c,p)}).toArray()),k.length==r.length){for(var l=0,s=r.length;s>l;l++){if(m=parseInt(k[l],10),h=r[l],isNaN(m))switch(h){case"MM":n=a(d[g].months).filter(function(){var a=this.slice(0,k[l].length),b=k[l].slice(0,a.length);return a==b}),m=a.inArray(n[0],d[g].months)+1;break;case"M":n=a(d[g].monthsShort).filter(function(){var a=this.slice(0,k[l].length),b=k[l].slice(0,a.length);return a==b}),m=a.inArray(n[0],d[g].monthsShort)+1}o[h]=m}for(var t,l=0;l<p.length;l++)t=p[l],t in o&&!isNaN(o[t])&&q[t](e,o[t])}return e},formatDate:function(b,c,e){var f={d:b.getUTCDate(),D:d[e].daysShort[b.getUTCDay()],DD:d[e].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:d[e].monthsShort[b.getUTCMonth()],MM:d[e].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};f.dd=(f.d<10?"0":"")+f.d,f.mm=(f.m<10?"0":"")+f.m;for(var b=[],g=a.extend([],c.separators),h=0,i=c.parts.length;i>h;h++)g.length&&b.push(g.shift()),b.push(f[c.parts[h]]);return b.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};e.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+e.headTemplate+"<tbody></tbody>"+e.footTemplate+"</table>"+"</div>"+'<div class="datepicker-months">'+'<table class="table-condensed">'+e.headTemplate+e.contTemplate+e.footTemplate+"</table>"+"</div>"+'<div class="datepicker-years">'+'<table class="table-condensed">'+e.headTemplate+e.contTemplate+e.footTemplate+"</table>"+"</div>"+"</div>",a.fn.datepicker.DPGlobal=e}(window.jQuery),define("datepicker",function(){}),angular.module("$strap.config",[]).value("$strapConfig",{}),angular.module("$strap.filters",["$strap.config"]),angular.module("$strap.directives",["$strap.config"]),angular.module("$strap",["$strap.filters","$strap.directives","$strap.config"]),angular.module("$strap.directives").directive("bsAlert",["$parse","$timeout","$compile",function(a,b,c){return{restrict:"A",link:function(d,e,f){var g=a(f.bsAlert),h=(g.assign,g(d)),i=function(a){b(function(){e.alert("close")},1*a)};f.bsAlert?d.$watch(f.bsAlert,function(a,b){h=a,e.html((a.title?"<strong>"+a.title+"</strong> ":"")+a.content||""),a.closed&&e.hide(),c(e.contents())(d),(a.type||b.type)&&(b.type&&e.removeClass("alert-"+b.type),a.type&&e.addClass("alert-"+a.type)),angular.isDefined(a.closeAfter)?i(a.closeAfter):f.closeAfter&&i(f.closeAfter),(angular.isUndefined(f.closeButton)||"0"!==f.closeButton&&"false"!==f.closeButton)&&e.prepend('<button type="button" class="close" data-dismiss="alert">×</button>')},!0):((angular.isUndefined(f.closeButton)||"0"!==f.closeButton&&"false"!==f.closeButton)&&e.prepend('<button type="button" class="close" data-dismiss="alert">×</button>'),f.closeAfter&&i(f.closeAfter)),e.addClass("alert").alert(),e.hasClass("fade")&&(e.removeClass("in"),setTimeout(function(){e.addClass("in")}));var j=f.ngRepeat&&f.ngRepeat.split(" in ").pop();e.on("close",function(a){var b;j?(a.preventDefault(),e.removeClass("in"),b=function(){e.trigger("closed"),d.$parent&&d.$parent.$apply(function(){for(var a=j.split("."),b=d.$parent,c=0;c<a.length;++c)b&&(b=b[a[c]]);b&&b.splice(d.$index,1)})},$.support.transition&&e.hasClass("fade")?e.on($.support.transition.end,b):b()):h&&(a.preventDefault(),e.removeClass("in"),b=function(){e.trigger("closed"),d.$apply(function(){h.closed=!0})},$.support.transition&&e.hasClass("fade")?e.on($.support.transition.end,b):b())})}}}]),angular.module("$strap.directives").directive("bsButton",["$parse","$timeout",function(a){return{restrict:"A",require:"?ngModel",link:function(b,c,d,e){if(e){c.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length||c.attr("data-toggle","button");var f=!!b.$eval(d.ngModel);f&&c.addClass("active"),b.$watch(d.ngModel,function(a,b){var d=!!a,e=!!b;d!==e?$.fn.button.Constructor.prototype.toggle.call(g):d&&!f&&c.addClass("active")})}c.hasClass("btn")||c.on("click.button.data-api",function(){c.button("toggle")}),c.button();var g=c.data("button");g.toggle=function(){if(!e)return $.fn.button.Constructor.prototype.toggle.call(this);var d=c.parent('[data-toggle="buttons-radio"]');d.length?(c.siblings("[ng-model]").each(function(c,d){a($(d).attr("ng-model")).assign(b,!1)}),b.$digest(),e.$modelValue||(e.$setViewValue(!e.$modelValue),b.$digest())):b.$apply(function(){e.$setViewValue(!e.$modelValue)})}}}}]).directive("bsButtonsCheckbox",["$parse",function(){return{restrict:"A",require:"?ngModel",compile:function(a){a.attr("data-toggle","buttons-checkbox").find("a, button").eLine truncated
|
||||
},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return C(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(a,b,c){return D({_i:a,_f:b,_l:c,_isUTC:!1})},H.utc=function(a,b,c){return D({_useUTC:!0,_isUTC:!0,_l:c,_i:a,_f:b})},H.unix=function(a){return H(1e3*a)},H.duration=function(a,b){var c,d,e=H.isDuration(a),g="number"==typeof a,h=e?a._input:g?{}:a,i=O.exec(a);return g?b?h[b]=a:h.milliseconds=a:i&&(c="-"===i[1]?-1:1,h={y:0,d:~~i[2]*c,h:~~i[3]*c,m:~~i[4]*c,s:~~i[5]*c,ms:~~i[6]*c}),d=new f(h),e&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},H.version=J,H.defaultFormat=_,H.updateOffset=function(){},H.lang=function(a,b){return a?(b?n(a,b):L[a]||o(a),H.duration.fn._lang=H.fn._lang=o(a),void 0):H.fn._lang._abbr},H.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),o(a)},H.isMoment=function(a){return a instanceof e},H.isDuration=function(a){return a instanceof f},H.fn=e.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return r(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!l(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=r(this,a||H.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?H.duration(+b,a):H.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?H.duration(+b,a):H.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?H(a).zone(this._offset||0):H(a).local(),g=6e4*(this.zone()-f.zone());return b=m(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-H(this).startOf("month")-(f-H(f).startOf("month")))/d,e-=6e4*(this.zone()-H(this).startOf("month").zone()-(f.zone()-H(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return H.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(H(),a)},calendar:function(){var a=this.diff(H().startOf("day"),"days",!0),b=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){var a=this.year();return 0===a%4&&0!==a%100||0===a%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?"string"==typeof a&&(a=this.lang().weekdaysParse(a),"number"!=typeof a)?this:this.add({d:a-b}):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),H.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=m(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),this},endOf:function(a){return this.startOf(a).add(a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+H(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+H(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+H(a).startOf(b)},min:function(a){rLine truncated
|
||||
},this.timeRange=function(a){var c=b.where(h.list,{type:"time",active:!0});if(0===c.length)return!1;switch(a){case"min":return{from:new Date(b.max(b.pluck(c,"from"))),to:new Date(b.min(b.pluck(c,"to")))};case"max":return{from:new Date(b.min(b.pluck(c,"from"))),to:new Date(b.max(b.pluck(c,"to")))};default:return!1}},this.remove=function(c){return b.isUndefined(h.list[c])?!1:(delete h.list[c],h.ids=a.current.services.filter.ids=b.without(h.ids,c),g.idQueue.unshift(c),g.idQueue.sort(function(a,b){return a-b}),!0)};var i=function(){return g.idQueue.length>0?g.idQueue.shift():h.ids.length};h.init()}])}),define("services/kbnIndex",["angular","underscore","config","moment"],function(a,b,c,d){var e=a.module("kibana.services");e.service("kbnIndex",["$http","alertSrv",function(a,e){function f(){var d=a({url:c.elasticsearch+"/_aliases",method:"GET"}).error(function(a,b){0===b?e.set("Error","Could not contact Elasticsearch at "+c.elasticsearch+". Please ensure that Elasticsearch is reachable from your system.","error"):e.set("Error","Could not reach "+c.elasticsearch+"/_aliases. If you"+" are using a proxy, ensure it is configured correctly","error")});return d.then(function(a){var c=[];return b.each(a.data,function(a,d){c.push(d),b.each(a.aliases,function(a,b){c.push(b)})}),c})}function g(a){return a=d(a).clone().toDate(),d(new Date(a.getTime()+6e4*a.getTimezoneOffset()))}function h(a,c,e){if(b.contains(["hour","day","week","month","year"],e)){var f;for(a=d(a).clone(),f=[];a.isBefore(c);)switch(f.push(a.clone()),e){case"hour":a.add("hours",1);break;case"day":a.add("days",1);break;case"week":a.add("weeks",1);break;case"month":a.add("months",1);break;case"year":a.add("years",1)}return f.push(d(c).clone()),f}return!1}this.indices=function(a,c,d,e){var i=[];return b.each(h(g(a),g(c),e),function(a){i.push(a.format(d))}),f().then(function(a){var c=b.intersection(i,a);return c.reverse(),c})}}])}),define("services/querySrv",["angular","underscore","config"],function(a,b,c){var d=a.module("kibana.services");d.service("querySrv",["dashboard","ejsResource",function(a,d){a.current.services.query=a.current.services.query||{},b.defaults(a.current.services.query,{idQueue:[],list:{},ids:[]});var e={query:"*",alias:"",pin:!1,type:"lucene"},f=d(c.elasticsearch),g=a.current.services.query;this.colors=["#7EB26D","#EAB839","#6ED0E0","#EF843C","#E24D42","#1F78C1","#BA43A9","#705DA0","#508642","#CCA300","#447EBC","#C15C17","#890F02","#0A437C","#6D1F62","#584477","#B7DBAB","#F4D598","#70DBED","#F9BA8F","#F29191","#82B5D8","#E5A8E2","#AEA2E0","#629E51","#E5AC0E","#64B0C8","#E0752D","#BF1B00","#0A50A1","#962D82","#614D93","#9AC48A","#F2C96D","#65C5DB","#F9934E","#EA6460","#5195CE","#D683CE","#806EB7","#3F6833","#967302","#2F575E","#99440A","#58140C","#052B51","#511749","#3F2B5B","#E0F9D7","#FCEACA","#CFFAFF","#F9E2D2","#FCE2DE","#BADFF4","#F9D9F9","#DEDAF7"];var h=this;this.init=function(){g=a.current.services.query,h.list=a.current.services.query.list,h.ids=a.current.services.query.ids,b.each(h.list,function(a,c){b.defaults(a,e),a.color=j(c)}),0===h.ids.length&&h.set({})},this.set=function(a,c){if(b.isUndefined(c)){var d=a.id||i();return a.id=d,a.color=a.color||j(d),b.defaults(a,e),h.list[d]=a,h.ids.push(d),d}return b.isUndefined(h.list[c])?!1:(b.extend(h.list[c],a),c)},this.remove=function(c){return b.isUndefined(h.list[c])?!1:(delete h.list[c],h.ids=a.current.services.query.ids=b.without(h.ids,c),g.idQueue.unshift(c),g.idQueue.sort(function(a,b){return a-b}),!0)},this.getEjsObj=function(a){return h.toEjsObj(h.list[a])},this.toEjsObj=function(a){switch(a.type){case"lucene":return f.QueryStringQuery(a.query||"*");default:return b.isUndefined(a.query)?!1:f.QueryStringQuery(a.query||"*")}},this.findQuery=function(a){return b.findWhere(h.list,{query:a})},this.idsByMode=function(a){switch(a.mode){case"all":return h.ids;case"pinned":return b.pluck(b.where(h.list,{pin:!0}),"id");case"unpinned":return b.difference(h.ids,b.pluck(b.where(h.list,{pin:!0}),"id"));case"selected":return b.intersection(h.ids,a.ids);default:return h.ids}};var i=function(){return g.idQueue.length>0?g.idQueue.shift():h.ids.length},j=function(a){return h.colors[a%h.colors.length]};h.init()}])}),define("services/timer",["angular","underscore"],function(a,b){var c=a.module("kibana.services");c.service("timer",["$timeout",function(a){var c=[];this.register=function(a){return c.push(a),a},this.cancel=function(d){c=b.without(c,d),a.cancel(d)},this.cancel_all=function(){b.each(c,function(b){a.cancel(b)}),c=[]}}])}),define("services/all",["./alertSrv","./dashboard","./fields","./filterSrv","./kbnIndex","./querySrv","./timer"],function(){}),define("controllers/dash",["angular","config","underscore","services/all"],function(a,b,c){var d=a.module("kibana.controllers");d.controller("DashCtrl",["$scope","$route","ejsResource","fields","dashboard","alertSrv",function(a,d,e,f,g,h){a.editor={index:0},a.init=function(){a.config=b,a._=c,a.dashboard=g,a.dashAlerts=h,h.clearAll(),a.fields=f,a.rLine truncated
|
||||
}function H(a,b){for(var c,d,e,f,g=n(),h=0;h<g.length;++h)if(c=g[h],c.direction==b&&(f=b+c.n+"axis",a[f]||1!=c.n||(f=b+"axis"),a[f])){d=a[f].from,e=a[f].to;break}if(a[f]||(c="x"==b?kb[0]:lb[0],d=a[b+"1"],e=a[b+"2"]),null!=d&&null!=e&&d>e){var i=d;d=e,e=i}return{from:d,to:e,axis:c}}function I(){ib.save(),ib.translate(mb.left,mb.top),ib.fillStyle=cb(eb.grid.backgroundColor,ob,0,"rgba(255, 255, 255, 0)"),ib.fillRect(0,0,nb,ob),ib.restore()}function J(){var b,c,d,e;ib.save(),ib.translate(mb.left,mb.top);var f=eb.grid.markings;if(f)for(a.isFunction(f)&&(c=qb.getAxes(),c.xmin=c.xaxis.min,c.xmax=c.xaxis.max,c.ymin=c.yaxis.min,c.ymax=c.yaxis.max,f=f(c)),b=0;b<f.length;++b){var g=f[b],h=H(g,"x"),i=H(g,"y");null==h.from&&(h.from=h.axis.min),null==h.to&&(h.to=h.axis.max),null==i.from&&(i.from=i.axis.min),null==i.to&&(i.to=i.axis.max),h.to<h.axis.min||h.from>h.axis.max||i.to<i.axis.min||i.from>i.axis.max||(h.from=Math.max(h.from,h.axis.min),h.to=Math.min(h.to,h.axis.max),i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),(h.from!=h.to||i.from!=i.to)&&(h.from=h.axis.p2c(h.from),h.to=h.axis.p2c(h.to),i.from=i.axis.p2c(i.from),i.to=i.axis.p2c(i.to),h.from==h.to||i.from==i.to?(ib.beginPath(),ib.strokeStyle=g.color||eb.grid.markingsColor,ib.lineWidth=g.lineWidth||eb.grid.markingsLineWidth,ib.moveTo(h.from,i.from),ib.lineTo(h.to,i.to),ib.stroke()):(ib.fillStyle=g.color||eb.grid.markingsColor,ib.fillRect(h.from,i.to,h.to-h.from,i.from-i.to))))}c=n(),d=eb.grid.borderWidth;for(var j=0;j<c.length;++j){var k,l,m,o,p=c[j],q=p.box,r=p.tickLength;if(p.show&&0!=p.ticks.length){for(ib.lineWidth=1,"x"==p.direction?(k=0,l="full"==r?"top"==p.position?0:ob:q.top-mb.top+("top"==p.position?q.height:0)):(l=0,k="full"==r?"left"==p.position?0:nb:q.left-mb.left+("left"==p.position?q.width:0)),p.innermost||(ib.strokeStyle=p.options.color,ib.beginPath(),m=o=0,"x"==p.direction?m=nb+1:o=ob+1,1==ib.lineWidth&&("x"==p.direction?l=Math.floor(l)+.5:k=Math.floor(k)+.5),ib.moveTo(k,l),ib.lineTo(k+m,l+o),ib.stroke()),ib.strokeStyle=p.options.tickColor,ib.beginPath(),b=0;b<p.ticks.length;++b){var s=p.ticks[b].v;m=o=0,isNaN(s)||s<p.min||s>p.max||"full"==r&&("object"==typeof d&&d[p.position]>0||d>0)&&(s==p.min||s==p.max)||("x"==p.direction?(k=p.p2c(s),o="full"==r?-ob:r,"top"==p.position&&(o=-o)):(l=p.p2c(s),m="full"==r?-nb:r,"left"==p.position&&(m=-m)),1==ib.lineWidth&&("x"==p.direction?k=Math.floor(k)+.5:l=Math.floor(l)+.5),ib.moveTo(k,l),ib.lineTo(k+m,l+o))}ib.stroke()}}d&&(e=eb.grid.borderColor,"object"==typeof d||"object"==typeof e?("object"!=typeof d&&(d={top:d,right:d,bottom:d,left:d}),"object"!=typeof e&&(e={top:e,right:e,bottom:e,left:e}),d.top>0&&(ib.strokeStyle=e.top,ib.lineWidth=d.top,ib.beginPath(),ib.moveTo(0-d.left,0-d.top/2),ib.lineTo(nb,0-d.top/2),ib.stroke()),d.right>0&&(ib.strokeStyle=e.right,ib.lineWidth=d.right,ib.beginPath(),ib.moveTo(nb+d.right/2,0-d.top),ib.lineTo(nb+d.right/2,ob),ib.stroke()),d.bottom>0&&(ib.strokeStyle=e.bottom,ib.lineWidth=d.bottom,ib.beginPath(),ib.moveTo(nb+d.right,ob+d.bottom/2),ib.lineTo(0,ob+d.bottom/2),ib.stroke()),d.left>0&&(ib.strokeStyle=e.left,ib.lineWidth=d.left,ib.beginPath(),ib.moveTo(0-d.left/2,ob+d.bottom),ib.lineTo(0-d.left/2,0),ib.stroke())):(ib.lineWidth=d,ib.strokeStyle=eb.grid.borderColor,ib.strokeRect(-d/2,-d/2,nb+d,ob+d))),ib.restore()}function K(){a.each(n(),function(a,b){if(b.show&&0!=b.ticks.length){var c,d,e,f,g,h=b.box,i=b.direction+"Axis "+b.direction+b.n+"Axis",j="flot-"+b.direction+"-axis flot-"+b.direction+b.n+"-axis "+i,k=b.options.font||"flot-tick-label tickLabel";fb.removeText(j);for(var l=0;l<b.ticks.length;++l)c=b.ticks[l],!c.label||c.v<b.min||c.v>b.max||("x"==b.direction?(f="center",d=mb.left+b.p2c(c.v),"bottom"==b.position?e=h.top+h.padding:(e=h.top+h.height-h.padding,g="bottom")):(g="middle",e=mb.top+b.p2c(c.v),"left"==b.position?(d=h.left+h.width-h.padding,f="right"):d=h.left+h.padding),fb.addText(j,d,e,c.label,k,null,null,f,g))}})}function L(a){a.lines.show&&M(a),a.bars.show&&P(a),a.points.show&&N(a)}function M(a){function b(a,b,c,d,e){var f=a.points,g=a.pointsize,h=null,i=null;ib.beginPath();for(var j=g;j<f.length;j+=g){var k=f[j-g],l=f[j-g+1],m=f[j],n=f[j+1];if(null!=k&&null!=m){if(n>=l&&l<e.min){if(n<e.min)continue;k=(e.min-l)/(n-l)*(m-k)+k,l=e.min}else if(l>=n&&n<e.min){if(l<e.min)continue;m=(e.min-l)/(n-l)*(m-k)+k,n=e.min}if(l>=n&&l>e.max){if(n>e.max)continue;k=(e.max-l)/(n-l)*(m-k)+k,l=e.max}else if(n>=l&&n>e.max){if(l>e.max)continue;m=(e.max-l)/(n-l)*(m-k)+k,n=e.max}if(m>=k&&k<d.min){if(m<d.min)continue;l=(d.min-k)/(m-k)*(n-l)+l,k=d.min}else if(k>=m&&m<d.min){if(k<d.min)continue;n=(d.min-k)/(m-k)*(n-l)+l,m=d.min}if(k>=m&&k>d.max){if(m>d.max)continue;l=(d.max-k)/(m-k)*(n-l)+l,k=d.max}else if(m>=k&&m>d.max){if(k>d.max)continue;n=(d.max-k)/(m-k)*(n-l)+l,m=d.max}(k!=h||l!=i)&&ib.moveTo(d.p2c(k)+b,e.p2c(l)+c),h=m,i=n,ib.lineTo(d.p2c(m)+b,e.p2c(n)+c)}}ib.stroke()}function c(a,b,c){for(var d=a.points,e=a.pointsize,f=Math.min(Math.max(0,c.min),c.max),g=0,h=!1,iLine truncated
|
||||
}}),b});
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/*! kibana - v3.0.0m3pre - 2013-09-16
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
require.config({baseUrl:"app",urlArgs:"r=2534463",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"]}});
|
||||
require.config({baseUrl:"app",urlArgs:"r=2534463",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"]}});
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
* Copyright (c) 2013 Rashid Khan; Licensed Apache License */
|
||||
|
||||
!function(a){var b={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};a.fn.vectorMap=function(a){var c,d,c=this.children(".jvectormap-container").data("mapObject");if("addMap"===a)jvm.WorldMap.maps[arguments[1]]=arguments[2];else{if(("set"===a||"get"===a)&&b[a][arguments[1]])return d=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),c[a+d].apply(c,Array.prototype.slice.call(arguments,2));a=a||{},a.container=this,c=new jvm.WorldMap(a)}return this}}(jQuery),function(a){function b(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),g=e,void 0!==c.axis&&c.axis===c.HORIZONTAL_AXIS&&(g=0,f=-1*e),void 0!==c.wheelDeltaY&&(g=c.wheelDeltaY/120),void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX/120),d.unshift(b,e,f,g),(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=c.length;d;)a.event.fixHooks[c[--d]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}(jQuery);var jvm={inherits:function(a,b){function c(){}c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.parentClass=b},mixin:function(a,b){var c;for(c in b.prototype)b.prototype.hasOwnProperty(c)&&(a.prototype[c]=b.prototype[c])},min:function(a){var b,c=Number.MAX_VALUE;if(a instanceof Array)for(b=0;b<a.length;b++)a[b]<c&&(c=a[b]);else for(b in a)a[b]<c&&(c=a[b]);return c},max:function(a){var b,c=Number.MIN_VALUE;if(a instanceof Array)for(b=0;b<a.length;b++)a[b]>c&&(c=a[b]);else for(b in a)a[b]>c&&(c=a[b]);return c},keys:function(a){var b,c=[];for(b in a)c.push(b);return c},values:function(a){var b,c,d=[];for(c=0;c<arguments.length;c++){a=arguments[c];for(b in a)d.push(a[b])}return d}};jvm.$=jQuery,jvm.AbstractElement=function(a,b){this.node=this.createElement(a),this.name=a,this.properties={},b&&this.set(b)},jvm.AbstractElement.prototype.set=function(a,b){var c;if("object"==typeof a)for(c in a)this.properties[c]=a[c],this.applyAttr(c,a[c]);else this.properties[a]=b,this.applyAttr(a,b)},jvm.AbstractElement.prototype.get=function(a){return this.properties[a]},jvm.AbstractElement.prototype.applyAttr=function(a,b){this.node.setAttribute(a,b)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(a,b,c){this.container=a,this.setSize(b,c),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(a,b){b=b||this.rootElement,b.add(a),a.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(a,b,c){var d=new jvm[this.classPrefix+"PathElement"](a,b);return this.add(d,c),d},jvm.AbstractCanvasElement.prototype.addCircle=function(a,b,c){var d=new jvm[this.classPrefix+"CircleElement"](a,b);return this.add(d,c),d},jvm.AbstractCanvasElement.prototype.addGroup=function(a){var b=new jvm[this.classPrefix+"GroupElement"];return a?a.node.appendChild(b.node):this.node.appendChild(b.node),b.canvas=this,b},jvm.AbstractShapeElement=function(a,b,c){this.style=c||{},this.style.current={},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setHovered=function(a){this.isHovered!==a&&(this.isHovered=a,this.updateStyle())},jvm.AbstractShapeElement.prototype.setSelected=function(a){this.isSelected!==a&&(this.isSelected=a,this.updateStyle(),jvm.$(this.node).trigger("selected",[a]))},jvm.AbstractShapeElement.prototype.setStyle=function(a,b){var c={};"object"==typeof a?c=a:c[a]=b,jvm.$.extend(this.style.current,c),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var a={};jvm.AbstractShapeElement.mergeStyles(a,this.style.initial),jvm.AbstractShapeElement.mergeStyles(a,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(a,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(a,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(a,this.style.selectedHover)),this.set(a)},jvm.AbstractShapeElement.mergeStyles=function(a,b){var c;b=b||{};for(c in b)null===b[c]?delete a[c]:a[c]=b[c]},jvm.SVGElement=function(){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(a){return document.createElementNS(jvm.SVGElement.svgns,a)},jvm.SLine truncated
|
||||
}},jvm.WorldMap.maps={},jvm.WorldMap.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8},selected:{fill:"yellow"},selectedHover:{}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2},selected:{fill:"blue"},selectedHover:{}}},jvm.WorldMap.apiEvents={onRegionLabelShow:"regionLabelShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerLabelShow:"markerLabelShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"},define("panels/map/lib/jquery.jvectormap.min",function(){}),define("panels/map/module",["angular","app","underscore","jquery","config","./lib/jquery.jvectormap.min"],function(a,b,c,d,e){var f=a.module("kibana.panels.map",[]);b.useModule(f),f.controller("map",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(b,d,f,g,h){b.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"Displays a map of shaded regions using a field containing a 2 letter country , or US state, code. Regions with more hit are shaded darker. Node that this does use the Elasticsearch terms facet, so it is important that you set it to the correct field."};var i={queries:{mode:"all",ids:[]},map:"world",colors:["#A0E2E2","#265656"],size:100,exclude:[],spyable:!0,index_limit:0};c.defaults(b.panel,i),b.init=function(){b.$on("refresh",function(){b.get_data()}),b.get_data()},b.get_data=function(){if(0!==g.indices.length){b.panelMeta.loading=!0;var a;a=b.ejs.Request().indices(g.indices),b.panel.queries.ids=f.idsByMode(b.panel.queries);var d=b.ejs.BoolQuery();c.each(b.panel.queries.ids,function(a){d=d.should(f.getEjsObj(a))}),a=a.facet(b.ejs.TermsFacet("map").field(b.panel.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);var e=a.doSearch();e.then(function(a){b.panelMeta.loading=!1,b.hits=a.hits.total,b.data={},c.each(a.facets.map.terms,function(a){b.data[a.term.toUpperCase()]=a.count}),b.$emit("render")})}},b.populate_modal=function(c){b.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+e.elasticsearch+"/"+g.indices+"/_search?pretty -d'\n"+a.toJson(JSON.parse(c.toString()),!0)+"'</pre>"}},b.build_search=function(a,b){h.set({type:"querystring",mandate:"must",query:a+":"+b}),g.refresh()}}]),f.directive("map",function(){return{restrict:"A",link:function(b,e){function f(){e.text(""),d(".jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label").remove(),require(["./panels/map/lib/map."+b.panel.map],function(){e.vectorMap({map:b.panel.map,regionStyle:{initial:{fill:"#8c8c8c"}},zoomOnScroll:!1,backgroundColor:null,series:{regions:[{values:b.data,scale:b.panel.colors,normalizeFunction:"polynomial"}]},onRegionLabelShow:function(a,d,f){e.children(".map-legend").show();var g=c.isUndefined(b.data[f])?0:b.data[f];e.children(".map-legend").text(d.text()+": "+g)},onRegionOut:function(){d(".map-legend").hide()},onRegionClick:function(a,d){var e=c.isUndefined(b.data[d])?0:b.data[d];0!==e&&b.build_search(b.panel.field,d)}}),e.prepend('<span class="map-legend"></span>'),d(".map-legend").hide()})}e.html('<center><img src="img/load_big.gif"></center>'),b.$on("render",function(){f()}),a.element(window).bind("resize",function(){f()})}}})});
|
||||
}},jvm.WorldMap.maps={},jvm.WorldMap.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8},selected:{fill:"yellow"},selectedHover:{}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2},selected:{fill:"blue"},selectedHover:{}}},jvm.WorldMap.apiEvents={onRegionLabelShow:"regionLabelShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerLabelShow:"markerLabelShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"},define("panels/map/lib/jquery.jvectormap.min",function(){}),define("panels/map/module",["angular","app","underscore","jquery","config","./lib/jquery.jvectormap.min"],function(a,b,c,d,e){var f=a.module("kibana.panels.map",[]);b.useModule(f),f.controller("map",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(b,d,f,g,h){b.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"Displays a map of shaded regions using a field containing a 2 letter country , or US state, code. Regions with more hit are shaded darker. Node that this does use the Elasticsearch terms facet, so it is important that you set it to the correct field."};var i={queries:{mode:"all",ids:[]},map:"world",colors:["#A0E2E2","#265656"],size:100,exclude:[],spyable:!0,index_limit:0};c.defaults(b.panel,i),b.init=function(){b.$on("refresh",function(){b.get_data()}),b.get_data()},b.get_data=function(){if(0!==g.indices.length){b.panelMeta.loading=!0;var a;a=b.ejs.Request().indices(g.indices),b.panel.queries.ids=f.idsByMode(b.panel.queries);var d=b.ejs.BoolQuery();c.each(b.panel.queries.ids,function(a){d=d.should(f.getEjsObj(a))}),a=a.facet(b.ejs.TermsFacet("map").field(b.panel.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);var e=a.doSearch();e.then(function(a){b.panelMeta.loading=!1,b.hits=a.hits.total,b.data={},c.each(a.facets.map.terms,function(a){b.data[a.term.toUpperCase()]=a.count}),b.$emit("render")})}},b.populate_modal=function(c){b.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+e.elasticsearch+"/"+g.indices+"/_search?pretty -d'\n"+a.toJson(JSON.parse(c.toString()),!0)+"'</pre>"}},b.build_search=function(a,b){h.set({type:"querystring",mandate:"must",query:a+":"+b}),g.refresh()}}]),f.directive("map",function(){return{restrict:"A",link:function(b,e){function f(){e.text(""),d(".jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label").remove(),require(["./panels/map/lib/map."+b.panel.map],function(){e.vectorMap({map:b.panel.map,regionStyle:{initial:{fill:"#8c8c8c"}},zoomOnScroll:!1,backgroundColor:null,series:{regions:[{values:b.data,scale:b.panel.colors,normalizeFunction:"polynomial"}]},onRegionLabelShow:function(a,d,f){e.children(".map-legend").show();var g=c.isUndefined(b.data[f])?0:b.data[f];e.children(".map-legend").text(d.text()+": "+g)},onRegionOut:function(){d(".map-legend").hide()},onRegionClick:function(a,d){var e=c.isUndefined(b.data[d])?0:b.data[d];0!==e&&b.build_search(b.panel.field,d)}}),e.prepend('<span class="map-legend"></span>'),d(".map-legend").hide()})}e.html('<center><img src="img/load_big.gif"></center>'),b.$on("render",function(){f()}),a.element(window).bind("resize",function(){f()})}}})});
|
||||
Vendored
+2
-2
@@ -15,11 +15,12 @@ vendor/angular/angular-strap.js
|
||||
app/components/extend-jquery.js
|
||||
app/components/settings.js
|
||||
app/services/alertSrv.js
|
||||
app/components/kbn.js
|
||||
vendor/moment.js
|
||||
vendor/modernizr-2.6.1.js
|
||||
app/services/dashboard.js
|
||||
app/services/fields.js
|
||||
app/services/filterSrv.js
|
||||
vendor/moment.js
|
||||
app/services/kbnIndex.js
|
||||
app/services/querySrv.js
|
||||
app/services/timer.js
|
||||
@@ -34,7 +35,6 @@ app/directives/dashUpload.js
|
||||
app/directives/kibanaPanel.js
|
||||
app/directives/ngBlur.js
|
||||
app/directives/ngModelOnBlur.js
|
||||
app/components/kbn.js
|
||||
app/directives/tip.js
|
||||
app/directives/all.js
|
||||
app/filters/all.js
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
define([
|
||||
'angular',
|
||||
'jquery',
|
||||
'kbn',
|
||||
'underscore',
|
||||
'config',
|
||||
'moment',
|
||||
'modernizr'
|
||||
],
|
||||
function (angular, _, config, Modernizr) {
|
||||
function (angular, $, kbn, _, config, moment, Modernizr) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('kibana.services');
|
||||
@@ -280,12 +283,12 @@ function (angular, _, config, Modernizr) {
|
||||
|
||||
this.script_load = function(file) {
|
||||
return $http({
|
||||
url: "dashboards/"+file,
|
||||
url: "app/dashboards/"+file,
|
||||
method: "GET",
|
||||
transformResponse: function(response) {
|
||||
/*jshint -W054 */
|
||||
var _f = new Function("ARGS",response);
|
||||
return _f($routeParams);
|
||||
var _f = new Function('ARGS','kbn','_','moment','window','document','angular','require','define','$','jQuery',response);
|
||||
return _f($routeParams,kbn,_,moment);
|
||||
}
|
||||
}).then(function(result) {
|
||||
if(!result) {
|
||||
|
||||
Reference in new issue
Block a user