(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/sessions/list"],{1059:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var i=t(272),n=t.n(i),o=t(89),a=t(1060);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,{propsList:Object.keys(r),defaultProps:l});d.displayName="JswList",d.propTypes=r;const c=d},1060:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>o});var i=t(270),n=t(89);const o=(e,{propsList:s=[],setters:t={},defaultProps:o={}})=>a=>{const r=(0,i.useRef)(),l=(0,i.useRef)(),[d,c]=Object.entries({...o,...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,n.render)(r.current,l.current),()=>{l.current.remove(),l.current=null})),[c.key,...p]),(0,i.jsx)("div",{ref:r,...c})}},1222:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>m});var i=t(270),n=t(272),o=t.n(n),a=t(89),r=t(1059),l=t(597);const d=a.Locale.getSection("admin.components.lists.sessions"),c={adminSession:{icon:t(1072),alt:d.lmsg("altAdminIcon"),description:d.lmsg("typeAdmin")},resellerSession:{icon:t(1077),alt:d.lmsg("altResellerIcon"),description:d.lmsg("typeReseller")},clientSession:{icon:t(1074),alt:d.lmsg("altClientIcon"),description:d.lmsg("typeClient")}},p=({allowSettings:e=!1,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};const m=(0,l.withPageLayout)(p)},1072:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/admin.png?144d3e2283d0111dbc297b21492ae3e3"},1074:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/customer.png?af8f4cde2514944f9c83409d034b2b99"},1077:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/reseller.png?463eeaee68db9945ef2f0988e5fa736a"}}]);
//# sourceMappingURL=list.js.map?41d3b3c74a9a0fd10baa