(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/admin/sessions/list"],{1620(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>c});var i=t(786),o=t.n(i),n=t(95),a=t(1621);const r={id:o().string,dataUrl:o().string,operations:o().array,itemActions:o().object,columns:o().array,data:o().shape({data:o().array,state:o().object,pager:o().object,locale:o().object,additional:o().object,pathbar:o().any}),searchFilters:o().object,searchOveral:o().string,disabledSelectHint:o().string,isDisabledItem:o().func,onRedraw:o().func,emptyViewMode:o().oneOf(["all","items"]),emptyView:o().any},l={id:void 0,dataUrl:void 0,operations:void 0,itemActions:void 0,columns:void 0,data:void 0,searchFilters:void 0,searchOveral:void 0,disabledSelectHint:void 0,isDisabledItem:void 0,onRedraw:void 0,emptyViewMode:void 0,emptyView:void 0},d=(0,a.default)(n.List,{propsList:Object.keys(r),defaultProps:l});d.displayName="JswList",d.propTypes=r;const c=d},1621(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>n});var i=t(396),o=t(95);const n=(e,{propsList:s=[],setters:t={},defaultProps:n={}})=>a=>{const r=(0,i.useRef)(),l=(0,i.useRef)(),[d,c]=Object.entries({...n,...a}).reduce((e,[t,i])=>(e[s.includes(t)?0:1][t]=i,e),[{},{}]),p=s.map(e=>{const s=d[e];return t[e]?(l.current?.[t[e]](s),null):s});return(0,i.useLayoutEffect)(()=>(l.current=new e(d),(0,o.render)(r.current,l.current),()=>{l.current.remove(),l.current=null}),[c.key,...p]),(0,i.jsx)("div",{ref:r,...c})}},1765(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>m});var i=t(396),o=t(786),n=t.n(o),a=t(95),r=t(1620),l=t(800);const d=a.Locale.getSection("admin.components.lists.sessions"),c={adminSession:{icon:t(1612),alt:d.lmsg("altAdminIcon"),description:d.lmsg("typeAdmin")},resellerSession:{icon:t(1617),alt:d.lmsg("altResellerIcon"),description:d.lmsg("typeReseller")},clientSession:{icon:t(1614),alt:d.lmsg("altClientIcon"),description:d.lmsg("typeClient")}},p=({allowSettings:e=!1,data:s,searchFilters:t})=>{const o=(0,i.useMemo)(()=>[{componentType:a.SmallButton,id:"buttonRefresh",title:d.lmsg("buttonRefresh"),description:d.lmsg("buttonRefreshDescription"),addCls:"sb-refresh",handler(){(0,a.getComponent)("active-plesk-sessions-list").reload()}},{componentType:a.bar.Separator},{componentType:a.SmallButton,id:"buttonRemove",title:d.lmsg("buttonRemove"),description:d.lmsg("buttonRemoveDescription"),addCls:"sb-remove-selected",handler(e){(0,a.getComponent)("active-plesk-sessions-list").execGroupOperation({url:"/admin/sessions/remove/",subtype:"delete",mouseEvent:e,locale:{confirmOnGroupOperation:d.lmsg("removeConfirmMessage")}})}},e?{componentType:a.bar.Separator}:null,e?{componentType:a.SmallButton,id:"buttonSettings",title:d.lmsg("buttonSettings"),description:d.lmsg("buttonSettingsDescription"),addCls:"sb-settings",href:"/admin/sessions/settings/"}:null].filter(Boolean),[e]),n=(0,i.useMemo)(()=>[a.list.COLUMN_SELECTION,{header:d.lmsg("headerType"),sortable:!0,headerCls:"icon",cls:"icon",dataIndex:"sessionTypeIcon",renderer({sessionType:e}){const{icon:s,alt:t,description:i}=c[e];return`<i class="icon"><img src="${s}" alt="${t}" /></i><span class="tooltipData">${i}</span>`}},{header:d.lmsg("headerLogin"),sortable:!0,dataIndex:"login"},{header:d.lmsg("headerIpAddress"),sortable:!0,dataIndex:"ip_address"},{header:d.lmsg("headerLogonTime"),sortable:!0,dataIndex:"loginTime"},{header:d.lmsg("headerIdleTime"),sortable:!0,dataIndex:"idleTime"}],[]),l=(0,i.useCallback)(({isDisabled:e})=>e,[]);return(0,i.jsx)(r.default,{id:"active-plesk-sessions-list",data:s,dataUrl:"/admin/sessions/list-data",searchFilters:t,operations:o,columns:n,isDisabledItem:l})};p.propTypes={allowSettings:n().bool,data:r.default.propTypes.data.isRequired,searchFilters:r.default.propTypes.searchFilters.isRequired};const m=(0,l.withPageLayout)(p)},1612(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/admin.png?144d3e2283d0111dbc297b21492ae3e3"},1614(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/customer.png?af8f4cde2514944f9c83409d034b2b99"},1617(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/reseller.png?463eeaee68db9945ef2f0988e5fa736a"}}]);
//# sourceMappingURL=list.js.map?0c1ea29aa16ab7f7e27f