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

Embedded components (SearchTraces and Tracepage ) #263

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

aljesusg
Copy link
Contributor

@aljesusg aljesusg commented Oct 8, 2018

Related issue : #248

The point is make a PoC about how whould this look .

We have here 2 uses of cases:

  • Show the results of a search
    results

  • Show a Trace
    trace

So I added query param called embed, with this params the top navigation and search are removed.
See demo GIF

embed_components

How works ? pass embed like a query param

TracePage View

trace

  • minimap option
  • details option

SearchTraces View

search

  • disableComparision option
  • hideGraph option

@aljesusg
Copy link
Contributor Author

aljesusg commented Oct 9, 2018

Kiali PoC in kiali/kiali-ui#736 and how looks
poc kiali

@objectiser
Copy link
Contributor

@aljesusg Is the time duration linked to the duration used on other pages? So if navigating from a page where duration is set to 30mins, that will be used when navigating to the traces page?

Will you also be supporting the tag filter field?

@aljesusg
Copy link
Contributor Author

aljesusg commented Oct 9, 2018

@objectiser this form is a created form in the application that is passed to the /search url like query params.

Example:
When the user cahnge my form I opoen an iframe to this url with the params that I have in the form
search?end=1539087907927000&limit=100&lookback=2d&maxDuration&minDuration&service=productpage&start=1538915107927000&tags=%7B"error"%3A"true"%7D

@aljesusg aljesusg changed the title WIP PoC - Embed components WIP PoC - Embedded components Oct 9, 2018
@aljesusg aljesusg force-pushed the embed_results_and_page branch from 9909f47 to 8515660 Compare October 11, 2018 08:28
@codecov
Copy link

codecov bot commented Oct 11, 2018

Codecov Report

Merging #263 into master will increase coverage by 0.29%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
+ Coverage   77.15%   77.45%   +0.29%     
==========================================
  Files         135      137       +2     
  Lines        2955     2976      +21     
  Branches      613      617       +4     
==========================================
+ Hits         2280     2305      +25     
+ Misses        532      529       -3     
+ Partials      143      142       -1
Impacted Files Coverage Δ
...ger-ui/src/components/TracePage/TracePageHeader.js 70% <ø> (ø) ⬆️
packages/jaeger-ui/src/components/App/Page.js 100% <ø> (ø) ⬆️
...s/SearchTracePage/SearchResults/ResultItemTitle.js 80% <ø> (ø) ⬆️
...ckages/jaeger-ui/src/components/TracePage/index.js 72.05% <100%> (+6.9%) ⬆️
packages/jaeger-ui/src/utils/embedded/index.js 100% <100%> (ø)
...onents/SearchTracePage/SearchResults/ResultItem.js 100% <100%> (ø) ⬆️
.../jaeger-ui/src/components/SearchTracePage/index.js 86.2% <60%> (-0.84%) ⬇️
...i/src/components/TracePage/TracePageHeaderEmbed.js 66.66% <66.66%> (ø)
.../components/SearchTracePage/SearchResults/index.js 73.68% <75%> (-1.32%) ⬇️
packages/jaeger-ui/src/utils/date.js 85% <0%> (-5%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e01bc36...b480f52. Read the comment docs.

@tiffon
Copy link
Member

tiffon commented Oct 11, 2018

This looks great.

I'd say for the search page, we might want to add the ability to

  • Hide the scatter plot
  • Disable trace comparisons

For the trace detail page, it might be nice to be able to:

  • Start with the mini-map collapsed
  • Have a way to go back to the search results page (if the user navigated from there)

What do you think?

For both pages, does it makes sense to show a link which would let the user open the page in a new tab (without the embed view restrictions)?

Looks great in the Kiali gif!

@aljesusg aljesusg force-pushed the embed_results_and_page branch 3 times, most recently from e04011c to 1cdb441 Compare October 15, 2018 10:25
@aljesusg
Copy link
Contributor Author

Hi @tiffon now I am working in the tracePage embed element, I did the SearchTraces. What do you think about the position of the button to open in a new tab the full view? (You can see the button in the Gif Demo)

How works ?

Search page

with disableComparision option

Sample : search?embed&end=1539596003745000&disableComparision&limit=20&lookback=1h&maxDuration&minDuration&service=productpage&start=1539592403745000
hidegraph

With hideGraph and disableComparision option

Sample : search?disableComparision&embed&end=1539596003745000&hideGraph&limit=20&lookback=1h&maxDuration&minDuration&service=productpage&start=1539592403745000
disablechart_disablecomparision

Demo

demo_searchtraces

@aljesusg aljesusg force-pushed the embed_results_and_page branch 2 times, most recently from 38ceeb1 to f526cf9 Compare October 15, 2018 11:06
@aljesusg
Copy link
Contributor Author

Demo TracePage

With option mapCollapsed the map is collapsed.
I don't like where I put the buttons to GoBack and link to a new tab with the full version. Any idea?
demo_tracepage

@aljesusg aljesusg force-pushed the embed_results_and_page branch from f526cf9 to cf7ffc5 Compare October 15, 2018 11:43
@aljesusg aljesusg changed the title WIP PoC - Embedded components Embedded components (SearchTraces and Tracepage ) Oct 15, 2018
@aljesusg aljesusg force-pushed the embed_results_and_page branch 2 times, most recently from 8f940a9 to ed9f3d3 Compare October 16, 2018 09:25
@aljesusg
Copy link
Contributor Author

aljesusg commented Oct 16, 2018

Changes addressed @tiffon , I don't know where is the best position for the buttons of goBack and go to the Jaeger Site

@tiffon
Copy link
Member

tiffon commented Oct 18, 2018

@aljesusg Looks great!

Regarding the where to put the buttons, I think you're right; they kind of stick out, right now.

I've been looking at other embed styles, and they usually have a footer which gives a title and some other details:

GitHub gist

ifnuoqt2nhdpqgolgyk9

Plotly (not an embedded view, but similar)

share from feed

(The red mark in the above image is from the blog post I copied it from; I didn't add it.)

Maybe we can do something similar, but move it to the top?

The top bar can link to the full view and replace the current trace header (title, extra buttons, etc).

This would make the view more compressed and make the "Back to search results" button seem less out of place.

Here is one possible aesthetic, with the back and without:

screen shot 2018-10-18 at 1 02 36 pm

screen shot 2018-10-18 at 1 10 47 pm

What do you think?

We could apply a similar treatment to the search results view so they'd be consistent.

Thanks for your time and hard work!

@aljesusg
Copy link
Contributor Author

aljesusg commented Oct 18, 2018

Ok @tiffon I am going to make the changes asap. Thanks

@aljesusg
Copy link
Contributor Author

aljesusg commented Oct 18, 2018

@tiffon for example for trace view is ok like this or do you want create a header for embed component without search and options? Where is the antd component for that example? I can't find that component in https://ant.design/

What do you think about how look this ?

Trace View Bar

screenshot from 2018-10-18 22-17-09

Search Results Bar

screenshot from 2018-10-18 22-30-04

@aljesusg aljesusg force-pushed the embed_results_and_page branch 3 times, most recently from 38e00a2 to 10bdc3e Compare October 18, 2018 20:47
@tiffon
Copy link
Member

tiffon commented Oct 19, 2018

@aljesusg I think a header without the "View Options" and keyboard help modal would probably be preferable. It might also be nice to be abel to toggle the additional details (datetime, etc) and the minimap. What do you think?

The screenshots from my previous comment are not from an Ant Design component, I use the Chrome Dev Tools to work something up from a random page to just take the screenshot.

Would it be possible to match the aesthetic from the screenshots?

@aljesusg
Copy link
Contributor Author

aljesusg commented Nov 5, 2018

Hi @tiffon

Sorry but I was on holidays this weeks. I'll try to adapt the ui to be like your screnshoots but I don't know if we can do it with antd

@objectiser
Copy link
Contributor

@tiffon Looks like only documenting kafka ingester is currently missing from 1.8 milestone, so anytime now - although that task has been open for a while. I agree that the comparison feature in embedded mode could be left out for the first cut of this feature.

@aljesusg Any thoughts on how long it may take to implement the changes @tiffon has requested (including leaving out compare)?

@aljesusg
Copy link
Contributor Author

I'll try to have the changes today @objectiser

@tiffon
Copy link
Member

tiffon commented Nov 12, 2018

@aljesusg We can use the value of the embed query string parameter to act as a version specification. So, for now, the only valid value for embed would be embed=v0 which would enable the search and/or trace detail view embedding, and the search results will never be comparable when embed=v0. Presently, any other value for embed would not trigger embed-mode, it would effectively be ignored.

Then, later, we can add trace comparisons as a possibility and use embed=v1. This way, older URLs which use embed=v0 will still not have comparisons.

This also gives us versioning for embedding, in general, which we also need.

What do you think?

@aljesusg
Copy link
Contributor Author

Great Idea @tiffon . I did the changed that you proposed but in the traceView I can't align the tittle with the buttons, i don't know if I should set in the css margin-top:10px, to fixed or if there is another way with antd to solve this.

screenshot from 2018-11-12 11-04-22

On the other hand I am going to show the GoBack button if in the history there is a search url in the previous one.

Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

@aljesusg thanks for making these changes. A few minor comments, the main thing I noticed is a few issues around embed vs embed=v0.

On both the search and trace detail pages, ?embed (without the =v0) still removes the top-nav.

embed-pr-00-search-query-param

embed-pr-02-detail-wo-v0

Also, on the embed search results page, can you remove the "Compare traces by..." message?

embed-pr-01-search-diffselection

Also, on the trace detail page, when there isn't "Go back" button, can you add a margin to the left of the title?

embed-pr-03-detail-margin-left

@aljesusg aljesusg force-pushed the embed_results_and_page branch 2 times, most recently from 15216eb to e1295ec Compare November 19, 2018 10:04
@aljesusg
Copy link
Contributor Author

Hi @tiffon , here is the last update of the demo with the comments addressed. Thanks

  • It's necessary to set embed=v0 (This configuration is in /utils/embedded folder)
  • SearchOptions
    • hideGraph
      demo_search
  • TraceOptions
    • enableDetails
    • mapCollapsed
    • The Go Back button only available if the user come from a search page (see demo for more details)
      demo_goback_trace

@aljesusg aljesusg force-pushed the embed_results_and_page branch 5 times, most recently from c2c970f to 8f1bf1d Compare November 22, 2018 16:44
Signed-off-by: Alberto Gutierrez <aljesusg@gmail.com>
@aljesusg aljesusg force-pushed the embed_results_and_page branch from 3e7ccd7 to f23043a Compare November 22, 2018 17:18
Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

A few comments are marked as resolved but don't have an accompanying change or replies to the effect of "will not change". Is there an un-pushed commit? If not, in the future can you please mark comments you're not inclined to address as "won't change" or something along those lines?

@aljesusg
Copy link
Contributor Author

Ok but I think that I addressed all the changes, sorry @tiffon I'll do the changes asap

@tiffon
Copy link
Member

tiffon commented Nov 24, 2018

@aljesusg Thanks! I didn't meant to interrupt your weekend, just wasn't sure about some of the changes.

Signed-off-by: Alberto Gutierrez <aljesusg@gmail.com>
@aljesusg
Copy link
Contributor Author

@tiffon Thanks for your comments !!! I did the changes, don't worry about interrupt my weekend, I am glad to collaborate :)

Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

@aljesusg Awesome! 🎉

This PR is the beginning of an entirely new type of use-case for the UI. We're super excited about it and thank you for the time, effort and ingenuity!

@tiffon tiffon merged commit f50592b into jaegertracing:master Nov 28, 2018
@tiffon tiffon mentioned this pull request Jan 9, 2019
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 5, 2021
* SearchTrace and TracePage Embedded components

Signed-off-by: Alberto Gutierrez <aljesusg@gmail.com>

* Change mutate in getSearchURL

Signed-off-by: Alberto Gutierrez <aljesusg@gmail.com>

Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
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.

3 participants