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

"Create Recording" view #59

Merged
merged 16 commits into from
Apr 30, 2020

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Apr 24, 2020

This PR adds an initial pass at #58 and an associated minor enhancement to #57 .

A new "Create Recording" view is added, which is routed as a child of the Recordings List view. The Recordings List gains a
"Create" toolbar button which links to the new view.

The new view is just a form with a bit of logic to determine what command name and arguments to use for the recording
request sent to ContainerJFR. When the request is successfully submitted, the view routes back to the Recordings List.
If the user cancels out of the view then they are returned to their previous location - currently this can only be the
Recordings List, but other links are possible in the future.

Not yet handled:
1. input validation
2. any system for notifying users of what went wrong if the request fails (invalid input, duplicate recording name, etc.)
3. the app Nav bar will not indicate any location when the user is in the Create Recording view. It should probably highlight the parent path as active
4. breadcrumbs at the top of the view

image
image
image

image

@jiekang
Copy link
Contributor

jiekang commented Apr 30, 2020

@andrewazores I noticed you ended up addressing 1,3 and 4. Are you planning to address 2 here too?

@andrewazores
Copy link
Member Author

Just edited the initial text to cross off that issue as well actually. It was addressed by the last three commits in the series.

@jiekang
Copy link
Contributor

jiekang commented Apr 30, 2020

Oh nice! My bad oops.

Copy link
Contributor

@jiekang jiekang left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrewazores andrewazores merged commit 0cbbf4e into cryostatio:react Apr 30, 2020
@andrewazores andrewazores deleted the react-create-recording branch April 30, 2020 21:16
andrewazores added a commit to andrewazores/cryostat-web that referenced this pull request May 19, 2020
* Set up "Create Recording" view routing

* Add public function for generating message IDs

* Implement custom recording creation form

* Render continuous recording duration as Continuous rather than 0s

* Nest routes, style nav active if route/child match

* Add navigable breadcrumbs replacing page titles

* Extract BreadcrumbPage component

* Validate recording name

Add form property to display invalid style when recording name provided
is invalid

* Constrain duration input to minimum of 0

* Validate recording event specifier string

Add form properties to style event specifier string text-area as invalid
if the specifier is invalid

* Update Template form input if user manually inputs matching name

* Add event specifier string tooltip icon

* Add global toast notifications

* Inform user of form issues and recording creation status via toast

* CommandChannel uses Notifications for user error messages

* Reformat tooltip for readability
andrewazores added a commit that referenced this pull request May 20, 2020
* Initial rewrite commit using patternfly-react-seed

* Initial port of command channel service

* Initial port of API service

* Very rough auth flow support

* Use function components to avoid 'this' binding complications

* Add component for (dis)connecting targets

* Update Select state on selection

* Include target connectUrl in select option label

* Add ContainerNode icon to Select

* Add title label to Select

* Use Grid layout

* Allow message ID to be supplied by caller

* 'Dynamic' routes only added when target connected

* Update label using is-connected listener

* Remove default Dashboard and Support pages

* Add rudimentary recording table view

* Update README

* Split Login component into React Form components (#52)

Basic login form asks for separate username and password, Bearer form
asks for just auth token

Additionally, use Card styling

* Add TargetSelect widget on RecordingList (#51)

* Add TargetSelect on recordings list view

* Only allow target disconnection from dashboard select

* Do not send messages before command channel is ready

* Add precondition to sendMessage ensuring channel is ready before messages processed

* Refactor to extract reusable TargetView container component

* allowDisconnect prop is optional, default false

* Each TargetView child becomes its own GridItem

* Dashboard reuses TargetView

* Update Route page titles to match components

* TargetView uses Stack layout rather than Grid

* Wrap TargetSelect contents within Card

* Wrap RecordingList in Card

* Include target port in render and command args

* Send user back to login when command channel connection is lost (#53)

* Clean up Patternfly Seed remnants (#62)

* Replace Seed app title

* Remove unused header "Toolbar" example

* "Create Recording" view (#59)

* Set up "Create Recording" view routing

* Add public function for generating message IDs

* Implement custom recording creation form

* Render continuous recording duration as Continuous rather than 0s

* Nest routes, style nav active if route/child match

* Add navigable breadcrumbs replacing page titles

* Extract BreadcrumbPage component

* Validate recording name

Add form property to display invalid style when recording name provided
is invalid

* Constrain duration input to minimum of 0

* Validate recording event specifier string

Add form properties to style event specifier string text-area as invalid
if the specifier is invalid

* Update Template form input if user manually inputs matching name

* Add event specifier string tooltip icon

* Add global toast notifications

* Inform user of form issues and recording creation status via toast

* CommandChannel uses Notifications for user error messages

* Reformat tooltip for readability

* Recording List overhaul as Data List (#63)

* Replace React Table with Data List for flexibility

Render recording download and report URLs as downloadable links

* Add row checkboxes

* Implement button for deleting recordings

* Implement button for stopping recordings

* Extract toolbar to local function component

* Append .jfr to recording download request filename

* Enable Stop button only when some selected recording is RUNNING/STARTING

* Initial Events view (#54)

* Add first-pass impls of Events components

* Add event template filtering

* Add event-types table pagination

* Move event type options into collapsible rows

And set event tables to compact styling

* Add event type filtering

* Apply changes from 'npm run format'

* Fix uppercase/lowercase filtering bug

* Allow comma-delimited category string matches

* Re-apply 'npm run format'

* Recalculate page number from previous perPage

Maintain state for previous count of items per page and recalculate the
page number and displayed slice to keep the current items in view when
the user changes the count per page

* Correct item count when filter text is non-empty

* Use eval-source-map in prod mode (#68)

Fixes an issue where invalid prod mode source maps cause browsers to be
unable to open the client when built in prod mode.

See webpack/webpack#8302

* Prefix request paths with /api/v1 (#66)

Related to cryostatio/cryostat-legacy#148

* Add ability to create Snapshot recordings (#67)

* Extract custom recordings form component

* Add tabset around card body

* Add Snapshot recording form

* Add "Archived Recordings" view tab (#69)

* Extract active recording list component

* Add Archived Recordings view

Add Archived Recordings view under Recordings List tab, visible/enabled
only when the ContainerJFR instance supports archiving

* Add "Archive" button to active recordings view

Add button allowing users to select active recordings and save them to
the archives

Fixes #57

* Immediately refresh archived list when save message observed

* Refactor to extract shared data list table element

* Use PF DataToolbar instead of plain Toolbar

* Add action button for creating recordings from template (#70)

* Add action button for creating recordings from Event Templates

Related to #58

* Restyle toolbars using PF DataToolbar

* Do not (un)mount child components on tab selection
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.

2 participants