https://house-of-nations.de/cp/javascript/views/admin/client/ip-address/form.js?e17e563136f0ab71eaf7
1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/client/ip-address/form"],{1034:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});var i=t(270),s=t(574),a=t(272),d=t.n(a),o=t(271);const l=({onClose:e,isOpen:n=!0,closeOnFormSuccess:t=!0,closeUrl:a="..",form:d,...l})=>{const r=(0,s.useNavigate)(),[c,u]=(0,i.useState)(n),p=(0,i.useRef)(null),m=(0,i.useCallback)(((...n)=>{const t=e??(()=>r(a,{preventScrollReset:!0}));u(!1),p.current=setTimeout((()=>{t(...n),p.current=null}),300)}),[a,r,e]);(0,i.useEffect)((()=>()=>clearTimeout(p.current)),[]),(0,i.useEffect)((()=>{n?p.current&&clearTimeout(p.current):u(n)}),[n]);const f=(0,i.useMemo)((()=>{if(d&&t){if((0,i.isValidElement)(d))return(0,i.cloneElement)(d,{onSuccess:()=>{d.props.onSuccess?.(),m()}});if("object"==typeof d)return{...d,onSuccess:()=>{d.onSuccess?.(),m()}}}return d}),[t,m,d]);return(0,i.jsx)(o.Drawer,{...l,form:f,onClose:m,isOpen:c})};l.propTypes={onClose:d().func,isOpen:d().bool,form:d().oneOfType([d().object,d().node]),closeOnFormSuccess:d().bool,closeUrl:d().oneOfType([d().string,d().object])};const r=l},2070:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>h});var i=t(271),s=t(1034),a=t(270),d=t(574),o=t(847),l=t(89),r=t(579),c=t(616),u=t(530),p=t(829),m=t.n(p),f=t(2071),v=t.n(f);const S=l.Locale.getTranslate("components.lists.client-ip-address.assign"),b=l.Locale.getSection("components.lists.client-ip-address.assign"),h=()=>{const e=(0,d.useNavigate)(),n=(0,d.useParams)(),[t,p]=(0,a.useState)({ipAddresses:[]}),f=btoa(`Client:${n.clientId}`),{data:{client:{availableIpAddress:h}={}}={}}=(0,r.useQuery)(m(),{variables:{clientId:f,ipAddressId:n.ipAddressId}}),[k,{loading:x}]=(0,c.useMutation)(v(),{refetchQueries:["ClientIpAddress"]}),y=0===h.length;return(0,a.jsx)(s.default,{"data-type":"client-ip-address-drawer",title:(0,a.jsx)(S,{content:"title"}),form:(0,a.jsx)(o.default,{"data-type":"client-ip-address-add-form",mutation:k,state:x?"submit":void 0,values:t,onSubmit:y?()=>e(".."):({ipAddresses:e})=>{const n=Object.entries(e).filter((([,e])=>Boolean(e))).map((([e])=>e));return{clientId:f,ids:n}},onSuccess:()=>{const e=Object.entries(t.ipAddresses).filter((([,e])=>Boolean(e))).map((([e])=>e));(0,u.addToast)({intent:"success",message:b.formatMessage("success",{name:(0,a.jsx)("b",{children:h.find((({id:n})=>e[0]===n)).ipAddress}),count:e.length})})},onFieldChange:(e,n)=>p((t=>(0,i.setIn)(t,e,n))),submitButton:{name:"send","data-action":"submit"},applyButton:!1,children:(0,a.jsxs)(i.FormField,{label:(0,a.jsx)(S,{content:"description"}),children:[y?l.Locale.getSection("components.lists.client-ip-address").lmsg("noAvailableIps"):null,h.map((({id:e,ipAddress:n})=>(0,a.jsx)(i.FormFieldCheckbox,{name:`ipAddresses[${e}]`,label:n},e)))]})})})}},2069:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(2070)},2067:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>k});var i=t(270),s=t(271),a=t(1034),d=t(574),o=t(847),l=t(89),r=t(579),c=t(616),u=t(828),p=t.n(u),m=t(2068),f=t.n(m);const v=l.Locale.getTranslate("components.lists.client-ip-address"),S=l.Locale.getSection("components.lists.client-ip-address"),b=l.Locale.getTranslate("components.lists.client-ip-address.properties"),h=l.Locale.getSection("components.lists.client-ip-address.properties"),k=()=>{const e=(0,d.useParams)(),n=btoa(`Client:${e.clientId}`),{data:{ipAddress:{id:t,ipAddress:l,interface:u,type:m,allocatedType:k,isBroken:x,ftpOverSSL:y,typeChangeableInClientPool:A,domains:j,defaultDomain:I,certificate:E}={},capability:{ftp:{isExplicitSSL:g}={}}={},os:{isWindows:C}={},client:{type:F,certificates:w}={}}={}}=(0,r.useQuery)(p(),{variables:{clientId:n,ipAddressId:e.ipAddressId}}),[N,{loading:D}]=(0,c.useMutation)(f(),{refetchQueries:["ClientIpAddress"]}),L="SHARED"!==k,O=(0,i.useMemo)((()=>({id:t,type:A&&"RESELLER"===F?m:void 0,ftpOverSSL:C?y:void 0,certificateId:E?.id,domainId:I?.id??0})),[]),T=(0,i.useMemo)((()=>{const e=[...w];return e.find((({id:e})=>e===E.id))||e.push(E),e}),[E,w]);return(0,i.jsx)(a.default,{"data-type":"client-ip-address-drawer",title:[(0,i.jsx)(s.Status,{style:{marginRight:".5rem"},intent:x?"danger":"success"},"title-status"),(0,i.jsx)(b,{content:"title",params:{address:l,interface:u}},"title-text")],form:L?(0,i.jsxs)(o.default,{"data-type":"client-ip-address-drawer-form","data-testid":"ClientIpAddressForm",values:O,mutation:N,state:D?"submit":void 0,onSubmit:t=>({...t,clientId:n,id:e.ipAddressId}),applyButton:!1,submitButton:{name:"send","data-action":"submit"},children:[(0,i.jsx)(s.FormField,{label:(0,i.jsx)(b,{content:"allocatedType"}
1),children:(0,i.jsx)(v,{content:"SHARED"===k?"typeShared":"typeExclusive"})}),A&&"RESELLER"===F?(0,i.jsx)(s.FormFieldRadioButtons,{label:(0,i.jsx)(b,{content:"distributedType"}),name:"type",options:[{value:"SHARED",label:(0,i.jsx)(v,{content:"typeShared"})},{value:"EXCLUSIVE",label:(0,i.jsx)(v,{content:"typeExclusive"})}]}):null,(0,i.jsx)(s.FormFieldSelect,{name:"certificateId",label:(0,i.jsx)(b,{content:"certificate"}),children:T.map((({id:e,name:n,ownerName:t})=>{const a=t?"domainCertificateRepository":"adminCertificateRepository";return(0,i.jsx)(s.SelectOption,{value:e,children:`${n} (${S.lmsg(a,{owner:t})})`},e)}))}),(0,i.jsxs)(s.FormFieldSelect,{name:"domainId",label:(0,i.jsx)(b,{content:"defaultSite"}),children:[(0,i.jsx)(s.SelectOption,{value:0,children:h.lmsg("none")}),j.map((({id:e,name:n})=>(0,i.jsx)(s.SelectOption,{value:e,children:n},e)))]}),C&&g?(0,i.jsx)(s.FormField,{label:(0,i.jsx)(v,{content:"ftpOverSSL"}),children:(0,i.jsx)(s.FormFieldCheckbox,{name:"ftpOverSSL",label:(0,i.jsx)(v,{content:"ftpOverSSL-allow"}),checkedValue:"ENABLED",uncheckedValue:"DISABLED"})}):null]}):void 0,children:L?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.FormField,{label:(0,i.jsx)(b,{content:"allocatedType"}),children:(0,i.jsx)(v,{content:"SHARED"===k?"typeShared":"typeExclusive"})}),(0,i.jsx)(s.FormField,{label:(0,i.jsx)(b,{content:"distributedType"}),children:(0,i.jsx)(v,{content:"SHARED"===m?"typeShared":"typeExclusive"})}),(0,i.jsx)(s.FormField,{label:(0,i.jsx)(b,{content:"certificate"}),children:()=>{const e=E.ownerName?"domainCertificateRepository":"adminCertificateRepository";return`${E.name} (${S.lmsg(e,{owner:E.ownerName})})`}}),(0,i.jsx)(s.FormField,{label:(0,i.jsx)(b,{content:"defaultSite"}),children:I?.id?I.name:(0,i.jsx)(b,{content:"none"})}),C?(0,i.jsx)(s.FormField,{label:(0,i.jsx)(v,{content:"ftpOverSSL"}),children:(0,i.jsx)(v,{content:"ftpOverSSL-"+(g?"ENABLED"===y?"yes":"no":"notAllowed")})}):null]})})}},2071:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddClientIpAddress"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddClientIpAddressInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addClientIpAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ids"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:124}};n.loc.source={body:"mutation AddClientIpAddress($input: AddClientIpAddressInput!) {\n addClientIpAddress(input: $input) {\n ids\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};function s(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n,e.exports.AddClientIpAddress=function(e,n){var t={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=i[n]||new Set,d=new Set,o=new Set;for(a.forEach((function(e){o.add(e)}));o.size>0;){var l=o;o=new Set,l.forEach((function(e){d.has(e)||(d.add(e),(i[e]||new Set).forEach((function(e){o.add(e)})))}))}return d.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(n,"AddClientIpAddress")},2068:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateClientIpAddressMutation"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateClientIpAddressInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateClientIpAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:140}};n.loc.source={body:"mutation UpdateClientIpAddressMutation($input: UpdateClientIpAddressInput!) {\n updateClientIpAddress(input: $input) {\n id\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};function s(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n,e.exports.UpdateClientIpAddressMutation=function(e,n){var t={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=i[n]||new Set,d=new Set,o=new Set;for(a.forEach((function(e){o.add(e)}));o.size>0;){var l=o;o=new Set,l.forEach((function(e){d.has(e)||(d.add(e),(i[e]||new Set).forEach((function(e){o.add(e)})))}))}return d.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(n,"UpdateClientIpAddressMutation")}}]); 2//# sourceMappingURL=form.js.map?e17e563136f0ab71eaf7
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.