"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[1519],{399123:(e,t,l)=>{l.r(t),l.d(t,{default:()=>g});var i=l(296540),n=l(469733),r=l(963070),a=l(67753),d=l(459449),c=l(845030),o=l(582724),m=l(14704),s=l(592510),E=l(413357),_=l(294303),A=l(460654),N=l(398300),h=l(834959),C=l(566723),O=l(596441),p=l(395646),w=l(325898),b=l(927099),u=l(38937),D=l(413146),M=l(6176),I=l(989512);const L=({model:e,name:t,mac:l,withName:n=!1,width:r=25,height:a=25,...d})=>n?i.createElement(I.A,{device:{model:e,name:t||"",mac:l},width:r,height:a,...d}):i.createElement(M.A,{width:r,height:a,model:e});var y,W=l(396660),P=l(11001),f=l(628291);!function(e){e.NAME="clinet_name",e.DATE="report_timestamp",e.WIFI_EXPERIENCE="client_wifi_experience",e.AP_MODEL="device_model",e.SSID="wlan_essid",e.CHANNEL="wlan_channel_width",e.DOWNLOAD="download",e.UPLOAD="upload"}(y||(y={}));const S={[y.NAME]:"COMMON_CLIENT",[y.DATE]:"COMMON_DATE",[y.WIFI_EXPERIENCE]:"COMMON_EXPERIENCE",[y.AP_MODEL]:"COMMON_CONNECTED_TO",[y.SSID]:"COMMON_WIFI_NAME",[y.CHANNEL]:"COMMON_CHANNEL",[y.DOWNLOAD]:"COMMON_DOWNLOAD",[y.UPLOAD]:"COMMON_UPLOAD"},H=({client_wifi_experience:e})=>i.createElement(b.A,{size:"body",style:{color:(0,f.L)(e,(0,w.A)().motif)}},i.createElement(d.sA,{id:(0,u.gd)(e)})),T=[{id:y.NAME,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.NAME]}),renderCell:({client_name:e,client_model:t,client_mac:l})=>i.createElement(b.A,{color:"inherit",size:"body"},e||t||l||i.createElement(d.sA,{id:"COMMON_FALLBACK"})),compare:(0,W.l0)(({client_name:e,client_model:t,client_mac:l})=>e||t||l)},{id:y.DATE,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.DATE]}),renderCell:({report_timestamp:e})=>i.createElement(b.A,{color:"inherit",size:"body"},i.createElement(D.A,{date:new Date(1e3*e)})),compare:(0,W.l0)(({report_timestamp:e})=>e)},{id:y.WIFI_EXPERIENCE,sortable:!0,label:i.createElement(d.sA,{id:S[y.WIFI_EXPERIENCE]}),minWidth:120,renderCell:({client_wifi_experience:e})=>i.createElement(H,{client_wifi_experience:e}),compare:(0,W.l0)(({client_wifi_experience:e})=>e)},{id:y.AP_MODEL,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.AP_MODEL]}),renderCell:({device_model:e})=>i.createElement(b.A,{size:"body",color:"inherit"},i.createElement(L,{model:e,withName:!0,width:20,height:20})),compare:(0,W.l0)(({device_model:e})=>e)},{id:y.SSID,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.SSID]}),renderCell:({wlan_essid:e})=>i.createElement(b.A,{size:"body",color:"inherit"},e),compare:(0,W.l0)(({wlan_essid:e})=>e)},{id:y.CHANNEL,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.CHANNEL]}),renderCell:({wlan_channel_width:e,wlan_channel:t})=>t?i.createElement(b.A,{size:"body",color:"inherit"},t,e?i.createElement(b.A,{size:"body",color:"inherit"}," (",e," ",i.createElement(d.sA,{id:"COMMON_UNIT_MHZ"}),")"):null):null,compare:(0,W.l0)(({wlan_channel:e=0,wlan_channel_width:t=0})=>e+t)},{id:y.DOWNLOAD,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.DOWNLOAD]}),renderCell:({speed_tests:e=[]})=>i.createElement(P.A,{bytesPerSecond:e.reduce((e,{download_speed_bytes:t=0})=>e+t,0),direction:"down",size:"medium",hideIcon:!0}),compare:(0,W.l0)(({speed_tests:e})=>e.reduce((e,{download_speed_bytes:t})=>e+t,0))},{id:y.UPLOAD,sortable:!0,minWidth:120,label:i.createElement(d.sA,{id:S[y.UPLOAD]}),renderCell:({speed_tests:e=[]})=>i.createElement(P.A,{bytesPerSecond:e.reduce((e,{upload_speed_bytes:t=0})=>e+t,0),direction:"up",size:"medium",hideIcon:!0}),compare:(0,W.l0)(({speed_tests:e=[]})=>e.reduce((e,{upload_speed_bytes:t})=>e+t,0))}],g=()=>{const e=(0,n.useDispatch)(),t=(0,n.useSelector)(p.R),l=(0,i.useCallback)(({client_mac:t})=>{e((0,c.XP)({type:N.H.CLIENT,id:t}))},[e]);return(0,o.A)([(0,m.y)(void 0,{crudCacheStrategy:{type:s.e.CACHE}}),(0,E.Zi)(h.B.WIFI_MAN)],t.length?i.createElement(_.A,{flexDirection:"column",gap:C.kc,padding:`${C.Ln} ${C.Ln} 0 ${C.Ln}`},i.createElement(a.A,{variant:"medium"},i.createElement(d.sA,{id:"INS_ST"})),i.createElement(_.A,{flexDirection:"column",overflowX:"auto",flex:1},i.createElement(r.A,{idField:"id",items:t,columns:T,onRowClick:l,initialSortBy:"report_timestamp",initiallySortAscending:!1,truncateHeaderCells:!0,rowHeight:O.I.ROW_HEIGHT,disableColumnFilters:!0,headerRowClassName:A.X}))):null)}}}]);