import{m as d,u as n,n as c}from"./index-009d300e.js";const l={props:{node:{type:[Object]},title:{type:[String]}},data(){return{hideNoDataStats:!1,defaultColor:this.$vuetify.theme.themes.light.primary}},computed:{...d(n,["nodes"]),total(){return this.nodes.reduce((e,t)=>{if(!t.statistics)return e;for(const s in e)e[s]+=t.statistics[s]||0;return e},{commandsTX:0,commandsRX:0,commandsDroppedTX:0,commandsDroppedRX:0})},stats(){return this.node.isControllerNode?{...this.node.statistics,commandsTX:this.total.commandsTX,commandsRX:this.total.commandsRX,commandsDroppedTX:this.total.commandsDroppedTX,commandsDroppedRX:this.total.commandsDroppedRX}:this.node.statistics},props(){const e={communication:{divider:!0,stats:{...this.createStat("CAN","CAN"),...this.createStat("NAK","NAK","red"),...this.createStat("timeoutACK","Timeout ACK","red"),...this.createStat("timeoutResponse","Timeout Response","red"),...this.createStat("timeoutCallback","Timeout Callback","red")},cols:6,statCols:4},[this.node.isControllerNode?"total Commands":"commands"]:{divider:this.node.isControllerNode,stats:{...this.createStat("commandsTX","TX"),...this.createStat("commandsRX","RX"),...this.createStat("commandsDroppedTX","Dropped TX","red"),...this.createStat("commandsDroppedRX","Dropped RX","red")},cols:3,statCols:6}};return this.node.isControllerNode&&(e.messages={divider:!1,stats:{...this.createStat("messagesTX","TX"),...this.createStat("messagesRX","RX"),...this.createStat("messagesDroppedTX","Dropped TX","red"),...this.createStat("messagesDroppedRX","Dropped RX","red")},cols:3,statCols:6}),e}},methods:{createStat(e,t,s=this.defaultColor){return{[`${e}`]:{title:t,value:this.stats[e],color:this.stats[e]?s:"grey"}}}}};var m=function(){var t=this,s=t._self._c;return t.node?s("v-row",{staticClass:"pa-4"},[t._l(t.props,function(o,a){return[s("v-col",{key:`section-content-${a}`,attrs:{cols:"12",sm:o.cols}},[s("div",[s("h1",{staticClass:"text-caption text-uppercase grey--text mb-2"},[t._v(" "+t._s(a)+" ")]),s("v-row",{attrs:{dense:""}},t._l(o.stats,function(r,i){return s("v-col",{key:`controller-stat-${i}`,staticClass:"pa-1",style:{color:r.color},attrs:{cols:o.statCols}},[s("h2",{staticClass:"text-caption"},[t._v(" "+t._s(r.title)+" ")]),s("div",{staticClass:"text-caption font-weight-bold"},[t._v(" "+t._s(r.value||"-")+" ")])])}),1)],1)]),o.divider?s("v-divider",{key:`section-divider-${a}`,staticClass:"my-4",attrs:{vertical:t.$vuetify.breakpoint.smAndUp}}):t._e()]})],2):t._e()},p=[],h=c(l,m,p,!1,null,null,null,null);const X=h.exports;export{X as default};
