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