diff --git a/web/.env.production b/web/.env.production index d307f0c91..1fad60181 100644 --- a/web/.env.production +++ b/web/.env.production @@ -1,3 +1 @@ -NEXT_PUBLIC_ADMIN_USERNAME=admin -NEXT_PUBLIC_ADMIN_STREAMKEY=abc123 NEXT_PUBLIC_API_HOST=/ \ No newline at end of file diff --git a/web/next.config.js b/web/next.config.js index 5213ae8de..a94cfa43a 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -1,3 +1,4 @@ module.exports = { basePath: "/admin", + trailingSlash: true, }; diff --git a/web/pages/components/chart.tsx b/web/pages/components/chart.tsx index 080e722a4..5a6968f36 100644 --- a/web/pages/components/chart.tsx +++ b/web/pages/components/chart.tsx @@ -5,7 +5,7 @@ import styles from '../../styles/styles.module.css'; interface ToolTipProps { active?: boolean, - payload?: object, + payload?: {name: string, payload: {value: string, time: Date}}[], unit?: string } @@ -22,6 +22,7 @@ interface TimedValue { interface ChartProps { data?: TimedValue[], + title?: string, color: string, unit: string, dataCollections?: any[], @@ -31,19 +32,24 @@ function CustomizedTooltip(props: ToolTipProps) { const { active, payload, unit } = props; if (active && payload && payload[0]) { const time = payload[0].payload ? timeFormat("%I:%M")(new Date(payload[0].payload.time)) : ""; + + const tooltipDetails = payload.map(data => { + return
- {time} {payload[0].payload.value} {unit} -
-