Skip to content

Commit

Permalink
Merge pull request #133268 from kyle-a-wong/backport24.2-133187
Browse files Browse the repository at this point in the history
release-24.2: ui: remove "Range Count" column from db page
  • Loading branch information
kyle-a-wong authored Oct 23, 2024
2 parents 25d6235 + 3aed352 commit 1f0a652
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cockroachlabs/cluster-ui",
"version": "24.2.1",
"version": "24.2.2",
"description": "Cluster UI is a library of large features shared between CockroachDB and CockroachCloud",
"repository": {
"type": "git",
Expand Down
4 changes: 0 additions & 4 deletions pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function newDatabaseDetailsSpanStatsResponse(): DatabaseDetailsSpanStatsResponse
approximate_disk_bytes: 0,
live_bytes: 0,
total_bytes: 0,
range_count: 0,
},
error: undefined,
};
Expand Down Expand Up @@ -332,7 +331,6 @@ export type DatabaseSpanStatsRow = {
approximate_disk_bytes: number;
live_bytes: number;
total_bytes: number;
range_count: number;
};

function formatSpanStatsExecutionResult(
Expand All @@ -357,7 +355,6 @@ function formatSpanStatsExecutionResult(
if (txnResult.rows.length === 1) {
const row = txnResult.rows[0];
out.spanStats.approximate_disk_bytes = row.approximate_disk_bytes;
out.spanStats.range_count = row.range_count;
out.spanStats.live_bytes = row.live_bytes;
out.spanStats.total_bytes = row.total_bytes;
} else {
Expand Down Expand Up @@ -511,7 +508,6 @@ export function createDatabaseDetailsSpanStatsReq(
): SqlExecutionRequest {
const statement = {
sql: `SELECT
sum(range_count) as range_count,
sum(approximate_disk_bytes) as approximate_disk_bytes,
sum(live_bytes) as live_bytes,
sum(total_bytes) as total_bytes
Expand Down
23 changes: 0 additions & 23 deletions pkg/ui/workspaces/cluster-ui/src/databasesPage/databasesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,29 +571,6 @@ export class DatabasesPage extends React.Component<
className: cx("databases-table__col-table-count"),
name: "tableCount",
},
{
title: (
<Tooltip
placement="bottom"
title="The total number of ranges across all tables in the database."
>
Range Count
</Tooltip>
),
cell: database => (
<LoadingCell
requestError={database.spanStatsRequestError}
queryError={database.spanStats?.error}
loading={database.spanStatsLoading}
errorClassName={cx("databases-table__cell-error")}
>
{database.spanStats?.range_count}
</LoadingCell>
),
sort: database => database.spanStats?.range_count,
className: cx("databases-table__col-range-count"),
name: "rangeCount",
},
{
title: (
<Tooltip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe("DatabaseDetails sagas", () => {
spanStats: {
approximate_disk_bytes: 100,
live_bytes: 200,
range_count: 300,
total_bytes: 400,
error: undefined,
},
Expand Down
2 changes: 0 additions & 2 deletions pkg/ui/workspaces/db-console/src/util/api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ describe("rest api", function () {
approximate_disk_bytes: 100,
live_bytes: 200,
total_bytes: 300,
range_count: 400,
},
],
},
Expand All @@ -130,7 +129,6 @@ describe("rest api", function () {
expect(res.results.spanStats.approximate_disk_bytes).toEqual(100);
expect(res.results.spanStats.live_bytes).toEqual(200);
expect(res.results.spanStats.total_bytes).toEqual(300);
expect(res.results.spanStats.range_count).toEqual(400);
});
});
});
Expand Down

0 comments on commit 1f0a652

Please sign in to comment.