(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/sessions/list"],{970:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var i=t(241),n=t.n(i),o=t(90),a=t(971);const r={id:n().string,dataUrl:n().string,operations:n().array,itemActions:n().object,columns:n().array,data:n().shape({data:n().array,state:n().object,pager:n().object,locale:n().object,additional:n().object,pathbar:n().any}),searchFilters:n().object,searchOveral:n().string,disabledSelectHint:n().string,isDisabledItem:n().func,onRedraw:n().func,emptyViewMode:n().oneOf(["all","items"]),emptyView:n().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)(o.List,Object.keys(r));d.displayName="JswList",d.propTypes=r,d.defaultProps=l;const c=d},971:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>o});var i=t(239),n=t(90);const o=(e,s=[],t={})=>o=>{const a=(0,i.useRef)(),r=(0,i.useRef)(),[l,d]=Object.entries(o).reduce(((e,[t,i])=>(e[s.includes(t)?0:1][t]=i,e)),[{},{}]),c=s.map((e=>{const s=l[e];return t[e]?(r.current?.[t[e]](s),null):s}));return(0,i.useLayoutEffect)((()=>(r.current=new e(l),(0,n.render)(a.current,r.current),()=>{r.current.remove(),r.current=null})),[d.key,...c]),(0,i.jsx)("div",{ref:a,...d})}},1099:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>m});var i=t(239),n=t(241),o=t.n(n),a=t(90),r=t(970),l=t(745);const d=a.Locale.getSection("admin.components.lists.sessions"),c={adminSession:{icon:t(983),alt:d.lmsg("altAdminIcon"),description:d.lmsg("typeAdmin")},resellerSession:{icon:t(988),alt:d.lmsg("altResellerIcon"),description:d.lmsg("typeReseller")},clientSession:{icon:t(985),alt:d.lmsg("altClientIcon"),description:d.lmsg("typeClient")}},p=({allowSettings:e,data:s,searchFilters:t})=>{const n=(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]),o=(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:n,columns:o,isDisabledItem:l})};p.propTypes={allowSettings:o().bool,data:r.default.propTypes.data.isRequired,searchFilters:r.default.propTypes.searchFilters.isRequired},p.defaultProps={allowSettings:!1};const m=(0,l.withPageLayout)(p)},983:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/admin.png?144d3e2283d0111dbc297b21492ae3e3"},985:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/customer.png?af8f4cde2514944f9c83409d034b2b99"},988:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/reseller.png?463eeaee68db9945ef2f0988e5fa736a"}}]);
//# sourceMappingURL=list.js.map?7175f543ec9b7db323bf