(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/admin/sessions/list"],{1659(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>c});var i=t(757),o=t.n(i),n=t(90),a=t(1660);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},1660(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>n});var i=t(372),o=t(90);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})}},1822(e,s,t){"use strict";t.r(s),t.d(s,{default:()=>m});var i=t(372),o=t(757),n=t.n(o),a=t(90),r=t(1659),l=t(771);const d=a.Locale.getSection("admin.components.lists.sessions"),c={adminSession:{icon:t(1672),alt:d.lmsg("altAdminIcon"),description:d.lmsg("typeAdmin")},resellerSession:{icon:t(1677),alt:d.lmsg("altResellerIcon"),description:d.lmsg("typeReseller")},clientSession:{icon:t(1674),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)},1672(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/admin.png?144d3e2283d0111dbc297b21492ae3e3"},1674(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/customer.png?af8f4cde2514944f9c83409d034b2b99"},1677(e){e.exports=Jsw.skinUrl+"/icons/16/plesk/reseller.png?463eeaee68db9945ef2f0988e5fa736a"}}]);
//# sourceMappingURL=list.js.map?2b01e82d4121f452837b