Skip to content
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
178 changes: 83 additions & 95 deletions .lore.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ View a dashboard

**Flags:**
- `-w, --web - Open in browser`
- `-s, --sixel - Render the dashboard as a sixel image`
- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data`
- `-r, --refresh <value> - Auto-refresh interval in seconds (default: 60, min: 10)`
- `-t, --period <value> - Time range: "7d", "2026-07-01..2026-08-01", ">=2026-07-01"`
Expand Down
19 changes: 17 additions & 2 deletions packages/cli/src/commands/dashboard/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type ViewFlags = {
readonly period?: TimeRange;
readonly json: boolean;
readonly fields?: string[];
readonly sixel: boolean;
};

/**
Expand Down Expand Up @@ -107,7 +108,7 @@ function buildViewData(
},
widgetResults: Map<number, WidgetDataResult>,
widgets: DashboardWidget[],
opts: { period: string; url: string }
opts: { period: string; url: string; sixel: boolean }
): DashboardViewData {
return {
id: dashboard.id,
Expand All @@ -117,6 +118,7 @@ function buildViewData(
url: opts.url,
dateCreated: dashboard.dateCreated,
environment: dashboard.environment,
sixel: opts.sixel,
widgets: widgets.map((w, i) => ({
title: w.title,
displayType: w.displayType,
Expand Down Expand Up @@ -188,6 +190,11 @@ export const viewCommand = buildCommand({
brief: "Open in browser",
default: false,
},
sixel: {
kind: "boolean",
brief: "Render the dashboard as a sixel image",
default: false,
},
fresh: FRESH_FLAG,
refresh: {
kind: "parsed",
Expand All @@ -203,7 +210,13 @@ export const viewCommand = buildCommand({
optional: true,
},
},
aliases: { ...FRESH_ALIASES, w: "web", r: "refresh", t: "period" },
aliases: {
...FRESH_ALIASES,
w: "web",
s: "sixel",
r: "refresh",
t: "period",
},
},
async *func(this: SentryContext, flags: ViewFlags, ...args: string[]) {
applyFreshFlag(flags);
Expand Down Expand Up @@ -281,6 +294,7 @@ export const viewCommand = buildCommand({
const viewData = buildViewData(dashboard, widgetData, widgets, {
period: formatTimeRangeFlag(timeRange),
url,
sixel: flags.sixel,
});

if (!isFirstRender) {
Expand Down Expand Up @@ -312,6 +326,7 @@ export const viewCommand = buildCommand({
buildViewData(dashboard, widgetData, widgets, {
period: formatTimeRangeFlag(timeRange),
url,
sixel: flags.sixel,
})
);
return { hint: `Dashboard: ${url}` };
Expand Down
Loading
Loading