PageSourceSearch

https://ezioqwarks-mlfloweq-server.hf.space/static-files/static/js/1181.fbde8d4f.chunk.js

js ezioqwarks-mlfloweq-server.hf.space collected 2026-10-03 16:51:52 UTC 9,650 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunk_mlflow_mlflow=globalThis.webpackChunk_mlflow_mlflow||[]).push([[1181],{13249(e,i,l){l.d(i,{Y:()=>S});var t=l(15032),n=l(51477),s=l(10587),a=l(5460),d=l(78292),o=l(79357),r=l(24507),c=l(38881),g=l(43637),u=l(88728),m=l(58619),p=l(76039),h=l(17263),f=l(41),v=l(70111),Y=l(19135),x=l(70014),A=l(53665),y=l(71974),w=l(63968);const T=({experimentIds:e,showTokenStats:i=!1,additionalControls:l,hideTooltipLinks:d=!1,tooltipLinkUrlBuilder:T,tooltipLinkText:S,filters:M})=>{const{theme:b}=(0,s.u)(),[F,k]=(0,n.useState)(null),[D]=(0,o.VA)(),I=D.startTime?new Date(D.startTime).getTime():void 0,H=D.endTime?new Date(D.endTime).getTime():void 0,_=(0,A.N3)(I,H),L=null!==F&&void 0!==F?F:_,C=A.ZG[L],B=(0,n.useMemo)(()=>(0,y.yB)(I,H,C),[I,H,C]);return(0,w.FD)("div",{css:(0,t.AH)({display:"flex",flexDirection:"column",gap:b.spacing.md},""),children:[(0,w.FD)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",gap:b.spacing.sm,flexWrap:"wrap"},""),children:[l,(0,w.Y)(x.l,{value:L,onChange:k,startTimeMs:I,endTimeMs:H,allowClear:null!==F&&F!==_,onClear:()=>k(null)}),(0,w.Y)(r.$,{excludeOptions:["ALL"]})]}),(0,w.Y)(Y.F7,{experimentIds:e,startTimeMs:I,endTimeMs:H,timeIntervalSeconds:C,timeBuckets:B,hideTooltipLinks:d,tooltipLinkUrlBuilder:T,tooltipLinkText:S,filters:M,children:(0,w.FD)("div",{css:(0,t.AH)({display:"flex",flexDirection:"column",gap:b.spacing.md},""),children:[(0,w.Y)(c.a,{title:(0,w.Y)(a.A,{id:"6ejdmD",defaultMessage:"Requests"})}),(0,w.FD)(v.vK,{children:[(0,w.Y)(g.K,{}),(0,w.Y)(u.L,{})]}),i?(0,w.FD)(v.vK,{children:[(0,w.Y)(m.o,{}),(0,w.Y)(p.A,{title:(0,w.Y)(a.A,{id:"WHwU2F",defaultMessage:"Tokens per Request"}),subtitle:(0,w.Y)(a.A,{id:"A+GxQM",defaultMessage:"avg per request"})})]}):(0,w.Y)(m.o,{}),(0,w.FD)(v.vK,{children:[(0,w.Y)(h.q,{}),(0,w.Y)(f.m,{})]})]})})]})},S=e=>(0,w.Y)(d.k,{children:(0,w.Y)(T,{...e})})},1181(e,i,l){l.r(i),l.d(i,{GatewayUsagePage:()=>H,default:()=>_});var t=l(15032),n=l(51477),s=l(39521),a=l(10587),d=l(77753),o=l(63695),r=l(5460),c=l(74343),g=l(39848),u=l(56511),m=l(21602),p=l(2077);var h=l(13249),f=l(59559),v=l(76862),Y=l(78292),x=l(79357),A=l(24507),y=l(33972),w=l(71758),T=l(18105),S=l(63968);const M=({experimentIds:e,additionalFilters:i})=>{const{theme:l}=(0,a.u)(),n=(0,x.Pz)();return 0===e.length?null:(0,S.FD)(S.FK,{children:[(0,S.Y)("div",{css:(0,t.AH)({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:l.spacing.sm},""),children:(0,S.Y)(A.$,{excludeOptions:["ALL"]})}),(0,S.Y)(v.v,{experimentIds:e,disableActions:!0,timeRange:n,columnStorageKeyPrefix:"gateway-usage",additionalFilters:i})]})},b=({title:e,description:i,componentId:l})=>{const{theme:n}=(0,a.u)();return(0,S.FD)("div",{css:(0,t.AH)({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:300,textAlign:"center",padding:n.spacing.lg},""),children:[(0,S.Y)(a.ck,{css:(0,t.AH)({fontSize:48,color:n.colors.textSecondary,marginBottom:n.spacing.md},"")}),(0,S.Y)(a.T.Title,{level:3,children:e}),(0,S.Y)(a.T.Text,{color:"secondary",css:(0,t.AH)({marginBottom:n.spacing.md},""),children:i}),(0,S.Y)(s.N_,{componentId:l,to:f.Ay.gatewayPageRoute,children:(0,S.Y)(r.A,{id:"zcuHsG",defaultMessage:"Go to Endpoints"})})]})};
1var F={name:"16gsvie",styles:"min-width:200px"},k={name:"p4355k",styles:"min-width:180px"},D={name:"3z2sxu",styles:"display:flex;flex-direction:column;flex:1;overflow:hidden"},I={name:"1rb8d7z",styles:"flex:1;display:flex;flex-direction:column;min-height:0"};const H=()=>{const{theme:e}=(0,a.u)(),i=(0,c.A)(),[l,v]=(0,s.ok)(),[x,A]=(0,n.useState)(null),[H,_]=(0,n.useState)(null),[L,C]=(0,n.useState)([]),B=l.get("tab"),O=["usage","logs"].includes(B)?B:"usage",{data:R,isLoading:U}=(0,u.c)(),{data:G,isLoading:K,error:P}=(()=>{var e,i,l;const t=(0,m.I)(["auth_users"],{queryFn:p.t.listUsers,retry:!1,refetchOnWindowFocus:!1});return{data:null!==(e=null===(i=t.data)||void 0===i?void 0:i.users)&&void 0!==e?e:[],error:null!==(l=t.error)&&void 0!==l?l:void 0,isLoading:t.isLoading}})(),q=(0,n.useMemo)(()=>R.filter(e=>e.usage_tracking&&e.experiment_id),[R]),z=(0,n.useMemo)(()=>{var e;return x&&"all"!==x&&null!==(e=q.find(e=>e.endpoint_id===x))&&void 0!==e?e:null},[x,q]),N=!x||"all"===x,Q=(0,n.useMemo)(()=>N?q.map(e=>e.experiment_id).filter(Boolean):null!==z&&void 0!==z&&z.experiment_id?[z.experiment_id]:[],[N,q,z]),V=(0,n.useMemo)(()=>{const e=[];H&&e.push((0,g.Fu)(g.d7,H));const i=(0,T.Kg)(L);return i&&e.push(...i),e.length>0?e:void 0},[H,L]),j=(0,n.useMemo)(()=>{if(H)return[{column:"user",operator:y.tl.EQUALS,value:H}]},[H]),E=(0,n.useMemo)(()=>(0,T.Q1)(L),[L]),W=(0,n.useMemo)(()=>(e,i,l)=>{const t=new URLSearchParams;return t.set("tab","logs"),t.set("startTimeLabel","CUSTOM"),t.set("startTime",new Date(i).toISOString()),t.set("endTime",new Date(i+1e3*l).toISOString()),null===E||void 0===E||E.forEach(e=>t.append("filter",e)),`${f.Ay.usagePageRoute}?${t.toString()}`},[E]),$=(0,n.useMemo)(()=>[{value:"state",label:i.formatMessage({id:"QWcxD+",defaultMessage:"State"}),valueOptions:T.Pk.map(e=>({value:e,label:i.formatMessage(y.Ab[e])}))}],[i]),Z=q.length>0,X=(0,S.FD)(S.FK,{children:[(0,S.FD)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",gap:e.spacing.xs},""),children:[(0,S.Y)(a.T.Text,{color:"secondary",children:(0,S.Y)(r.A,{id:"KcGozs",defaultMessage:"Endpoint:"})}),(0,S.FD)(d.SimpleSelect,{id:"gateway-usage-endpoint-selector",componentId:"mlflow.gateway.usage.endpoint-selector",value:null!==x&&void 0!==x?x:"all",onChange:({target:e})=>A("all"===e.value?null:e.value),css:F,disabled:U,children:[(0,S.Y)(d.SimpleSelectOption,{value:"all",children:(0,S.Y)(r.A,{id:"9G21RV",defaultMessage:"All endpoints"})}),q.map(e=>(0,S.Y)(d.SimpleSelectOption,{value:e.endpoint_id,children:e.name},e.endpoint_id))]}),U&&(0,S.Y)(a.ah,{size:"small"})]}),!P&&(0,S.FD)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",gap:e.spacing.xs},""),children:[(0,S.Y)(a.T.Text,{color:"secondary",children:(0,S.Y)(r.A,{id:"hX4/P0",defaultMessage:"User:"})}),(0,S.FD)(d.SimpleSelect,{id:"gateway-usage-user-selector",componentId:"mlflow.gateway.usage.user-selector",value:null!==H&&void 0!==H?H:"all",onChange:({target:e})=>_("all"===e.value?null:e.value),css:k,disabled:K||0===G.length,children:[(0,S.Y)(d.SimpleSelectOption,{value:"all",children:(0,S.Y)(r.A,{id:"s2G/vI",defaultMessage:"All users"})}),G.map(e=>(0,S.Y)(d.SimpleSelectOption,{value:String(e.id),children:e.username},e.id))]}),K&&(0,S.Y)(a.ah,{size:"small"})]})]});return(0,S.FD)("div",{css:D,children:[(0,S.FD)("div",{css:(0,t.AH)({padding:e.spacing.md,paddingBottom:0},""),children:[(0,S.FD)("div",{css:(0,t.AH)({display:"flex",flexDirection:"column",gap:e.spacing.xs,marginBottom:e.spacing.md},""),children:[(0,S.Y)(d.Breadcrumb,{includeTrailingCaret:!0,children:(0,S.Y)(d.Breadcrumb.Item,{children:(0,S.Y)(s.N_,{componentId:"mlflow.gateway.usage.breadcrumb_gateway_link",to:f.Ay.gatewayPageRoute,children:(0,S.Y)(o.H,{})})})}),(0,S.FD)("div",{css:(0,t.AH)({display:"flex",gap:e.spacing.sm,alignItems:"center"},""),children:[(0,S.Y)("div",{css:(0,t.AH)({borderRadius:e.borders.borderRadiusSm,backgroundColor:e.colors.backgroundSecondary,padding:e.spacing.sm,display:"flex"},""),children:(0,S.Y)(a.ck,{})}),(0,S.Y)(a.T.Title,{withoutMargins:!0,level:2,children:(0,S.Y)(r.A,{id:"Ai/ANo",defaultMessage:"Usage"})})]})]}),Z&&(0,S.Y)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",gap:e.spacing.md,marginBottom:e.spacing.sm},""),children:X})]}),(0,S.FD)(a.ht.Root,{componentId:"mlflow.gateway.usage.tabs",valueHasNoPii:!0,value:O,onValueChange:e=>{v(i=>(i.set("tab",e),i),{replace:!0})},css:I,children:[(0,S.Y)("div",{css:(0,t.AH)({paddingLeft:e.spacing.md,paddingRight:e.spacing.md},""),children:(0,S.FD)(a.ht.List,{children:[(0,S.Y)(a.ht.Trigger,{value:"usage",children:(0,S.Y)(r.A,{id:"0QTEQi",defaultMessage:"Usage"})}),(0,S.Y)(a.ht.Trigger,{value:"logs",children:(0,S.Y)(r.A,{id:"xvd8So",defaultMessage:"Logs"})})]})}),(0,S.Y)(a.ht.Content,{value:"usage",css:(0,t.AH)({flex:1,overflow:"auto",padding:e.spacing.md},""),children:U||Z?U||Q.length>0?(0,S.Y)(h.Y,{experimentIds:Q,showTokenStats:!0,additionalControls:(0,S.Y)(w.o,{filters:L,setFilters:C,
1columnOptions:$}),tooltipLinkUrlBuilder:W,tooltipLinkText:(0,S.Y)(r.A,{id:"V+4GZQ",defaultMessage:"View logs for this period"}),filters:V}):(0,S.Y)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",justifyContent:"center",minHeight:200,color:e.colors.textSecondary},""),children:(0,S.Y)(a.T.Text,{children:(0,S.Y)(r.A,{id:"5T4wqF",defaultMessage:"Select an endpoint to view usage metrics"})})}):(0,S.Y)(b,{title:(0,S.Y)(r.A,{id:"CO81il",defaultMessage:"No usage data available"}),description:(0,S.Y)(r.A,{id:"54bvuq",defaultMessage:"Once you have endpoints with usage tracking enabled, usage metrics will appear here."}),componentId:"mlflow.gateway.usage.go_to_endpoints_link"})}),(0,S.Y)(a.ht.Content,{value:"logs",css:(0,t.AH)({flex:1,display:"flex",flexDirection:"column",overflow:"hidden",padding:e.spacing.md},""),children:U||Z?Q.length>0?(0,S.Y)(Y.k,{children:(0,S.Y)(M,{experimentIds:Q,additionalFilters:j})}):(0,S.Y)("div",{css:(0,t.AH)({display:"flex",alignItems:"center",justifyContent:"center",minHeight:200,color:e.colors.textSecondary},""),children:(0,S.Y)(a.T.Text,{children:(0,S.Y)(r.A,{id:"YrYgo5",defaultMessage:"Select an endpoint to view logs"})})}):(0,S.Y)(b,{title:(0,S.Y)(r.A,{id:"qBGVKG",defaultMessage:"No logs available"}),description:(0,S.Y)(r.A,{id:"oZ4C/F",defaultMessage:"Once you have endpoints with usage tracking enabled, logs will appear here."}),componentId:"mlflow.gateway.usage.go_to_endpoints_link_logs"})})]})]})},_=H}}]);

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.