unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
2 lines (1 loc) • 758 B
JavaScript
import{bc as a,ba as i,b9 as c,r as u,bb as h,j as n}from"./index-BAMIkcom.js";const f=(e={})=>{const{uiConfig:{prometheusAPIAvailable:r}}=a(),{data:t,error:s,mutate:o}=i(r,{},c("api/admin/metrics/rps"),l,e);return u.useMemo(()=>({metrics:t,loading:!s&&!t,refetch:()=>o(),error:s}),[t,s,o])},l=e=>fetch(e).then(h("Instance Metrics")).then(r=>r.json()),p=()=>{const{uiConfig:{prometheusAPIAvailable:e}}=a();return e?null:n.jsxs("p",{children:["This view requires the ",n.jsx("strong",{children:"PROMETHEUS_API"})," environment variable to be set. Refer to our"," ",n.jsx("a",{href:"https://docs.getunleash.io/concepts/network-view#data-source",target:"_blank",rel:"noreferrer",children:"documentation"})," ","for more information."]})};export{p as N,f as u};