1"use strict";(globalThis.webpackChunkPlesk||=[]).push([["components/pages/DatabasesPage/ConnectionInfo"],{1647(e,t,o){o.r(t),o.d(t,{default:()=>r});var s=o(342),n=o(95),a=o(341);const c=n.Locale.getSection("components.buttons"),r=({id:e,content:t,icon:o="copy",className:n,tooltip:r=c.lmsg("copyToClipboard"),onCopy:l=()=>{},children:i})=>(0,a.jsx)(s.Button,{className:n,ghost:!0,icon:o,tooltip:r,tooltipAsLabel:!0,onClick:()=>{(0,s.copyToClipboard)(t),l()},"data-action":"copy-to-clipboard"+(e?`-${e}`:""),children:i})},1989(e,t,o){o.r(t),o.d(t,{default:()=>u});var s=o(342),n=o(782),a=o.n(n),c=o(718),r=o(1647),l=o(95),i=o(341);const d=({data:e,children:t,childrenAsButton:o=!1,component:n=s.Paragraph,id:a,...d})=>(0,i.jsxs)(n,{...d,children:[!o&&t," ",(0,i.jsx)(r.default,{id:a,content:e,onCopy:()=>(0,c.addToast)({intent:"success",message:l.Locale.getSection("components.buttons").lmsg("copied")}),children:o&&t})]});d.propTypes={childrenAsButton:a().bool,component:a().oneOf([a().node,a().string]),data:a().string.isRequired,children:a().node.isRequired,id:a().string};const u=d},1604(e,t,o){o.r(t),o.d(t,{default:()=>c});var s=o(341),n=o(772),a=o(342);const c=({onClose:e,isOpen:t=!0,closeOnFormSuccess:o=!0,closeUrl:c="..",form:r,...l})=>{const i=(0,n.useNavigate)(),[d,u]=(0,s.useState)(t),p=(0,s.useRef)(null),m=(0,s.useCallback)((...t)=>{const o=e??(()=>i(c,{preventScrollReset:!0}));u(!1),p.current=setTimeout(()=>{o(...t),p.current=null},300)},[c,i,e]);(0,s.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,s.useEffect)(()=>{t?p.current&&clearTimeout(p.current):u(t)},[t]);const h=(0,s.useMemo)(()=>{if(r&&o){if((0,s.isValidElement)(r))return(0,s.cloneElement)(r,{onSuccess:(...e)=>{r.props.onSuccess?.(...e),m()}});if("object"==typeof r)return{...r,onSuccess:(...e)=>{r.onSuccess?.(...e),m()}}}return r},[o,m,r]);return(0,s.jsx)(a.Drawer,{...l,form:h,onClose:m,isOpen:d})}},2902(e,t,o){o.r(t),o.d(t,{default:()=>h});var s=o(785),n=o(772),a=o(342),c=o(95),r=o(1604),l=o(1989),i=o(1337),d=o.n(i),u=o(341);const p=c.Locale.getTranslate("components.pages.Databases.ConnectionInfo"),m=c.Locale.getSection("components.pages.Databases.ConnectionInfo"),h=()=>{const e=(0,n.useParams)(),{data:{database:t}}=(0,s.useQuery)(d(),{variables:{id:btoa(`Database:${e.databaseId}`)}}),o=t.defaultUser??t.users[0];return(0,u.jsxs)(r.default,{title:(0,u.jsx)(p,{content:"title"}),subtitle:(0,u.jsx)(p,{content:"description",params:{database:t.name}}),size:"sm","data-type":"connection-info",children:[(0,u.jsx)(a.Paragraph,{children:(0,u.jsx)(p,{content:"hint"})}),(0,u.jsx)(a.FormField,{label:(0,u.jsx)(p,{content:"host"}),children:(0,u.jsx)(l.default,{tooltip:m.lmsg("copyHost"),data:`${t.server.host}:${t.server.port}`,children:`${t.server.host}:${t.server.port}`})}),(0,u.jsx)(a.FormField,{label:(0,u.jsx)(p,{content:"databaseName"}),children:(0,u.jsx)(l.default,{tooltip:m.lmsg("copyDatabaseName"),data:t.name,children:t.name})}),(0,u.jsx)(a.FormField,{label:(0,u.jsx)(p,{content:"user"}),children:o?(0,u.jsx)(l.default,{tooltip:m.lmsg("copyUser"),data:o.login,children:o.login}):(0,u.jsx)(a.Paragraph,{children:(0,u.jsx)(p,{content:"noDefaultUser"})})}),(0,u.jsx)(a.FormField,{label:(0,u.jsx)(p,{content:"password"}),children:o?"********":""})]})}}}]); 2//# sourceMappingURL=ConnectionInfo.js.map?44fba2ad3304d3087154
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.