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

pkg/ui: Swap in new Snapshot debug component #94701

Merged
merged 1 commit into from
Jan 11, 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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { Breadcrumbs } from "src/breadcrumbs";
// In order to provide that feature with respectable performance and an easy
// GUI, we toggle between one of several components here based on the URL
// params. To manage that navigation, we need to know the route prefix.
export const ROUTE_PREFIX = "/debug/tracez_v2/";
export const ROUTE_PREFIX = "/debug/tracez/";

export interface SnapshotPageStateProps {
sort: SortSetting;
Expand Down Expand Up @@ -308,11 +308,14 @@ export const SnapshotPage: React.FC<SnapshotPageProps> = props => {

const breadcrumbItems = [
{
link: `/debug/tracez_v2/node/${nodeID}/snapshot/${snapshotID}`,
link: join(ROUTE_PREFIX, `/node/${nodeID}/snapshot/${snapshotID}`),
name: `Node ${nodeID}, Snapshot ${snapshotID}`,
},
{
link: `/debug/tracez_v2/node/${nodeID}/snapshot/${snapshotID}/span/${spanID}`,
link: join(
ROUTE_PREFIX,
`/node/${nodeID}/snapshot/${snapshotID}/span/${spanID}`,
),
name: `${span?.operation}`,
},
];
Expand All @@ -329,7 +332,10 @@ export const SnapshotPage: React.FC<SnapshotPageProps> = props => {
items={[
...breadcrumbItems,
{
link: `/debug/tracez_v2/node/${nodeID}/snapshot/${snapshotID}/span/${spanID}/raw`,
link: join(
ROUTE_PREFIX,
`/node/${nodeID}/snapshot/${snapshotID}/span/${spanID}/raw`,
),
name: `raw trace`,
},
]}
Expand Down
4 changes: 2 additions & 2 deletions pkg/ui/workspaces/db-console/src/app.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,9 @@ describe("Routing to", () => {
});
});

describe("'/debug/tracez_v2/node/:nodeID/snapshot/:snapshotID' path", () => {
describe("'/debug/tracez/node/:nodeID/snapshot/:snapshotID' path", () => {
test("routes to <SnapshotPage> component", () => {
navigateToPath("/debug/tracez_v2/node/1/snapshot/12345");
navigateToPath("/debug/tracez/node/1/snapshot/12345");
screen.getByTestId("snapshotPage");
});
});
Expand Down
4 changes: 1 addition & 3 deletions pkg/ui/workspaces/db-console/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import HotRangesPage from "src/views/hotRanges/index";
import RecentStatementDetails from "./views/statements/recentStatementDetailsConnected";
import RecentTransactionDetails from "./views/transactions/recentTransactionDetailsConnected";
import "styl/app.styl";
import { Tracez } from "src/views/tracez/tracez";
import InsightsOverviewPage from "./views/insights/insightsOverview";
import TransactionInsightDetailsPage from "./views/insights/transactionInsightDetailsPage";
import StatementInsightDetailsPage from "./views/insights/statementInsightDetailsPage";
Expand Down Expand Up @@ -326,8 +325,7 @@ export const App: React.FC<AppProps> = (props: AppProps) => {

{/* debug pages */}
<Route exact path="/debug" component={Debug} />
<Route exact path="/debug/tracez" component={Tracez} />
<Route path="/debug/tracez_v2" component={SnapshotRouter} />
<Route path="/debug/tracez" component={SnapshotRouter} />
<Route exact path="/debug/redux" component={ReduxDebug} />
<Route exact path="/debug/chart" component={CustomChart} />
<Route
Expand Down