-
Notifications
You must be signed in to change notification settings - Fork 712
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
Search on canvas #1429
Search on canvas #1429
Conversation
dcad43d
to
85b7f62
Compare
if I type "python" and press enter, I get a blob/pill. I would like to be able to delete the blob/pill using backspace. |
Also I couldn't quite figure out how to do the metric search (less than, greater than etc). Perhaps making the hints clickable (to see next hint) would help with discoverability? |
Also switching between topologies seem to have some bugs. When I search for "python" (which is not in the label or sublabel) is highlights the command (good), but then I switch away from the containers view to the the processes view and back, and they are gone. (But only briefly - they come back after a few seconds) |
This is might be a backend issue. A lot of the time, the backend does not send the |
Fixes #1299 |
I have noticed that the BE doesn't send metadata initially (w/ |
@@ -1,10 +1,13 @@ | |||
import React from 'react'; | |||
import ReactDOM from 'react-dom'; | |||
import { connect } from 'react-redux'; | |||
import classNames from 'classnames'; | |||
import cx from 'classnames'; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Lower-priority
Enhancements
|
|
@@ -404,7 +401,7 @@ function mapStateToProps(state) { | |||
return { | |||
adjacentNodes: getAdjacentNodes(state), | |||
forceRelayout: state.get('forceRelayout'), | |||
nodes: state.get('nodes'), | |||
nodes: state.get('nodes').filter(node => !node.get('filtered')), |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
The animations of the nodes are a bit strange. When hovering a node, it jumps and then the other nodes jump. Is that intentional? (The small framerate makes it difficult to see in the gif above, but I hope it's enough to illustrate it) Also, when clicking on a "searched" node, the surrounding nodes get grayed out, which I guess is consistent with the view, but maybe a bit unpleasant because you cannot see the edges properly (no strong opinions about this one though). In that case I think there may be no need to gray out since the blue color boxes may be enough to distinguish which ones were filtered. |
return url.replace(new RegExp(SLASH, 'g'), SLASH_REPLACEMENT); | ||
return url | ||
.replace(new RegExp(PERCENT, 'g'), PERCENT_REPLACEMENT) | ||
.replace(new RegExp(SLASH, 'g'), SLASH_REPLACEMENT); | ||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This interacts strangely with filters. If I select the Edit: It's also when you change filters (which affect other topologies) with an active search query, the link highlight won't change. |
try { | ||
return new RegExp(expression, options); | ||
} catch (e) { | ||
return new RegExp(_.escapeRegExp(expression), options); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Code looking good. 👍 Some nice comments there. |
452020d
to
d0dc202
Compare
I have deployed this on the service, and as soon as I start playing with search the app gets overloaded and the probes drop reports. For instance.
This seems to be an exacerbation of #1457 but EDIT: I do see reports being dropped but not as often |
More recent commits look fine too. LGTMTM |
* adds a search field next to the topologies * highlight results on canvas as you type * non-matching nodes are grayed out * "prefix:" limits search to field label
Examples: * cpu > 2 // means percent * memory > 4.5MB
Try regexp, escape if invalid
* Fix node-details-test for search * Label spacing and matched text truncation * Delete pinned search on backspace, add hint for metrics, escape % in URL * Fix text-bg on node highlight * Added tests for search-utils * Fix matching of other topologies, added comment re quick clear * s/cx/classnames/ * Ignore MoC keys when search in focus, blur on Esc * Fixes search term highlighting on-hover * Fix SVG exports * Fine-tuned search item rendering * Fixed search highlighting in the details panel * Dont throb node on hover * Hotkey for search: '/' * Keep focus on search when tabbing away from the browser * bring hovered node to top * background for search results on hover * fixed height for foreign object to prevent layout glitches * Dont blur focused nodes on search * More robust metric matchers * More meaningful search hints
Having the DOM nodes w/ display:none is still expensive. We only need them briefly for svg export.
Key was not being generated correctly.
Fixes #1471
I find the hovering on not-highlighted nodes/edges surprising (It may be intentional but it feels buggy): Also, I still see tags from different nodes overlapping Performance-wise it seems to be tolerable Report: report_search_review.json.gz Other than that LGTM |
Features:
cpu > 2
ormemory > 4MB
Fixups: