This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BlueEntityRefLink = styled(EntityRefLink)({ | |
| '& a': { | |
| color: '#1976d2', | |
| textDecoration: 'none', | |
| '&:hover': { | |
| color: '#1565c0', | |
| textDecoration: 'underline', | |
| }, | |
| }, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "apNumber": "49201", | |
| "certificates": [ | |
| { | |
| "id": "83d1042f-c9da-48b0-a4b0-35cfdb7b4d31", | |
| "certName": "www.store-east.example.com", | |
| "expiresAt": "2025-10-04T18:25:43Z", | |
| "daysRemaining": 103 | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from ‘react’; | |
| import { Box, Typography, Chip, Link, Paper } from ‘@mui/material’; | |
| import { PieChart, Pie, Cell, ResponsiveContainer } from ‘recharts’; | |
| const ExpandedCodeCoverageContent = ({ data }) => { | |
| // Transform coverage percentage for the donut chart | |
| const chartData = [ | |
| { name: ‘Covered’, value: data.coverage }, | |
| { name: ‘Uncovered’, value: 100 - data.coverage } | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from ‘react’; | |
| import { Box, Typography, Chip, Link, Paper, useTheme } from ‘@mui/material’; | |
| import { AssetCodeCoverageInfo } from ‘../../types/api’; | |
| import DonutChart from ‘./DonutChart’; | |
| import moment from ‘moment’; | |
| interface ExtendedAssetCodeCoverageInfo extends AssetCodeCoverageInfo { | |
| codeSmells?: number; | |
| codeQuality?: string; | |
| codeCoverageReportUrl?: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useQueries } from '@tanstack/react-query'; | |
| function useAggregatedIncidents() { | |
| const queryClient = useQueryClient(); | |
| const groupIds = ['group1', 'group2', 'group3']; | |
| // Dynamically create queries for each group | |
| const groupQueries = useQueries({ | |
| queries: groupIds.map((groupId) => ({ | |
| queryKey: ['incidents', groupId], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ARG PY_BASE=fcr.fmr.com/python:3.11-slim | |
| FROM ${PY_BASE} as runtime | |
| ENV HOME=/home/litellm | |
| RUN useradd -m -s /bin/bash litellm && python -m venv ${HOME}/venv | |
| ENV PATH="${HOME}/venv/bin:${PATH}" PYTHONHTTPSVERIFY=0 | |
| USER litellm | |
| WORKDIR /app | |
| ARG LITELLM_VERSION=1.74.3 | |
| ARG EXTRAS="proxy,prometheus,prisma,langfuse" | |
| RUN --mount=type=cache,target=${HOME}/.cache/pip pip install --no-cache-dir --trusted-host pypi.org --trusted-host files.pythonhosted.org "litellm[${EXTRAS}]==${LITELLM_VERSION}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://opencode.ai/config.json", | |
| // 3-a. Register WebUI as a provider | |
| "provider": { | |
| "openwebui": { | |
| "npm": "@ai-sdk/openai-compatible", // tells OpenCode the wire protocol | |
| "name": "Open WebUI (local)", // label shown in the /models list | |
| "options": { | |
| "baseURL": "http://localhost:3000/api" /* <-- your URL here */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -H "Authorization: Bearer $OPENWEBUI_API_KEY" http://localhost:3000/api/models | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| general_settings: | |
| master_key: sk-ADMIN-KEY # your admin key | |
| user_header_name: X-OpenWebUI-User-Email | |
| litellm_settings: | |
| disable_end_user_cost_tracking: false | |
| disable_end_user_cost_tracking_prometheus_only: false | |
| extra_spend_tag_headers: | |
| - "X-OpenWebUI-User-Email" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To implement a circuit breaker that tracks errors per backend plugin in Backstage—triggering a cooldown (circuit open) when a plugin returns too many errors (e.g., 5xx status codes)—without requiring plugin developers to modify their code, customize the httpRouterService using a service factory override. This leverages Backstage’s backend architecture, where each plugin has its own isolated httpRouter instance (an Express Router), mounted at /api/. By overriding the core httpRouterService factory, you can inject a per-plugin circuit breaker middleware that monitors response statuses globally, applying to all plugins, including third-party ones. 20 0 11 | |
| This approach uses Opossum to manage the circuit state per plugin, manually recording successes/failures based on response status codes (e.g., counting 5xx as failures). When the error threshold is exceeded, the circuit opens, returning a 503 response for that plugin’s routes during cooldown. It aligns with the circuit breaker pattern for server-side resilience |