芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/hocabayucatan.gob.mx/media/plg_system_debug/widgets/sqlqueries/widget.min.js
!function(e){var t=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");PhpDebugBar.Widgets.SQLQueriesWidget=PhpDebugBar.Widget.extend({className:t("sqlqueries"),onFilterClick:function(a){e(a).toggleClass(t("excluded"));var s=[];this.$toolbar.find(t(".filter")+t(".excluded")).each((function(){s.push(this.rel)})),this.$list.$el.find("li[connection="+e(a).attr("rel")+"]").toggle(),this.set("exclude",s)},onFilterDupesClick:function(a){e(a).toggleClass(t("excluded"));var s=[];this.$toolbar.find(t(".filter")+t(".excluded")).each((function(){s.push(this.rel)})),this.$list.$el.find("li[dupeindex="+e(a).attr("rel")+"]").toggle(),this.set("exclude",s)},onCopyToClipboard:function(t){var a=e(t).parent("li").find("code").get(0);!function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNodeContents(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}!function(){try{document.execCommand("copy"),alert("Query copied to the clipboard")}catch(e){console.log("Oops, unable to copy")}}(),window.getSelection().removeAllRanges()}(a)},render:function(){this.$status=e("
").addClass(t("status")).appendTo(this.$el),this.$toolbar=e("
").addClass(t("toolbar")).appendTo(this.$el);var a=[],s=this;this.$list=new PhpDebugBar.Widgets.ListWidget({itemRenderer:function(n,i){var l,o,d;if(e("
").addClass(t("sql")).html(PhpDebugBar.Widgets.highlight(i.sql,"sql")).appendTo(n),i.duration_str&&e('
').addClass(t("duration")).text(i.duration_str).appendTo(n),i.memory_str&&e('
').addClass(t("memory")).text(i.memory_str).appendTo(n),void 0!==i.row_count&&e('
').addClass(t("row-count")).text(i.row_count).appendTo(n),void 0!==i.stmt_id&&i.stmt_id&&e('
').addClass(t("stmt-id")).text(i.stmt_id).appendTo(n),i.connection&&(e('
').addClass(t("database")).text(i.connection).appendTo(n),n.attr("connection",i.connection),-1==e.inArray(i.connection,a)&&(a.push(i.connection),e("
").addClass(t("filter")).text(i.connection).attr("rel",i.connection).on("click",(function(){s.onFilterClick(this)})).appendTo(s.$toolbar),a.length>1&&(s.$toolbar.show(),s.$list.$el.css("margin-bottom","20px")))),void 0===i.is_success||i.is_success||(n.addClass(t("error")),n.append(e("
").addClass(t("error")).text("["+i.error_code+"] "+i.error_message))),i.params&&!e.isEmptyObject(i.params))var r=e('
').text("Params").addClass(t("eye")).css("cursor","pointer").on("click",(function(){l&&l.is(":visible")?(l.hide(),r.addClass(t("eye")),r.removeClass(t("eye-dash"))):(!function(){if(l)l.show();else{var a;for(var s in(l=e("
").addClass(t("params")).appendTo(n)).append('
Query Parameters
'),l.append("
ID
Value
Data Type
"),i.params)a=i.params[s],l.append("
"+s+"
"+a.value+"
"+a.dataType+"
");l.show()}}(),r.addClass(t("eye-dash")),r.removeClass(t("eye")))})).appendTo(n);if(i.explain&&!e.isEmptyObject(i.explain))var p=e('
').text("Explain").addClass(t("eye")).css("cursor","pointer").on("click",(function(){o&&o.is(":visible")?(o.hide(),p.addClass(t("eye")),p.removeClass(t("eye-dash"))):(!function(){if(o)o.show();else{var a,s,l;for(a in(o=e("
").addClass(t("explain")).appendTo(n)).append("
"+i.explain_col.join("
")+"
"),i.explain)l=[],s=i.explain[a],i.explain_col.forEach((function(e){l.push(s[e])})),o.append("
"+l.join("
")+"
");o.show()}}(),p.addClass(t("eye-dash")),p.removeClass(t("eye")))})).appendTo(n);if(i.callstack&&!e.isEmptyObject(i.callstack))var c=e('
').text("Stack").addClass(t("eye")).css("cursor","pointer").on("click",(function(){d&&d.is(":visible")?(d.hide(),c.addClass(t("eye")),c.removeClass(t("eye-dash"))):(!function(){if(d)d.show();else{var a,l,o,r,p;for(a in d=e('
Call Stack
').addClass(t("callstack")).appendTo(n),i.callstack)o=(l=i.callstack[a])[3]?l[3].replace(s.root_path,"")+":"+l[4]:"",r=l[2].replace(s.root_path,""),p=l[1]?"caller":"",o&&s.xdebug_link&&(o='
'+o+"
"),d.append('
'+l[0]+"
"+r+"
"+o+"
");d.show()}}(),c.addClass(t("eye-dash")),c.removeClass(t("eye")))})).appendTo(n);if(void 0!==i.caller&&i.caller){var u=i.caller.replace(s.root_path,"");if(s.xdebug_link){var h=i.caller.split(":");e("
").text(u).addClass(t("editor-link")).attr("href",s.xdebug_link.replace("%f",h[0]).replace("%l",h[1])).appendTo(n)}else e('
').text(u).addClass(t("stmt-id")).appendTo(n)}e('
').text("Copy").addClass(t("copy-clipboard")).css("cursor","pointer").on("click",(function(e){s.onCopyToClipboard(this),e.stopPropagation()})).appendTo(n),n.attr("dupeindex","dupe-0")}}),this.$list.$el.appendTo(this.$el),this.bindAttr("data",(function(a){if(a.length<=0)return!1;this.root_path=a.root_path,this.xdebug_link=a.xdebug_link,this.$list.set("data",a.statements),this.$status.empty();for(var n={},i=0,l=0,o=0;o
1){l+=n[d].keys.length,r++;for(o=0;o
").addClass(t("filter")).text(o?"Duplicates "+o:"Uniques").attr("rel","dupe-"+o).on("click",(function(){s.onFilterDupesClick(this)})).appendTo(s.$toolbar);s.$toolbar.show(),s.$list.$el.css("margin-bottom","20px")}var p=e("
").text(a.nb_statements+" statements were executed").appendTo(this.$status);a.nb_failed_statements&&p.append(", "+a.nb_failed_statements+" of which failed"),l&&(p.append(", "+l+" of which were duplicates"),p.append(", "+i+" unique")),a.accumulated_duration_str&&this.$status.append(e('
').addClass(t("duration")).text(a.accumulated_duration_str)),a.memory_usage_str&&this.$status.append(e('
').addClass(t("memory")).text(a.memory_usage_str))}))}})}(PhpDebugBar.$);