PageSourceSearch

https://acscontrol.com/cp/javascript/views/admin/client/ip-address/form.js?23e5c14da2cf422c4f8d

js acscontrol.com collected 2026-10-06 05:29:43 UTC 10,293 bytes, 2 lines download raw bytes

1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/client/ip-address/form"],{960:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});var i=t(242),a=t(244),s=t.n(a),d=t(243);const l=({onClose:e,isOpen:n,...t})=>{const[a,s]=(0,i.useState)(n),l=(0,i.useRef)(null),o=(0,i.useMemo)((()=>e?(...n)=>{s(!1),l.current=setTimeout((()=>{e(...n),l.current=null}),300)}:e),[e]);return(0,i.useEffect)((()=>()=>clearTimeout(l.current)),[]),(0,i.useEffect)((()=>{l.current&&clearTimeout(l.current)}),[n]),(0,i.jsx)(d.Drawer,{...t,onClose:o,isOpen:a})};l.propTypes={onClose:s().func,isOpen:s().bool},l.defaultProps={onClose:null,isOpen:!0};const o=l},1965:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>b});var i=t(243),a=t(960),s=t(242),d=t(728),l=t(927),o=t(90),r=t(734),c=t(762),u=t(679),p=t(916),m=t.n(p),f=t(1966),v=t.n(f);const S=o.Locale.getTranslate("components.lists.client-ip-address.assign"),h=o.Locale.getSection("components.lists.client-ip-address.assign"),b=()=>{const e=(0,d.useNavigate)(),n=(0,d.useParams)(),[t,p]=(0,s.useState)({ipAddresses:[]}),f=btoa(`Client:${n.clientId}`),{data:{client:{availableIpAddress:b}={}}={}}=(0,r.useQuery)(m(),{variables:{clientId:f,ipAddressId:n.ipAddressId}}),[k,{loading:x}]=(0,c.useMutation)(v(),{refetchQueries:["ClientIpAddress"]}),A=0===b.length,y=()=>e("..");return(0,s.jsx)(a.default,{"data-type":"client-ip-address-drawer",onClose:y,title:(0,s.jsx)(S,{content:"title"}),form:(0,s.jsx)(l.default,{"data-type":"client-ip-address-add-form",mutation:k,state:x?"submit":void 0,values:t,onSubmit:A?y:({ipAddresses:e})=>{const n=Object.entries(e).filter((([,e])=>Boolean(e))).map((([e])=>e));return{clientId:f,ids:n}},onSuccess:()=>{const n=Object.entries(t.ipAddresses).filter((([,e])=>Boolean(e))).map((([e])=>e));(0,u.addToast)({intent:"success",message:h.formatMessage("success",{name:(0,s.jsx)("b",{children:b.find((({id:e})=>n[0]===e)).ipAddress}),count:n.length})}),e("..")},onFieldChange:(e,n)=>p((t=>(0,i.setIn)(t,e,n))),submitButton:{name:"send","data-action":"submit"},applyButton:!1,children:(0,s.jsxs)(i.FormField,{label:(0,s.jsx)(S,{content:"description"}),children:[A?o.Locale.getSection("components.lists.client-ip-address").lmsg("noAvailableIps"):null,b.map((({id:e,ipAddress:n})=>(0,s.jsx)(i.FormFieldCheckbox,{name:`ipAddresses[${e}]`,label:n},e)))]})})})}},1964:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(1965)},1962:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>k});var i=t(242),a=t(243),s=t(960),d=t(728),l=t(927),o=t(90),r=t(734),c=t(762),u=t(915),p=t.n(u),m=t(1963),f=t.n(m);const v=o.Locale.getTranslate("components.lists.client-ip-address"),S=o.Locale.getSection("components.lists.client-ip-address"),h=o.Locale.getTranslate("components.lists.client-ip-address.properties"),b=o.Locale.getSection("components.lists.client-ip-address.properties"),k=()=>{const e=(0,d.useNavigate)(),n=(0,d.useParams)(),t=btoa(`Client:${n.clientId}`),{data:{ipAddress:{id:o,ipAddress:u,interface:m,type:k,allocatedType:x,isBroken:A,ftpOverSSL:y,typeChangeableInClientPool:j,domains:I,defaultDomain:E,certificate:C}={},capability:{ftp:{isExplicitSSL:g}={}}={},os:{isWindows:F}={},client:{type:w,certificates:N}={}}={}}=(0,r.useQuery)(p(),{variables:{clientId:t,ipAddressId:n.ipAddressId}}),[D,{loading:L}]=(0,c.useMutation)(f(),{refetchQueries:["ClientIpAddress"]}),O="SHARED"!==x,T=(0,i.useMemo)((()=>({id:o,type:j&&"RESELLER"===w?k:void 0,ftpOverSSL:F?y:void 0,certificateId:C?.id,domainId:E?.id??0})),[]),R=(0,i.useMemo)((()=>{const e=[...N];return e.find((({id:e})=>e===C.id))||e.push(C),e}),[C,N]),B=()=>e("..");return(0,i.jsx)(s.default,{"data-type":"client-ip-address-drawer",onClose:B,title:[(0,i.jsx)(a.Status,{style:{marginRight:".5rem"},intent:A?"danger":"success"},"title-status"),(0,i.jsx)(h,{content:"title",params:{address:u,interface:m}},"title-text")],form:O?(0,i.jsxs)(l.default,{"data-type":"client-ip-address-drawer-form","data-testid":"ClientIpAddressForm",values:T,mutation:D,state:L?"submit":void 0,onSuccess:B,onSubmit:e=>({...e,clientId:t,id:n.ipAddressId}),applyButton:!1,submitButton:{name:"send","data-action":"submit"},children:[(0,i.jsx)(a.FormField,{label:(0,i.jsx)(h,{content:"allocatedType"}
1),children:(0,i.jsx)(v,{content:"SHARED"===x?"typeShared":"typeExclusive"})}),j&&"RESELLER"===w?(0,i.jsx)(a.FormFieldRadioButtons,{label:(0,i.jsx)(h,{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)(a.FormFieldSelect,{name:"certificateId",label:(0,i.jsx)(h,{content:"certificate"}),children:R.map((({id:e,name:n,ownerName:t})=>{const s=t?"domainCertificateRepository":"adminCertificateRepository";return(0,i.jsx)(a.SelectOption,{value:e,children:`${n} (${S.lmsg(s,{owner:t})})`},e)}))}),(0,i.jsxs)(a.FormFieldSelect,{name:"domainId",label:(0,i.jsx)(h,{content:"defaultSite"}),children:[(0,i.jsx)(a.SelectOption,{value:0,children:b.lmsg("none")}),I.map((({id:e,name:n})=>(0,i.jsx)(a.SelectOption,{value:e,children:n},e)))]}),F&&g?(0,i.jsx)(a.FormField,{label:(0,i.jsx)(v,{content:"ftpOverSSL"}),children:(0,i.jsx)(a.FormFieldCheckbox,{name:"ftpOverSSL",label:(0,i.jsx)(v,{content:"ftpOverSSL-allow"}),checkedValue:"ENABLED",uncheckedValue:"DISABLED"})}):null]}):void 0,children:O?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.FormField,{label:(0,i.jsx)(h,{content:"allocatedType"}),children:(0,i.jsx)(v,{content:"SHARED"===x?"typeShared":"typeExclusive"})}),(0,i.jsx)(a.FormField,{label:(0,i.jsx)(h,{content:"distributedType"}),children:(0,i.jsx)(v,{content:"SHARED"===k?"typeShared":"typeExclusive"})}),(0,i.jsx)(a.FormField,{label:(0,i.jsx)(h,{content:"certificate"}),children:()=>{const e=C.ownerName?"domainCertificateRepository":"adminCertificateRepository";return`${C.name} (${S.lmsg(e,{owner:C.ownerName})})`}}),(0,i.jsx)(a.FormField,{label:(0,i.jsx)(h,{content:"defaultSite"}),children:E?.id?E.name:(0,i.jsx)(h,{content:"none"})}),F?(0,i.jsx)(a.FormField,{label:(0,i.jsx)(v,{content:"ftpOverSSL"}),children:(0,i.jsx)(v,{content:"ftpOverSSL-"+(g?"ENABLED"===y?"yes":"no":"notAllowed")})}):null]})})}},1966: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:129}};n.loc.source={body:"mutation AddClientIpAddress($input: AddClientIpAddressInput!) {\r\n    addClientIpAddress(input: $input) {\r\n        ids\r\n    }\r\n}\r\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 a(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:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,d=new Set,l=new Set;for(s.forEach((function(e){l.add(e)}));l.size>0;){var o=l;l=new Set,o.forEach((function(e){d.has(e)||(d.add(e),(i[e]||new Set).forEach((function(e){l.add(e)})))}))}return d.forEach((function(n){var i=a(e,n);i&&t.definitions.push(i)})),t}(n,"AddClientIpAddress")},1963: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:145}};n.loc.source={body:"mutation UpdateClientIpAddressMutation($input: UpdateClientIpAddressInput!) {\r\n    updateClientIpAddress(input: $input) {\r\n        id\r\n    }\r\n}\r\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 a(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:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,d=new Set,l=new Set;for(s.forEach((function(e){l.add(e)}));l.size>0;){var o=l;l=new Set,o.forEach((function(e){d.has(e)||(d.add(e),(i[e]||new Set).forEach((function(e){l.add(e)})))}))}return d.forEach((function(n){var i=a(e,n);i&&t.definitions.push(i)})),t}(n,"UpdateClientIpAddressMutation")}}]);
2//# sourceMappingURL=form.js.map?23e5c14da2cf422c4f8d

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.