PageSourceSearch

https://gnu.kz/cp/javascript/components/pages/IpAddressDomainsPage.js?45b834706d860b44f66a

js gnu.kz collected 2026-10-06 04:26:25 UTC 2,595 bytes, 13 lines download raw bytes

1"use strict";(globalThis.webpackChunkPlesk||=[]).push([["components/pages/IpAddressDomainsPage"],{1604(e,t,s){s.r(t),s.d(t,{default:()=>i});var a=s(341),n=s(772),d=s(342);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})}},1603(e,t,s){s.r(t),s.d(t,{default:()=>m});var a=s(341),n=s(772),d=s(342),i=s(1604),o=s(95),r=s(755),u=s(811),l=s(718);const c=r.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:r}=(0,n.useLoaderData)(),{ipAddressId:m}=(0,n.useParams)(),[f,{loading:D}]=(0,u.useMutation)(c,{onCompleted:()=>e(-1)}),g=t||o.defaultDomain?.id,y=t&&t!==o.defaultDomain?.id,A="ADMIN"===r.type||"EXCLUSIVE"===o.type,h=e=>()=>s(e),j=(0,a.useMemo)(()=>[{key:"name",title:(0,a.jsx)(p,{content:"site"}),type:"title",render:({id:e,name:t,htype:s})=>A?(0,a.jsx)(d.Radio,{onChange:h(e),checked:g===e,disabled:"NONE"===s,children:t}):t}],[g,A]);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:j,toolbar:A?(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:!y,state:D?"loading":void 0,children:(0,a.jsx)(p,{content:"setAsDefault"})})}):null})})}}}]);
13//# sourceMappingURL=IpAddressDomainsPage.js.map?45b834706d860b44f66a

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.