-
Notifications
You must be signed in to change notification settings - Fork 356
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
Topology - indicate no results when searching #1277
Conversation
|
||
$scope.searchNode = function() { | ||
var svg = topologyService.getSVG($scope.d3); | ||
var query = $('input#search_topology')[0].value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using angular.element
here and even below?
angular.element('input#search_topology').value
var links = svg.selectAll("line"); | ||
links.style("opacity", "0.2"); | ||
|
||
if (nodes.length == selected.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
===
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks :)
|
||
$scope.searchNode = function() { | ||
var svg = topologyService.getSVG($scope.d3); | ||
var query = $('input#search_topology')[0].value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use angular.element
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not doing that, this has nothing to do with anything angular related, no point in using angular.element
here.
(This looks out of place in an angular controller, I agree completely, but it is supposed to look out of place, because that's one of those things that's done in a silly way until we make the custom toolbar angular too.)
This pull request is not mergeable. Please rebase and repush. |
@himdel can you verify that the |
@himdel I get the |
Also, do we really need the |
…matches 0 items included in all the topologies and styled so that it overlays the content https://bugzilla.redhat.com/show_bug.cgi?id=1445857
…de instead of having N identical copies this just moves searchNode and resetSearch to the service, under a `mixinSearch` method that adds these to the current scope when called
so that we can show the not_found message when searching and notFound :) https://bugzilla.redhat.com/show_bug.cgi?id=1445857
@dclarizio Verified Clear search works :) .. was it behaving oddly somewhere or..? @AparnaKarve Well, it's kinda nice to have a straightforward way of cleaning the search .. but either way, it was part of the design proposed by patternfly, that's why. |
because apparently length is always 0 or 1
@AparnaKarve thanks for catching the bug .. turns out with d3, |
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/5a994811483601dec8cbb1c347789d04951f0d17~...203fddcded751e9567c638e83873424023ab758b with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in the UI, looks good! |
Linking the refactoring pivotal story here as this PR unifies the search functionality in JS controllers: https://www.pivotaltracker.com/story/show/143239019 |
Travis failure is unrelated, merging. |
Topology - indicate no results when searching (cherry picked from commit 9c1c972) https://bugzilla.redhat.com/show_bug.cgi?id=1459297
Fine backport details:
|
For some reason, when searching in topology, we want to inform the user when no results match the criteria.
We could just show an alert, but that takes up too much vertical space.
We could also hide the topology, but since topology still shows all the items, just with opacity=0.2, clearly it's supposed to be showing by design.
So.. a compromise, we show a patternfly-like message, but overlay it over the topology graph.
https://bugzilla.redhat.com/show_bug.cgi?id=1445857