(this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[10],{507:function(t,e){var n;(n=jQuery).fn.extend({tableExport:function(t){function e(t){var e=[];return n(t).find("thead").first().find("th").each((function(t,o){void 0!==n(o).attr("data-field")?e[t]=n(o).attr("data-field"):e[t]=t.toString()})),e}function o(t,e,o,i,a){if(-1==n.inArray(o,b.ignoreRow)&&-1==n.inArray(o-i,b.ignoreRow)){var l=n(t).filter((function(){return"none"!=n(this).data("tableexport-display")&&(n(this).is(":visible")||"always"==n(this).data("tableexport-display")||"always"==n(this).closest("table").data("tableexport-display"))})).find(e),r=0;if(l.each((function(t){if("always"==n(this).data("tableexport-display")||"none"!=n(this).css("display")&&"hidden"!=n(this).css("visibility")&&"none"!=n(this).data("tableexport-display")){var e=t,i=!1;if(0e&&"undefined"!=typeof k[e]&&-1!=n.inArray(k[e],b.ignoreColumn)&&(i=!0):"number"!=typeof b.ignoreColumn[0]||-1==n.inArray(e,b.ignoreColumn)&&-1==n.inArray(e-l.length,b.ignoreColumn)||(i=!0)),!1===i&&"function"===typeof a){i=0;var s,d=0;if("undefined"!=typeof A[o]&&0a&&(d=Math.min(t.width,this.width),y=this.height*d/this.width),y/gi,"\u2060");if(t=n("
").html(s).contents(),s="",n.each(t.text().split("\u2028"),(function(t,e){0t?"-":"")+(b.numbers.output.thousandsSeparator?(h?d[0].substr(0,h)+b.numbers.output.thousandsSeparator:"")+d[0].substr(h).replace(/(\d{3})(?=\d)/g,"$1"+b.numbers.output.thousandsSeparator):d[0])+(d[1].length?b.numbers.output.decimalMark+d[1]:"")}}!0===b.escape&&(i=escape(i)),"function"===typeof b.onCellData&&(i=b.onCellData(l,e,o,i))}return i}function d(t,e,n){return e+"-"+n.toLowerCase()}function h(t,e){var n=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(t),o=e;return n&&(o=[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]),o}function f(t){var e=c(t,"text-align"),o=c(t,"font-weight"),i=c(t,"font-style"),a="";return"start"==e&&(e="rtl"==c(t,"direction")?"right":"left"),700<=o&&(a="bold"),"italic"==i&&(a+=i),""===a&&(a="normal"),e={style:{align:e,bcolor:h(c(t,"background-color"),[255,255,255]),color:h(c(t,"color"),[0,0,0]),fstyle:a},colspan:parseInt(n(t).attr("colspan"))||0,rowspan:parseInt(n(t).attr("rowspan"))||0},null!==t&&(t=t.getBoundingClientRect(),e.rect={width:t.width,height:t.height}),e}function c(t,e){try{return window.getComputedStyle?(e=e.replace(/([a-z])([A-Z])/,d),window.getComputedStyle(t,null).getPropertyValue(e)):t.currentStyle?t.currentStyle[e]:t.style[e]}catch(n){}return""}function u(t,e,n){if(null!==(e=c(t,e).match(/\d+/))){e=e[0],t=t.parentElement;var o=document.createElement("div");return o.style.overflow="hidden",o.style.visibility="hidden",t.appendChild(o),o.style.width=100+n,n=100/o.offsetWidth,t.removeChild(o),e*n}return 0}function p(t){var e,n,o=0;if(0===t.length)return o;for(e=0,n=t.length;e(i=t.charCodeAt(o))?n+=String.fromCharCode(i):(127i?n+=String.fromCharCode(i>>6|192):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128)),n+=String.fromCharCode(63&i|128));for(t=n;s>2,e=(3&e)<<4|(n=t.charCodeAt(s++))>>4,a=(15&n)<<2|(o=t.charCodeAt(s++))>>6,l=63&o,isNaN(n)?a=l=64:isNaN(o)&&(l=64),r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l);return r}var m,b={consoleLog:!1,csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,excelstyles:[],fileName:"tableExport",htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"left",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"center"},alternateRowStyles:{fillColor:245},tableExport:{onAfterAutotable:null,onBeforeAutotable:null,onTable:null,outputImages:!0}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,outputMode:"file",pdfmake:{enabled:!1},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"myTableName",type:"csv",worksheetName:"xlsWorksheetName"},w=this,v=null,x=[],S=[],C=0,A=[],N="",k=[];if(n.extend(!0,b,t),k=e(w),"csv"==b.type||"tsv"==b.type||"txt"==b.type){var E="",j=(C=0,function(t,e,i){return t.each((function(){N="",o(this,e,C,i+t.length,(function(t,e,n){var o=N,i="";null!==t&&(e=null===(t=s(t,e,n))||""===t?"":t.toString(),"tsv"==b.type?(t instanceof Date&&t.toLocaleString(),i=r(e,"\t"," ")):t instanceof Date?i=b.csvEnclosure+t.toLocaleString()+b.csvEnclosure:(0<=(i=r(e,b.csvEnclosure,b.csvEnclosure+b.csvEnclosure)).indexOf(b.csvSeparator)||/[\r\n ]/g.test(i))&&(i=b.csvEnclosure+i+b.csvEnclosure)),N=o+(i+("tsv"==b.type?"\t":b.csvSeparator))})),0<(N=n.trim(N).substring(0,N.length-1)).length&&(0')+"";(x=n(w).find("thead").first().find(b.theadSelector)).each((function(){o(this,"th,td",C,x.length,(function(t,e,n){T+=""+s(t,e,n)+""})),C++})),T+="";var B=1;if(n(w).find("tbody").each((function(){S.push.apply(S,n(this).find(b.tbodySelector))})),b.tfootSelector.length&&S.push.apply(S,n(w).find("tfoot").find(b.tfootSelector)),n(S).each((function(){var t=1;N="",o(this,"td,th",C,x.length+S.length,(function(e,n,o){N+=""+s(e,n,o)+"",t++})),0"!=N&&(T+=''+N+"",B++),C++})),T+="",!0===b.consoleLog&&console.log(T),"string"===b.outputMode)return T;if("base64"===b.outputMode)return g(T);try{m=new Blob([T],{type:"application/xml;charset=utf-8"}),saveAs(m,b.fileName+".xml")}catch(V){y(b.fileName+".xml","data:application/xml;charset=utf-8;base64,",T)}}else if("excel"==b.type||"xls"==b.type||"word"==b.type||"doc"==b.type){var P="excel"==(t="excel"==b.type||"xls"==b.type?"excel":"word")?"xls":"doc",R='xmlns:x="urn:schemas-microsoft-com:office:'+t+'"',I="";if(n(w).filter((function(){return"none"!=n(this).data("tableexport-display")&&(n(this).is(":visible")||"always"==n(this).data("tableexport-display"))})).each((function(){var t=n(this);C=0,k=e(this),I+="",(x=t.find("thead").first().find(b.theadSelector)).each((function(){N="",o(this,"th,td",C,x.length,(function(t,e,o){if(null!==t){var i="";for(var a in N+=""}})),0"+N+""),C++})),I+="",t.find("tbody").each((function(){S.push.apply(S,n(this).find(b.tbodySelector))})),b.tfootSelector.length&&S.push.apply(S,t.find("tfoot").find(b.tfootSelector)),n(S).each((function(){var t=n(this);N="",o(this,"td,th",C,x.length+S.length,(function(e,o,i){if(null!==e){var a="",l=n(e).data("tableexport-msonumberformat");for(var r in"undefined"==typeof l&&"function"===typeof b.onMsoNumberFormat&&(l=b.onMsoNumberFormat(e,o,i)),"undefined"!=typeof l&&""!==l&&(a="style=\"mso-number-format:'"+l+"'"),b.excelstyles)b.excelstyles.hasOwnProperty(r)&&(""===(l=n(e).css(b.excelstyles[r]))&&(l=t.css(b.excelstyles[r])),""!==l&&"0px none rgb(0, 0, 0)"!=l&&"rgba(0, 0, 0, 0)"!=l&&(a+=""===a?'style="':";",a+=b.excelstyles[r]+":"+l));N+="")+""}})),0"+N+""),C++})),b.displayTableName&&(I+=""),I+="
"+s(n("

"+b.tableName+"

"))+"
",!0===b.consoleLog&&console.log(I)})),R='',"excel"===t&&(R+="\x3c!--[if gte mso 9]>",R+="",R+="",R+="",R+="",R+="",R+=b.worksheetName,R+="",R+="",R+="",R+="",R+="",R+="",R+="",R+="",R+="br {mso-data-placement:same-cell;}",R+="",R+="",R+=I,R+="",R+="",!0===b.consoleLog&&console.log(R),"string"===b.outputMode)return R;if("base64"===b.outputMode)return g(R);try{m=new Blob([R],{type:"application/vnd.ms-"+b.type}),saveAs(m,b.fileName+"."+P)}catch(V){y(b.fileName+"."+P,"data:application/vnd.ms-"+t+";base64,",R)}}else if("xlsx"==b.type){var U=[],H=[];C=0,S=n(w).find("thead").first().find(b.theadSelector),n(w).find("tbody").each((function(){S.push.apply(S,n(this).find(b.tbodySelector))})),b.tfootSelector.length&&S.push.apply(S,n(w).find("tfoot").find(b.tfootSelector)),n(S).each((function(){var t=[];o(this,"th,td",C,S.length,(function(e,n,o){if("undefined"!==typeof e&&null!==e){var i=parseInt(e.getAttribute("colspan")),a=parseInt(e.getAttribute("rowspan"));if(""!==(e=s(e,n,o))&&e==+e&&(e=+e),H.forEach((function(e){if(C>=e.s.r&&C<=e.e.r&&t.length>=e.s.c&&t.length<=e.e.c)for(var n=0;n<=e.e.c-e.s.c;++n)t.push(null)})),(a||i)&&(i=i||1,H.push({s:{r:C,c:t.length},e:{r:C+(a||1)-1,c:t.length+i-1}})),t.push(""!==e?e:null),i)for(a=0;ao&&(n.s.r=o),n.s.c>i&&(n.s.c=i),n.e.rn.s.c&&(e["!ref"]=XLSX.utils.encode_range(n)),e}(U))["!merges"]=H,t.SheetNames.push(b.worksheetName),t.Sheets[b.worksheetName]=P,t=XLSX.write(t,{bookType:b.type,bookSST:!1,type:"binary"});try{m=new Blob([function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),o=0;o!=t.length;++o)n[o]=255&t.charCodeAt(o);return e}(t)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8"}),saveAs(m,b.fileName+"."+b.type)}catch(V){y(b.fileName+"."+b.type,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8",U)}}else if("png"==b.type)html2canvas(n(w)[0]).then((function(t){t=t.toDataURL();for(var e=atob(t.substring(22)),n=new ArrayBuffer(e.length),o=new Uint8Array(n),i=0;iQ){for(var e in t>z.a0[0]&&(q="a0",J="l"),z)z.hasOwnProperty(e)&&z[e][1]>t&&(q=e,J="l",z[e][0]>t&&(J="p"));Q=t}}})),b.jspdf.format=""===q?"a4":q,b.jspdf.orientation=""===J?"w":J}X.doc=new jsPDF(b.jspdf.orientation,b.jspdf.unit,b.jspdf.format),!0===X.outputImages&&(X.images={}),"undefined"!=typeof X.images&&(n(w).filter((function(){return"none"!=n(this).data("tableexport-display")&&(n(this).is(":visible")||"always"==n(this).data("tableexport-display"))})).each((function(){var t=0;x=n(this).find("thead").find(b.theadSelector),n(this).find("tbody").each((function(){S.push.apply(S,n(this).find(b.tbodySelector))})),b.tfootSelector.length&&S.push.apply(S,n(this).find("tfoot").find(b.tfootSelector)),n(S).each((function(){o(this,"td,th",x.length+t,x.length+S.length,(function(t,e,o){"undefined"!==typeof t&&null!==t&&"undefined"!=typeof(e=n(t).children())&&0t.styles.rowHeight&&(t.styles.rowHeight=o)),"undefined"!=typeof i.style&&!0!==i.style.hidden&&(t.styles.halign=i.style.align,"inherit"===r.styles.fillColor&&(t.styles.fillColor=i.style.bcolor),"inherit"===r.styles.textColor&&(t.styles.textColor=i.style.color),"inherit"===r.styles.fontStyle&&(t.styles.fontStyle=i.style.fstyle))}}),"function"!==typeof r.createdCell&&(r.createdCell=function(t,e){var n=X.rowoptions[e.row.index+":"+e.column.dataKey];"undefined"!=typeof n&&"undefined"!=typeof n.style&&!0!==n.style.hidden&&(t.styles.halign=n.style.align,"inherit"===r.styles.fillColor&&(t.styles.fillColor=n.style.bcolor),"inherit"===r.styles.textColor&&(t.styles.textColor=n.style.color),"inherit"===r.styles.fontStyle&&(t.styles.fontStyle=n.style.fstyle))}),"function"!==typeof r.drawHeaderCell&&(r.drawHeaderCell=function(t,e){var n=X.columns[e.column.dataKey];return(!0!==n.style.hasOwnProperty("hidden")||!0!==n.style.hidden)&&0<=n.rowIndex&&a(t,e,n)}),"function"!==typeof r.drawCell&&(r.drawCell=function(t,e){var n=X.rowoptions[e.row.index+":"+e.column.dataKey];if(a(t,e,n)){if(X.doc.rect(t.x,t.y,t.width,t.height,t.styles.fillStyle),"undefined"!=typeof n&&"undefined"!=typeof n.kids&&0X.dh||"undefined"==typeof X.dh)&&(X.dh=o),X.dw=t.width/n.rect.width,l(t,n.kids,X)}X.doc.autoTableText(t.text,t.textPos.x,t.textPos.y,{halign:t.styles.halign,valign:t.styles.valign})}return!1}),X.headerrows=[],(x=n(this).find("thead").find(b.theadSelector)).each((function(){t=0,X.headerrows[i]=[],o(this,"th,td",i,x.length,(function(e,n,o){var a=f(e);a.title=s(e,n,o),a.key=t++,a.rowIndex=i,X.headerrows[i].push(a)})),i++})),0