PageSourceSearch

https://diariodecuba.net/cp/javascript/components/pages/BandwidthLimitingPage.js?6ef98a9e6f102e182ec4

js diariodecuba.net collected 2026-10-03 22:39:24 UTC 6,860 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/BandwidthLimitingPage"],{2922(e,n,i){"use strict";i.r(n),i.d(n,{BandwidthLimitingForm:()=>b});var a=i(396),t=i(787),d=i.n(t),s=i(810),o=i(715),r=i(397),c=i(1371),l=i(832),u=i(95),m=i(663),p=i(2923),f=i.n(p);i(2924);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,o.useNavigate)(),d=`/smb/web/overview/id/${i.domainId}/type/domain`,[u,p]=(0,a.useState)(()=>g(e.hosting.performance)),[b,{loading:v}]=(0,s.useMutation)(f());return(0,a.jsxs)(c.default,{values:u,mutation:b,onFieldChange:(e,n)=>{p(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:v?"loading":void 0,onSuccess:({updateHostingPerformance:{domain:e}})=>{(0,m.addToast)({intent:"success",message:(0,a.jsx)(h,{content:"success"})}),p(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}},2921(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>u});var a=i(787),t=i.n(a),d=i(397),s=i(95),o=i(2922),r=i(396);const c=s.Locale.getTranslate("components.pages.BandwidthLimiting"),l=e=>e.domain.hosting?(0,r.jsx)(o.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},2920(e,n,i){"use strict";i.r(n),i.d(n,{default:()=>a.default});var a=i(2921)},2923(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"}}},directives:[]}],directives:[],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"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hosting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"performance"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trafficBandwidth"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxConnection"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],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,s=new Set,o=new Set;for(d.forEach(function(e){o.add(e)});o.size>0;){var r=o;o=new Set,r.forEach(function(e){s.has(e)||(s.add(e),(a[e]||new Set).forEach(function(e){o.add(e)}))})}return s.forEach(function(n){var a=t(e,n);a&&i.definitions.push(a)}),i}(n,"UpdateHostingPerformance")},2924(e,n,i){"use strict";i.r(n)}}]);
2//# sourceMappingURL=BandwidthLimitingPage.js.map?6ef98a9e6f102e182ec4

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.