PageSourceSearch

https://diariodecuba.net/cp/javascript/components/pages/IpAddressDomainsPage.js?3949906d92982b7f1968

js diariodecuba.net collected 2026-10-03 22:36:06 UTC 2,623 bytes, 13 lines download raw bytes

1"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/IpAddressDomainsPage"],{1526(e,t,s){s.r(t),s.d(t,{default:()=>i});var a=s(396),n=s(715),d=s(397);const i=({onClose:e,isOpen:t=!0,closeOnFormSuccess:s=!0,closeUrl:i="..",form:o,...r})=>{const u=(0,n.useNavigate)(),[l,c]=(0,a.useState)(t),p=(0,a.useRef)(null),m=(0,a.useCallback)((...t)=>{const s=e??(()=>u(i,{preventScrollReset:!0}));c(!1),p.current=setTimeout(()=>{s(...t),p.current=null},300)},[i,u,e]);(0,a.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,a.useEffect)(()=>{t?p.current&&clearTimeout(p.current):c(t)},[t]);const f=(0,a.useMemo)(()=>{if(o&&s){if((0,a.isValidElement)(o))return(0,a.cloneElement)(o,{onSuccess:(...e)=>{o.props.onSuccess?.(...e),m()}});if("object"==typeof o)return{...o,onSuccess:(...e)=>{o.onSuccess?.(...e),m()}}}return o},[s,m,o]);return(0,a.jsx)(d.Drawer,{...r,form:f,onClose:m,isOpen:l})}},1525(e,t,s){s.r(t),s.d(t,{default:()=>m});var a=s(396),n=s(715),d=s(397),i=s(1526),o=s(95),r=s(810),u=s(700),l=s(663);const c=u.gql`
2    mutation UpdateIpAddressDefaultDomain($input: UpdateIpAddressDefaultDomainInput!) {
3        updateIpAddressDefaultDomain(input: $input) {
4            ipAddress {
5                id
6                defaultDomain {
7                    id
8                }
9            }
10        }
11    }
12`,p=o.Locale.getTranslate("components.pages.ip-address-domains"),m=()=>{const e=(0,n.useNavigate)(),[t,s]=(0,a.useState)(),{ipAddress:o,viewer:u}=(0,n.useLoaderData)(),{ipAddressId:m}=(0,n.useParams)(),[f,{loading:g}]=(0,r.useMutation)(c,{onCompleted:()=>e(-1)}),D=t||o.defaultDomain?.id,h=t&&t!==o.defaultDomain?.id,y="ADMIN"===u.type||"EXCLUSIVE"===o.type,A=e=>()=>s(e),b=(0,a.useMemo)(()=>[{key:"name",title:(0,a.jsx)(p,{content:"site"}),type:"title",render:({id:e,name:t,htype:s})=>y?(0,a.jsx)(d.Radio,{onChange:A(e),checked:D===e,disabled:"NONE"===s,children:t}):t}],[D,y]);return(0,a.jsx)(i.default,{"data-type":"ip-address-domains-drawer",title:(0,a.jsx)(p,{content:"title",params:{type:(0,a.jsx)(p,{content:`type-${o.type}`}),ipAddress:o.ipAddress}}),children:(0,a.jsx)(d.List,{id:"ip-address-domains-list",rowKey:"id",data:o.domains,columns:b,toolbar:y?(0,a.jsx)(d.Toolbar,{children:(0,a.jsx)(d.Button,{"data-testid":"updateDomainButton",onClick:async()=>{try{await f({variables:{input:{ipAddressId:m,domainId:t}}})}catch(e){(0,l.addToast)({intent:"danger",message:e.message})}},disabled:!h,state:g?"loading":void 0,children:(0,a.jsx)(p,{content:"setAsDefault"})})}):null})})}}}]);
13//# sourceMappingURL=IpAddressDomainsPage.js.map?3949906d92982b7f1968

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.