Migrate integrations to widgets

This commit is contained in:
Meierschlumpf
2022-12-18 21:21:23 +01:00
parent 7cb71eba84
commit e914174e78
14 changed files with 247 additions and 120 deletions

View File

@@ -35,10 +35,13 @@ export const DashDotGraph = ({ graph, isCompact, dashDotUrl }: DashDotGraphProps
const useIframeSrc = (dashDotUrl: string, graph: GraphType, isCompact: boolean) => {
const { colorScheme, colors, radius } = useMantineTheme();
const surface = (colorScheme === 'dark' ? colors.dark[7] : colors.gray[0]).substring(1); // removes # from hex value
const graphId = graph.id === 'memory' ? 'ram' : graph.id;
return (
`${dashDotUrl}` +
`?singleGraphMode=true` +
`&graph=${graph.id}` +
`&graph=${graphId}` +
`&theme=${colorScheme}` +
`&surface=${surface}` +
`&gap=${isCompact ? 10 : 5}` +