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

ui: add plan gist as option on bundle collection #110931

Merged
merged 1 commit into from Sep 20, 2023

Conversation

maryliag
Copy link
Contributor

Note to reviewers: There is another option to get any plan except from the selected gist, but that is not part of this PR. Once a design is created, this option can be added.


Part Of #103018

This commit adds an option to collect statement bundle based on a specific plan gist.

Screenshot 2023-09-19 at 3 18 01 PM

https://www.loom.com/share/59335438f0884b75a7d163d96effe5a8

Release note (ui change): Add option to filter out by specific plan gist when collecting a statement bundle.

@maryliag maryliag requested review from koorosh and a team September 19, 2023 19:59
@maryliag maryliag requested a review from a team as a code owner September 19, 2023 19:59
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@maryliag maryliag force-pushed the gist-modal branch 2 times, most recently from 77fab29 to ca5ef87 Compare September 20, 2023 12:48
Part Of cockroachdb#103018

This commit adds an option to collect statement bundle
based on a specific plan gist.

Release note (ui change): Add option to filter out by specific
plan gist when collecting a statement bundle.
@maryliag
Copy link
Contributor Author

bors r+

@@ -1021,6 +1021,7 @@ export class StatementDetails extends React.Component<
onSortingChange={this.props.onSortingChange}
currentScale={this.props.timeScale}
onChangeTimeScale={this.changeTimeScale}
planGists={this.props.statementDetails.statement.stats.plan_gists}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is plan_gists always going to exists or do we need to do some optional chaining here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always going to exist

value={selectedPlanGist}
defaultValue={planGists ? planGists[0] : ""}
onChange={(selected: string) =>
setSelectedPlanGist(selected)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can skip creating the anon function here and just pass in setSelectedPlanGist since the params line up and there's no extra work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting a lint error, because the default is int, so I need to create this way to get the parameter as string

@maryliag
Copy link
Contributor Author

bors r-

@craig
Copy link
Contributor

craig bot commented Sep 20, 2023

Canceled.

@maryliag
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 20, 2023

Build succeeded:

@craig craig bot merged commit 2a23692 into cockroachdb:master Sep 20, 2023
8 checks passed
@maryliag maryliag deleted the gist-modal branch September 21, 2023 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants