1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4301],{21547:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/AnonymousLimitsTable",function(){return r(34707)}])},34707:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T});var a=r(23798),o=r(64927),n=r(71602),l=r(41008),s=r(59354),i=r(68006),c=r(21462),p=r(12131),u=r(85096),d=r(69016),h=r(21188),f=r(71268),m=r(62459);function T(){let{data:e,isLoading:t,error:r}=h.i.admin.getAnonymousLimitRules.useQuery({body:{_dummy:""}}),i=(0,c.useMemo)(()=>e?e.map(e=>{let t=e.limitUnit,r=(0,d.gD)(t)?(0,d.z3)(e.limit):e.limit.toLocaleString();return{scope:(0,d.Pk)((0,d.j9)(e.scopeType,e.scopeValue)),limit:r,unit:(0,d.zO)(t),window:(0,d.UK)(e.windowSeconds),appliesTo:e.includeOriginInKey?"Per IP + Origin":"Per IP",rawRule:e}}).sort((e,t)=>{let r=e.scope.localeCompare(t.scope);return 0!==r?r:"Per IP"===e.appliesTo?-1:1}):[],[e]);return r?(0,a.jsx)(f.default,{error:r,fallbackMessage:"Unknown error loading anonymous limit rules",heading:"Error loading anonymous limit rules"}):t?(0,a.jsx)(m.default,{}):0===i.length?(0,a.jsx)(o.F,{heading:"No anonymous limit rules found",variant:"default",children:"No anonymous limit rules are currently configured."}):(0,a.jsx)("div",{className:(0,u.t$)({gap:"24"}),children:(0,a.jsxs)(n.X,{children:[(0,a.jsx)("thead",{children:(0,a.jsxs)(l.Tr,{children:[(0,a.jsx)(s.Th,{children:"Scope"}),(0,a.jsx)(s.Th,{children:"Limit"}),(0,a.jsx)(s.Th,{children:"Unit"}),(0,a.jsx)(s.Th,{children:"Window"}),(0,a.jsx)(s.Th,{children:"Applies To"})]})}),(0,a.jsx)("tbody",{children:i.map((e,t)=>(0,a.jsx)(y,{rule:e},t))})]})})}function y(e){let{rule:t}=e;return(0,a.jsxs)(l.Tr,{children:[(0,a.jsx)(i.Td,{children:t.scope}),(0,a.jsx)(i.Td,{className:(0,p.AH)({textStyle:"mono.md"}),children:t.limit}),(0,a.jsx)(i.Td,{children:t.unit}),(0,a.jsxs)(i.Td,{className:(0,p.AH)({textStyle:"mono.md"}),children:["per ",t.window]}),(0,a.jsx)(i.Td,{children:t.appliesTo})]})}},62459:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var a=r(23798),o=r(64407);r(21462);var n=r(12131);function l(){return(0,a.jsx)("div",{className:(0,n.AH)({w:"full"}),children:(0,a.jsx)(o.E,{className:(0,n.AH)({height:"[150px]",w:"full",my:"[2px]"})})})}},69016:(e,t,r)=>{"use strict";function a(e){switch(e){case"ComputeUnits":return"Compute Units";case"RequestCount":return"Request Count";case"RequestSize":return"Request Size";case"ResponseSize":return"Response Size";default:return e}}function o(e){return"RequestSize"===e||"ResponseSize"===e}function n(e){let t=["bytes","KiB","MiB","GiB","TiB"],r=0,a=e;for(;a>=1024&&r<t.length-1;)a/=1024,r++;let o=a%1==0?a.toLocaleString():a.toLocaleString(void 0,{maximumFractionDigits:1});return"".concat(o," ").concat(t[r])}function l(e){return n(1024*e*1024)}function s(e){return"AllRequests"===e?"All requests":"UpstreamTypeDefault"===e?"Default per upstream":"NodeOperationIdDefault"===e?"Default per node operation":"GraphqlTableDefault"===e?"Default per GraphQL table":"object"==typeof e&&"UpstreamType"in e?"Upstream: ".concat(e.UpstreamType):"object"==typeof e&&"NodeOperationId"in e?"Node operation: ".concat(e.NodeOperationId):"object"==typeof e&&"GraphqlTable"in e?"GraphQL table: ".concat(e.GraphqlTable):"object"==typeof e&&"DecibelHttpPath"in e?"Decibel HTTP path: ".concat(e.DecibelHttpPath):"Unknown scope"}function i(e){if(e<60)return"".concat(e,"s");if(e<3600){let t=Math.floor(e/60),r=e%60;return r>0?"".concat(t,"m ").concat(r,"s"):"".concat(t,"m")}let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,o="".concat(t,"h");return r>0&&(o+=" ".concat(r,"m")),a>0&&(o+=" ".concat(a,"s")),o}function c(e){var t;let{scopeType:r,scopeValue:a}="AllRequests"===(t=e.scope)?{scopeType:"AllRequests",scopeValue:null}:"UpstreamTypeDefault"===t?{scopeType:"UpstreamTypeDefault",scopeValue:null}:"NodeOperationIdDefault"===t?{scopeType:"NodeOperationIdDefault",scopeValue:null}:"GraphqlTableDefault"===t?{scopeType:"GraphqlTableDefault",scopeValue:null}:"object"==typeof t&&"UpstreamType"in t?{scopeType:"UpstreamType",scopeValue:t.UpstreamType}:"object"==typeof t&&"NodeOperationId"in t?{scopeType:"NodeOperationId",scopeValue:t.NodeOperationId}:"object"==typeof t&&"GraphqlTable"in t?{scopeType:"GraphqlTable",scopeValue:t.GraphqlTable}:"object"==typeof t&&"DecibelHttpPath"in t?{scopeType:"DecibelHttpPath",scopeValue:t.DecibelHttpPath}:{scopeType:"AllRequests",scopeValue:null};return"".concat(e.appliesTo,"-").concat(e.limitUnit,"-").concat(e.windowSeconds,"-").concat(r).concat(a?"-".concat(a):"")}function p(e,t){switch(e){case"AllRequests":default:return"AllRequests";case"UpstreamTypeDefault":return"UpstreamTypeDefault";case"UpstreamType":return{UpstreamType:t};case"NodeOperationIdDefault":return"NodeOperationIdDefault";case"NodeOperationId":if(!t)throw Error("Scope value is required for NodeOperationId scope type");return{NodeOperationId:t};case"GraphqlTableDefault":return"GraphqlTableDefault";case"GraphqlTable":if(!t)throw Error("Scope value is required for GraphqlTable scope t
1ype");return{GraphqlTable:t};case"DecibelHttpPath":if(!t)throw Error("Scope value is required for DecibelHttpPath scope type");return{DecibelHttpPath:t}}}r.d(t,{LU:()=>c,Pk:()=>s,UK:()=>i,_C:()=>l,gD:()=>o,j9:()=>p,z3:()=>n,zO:()=>a})},71268:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var a=r(23798),o=r(64927);r(21462);var n=r(75828);function l(e){let{error:t,fallbackMessage:r,heading:l="Error loading data"}=e;return(0,a.jsx)(o.F,{heading:l,variant:"error",children:(0,n.g)(t,r)})}}},e=>{e.O(0,[1074,636,6593,8792],()=>e(e.s=21547)),_N_E=e.O()}]);
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.