Skip to content

Commit

Permalink
Merge #86990 #87008
Browse files Browse the repository at this point in the history
86990: ui: ui fixes on database page r=maryliag a=maryliag

This commit uses the count format function
for index total reads, fix the style of the
`reset all index stats` button and updates the
`User` column to `User name` column.

Partially addresses #85237

Release justification: low risk changes
Release note (ui change): Change column name from `User` to
`User Name` on Table Details, Grant tab.

87008: ui: update sub-optimal label r=maryliag a=maryliag

Update label from `Suboptimal Plan` to `Sub-Optimal Plan`.

Release justification: low risk change
Release note: None

Co-authored-by: Marylia Gutierrez <[email protected]>
  • Loading branch information
craig[bot] and maryliag committed Aug 29, 2022
3 parents 3b16435 + da261b1 + 1c42a9f commit cb57def
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export class DatabaseTablePage extends React.Component<
name: "total reads",
title: "Total Reads",
hideTitleUnderline: true,
cell: indexStat => indexStat.totalReads,
cell: indexStat => format.Count(indexStat.totalReads),
sort: indexStat => indexStat.totalReads,
},
{
Expand Down Expand Up @@ -356,10 +356,10 @@ export class DatabaseTablePage extends React.Component<

private grantsColumns: ColumnDescriptor<Grant>[] = [
{
name: "user",
name: "username",
title: (
<Tooltip placement="bottom" title="The user name.">
User
User Name
</Tooltip>
),
cell: grant => grant.user,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,14 @@
}
}
}

.index-stats__reset-btn {
color: $colors--primary-blue-3;
font-size: $font-size--medium;
line-height: $line-height--small;

&:hover {
color: $colors--primary-blue-3;
text-decoration: underline;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SummaryCard } from "../summaryCard";
import moment, { Moment } from "moment";
import { Heading } from "@cockroachlabs/ui-components";
import { Anchor } from "../anchor";
import { DATE_FORMAT_24_UTC, performanceTuningRecipes } from "../util";
import { Count, DATE_FORMAT_24_UTC, performanceTuningRecipes } from "../util";

const cx = classNames.bind(styles);

Expand Down Expand Up @@ -241,7 +241,11 @@ export class IndexDetailsPage extends React.Component<
</Tooltip>
<div>
<a
className={cx("action", "separator")}
className={cx(
"action",
"separator",
"index-stats__reset-btn",
)}
onClick={() =>
this.props.resetIndexUsageStats(
this.props.databaseName,
Expand Down Expand Up @@ -278,7 +282,7 @@ export class IndexDetailsPage extends React.Component<
</td>
<td className="table__cell">
<p className={cx("summary-card--value")}>
{this.props.details.totalReads}
{Count(this.props.details.totalReads)}
</p>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/src/insights/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const suboptimalPlanInsight = (execType: InsightExecEnum): Insight => {
`due to outdated statistics or missing indexes.`;
return {
name: InsightNameEnum.suboptimalPlan,
label: "Suboptimal Plan",
label: "Sub-Optimal Plan",
description: description,
tooltipDescription:
description + ` Click the ${execType} execution ID to see more details.`,
Expand Down

0 comments on commit cb57def

Please sign in to comment.