Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overview page to work with the new DASHBOARD_UID env var #32279

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dashboard/client/src/pages/metrics/Metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export const Metrics = ({ newIA = false }: MetricsProps) => {
})}
>
<Button
href={grafanaHost}
href={`${grafanaHost}/d/${grafanaDefaultDashboardUid}`}
target="_blank"
rel="noopener noreferrer"
endIcon={<RiExternalLinkLine />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ export const ClusterUtilizationCard = ({
}: ClusterUtilizationCardProps) => {
const classes = useStyles();

const { grafanaHost, prometheusHealth, sessionName } =
useContext(GlobalContext);
const path =
"/d-solo/rayDefaultDashboard/default-dashboard?orgId=1&theme=light&panelId=41";
const {
grafanaHost,
prometheusHealth,
sessionName,
grafanaDefaultDashboardUid = "rayDefaultDashboard",
} = useContext(GlobalContext);
const path = `/d-solo/${grafanaDefaultDashboardUid}/default-dashboard?orgId=1&theme=light&panelId=41`;
const timeRangeParams = "&from=now-30m&to=now";

return (
Expand Down
11 changes: 7 additions & 4 deletions dashboard/client/src/pages/overview/cards/NodeCountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ type NodeCountCardProps = {
export const NodeCountCard = ({ className }: NodeCountCardProps) => {
const classes = useStyles();

const { grafanaHost, prometheusHealth, sessionName } =
useContext(GlobalContext);
const path =
"/d-solo/rayDefaultDashboard/default-dashboard?orgId=1&theme=light&panelId=24";
const {
grafanaHost,
prometheusHealth,
sessionName,
grafanaDefaultDashboardUid = "rayDefaultDashboard",
} = useContext(GlobalContext);
const path = `/d-solo/${grafanaDefaultDashboardUid}/default-dashboard?orgId=1&theme=light&panelId=24`;
const timeRangeParams = "&from=now-30m&to=now";

return (
Expand Down