cluster-ui: add button to reset SQL stats on statement page and txn page#271
cluster-ui: add button to reset SQL stats on statement page and txn page#271Azhng merged 1 commit intocockroachdb:masterfrom
Conversation
| return `Last cleared ${moment.utc(lastReset).format(DATE_FORMAT)}`; | ||
| }; | ||
|
|
||
| const renderResetSQLStats = (resetSQLStats: () => void) => { |
There was a problem hiding this comment.
for both render reset stats and tooltip there is no need to pass parameters (since they're both static) and they look very simple, so I don't think is worth creating a render function for each one (the last cleared render requires some "calculation", so it's better to leave it separated), but I would suggest add those two renders directly
5b6ad95 to
dcbf151
Compare
| .tooltip-hover-area { | ||
| padding-top: 3px; | ||
| padding-right: 10px; | ||
| } No newline at end of file |
There was a problem hiding this comment.
Can we get a new line here? 😄
| <div> | ||
| <Tooltip text={toolTipText} className={cxStats("align-float")}> | ||
| <div className={cxStats("tooltip-hover-area")}> | ||
| <div className={cxStmt("numeric-stats-table__info-icon")}>i</div> |
There was a problem hiding this comment.
We have an InfoCircle icon, you might be interested in.
import { Icon } from "@cockroachlabs/ui-components";
...
<Icon iconName="InfoCircle" />| {activeFilters ? resultsCountAndClear : resultsPerPageLabel} | ||
| </h4> | ||
| <h4 className={lastCleared}>{renderLastCleared(lastReset)}</h4> | ||
| <div> |
There was a problem hiding this comment.
Right now you are floating the children of this div. I think you could get the same effect by adding a "display:flex" to this container and not need to apply styles to the individual children.
dcbf151 to
848763b
Compare
|
TFTR! |
63342: ui: add button to reset SQL stats r=Azhng a=Azhng Release note (ui change): User can now reset SQL stats from DB Console. Follow up to: cockroachdb/ui#271 Closes #33315 63401: ui: e2e tests, improved cypress test for tsx, overview and db page r=nanduu04 a=nanduu04 Previously, only visual regression tests were written Wrote cypress tests using the cypress-testing-library [CRDB-2388](https://cockroachlabs.atlassian.net/browse/CRDB-2388?atlOrigin=eyJpIjoiOWIzNzY0ZjkzY2RhNGU3ZTgyZTUyOTY5MjE4ZmM5YmIiLCJwIjoiaiJ9) Release note: None 63713: config: deflake TestMarshalableZoneConfigRoundTrip r=aayushshah15 a=aayushshah15 A previous change (#63079) made this test flakey by (needlessly) making one of the marshalled fields a value derived from two other fields (as opposed to just one). This commit fixes the flake. Release note: None 63726: install: fix log flags in roachprod start r=knz a=tbg I broke this in #63472, twofold. 1. if the version switch returned false, we weren't passing log flags at all, so there weren't any log files. 2. the version switch returned false on current master, since 21.1 is not tagged yet (we're still in the prerelease versions, currently at 21.1.0-alpha.3). I tested that this fix works. Release note: None Co-authored-by: Azhng <archer.xn@gmail.com> Co-authored-by: Nandu Pokhrel <nandup@cockroachlabs.com> Co-authored-by: Aayush Shah <aayush.shah15@gmail.com> Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
cluster-ui: add button to reset SQL stats on statement page and txn page
Addresses cockroachdb/cockroach#33315
Before:
Stmt page

Txn Page

After:
Stmt Page:

Txn Page:

Tooltip
