zui icon indicating copy to clipboard operation
zui copied to clipboard

Help users pick a pool for their new Query Session

Open philrz opened this issue 1 year ago • 1 comments

Repro is with Zui commit a20f709.

I was doing some testing as a user mostly familiar with the prior app workflows and new to the Session Flow introduced in #2439. As shown in the video below, it made sense to me that when clicking "Query Pool" from a pool info page that it started me out in a new Query Session with that pool already selected in the "FROM" pull-down. However, when I later clicked "+" to open a new Query Session tab, I was confused by the absence of a similar "FROM" pull-down. I thought that maybe some kind of "blank" pull-down might be shown to help me make a pool selection.

https://user-images.githubusercontent.com/5934157/183520365-5fda4898-8da8-44ff-96d0-615e77f09af0.mp4

I showed this to @jameskerr and he reminded me that that the "FROM" is actually a "Pin" query element, so the way to add it in a new tab would be to click the "Pins" pull-down as I do later in the video and select "New "From' Pin". This works as shown in the video, but here's some additional thoughts on how this could be made easier for me to have figured out on my own.

  1. @jameskerr mentioned that there's already plans to move the "Pins" button closer to the actual pins. Indeed, if that had been the case (e.g., if "Pins" were just to the left of where the "FROM" was previously) I'd have made the connection to click it and see the 'From' option.

  2. As shown in the video, when "New "From' Pin" is clicked, it effectively creates a sort of "blank" pull-down selector. Therefore, when a user clicks to open a new Query Session, it might be helpful to do this for them. Granted, a user at this point could manually type the from "dce_rpc.log.gz" as part of a whole query, and this might indeed be desirable for some users that are pasting fully-formed Zed from CLI use cases. However, I suspect that more app users are going to be working mostly/entirely within the app and hence would appreciate saving the clicks of adding a pin.

  3. Now that I knew all this, on a related topic I asked @jameskerr why clicking "Query Pool" doesn't currently auto-add a "Time Range" pin with the start/end times for the pool key already filled out, since that would seem to match what we're doing with the auto-added "FROM". @jameskerr acknowledged that this is something he's thinking about currently as he's working on bringing back the Zeek-centric histogram (#2472).

philrz avatar Aug 08 '22 22:08 philrz

I see now that part of this is already covered by #2386.

philrz avatar Aug 09 '22 15:08 philrz

If there is no pool selected, or if there is a "No pool specified" error, we should turn the "results" area into a list of pools that when one is clicked adds a from pin to the editor.

jameskerr avatar Aug 22 '22 17:08 jameskerr

Verified in Brim commit 6eaaa54.

As shown in the attached video, now when a new Query Session is started, the user is immediately shown a list of available pools to choose from if they want to query one with a single click. Of course they're still free to type from selections directly into the query editor, such as if they wanted to query data from multiple pools at the same time.

https://user-images.githubusercontent.com/5934157/192636092-ac1b318f-6cd7-4a5c-96de-ea7318181c60.mp4

Thanks @jameskerr!

philrz avatar Sep 27 '22 21:09 philrz