PageSourceSearch

https://molly88.net/cp/javascript/components/pages/BandwidthLimitingPage.js?273d64ee27673c396efb

js molly88.net collected 2026-10-05 06:51:27 UTC 6,627 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk||=[]).push([["components/pages/BandwidthLimitingPage"],{3004(e,n,i){"use strict";i.r(n),i.d(n,{BandwidthLimitingForm:()=>b});var a=i(341),t=i(782),d=i.n(t),o=i(811),s=i(772),r=i(342),c=i(798),l=i(797),u=i(95),m=i(718),f=i(3005),p=i.n(f);i(3006);const h=u.Locale.getTranslate("components.pages.BandwidthLimiting"),g=({trafficBandwidth:e,maxConnection:n})=>({isTrafficBandwidthEnabled:-1!==e,trafficBandwidth:-1===e?"":e,isMaxConnectionEnabled:-1!==n,maxConnection:-1===n?"":n}),b=({domain:e,capability:n,params:i})=>{const t=(0,s.useNavigate)(),d=`/smb/web/overview/id/${i.domainId}/type/domain`,[u,f]=(0,a.useState)(()=>g(e.hosting.performance)),[b,{loading:x}]=(0,o.useMutation)(p());return(0,a.jsxs)(c.default,{values:u,mutation:b,onFieldChange:(e,n)=>{f(i=>(0,r.setIn)(i,e,n))},onSubmit:()=>({id:btoa(`Domain:${i.domainId}`),trafficBandwidth:u.isTrafficBandwidthEnabled?u.trafficBandwidth?+u.trafficBandwidth:null:-1,maxConnection:u.isMaxConnectionEnabled?u.maxConnection?+u.maxConnection:null:-1}),state:x?"loading":void 0,onSuccess:({updateHostingPerformance:{domain:e}})=>{(0,m.addToast)({intent:"success",message:(0,a.jsx)(h,{content:"success"})}),f(g(e.hosting.performance)),t(d)},applyButton:!1,cancelButton:{component:l.default,to:d},children:[!n.packages.isQoSStarted&&(0,a.jsx)(r.StatusMessage,{intent:"warning",children:(0,a.jsx)(h,{content:"bandwidthThrottling"})}),(0,a.jsx)(r.FormField,{label:(0,a.jsx)(h,{content:"bandwidthLabel"}),description:(0,a.jsx)(h,{content:"bandwidthHint"}),required:u.isTrafficBandwidthEnabled,name:"trafficBandwidth",children:({getValue:e,setValue:n,isDisabled:i})=>(0,a.jsxs)("div",{className:"bandwidth-limiting-field-complex",children:[(0,a.jsxs)("div",{className:"bandwidth-limiting-input-with-suffix-wrapper bandwidth-limiting-input-complex-wrapper",children:[(0,a.jsx)(r.Input,{onChange:e=>n(e.target.value.replace(/\D/g,"")),maxLength:7,size:8,value:e(),disabled:!u.isTrafficBandwidthEnabled||i()}),(0,a.jsx)(h,{content:"kbps"})]}),(0,a.jsx)(r.FormFieldCheckbox,{name:"isTrafficBandwidthEnabled",label:(0,a.jsx)(h,{content:"unlimited"}),checkedValue:!1,uncheckedValue:!0})]})}),(0,a.jsx)(r.FormField,{label:(0,a.jsx)(h,{content:"maxConnectionLabel"}),description:(0,a.jsx)(h,{content:"maxConnectionHint"}),required:u.isMaxConnectionEnabled,name:"maxConnection",children:({getValue:e,setValue:n,isDisabled:i})=>(0,a.jsxs)("div",{className:"bandwidth-limiting-field-complex",children:[(0,a.jsx)("div",{className:"bandwidth-limiting-input-complex-wrapper",children:(0,a.jsx)(r.Input,{onChange:e=>n(e.target.value.replace(/\D/g,"")),maxLength:10,size:11,value:e(),disabled:!u.isMaxConnectionEnabled||i()})}),(0,a.jsx)(r.FormFieldCheckbox,{name:"isMaxConnectionEnabled",label:(0,a.jsx)(h,{content:"unlimited"}),checkedValue:!1,uncheckedValue:!0})]})})]})};b.propTypes={domain:d().shape({hosting:d().shape({performance:d().shape({trafficBandwidth:d().number.isRequired,maxConnection:d().number.isRequired}).isRequired}).isRequired}).isRequired,capability:d().shape({packages:d().shape({isQoSStarted:d().bool.isRequired}).isRequired}).isRequired,params:d().shape({domainId:d().string.isRequired}).isRequired}},3003(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>u});var a=i(782),t=i.n(a),d=i(342),o=i(95),s=i(3004),r=i(341);const c=o.Locale.getTranslate("components.pages.BandwidthLimiting"),l=e=>e.domain.hosting?(0,r.jsx)(s.BandwidthLimitingForm,{...e}):(0,r.jsx)(d.StatusMessage,{intent:"info",children:(0,r.jsx)(c,{content:"virtualHostingRequired"})});l.propTypes={domain:t().shape({hosting:t().shape({performance:t().shape({trafficBandwidth:t().number.isRequired,maxConnection:t().number.isRequired}).isRequired})}).isRequired,capability:t().shape({packages:t().shape({isQoSStarted:t().bool.isRequired}).isRequired}).isRequired,params:t().shape({domainId:t().string.isRequired}).isRequired};const u=l},3002(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>a.default});var a=i(3003)},3005(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateHostingPerformance"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateHostingPerformanceInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateHostingPerformance"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"hosting"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"performance"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trafficBandwidth"}},{kind:"Field",name:{kind:"Name",value:"maxConnection"}}]}}]}}]}}]}}]}}],loc:{start:0,end:327}};n.loc.source={body:"mutation UpdateHostingPerformance($input: UpdateHostingPerformanceInput!) {\n    updateHostingPerformance(input: $input) {\n        domain {\n            id\n            hosting {\n                performance {\n                    trafficBandwidth\n                    maxConnection\n                }\n            }\n        }\n    }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}var a={};function t(e,n){for(var i=0;i<e.definitions.length;i++){var a=e.definitions[i];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.UpdateHostingPerformance=function(e,n){var i={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var d=a[n]||new Set,o=new Set,s=new Set;for(d.forEach(function(e){s.add(e)});s.size>0;){var r=s;s=new Set,r.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){s.add(e)}))})}return o.forEach(function(n){var a=t(e,n);a&&i.definitions.push(a)}),i}(n,"UpdateHostingPerformance")},3006(e,n,i){"use strict";i.r(n)}}]);
2//# sourceMappingURL=BandwidthLimitingPage.js.map?273d64ee27673c396efb

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.