(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/smb/database/users-list"],{1e3:(e,a,s)=>{"use strict";s.r(a);var t=s(154),r=s(261),l=s.n(r),n=s(144),d=s(602),o=s(648),i=s(576);const m=n.Locale.getSection("smb.controllers.database.users-list"),b=n.Locale.getSection("smb.components.lists.database.users"),u=({domainId:e,allowCreateUser:a,...s})=>(0,t.createElement)(i.default,null,(()=>new n.Panel({cls:"list-box",items:[{componentType:n.List,id:"database-users-list",searchOveral:"name",dataUrl:`/smb/database/users-list-data/domainId/${e}`,...s,columns:[n.list.COLUMN_SELECTION,{header:b.lmsg("login"),sortable:!0,dataIndex:"login",renderer({id:e,login:a,isDefault:s,isUsedByApp:t,status:r}){const l=s?(0,n.createElement)("b",a):a;return["orphaned"===r?l:(0,n.createElement)("a",{href:`/smb/database/edit-user/id/${e}`},l),t?` (${b.lmsg("disabledSelectHint")})`:"","orphaned"===r?` (${b.lmsg("orphanedHint",{orphanedRepairLink:(0,n.createElement)("a",{href:`/smb/database/repair-orphaned/id/${e}`},b.lmsg("orphanedRepairLink"))})})`:""]}},{header:b.lmsg("database"),sortable:!1,dataIndex:"databaseName",renderer:({globalUser:e,databaseName:a})=>e?(0,n.createElement)("b",a):a},{header:b.lmsg("server"),sortable:!1,dataIndex:"server",renderer:({serverHost:e,serverPort:a,serverTypeTitle:s})=>`${e}${0<a?`:${a}`:""} (${s})`}],operations:[a?{componentType:n.SmallButton,title:m.lmsg("buttonAddUser"),description:m.lmsg("buttonAddUserHint"),addCls:"sb-add-user",href:`/smb/database/create-user/domainId/${e}`}:null,a?{componentType:n.bar.Separator}:null,{componentType:"Jsw.SmallButton",id:"buttonRemoveUser",title:b.lmsg("remove"),description:b.lmsg("hintRemove"),addCls:"sb-remove-selected",handler(e){var a;const s=(0,n.getComponent)("database-users-list"),t=s.getSelectedItems();s.execGroupOperation({url:"/smb/database/delete-users",subtype:n.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:b.formatMessage("confirmOnDelete",{login:`<b>${(0,n.escapeHtml)(null===(a=t[0])||void 0===a?void 0:a.login)}</b>`,count:t.length})})}}],isDisabledItem:({isUsedByApp:e,isDefault:a})=>e||a}]})));u.propTypes={domainId:l().number.isRequired,allowCreateUser:l().bool},u.defaultProps={allowCreateUser:!1},a.default=(0,d.withPageLayout)((0,o.withPageContent)(u))},999:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>t.default});var t=s(1e3)}}]);
//# sourceMappingURL=users-list.js.map?175ee7a279d44fd777b7