Files
DirectAdmin-1.62.4/directadmin-1.62.4/data/skins/evolution/assets/pages/81.js
tuend-work 0b28a76e20 ud
2025-11-12 23:24:15 +07:00

1 line
10 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{1340:function(t,e,a){"use strict";a.r(e);var n=a(3034),r=a(1849);for(var o in r)"default"!==o&&function(t){a.d(e,t,(function(){return r[t]}))}(o);var s=a(0),i=a(2661),l=a.n(i),u=Object(s.a)(r.default,n.a,n.b,!1,null,null,null);"function"==typeof l.a&&l()(u),e.default=u.exports},1500:function(t,e,a){"use strict";a.r(e);var n=a(1501),r=a.n(n);for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e.default=r.a},1501:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(1532),r={extends:n.Line,mixins:[n.mixins.reactiveProp],props:["chart","options"],mounted:function(){this.renderChart(this.chartData,this.options)}};e.default=r},1849:function(t,e,a){"use strict";a.r(e);var n=a(1850),r=a.n(n);for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e.default=r.a},1850:function(t,e,a){"use strict";var n=a(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(2)),o=n(a(1851)),s=n(a(1852));function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function l(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach((function(e){(0,r.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var u={preload:o.default,api:[{command:o.default,bind:"breakdown"}],components:{LineChart:s.default},data:function(){return{showAs:"table"}},props:{year:{type:String,required:!0},month:{type:String,required:!1,default:String((new Date).getMonth()+1)},user:{type:String,required:!1}},computed:{entries:function(){return this.$api.breakdown.rows},total:function(){return this.$api.breakdown.total},columns:function(){return[{id:"day",label:this.$gettext("Day")},{id:"http",label:this.$gettext("Apache")},{id:"email",label:this.$gettext("E-mails (Incoming / Outgoing)")},{id:"ftp",label:this.$gettext("FTP")},{id:"pop",label:this.$gettext("POP")},{id:"imap",label:this.$gettext("IMAP")},{id:"da",label:this.$gettext("Direct Admin")},{id:"other",label:this.$gettext("Other")},{id:"total",label:this.$gettext("Total")}]},chartData:function(){return{labels:this.entries.map((function(t){return t.day})),datasets:[l({label:this.$gettext("Total")},this.datasetOptions("rgba(255, 99, 132, 1)"),{},this.datasetData("total")),l({label:this.$gettext("Apache")},this.datasetOptions("rgba(1, 147, 202, 1)"),{},this.datasetData("http")),l({label:this.$gettext("E-mails")},this.datasetOptions("rgba(228, 91, 0, 1)"),{},this.datasetData("email")),l({label:this.$gettext("FTP")},this.datasetOptions("rgba(93, 195, 127, 1)"),{},this.datasetData("ftp")),l({label:this.$gettext("POP")},this.datasetOptions("rgba(52, 56, 60, 1)"),{},this.datasetData("pop")),l({label:this.$gettext("IMAP")},this.datasetOptions("rgba(0, 131, 180, 1)"),{},this.datasetData("imap")),l({label:this.$gettext("Direct Admin")},this.datasetOptions("rgba(198, 208, 218, 1)"),{},this.datasetData("da")),l({label:this.$gettext("Other")},this.datasetOptions("rgba(95, 111, 129, 1)"),{},this.datasetData("Other"))]}},chartOptions:function(){var t=this;return{scales:{yAxes:[{ticks:{callback:function(e){return t.getHumanReadableVolume(e)}}}]},tooltips:{enabled:!0,mode:"nearest",intersect:!1,xPadding:10,yPadding:10,titleFontFamily:"Open Sans",bodyFontFamily:"Open Sans",footerFontFamily:"Open Sans",footerFontSize:10,callbacks:{title:function(e){return"".concat(e[0].xLabel," ").concat(t.getMonthName(t.month)," ").concat(t.year)},label:function(e){var a=e.datasetIndex,n=e.yLabel,r=[t.$gettext("Total"),t.$gettext("Apache"),t.$gettext("E-mails"),t.$gettext("FTP"),t.$gettext("POP"),t.$gettext("IMAP"),t.$gettext("Direct Admin"),t.$gettext("Other")][a];return"".concat(r,": ").concat(t.getHumanReadableVolume(n))}}}}}},methods:{datasetOptions:function(t){return{backgroundColor:t.replace("1)","0.2)"),borderColor:t,pointBackgroundColor:t,borderWidth:2,pointRadius:2,pointHitRadius:20,fill:!1}},datasetData:function(t){return{data:this.entries.map((function(e){return e[t]}))}},getMonthName:function(t){return[this.$gettext("January"),this.$gettext("February"),this.$gettext("March"),this.$gettext("April"),this.$gettext("May"),this.$gettext("June"),this.$gettext("July"),this.$gettext("August"),this.$gettext("September"),this.$gettext("October"),this.$gettext("November"),this.$gettext("December")][parseInt(t,10)-1]},getHumanReadableVolume:function(t){return this.$options.filters.humanReadableSize(t)}}};e.default=u},1851:function(t,e,a){"use strict";var n=a(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a(30)),o=r.default.get({id:"BANDWIDTH_BREAKDOWN",url:"/CMD_BANDWIDTH_BREAKDOWN",response:[],schema:{month:r.default.OPTIONAL_STRING,year:r.default.OPTIONAL_STRING,user:r.default.OPTIONAL_STRING},before:function(t){var e=new Date,a=(e.getMonth()+1).toString(),n=e.getFullYear().toString();return t.month===a&&t.year===n?{user:t.user,month:null,year:null}:t},after:function(t){return t.flow(t.wrap("rows"),t.moveProp("rows.total","total"),t.mapProp("rows",t.flow(t.deleteProps(["simpletotal","month","year"]),t.toArray,t.mapArray(t.mapValues(t.convert.toAppNumber)))),t.mapProp("total",t.mapValues(t.convert.toAppNumber)))}});e.default=o},1852:function(t,e,a){"use strict";a.r(e);var n=a(1500);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);var o=a(0),s=Object(o.a)(n.default,void 0,void 0,!1,null,null,null);e.default=s.exports},2661:function(t,e){},3034:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("app-page",[a("translate",{attrs:{slot:"page:title","translate-params":{month:t.getMonthName(t.month),year:t.year,user:t.user}},slot:"page:title"},[t._v("\n Bandwidth Breakdown for %{user}: %{year} %{month}\n ")]),t._v(" "),a("app-page-section",{directives:[{name:"flex",rawName:"v-flex",value:{main:"between"},expression:"{ main: 'between' }"}],staticClass:"filters"},[a("div",{directives:[{name:"gutter",rawName:"v-gutter",value:[1,null],expression:"[1, null]"}]},[a("div",{directives:[{name:"flex",rawName:"v-flex",value:{cross:"center"},expression:"{ cross: 'center' }"},{name:"gutter",rawName:"v-gutter",value:[null,1],expression:"[null, 1]"}]},[a("translate",{attrs:{tag:"strong"}},[t._v("Show As: ")]),t._v(" "),a("input-check",{attrs:{type:"radio",value:"table"},model:{value:t.showAs,callback:function(e){t.showAs=e},expression:"showAs"}},[a("translate",[t._v("Table")])],1),t._v(" "),a("input-check",{attrs:{type:"radio",value:"chart"},model:{value:t.showAs,callback:function(e){t.showAs=e},expression:"showAs"}},[a("translate",[t._v("Chart")])],1)],1)])]),t._v(" "),a("transition",{attrs:{name:"fadeBounce"}},["table"===t.showAs?a("app-page-section",[a("ui-r-table",t._b({scopedSlots:t._u([{key:"col:http",fn:function(e){var a=e.http;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:email",fn:function(e){var a=e.email,n=e.email_count_incoming,r=e.email_count_outgoing;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ("+t._s(n)+" / "+t._s(r)+")\n ")]}},{key:"col:ftp",fn:function(e){var a=e.ftp;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:pop",fn:function(e){var a=e.pop;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:imap",fn:function(e){var a=e.imap;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:da",fn:function(e){var a=e.da;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:other",fn:function(e){var a=e.other;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}},{key:"col:total",fn:function(e){var a=e.total;return[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]}}],null,!1,2320554330)},"ui-r-table",{rows:t.entries,columns:t.columns,isCheckable:!1,isSortable:!0,disablePagination:!0,verticalLayout:t.$_Client.isPhone},!1),[t._v(" "),t._v(" "),t._v(" "),t._v(" "),t._v(" "),t._v(" "),t._v(" "),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:day"},slot:"col:after:day"},[a("translate",{staticClass:"txt:bold"},[t._v("Total")])],1),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:http"},slot:"col:after:http"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.http))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:email"},slot:"col:after:email"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.email))+"\n ("+t._s(t.total.email_count_incoming)+" / "+t._s(t.total.email_count_outgoing)+")\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:ftp"},slot:"col:after:ftp"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.ftp))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:pop"},slot:"col:after:pop"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.pop))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:imap"},slot:"col:after:imap"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.imap))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:da"},slot:"col:after:da"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.da))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:other"},slot:"col:after:other"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.other))+"\n ")]),t._v(" "),a("span",{staticClass:"txt:bold",attrs:{slot:"col:after:total"},slot:"col:after:total"},[t._v("\n "+t._s(t._f("humanReadableSize")(t.total.total))+"\n ")])])],1):a("app-page-section",[a("line-chart",t._b({},"line-chart",{chartData:t.chartData,options:t.chartOptions},!1))],1)],1)],1)},r=[];a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return r}))}}]);