"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[1540],{799329(e,t,n){n.d(t,{A:()=>l});var s=n(602086),i=n(141992);const l=(0,n(272338).w)(e=>(0,s.createElement)("svg",(0,i.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,s.createElement)("path",{d:"M6.5 4.5c0 1.649 1.09 3.03 2.651 4.642.31.32.849.097.849-.348V2.5a.48.48 0 0 0-.5-.487c-1.696.097-3 .724-3 2.487Zm9 2c-1.648 0-3.03 1.09-4.64 2.651a.495.495 0 0 0 .347.849H17.5a.48.48 0 0 0 .486-.5c-.096-1.696-.723-3-2.486-3Zm-11 7c1.648 0 3.03-1.09 4.64-2.651A.495.495 0 0 0 8.794 10H2.5a.48.48 0 0 0-.487.5c.097 1.696.724 3 2.487 3Zm6.349-2.64c1.56 1.611 2.651 2.993 2.651 4.641 0 1.763-1.304 2.39-3 2.487a.48.48 0 0 1-.5-.487v-6.293c0-.445.539-.668.849-.348Z",fill:"currentColor",className:e.twotonedclassname}),(0,s.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 4.5c0 1.649 1.09 3.03 2.651 4.642.31.32.849.097.849-.348V2.5a.48.48 0 0 0-.5-.487c-1.696.097-3 .724-3 2.487Zm1 0c0 .953.496 1.852 1.5 3.006V3.07c-.474.074-.82.205-1.05.372-.251.181-.45.462-.45 1.058Zm8 2c-1.648 0-3.03 1.09-4.64 2.651a.495.495 0 0 0 .347.849H17.5a.48.48 0 0 0 .486-.5c-.096-1.696-.723-3-2.486-3Zm0 1c-.952 0-1.851.496-3.005 1.5h4.435c-.074-.474-.205-.82-.372-1.05-.181-.251-.462-.45-1.058-.45Zm-11 6c1.648 0 3.03-1.09 4.64-2.651A.495.495 0 0 0 8.794 10H2.5a.48.48 0 0 0-.487.5c.097 1.696.724 3 2.487 3ZM3.07 11h4.435C6.35 12.004 5.452 12.5 4.5 12.5c-.596 0-.877-.199-1.058-.45-.167-.23-.298-.576-.372-1.05Zm7.779-.14c1.56 1.611 2.651 2.993 2.651 4.641 0 1.763-1.304 2.39-3 2.487a.48.48 0 0 1-.5-.487v-6.293c0-.445.539-.668.849-.348ZM11 12.496v4.435c.474-.075.82-.205 1.05-.372.251-.181.45-.462.45-1.058 0-.952-.496-1.851-1.5-3.005Z",fill:"currentColor",className:e.baseclassname}),(0,s.createElement)("path",{d:"M6.5 4.5c0 1.649 1.09 3.03 2.651 4.642.31.32.849.097.849-.348V2.5a.48.48 0 0 0-.5-.487c-1.696.097-3 .724-3 2.487Zm9 2c-1.648 0-3.03 1.09-4.64 2.651a.495.495 0 0 0 .347.849H17.5a.48.48 0 0 0 .486-.5c-.096-1.696-.723-3-2.486-3Zm-11 7c1.648 0 3.03-1.09 4.64-2.651A.495.495 0 0 0 8.794 10H2.5a.48.48 0 0 0-.487.5c.097 1.696.724 3 2.487 3Zm6.349-2.64c1.56 1.611 2.651 2.993 2.651 4.641 0 1.763-1.304 2.39-3 2.487a.48.48 0 0 1-.5-.487v-6.293c0-.445.539-.668.849-.348Z",fill:"currentColor",className:e.fillclassname})))},453007(e,t,n){n.d(t,{A:()=>a});var s=n(938984),i=n(247816),l=n(291508);const a=(0,i.A)(s.A,(0,l.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},109700(e,t,n){n.d(t,{A:()=>d});var s=n(274934),i=n(100978),l=n(535322),a=n(376892),r=n(597377),_=n(906701),o=n(924453);const d=({oob_info:{mac:e,v4_address:t,v6_addresses:n}={},type:d,uplink:c,device_mode_override:p})=>e||t||n?(0,s.jsx)(l.A,{type:l.I.ACCORDION,items:[{id:"oob-port-information",label:(0,s.jsx)(a.A,{id:"DEVICE_MANAGEMENT_PORT"}),renderContent:()=>(0,s.jsxs)(i.A,{height:"100%",flexDirection:"column",children:[t?(0,s.jsx)(r.A,{ip:t,lan_ip:t,type:d,uplink:c,device_mode_override:p}):null,e?(0,s.jsx)(o.A,{mac:e}):null,n?(0,s.jsx)(_.A,{ipv6_address:n}):null]}),openByDefault:!0}]}):null},241092(e,t,n){n.d(t,{A:()=>M});var s=n(274934),i=n(558948),l=n(309130),a=n(376892),r=n(100978),_=n(535322),o=n(125799),d=n(814557),c=n(938984),p=n(799329),A=n(600191),m=n(247816),x=n(291508),u=n(470070);var E,j=n(820510);!function(e){e.ORANGE="orange",e.RED="red"}(E||(E={}));const I=(e,t)=>(e.index||0)-(t.index||0),v=(0,m.A)(p.A)`
  color: ${({theme:e})=>d.Ay[`desktop-color-neutral-00-${e.themeName}`]};
`,N=(0,m.A)(A.A,(0,x.A)("color"))`
  color: ${({theme:e,color:t})=>d.Ay[`desktop-color-${t}-06-${e.themeName}`]};
`,h=(0,m.A)(r.A)`
  width: ${l.S2};
  height: ${l.S2};
  border-radius: 4px;
  background-color: ${({theme:e})=>d.Ay[`desktop-color-green-06-${e.themeName}`]};
`,C=(0,m.A)(h)`
  background-color: ${({theme:e})=>d.Ay[`desktop-color-neutral-03-${e.themeName}`]};
`,O=({fan:{index:e,speed:t}})=>(0,s.jsxs)(j.m,{children:[(0,s.jsx)(j.Y,{id:"DEVICE_FAN",children:e}),(0,s.jsx)(j.Y,{id:"DEVICE_LEVEL",children:t})]}),f=({fan:e})=>(0,s.jsx)(o.A,{description:(0,s.jsx)(O,{fan:e}),width:100,children:(0,s.jsx)(h,{justifyContent:"center",alignItems:"center",children:(0,s.jsx)(v,{})})}),D=({index:e,messageId:t,color:n=E.ORANGE})=>(0,s.jsx)(o.A,{description:(0,s.jsx)(u.sA,{id:t,values:{index:e}}),width:199,children:(0,s.jsx)(C,{justifyContent:"center",alignItems:"center",children:(0,s.jsx)(N,{color:n,size:"original",variant:"fill"})})}),g=({fan:e})=>{switch(!0){case!e.present:return(0,s.jsx)(D,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:E.RED});case!!(1&e.critical_state):return(0,s.jsx)(D,{index:e.index,messageId:"DEVICE_FAN_SPEED_TOO_HIGH"});case!!(2&e.critical_state):return(0,s.jsx)(D,{index:e.index,messageId:"DEVICE_FAN_STOPPED"});case!!(4&e.critical_state):return(0,s.jsx)(D,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:E.RED});default:return(0,s.jsx)(f,{fan:e})}},T=({fan:e})=>(0,s.jsxs)(r.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[(0,s.jsx)(g,{fan:e}),(0,s.jsx)(c.A,{size:"small",color:"text-3",children:e.present&&void 0!==e.speed?e.speed:(0,s.jsx)(u.sA,{id:"COMMON_FALLBACK"})})]}),y=({fan_table:e})=>(0,s.jsx)(r.A,{flexDirection:"row",justifyContent:"center",gap:l.S2,children:e.sort(I).map(e=>(0,s.jsx)(T,{fan:e},e.index))});var L=n(203071);const M=({psu_table:e=[],fan_table:t=[]})=>e.length>0?(0,s.jsx)(_.A,{type:_.I.ACCORDION,items:[{id:"powerSource",openByDefault:!0,label:(0,s.jsx)(a.A,{id:t.length?"DEVICE_HEADER_POWER_AND_FAN_UTILIZATION":"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>(0,s.jsxs)(r.A,{flexDirection:"column",gap:l.Ln,children:[(0,s.jsx)(L.A,{psuTable:e,marginBottom:0}),t.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{}),(0,s.jsx)(y,{fan_table:t})]}):null]})}]}):null},203071(e,t,n){n.d(t,{A:()=>f});var s=n(274934),i=n(602086),l=n(43009),a=n(125799),r=n(814557),_=n(367551),o=n(900302),d=n(938984),c=n(600191),p=n(247816),A=n(263705),m=n(662986),x=n(309130),u=n(100978),E=n(453007),j=n(470070),I=n(314229),v=n(820510);const N=(0,p.A)(u.A)`
  justify-content: space-between;
`,h=(0,p.A)(o.A)`
  margin: 0 6px;
  height: 10px;
`,C=(0,p.A)(c.A)`
  margin: 0 6px;
`,O=({index:e,item:t})=>(0,s.jsxs)(v.m,{children:[(0,s.jsx)(v.Y,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:""},children:e+1}),t.temp?Object.entries(t.temp).map(([e,t])=>(0,s.jsxs)(v.Y,{id:"DEVICE_TEMPERATURE_SENSOR",values:{index:+e+1},children:[t?.toFixed(1)||(0,s.jsx)(j.sA,{id:"COMMON_FALLBACK"})," ",(0,s.jsx)(j.sA,{id:"COMMON_UNIT_CELSIUS"})]},e)):null,t.fanSpeed?(0,s.jsxs)(v.Y,{id:"DEVICE_FAN_SPEED",children:[t.fanSpeed," ",(0,s.jsx)(j.sA,{id:"COMMON_UNIT_RPM"})]}):null]}),f=({psuTable:e=[],marginBottom:t})=>{const{themeName:n,motifPalette:o}=(0,A.u)(),{motif:c}=(0,l.A)(),{formatMessage:p}=(0,j.tz)(),v=(0,i.useMemo)(()=>e.map(({power:t,power_capacity:i,temp:l,fan:A,present:x,online:v,label:f},D)=>{const g=i||550,T=Math.ceil(Number.parseFloat(t)/g*100),y={variant:(0,I.NH)(T),value:T,temp:l,fanSpeed:A?.[0],online:v,present:x},L=e?.[D]?.power;return(0,s.jsxs)(u.A,{flexDirection:"column",children:[(0,s.jsxs)(N,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(j.sA,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:D+1}})}),(0,s.jsx)(u.A,{justifyContent:"space-between",alignItems:"center",children:y.present?(0,s.jsxs)(s.Fragment,{children:[y.online||y.value?null:(0,s.jsx)(a.A,{description:p({id:"DEVICE_USW_MC_PSU_OFFLINE_TOOLTIP"},{index:D+1}),portal:!0,children:(0,s.jsx)(C,{size:"original",variant:"fill",color:r.Ay[`desktop-color-orange-06-${n}`],fill:r.Ay[`desktop-color-neutral-00-${n}`]})}),y.online?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:(0,s.jsx)(j.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:`${Math.ceil(Number.parseFloat(L))}/${g}`}})}),(0,s.jsx)(h,{orientation:"vertical",color:r.Ay[`desktop-color-neutral-04-${n}`]}),(0,s.jsx)(E.A,{size:"medium",colorOverride:y.value?o[y.variant]:r.Ay[`desktop-color-text-3-${c}`],children:(0,m.A)(y.value)})]}):null]}):(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:(0,s.jsx)(j.sA,{id:"DEVICE_NOT_INSTALLED"})})})]}),(0,s.jsx)(a.A,{description:y.present?(0,s.jsx)(O,{index:D,item:y}):null,width:250,children:(0,s.jsx)(_.A,{items:[y],rounded:!0})})]},f)}),[e]);return(0,s.jsx)(u.A,{flexDirection:"column",marginBottom:t??x.kI,gap:x.kc,children:v})}},872926(e,t,n){n.d(t,{A:()=>p});var s=n(274934),i=n(977872),l=n(810024),a=n(589650),r=n(748094),_=n(470070),o=n(754924),d=n(726831);const c=({adopted:e})=>(0,s.jsx)(r.A,{link:d.A.virtualNetworkConnectivity,children:(0,s.jsx)(_.sA,{id:e?"DEVICE_FALLBACK_IP_ADOPTED_WITH_UNIFI_GATEWAY_WARNING":"DEVICE_FALLBACK_IP_NOT_ADOPTED_WARNING",values:{bold:(0,s.jsx)("strong",{children:(0,s.jsx)(_.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"})})}})}),p=({ip:e,adopted:t,config_network:n})=>(0,i.d4)(o.m9)&&(0,l.W5)(e)&&n?.type===a.NL.DHCP?(0,s.jsx)(c,{adopted:t}):null},601540(e,t,n){n.r(t),n.d(t,{default:()=>$});var s=n(274934),i=n(602086),l=n(586566),a=n(469890),r=n(956978),_=n(853109),o=n(808202),d=n(87449),c=n(977872),p=n(244081),A=n(724081),m=n(748094),x=n(470070),u=n(874866),E=n(794535),j=n(754924),I=n(458619);const v=({activeItem:e,activeItem:{mac:t,mclag_group_id:n,version:l}})=>{const a=(0,c.d4)(u.D),r=(0,c.d4)(j.ID);return(0,i.useMemo)(()=>{const e=a.find(({_id:e})=>e===n);if(!e)return!1;const s=Object.values(e.peers).find(e=>e!==t),i=r.find(({mac:e})=>e===s);return!!i&&Boolean((0,d.valid)(i.version)&&(0,d.valid)(l)&&(0,d.coerce)(i.version).compare((0,d.coerce)(l)))},[a,t,n,l])?(0,s.jsx)(m.A,{extra:(0,s.jsx)(I.A,{device:e}),children:(0,s.jsx)(x.sA,{id:"DEVICE_VERSION_MISMATCH_TEXT",values:{bold:(0,s.jsx)("strong",{children:(0,s.jsx)(x.sA,{id:"DEVICE_VERSION_MISMATCH_BOLD"})})}})}):null},N=({activeItem:e})=>(0,A.A)([(0,E.J4)(void 0,{crudCacheStrategy:{type:p.e.CACHE}})],(0,s.jsx)(v,{activeItem:e}));var h=n(110372),C=n(380592);const O=({port_table:e,model:t})=>{const n=(0,r.czF)({model:t}),i=e?.[0]?.is_uplink,l=e?.slice(1,5).some(e=>e.speed>C.A[h.n5.PORTSPEED_HALF_1000].speed);return n&&i&&l?(0,s.jsx)(m.A,{variant:"info",children:(0,s.jsx)(x.sA,{id:"DEVICE_SWITCH_FLEX_XG_UPLINK_WARNING",values:{b:x.b}})}):null};var f=n(872926),D=n(241092),g=n(203155),T=n(384780),y=n(383550),L=n(437366),M=n(100978),S=n(535322),b=n(376892),P=n(857780),V=n(347625),w=n(938984),R=n(664092);const k=({labelId:e,displayValue:t,labelValues:n})=>null==t?null:(0,s.jsxs)(R.A,{children:[(0,s.jsx)(w.A,{color:"text-2",size:"medium",children:(0,s.jsx)(x.sA,{id:e,values:n})}),(0,s.jsx)(w.A,{color:"text-3",size:"medium",children:t})]}),F=({gnss:e})=>{if(!e)return null;const t="string"==typeof e.antenna_detected&&"yes"===e.antenna_detected.toLowerCase();return(0,s.jsx)(k,{labelId:"DEVICE_SMA_SIGNAL_LABEL",displayValue:(0,s.jsx)(x.sA,{id:t||"boolean"==typeof e.antenna_detected&&e.antenna_detected?"COMMON_DETECTED":"COMMON_NOT_DETECTED"})})},B=({seconds:e,nanoseconds:t})=>{if(void 0===e&&void 0===t)return null;const n=e??0,i=t??0;return(0,s.jsx)(k,n>=1?{labelId:"DEVICE_PTP_OFFSET_LABEL",displayValue:(0,s.jsxs)(s.Fragment,{children:[n," ",(0,s.jsx)(x.sA,{id:"COMMON_UNIT_SECONDS_SHORT"})," ",i," ",(0,s.jsx)(x.sA,{id:"COMMON_UNIT_NANOSECONDS_SHORT"})]})}:{labelId:"DEVICE_PTP_OFFSET_LABEL",displayValue:(0,s.jsxs)(s.Fragment,{children:[i," ",(0,s.jsx)(x.sA,{id:"COMMON_UNIT_NANOSECONDS_SHORT"})]})})},H=({gnss:e,switch_caps:t,ptp_dataset:n,precision_time_protocol_config:a})=>{const r=(0,l.k2)(t?.feature_caps||0),_=(0,l.ny)(t?.feature_caps||0),o=a?.clock_mode,d=r&&o===P.nX.SMA,p=_&&!!n?.ptp_clk_identity&&o!==P.nX.TRANSPARENT,A=(0,c.d4)(j.ID),m=p&&!!n.ptp_clk_identity&&n.ptp_clk_identity===n.ptp_gmaster_clk_identity,u=p&&(o===P.nX.BOUNDARY||o===P.nX.SMA),E=(0,i.useMemo)(()=>{if(!p||m)return;if(n.ptp_gmaster_mac){const e=A.find(e=>e.mac===n.ptp_gmaster_mac);return e?(0,V.Q)(e):void 0}if(!n.ptp_gmaster_clk_identity)return;const e=A.find(e=>e.ptp_dataset?.ptp_clk_identity===n.ptp_gmaster_clk_identity);return e?(0,V.Q)(e):void 0},[A,p,m,n]);return d||p?(0,s.jsx)(S.A,{type:S.I.ACCORDION,items:[{id:"timing-and-synchronization",openByDefault:!0,label:(0,s.jsx)(b.A,{id:"DEVICE_TIMING_AND_SYNCHRONIZATION_LABEL"}),renderContent:()=>(0,s.jsxs)(M.A,{height:"100%",flexDirection:"column",children:[d?(0,s.jsx)(F,{gnss:e}):null,p?(0,s.jsxs)(s.Fragment,{children:[n.ptp_clk_identity?(0,s.jsx)(k,{labelId:"DEVICE_PTP_LOCAL_CLOCK_ID_LABEL",displayValue:n.ptp_clk_identity}):null,u?(0,s.jsx)(k,{labelId:"DEVICE_PTP_CLOCK_ROLE_LABEL",displayValue:(0,s.jsx)(x.sA,{id:m?"DEVICE_PTP_CLOCK_MODE_SMA":"DEVICE_PTP_CLOCK_MODE_BOUNDARY"})}):null,m?null:(0,s.jsxs)(s.Fragment,{children:[n.ptp_gmaster_clk_identity?(0,s.jsx)(k,{labelId:"DEVICE_PTP_GRANDMASTER_CLOCK_LABEL",displayValue:E||n.ptp_gmaster_clk_identity}):null,void 0!==n.ptp_synchronized?(0,s.jsx)(k,{labelId:"DEVICE_PTP_SYNCHRONIZED_LABEL",displayValue:(0,s.jsx)(x.sA,{id:0!==n.ptp_synchronized?"COMMON_YES":"COMMON_NO"})}):null,(0,s.jsx)(B,{seconds:n.ptp_offset_from_master_s,nanoseconds:n.ptp_offset_from_master_ns}),void 0!==n.ptp_mean_path_delay_ns?(0,s.jsx)(k,{labelId:"DEVICE_PTP_MEAN_PATH_DELAY_LABEL",displayValue:(0,s.jsxs)(s.Fragment,{children:[n.ptp_mean_path_delay_ns," ",(0,s.jsx)(x.sA,{id:"COMMON_UNIT_NANOSECONDS_SHORT"})]})}):null,void 0!==n.ptp_jitter_ns?(0,s.jsx)(k,{labelId:"DEVICE_PTP_JITTER_LABEL",displayValue:(0,s.jsxs)(s.Fragment,{children:[n.ptp_jitter_ns," ",(0,s.jsx)(x.sA,{id:"COMMON_UNIT_NANOSECONDS_SHORT"})]})}):null,void 0!==n.ptp_steps_removed?(0,s.jsx)(k,{labelId:"DEVICE_PTP_STEPS_REMOVED_LABEL",displayValue:n.ptp_steps_removed}):null]})]}):null]})}]}):null};var U=n(216082),Z=n(109700);const $=({activeItem:e,activeItem:{adopted:t,name:n,model:d,mac:c,type:p,oob_info:A,detailed_states:{device_near_power_limit:m,device_near_effective_power_limit:x}={device_near_power_limit:!1,device_near_effective_power_limit:!1},total_used_power:u,total_max_power:E,ip:j,config_network:I,deviceState:v,ethernet_overrides:h,port_table:C,switch_caps:M,lan_ip:S,ipv6:b,uptime:P,displayable_version:V,has_temperature:w,overheating:R,general_temperature:k,has_fan:F,fan_level:B,"system-stats":$,psu_table:W,fan_table:Y,gnss:z,ptp_dataset:G,precision_time_protocol_config:K,shortname:X,uplink:J,device_mode_override:Q}})=>{const q=(0,i.useMemo)(()=>(0,r.aK8)(v),[v]),{port_idx:ee}=(0,_.q$)(e)||{};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.A,{activeItem:e,showPortOverview:!0}),(0,s.jsx)(f.A,{ip:j,adopted:t,config_network:I}),(0,l.tT)(M?.feature_caps)?(0,s.jsx)(N,{activeItem:e}):null,(0,s.jsx)(O,{port_table:C,model:d}),q?null:(0,s.jsxs)(s.Fragment,{children:[(0,a.b0)(C)?(0,s.jsx)(o.A,{type:p,mac:c,model:d,device_near_power_limit:m,device_near_effective_power_limit:x,total_used_power:u,total_max_power:E,isPoeAdapter:(0,l.Y6)(e)}):null,(0,s.jsx)(T.A,{activeItem:e})]}),(0,s.jsx)(D.A,{psu_table:W,fan_table:Y}),(0,s.jsx)(L.A,{name:n,model:d,type:p,ip:j,lan_ip:S,ethernet_overrides:h,port_table:C,ipv6:b,mac:c,connection_network_id:e.connection_network_id,displayable_version:V,uptime:P,has_temperature:w,has_fan:F,overheating:R,general_temperature:k,fan_level:B,fan_table:Y,systemStatsMem:$?.mem,local_uplink_port:ee,deviceState:v,uplink:J,device_mode_override:Q}),q?null:(0,s.jsx)(H,{gnss:z,switch_caps:M,ptp_dataset:G,precision_time_protocol_config:K}),q?null:(0,s.jsx)(g.A,{activeItem:e}),(0,s.jsx)(Z.A,{oob_info:A,type:p,uplink:J,device_mode_override:Q}),(0,s.jsx)(U.A,{shortname:X})]})}}}]);