Commit Graph

753 Commits

Author SHA1 Message Date
Filip Barl
038bbbd5ce Added a semitransparent layer over the background nodes. 2017-08-08 10:52:54 +01:00
Roland Schilter
656fbac4e6 Fix rendering of exported SVG (#2794)
Replace invalid characters in attribute value; fixes the error

        Unescaped '<' not allowed in attributes values

Fixes #2534
2017-08-08 10:04:22 +01:00
Filip Barl
d8ffea4781 Balance timeline zooming sensitivity between Firefox and Chrome (#2788)
* Balanced timeline zooming sensitivity between Firefox and Chrome.

* Organize the wheel delta zooming logic better.
2017-08-07 11:27:12 +02:00
Roland Schilter
13188845a5 Fix timeline label vertical displacement on some Chromes (#2793)
Fixes #2789
2017-08-07 11:05:53 +02:00
Filip Barl
9ea66266f3 Adjust timeline zoom sensitivity on Firefox (#2777)
* Adjust Firefox zoom sensitivity.

* Animate zooming to make it appear smoother (especially on Firefox).

* Debounced zoom tracking.

* Addressed the comments.
2017-08-01 17:36:46 +02:00
Filip Barl
f9e9a8ae4d Shrink timeline height and make years fade out (#2778)
* Shrink timeline height to 55px and make years fade out as hours fade in.

* Address the comments.
2017-08-01 14:17:03 +02:00
Filip Barl
bc7ad7a78a Always take timestamp into account in Node Details when time travelling (#2775) 2017-08-01 12:40:08 +02:00
Roland Schilter
c3c23d7dd1 Add test for pods number not updating (#2741)
* Fix distance test for single node

* Add test for pods number not updating labels
2017-07-28 17:13:41 +02:00
Filip Barl
2183a93916 Time Travel 3.0 (#2703)
* Experimental.

* Getting somewhere.

* Good zooming behaviour.

* Working timeline zooming & panning.

* Clickable timestamps.

* Dragging cursor

* Timeline panning buttons.

* Capping at current time.

* Scale limits.

* Better ticks.

* Time tags fading in smoothly.

* Removed seconds.

* Better tick spacing.

* Vertical panning as zooming.

* Organizing the code..

* Replaced d3-zoom with native events.

* Got rid of scaleX

* More code beautified.

* Almost done polishing the code.

* Some cleanup.

* Better request triggers.

* More cleaning up.

* Styled the timestamp input.

* Final cleanup.

* Update yarn.lock

* Zoom tracking.

* Animate timeline translations.

* Fixed the PAUSE button glitch and updating the time control info.

* Opacity fix and timeline arrows removed.

* Fixed the red vertical bar.

* Use preventDefault() on timeline scrolling.
2017-07-27 14:40:20 +02:00
Filip Barl
8f1fdeb477 Make Resource view nodes clickable (#2679)
* Made Resource view nodes clickable.

* Remove selection when clicking on the background.

* Use opacity instead of the blue overlay for selected nodes.
2017-07-25 17:46:17 +02:00
Roland Schilter
00ddb51685 Fix Pods number in graph not updating (minor label) (#2728)
By only caching layout values (x, y, rank)

Fixes #2401.
2017-07-21 16:34:36 +02:00
Roland Schilter
4f1d02f590 Merge pull request #2720 from weaveworks/2716-fix-newVersion-notification-not-showing
Fix New Version notification not showing
2017-07-19 11:45:29 +02:00
Roland Schilter
1f784ad5fa Fix New Version notification not showing
Fixes #2716.
2017-07-17 16:32:27 +02:00
Roland Schilter
a6d3542c89 Merge pull request #2713 from weaveworks/2708-reset-nodes-when-scope-app-restarted
Reset nodes in frontend when scope-app restarted
2017-07-14 19:02:41 +02:00
Roland Schilter
5329efa528 Reset nodes in frontend when scope-app restarted
When the scope-app restarts, it no longer has a
reference to the previous node set. Therefore,
the delta update adds *all* nodes but does not
remove legacy ones.

`reset==true` tells the frontend to start fresh.

Fixes #2708
2017-07-13 14:28:17 +02:00
Roland Schilter
e9945e78cb Keep topo nav visible if subnav selected
Follow-up to 21a0093c but also displays parent topology if
an empty sub_topology is selected.
2017-07-12 18:53:33 +02:00
Roland Schilter
21a0093c08 Keep topology nav visible if selected
If the scope-app API unexpectedly restarts, it has no report
at hand (until it gets one from the probe) and sends node
count 0 to the frontend for all topologies. Once the report
arrives, it will send the proper count.

What happened was the frontend did hide Processes for a short
time till the node count recovered. This moved the topology
selection to the always visible Containers (hide_if_empty == false)
while keeping the graph as is.

Once the node count recovers, Processes comes back but the
selection is still at Containers.

We now keep the selected topology visible at all time even if
the API returns a node count of 0. This recovers nicely when
the correct node counts come in. Once the user selects a different
topology while and a backend response arrives, it disappears.

Fixes #2646
2017-07-12 17:12:43 +02:00
Filip Barl
a390c7633e Make graph layout zoom limits constant (#2678)
* Make zoom limits such that nodes are always between 1px and 200px big.

* Increased minimal node size from 1px to 3px.
2017-07-07 19:52:42 +02:00
Filip Barl
8f22d58cab Last line of defense against overlapping nodes in graph layout (#2688)
* Refresh the layout once more at the end if previous heuristics cause an overlap.

* Added mixpanel tracking.
2017-07-07 19:22:04 +02:00
Filip Barl
8f2d47ce4e Time travel redesign (#2651)
* Initial top level control.

* Added the jump buttons.

* Tiny styling adjustments.

* Massive renaming.

* Pause info

* Added slider marks.

* Improved messaging.

* Freeze all updates when paused.

* Repositioned for Configure button.

* Improved the flow.

* Working browsing through slider.

* Small styling.

* Hide time travel button behind the feature flag.

* Fixed actions.

* Elements positioning corner cases.

* Removed nodes delta buffering code.

* Fixed the flow.

* Fixed almost all API call cases.

* Final touches

* Fixed the tests.

* Fix resource view updates when time travelling.

* Added some comments.

* Addressed some of @foot's comments.
2017-07-06 16:06:55 +02:00
Roland Schilter
cf8a95c878 Merge pull request #2683 from weaveworks/table-overflow-plus-one
Show table overflow only if limit exceeded by 2+
2017-07-06 15:50:11 +02:00
Roland Schilter
dfda3e0b0b Show table overflow only if limit exceeded by 2+
Having to toggle a +1 feels weird while that +1 takes up
the same vertical space as displaying that row.
2017-07-06 13:56:03 +02:00
Simon
77ba8aa8b3 Merge pull request #2666 from weaveworks/2660-fix-pid-truncation
Prevents 6 digit pids from being truncated in details panel/table mode
2017-07-05 14:27:56 +02:00
Simon
6310b48937 Switch to 56px small cols to fit in 6 digit pids 2017-07-05 14:27:34 +02:00
Simon Howe
ba29271053 Prevents 6 digit pids from being truncated in details panel/table mode 2017-07-04 10:42:18 +02:00
Simon Howe
ee55d17b0e Review feedback on supporting multiple relatives in node-grid columns 2017-07-04 10:41:41 +02:00
Simon Howe
ffd531e44a Show multiple relatives in the nodes-grid view 2017-07-04 10:41:41 +02:00
Mike Lang
ec2a7fc753 Prefer controllers view for default view 2017-06-27 10:19:04 -07:00
jpellizzari
4f341cb1d2 Add new node shapes for k8s combined view
While we're there, adopt a consistent ordering for all places that shapes are listed
Order is least sides to most sides, with circle before polygons, and complex shapes (currently just Cloud) after.

On shape choices for topologies:
* Since the k8s logo is a heptagon, we want pods to be heptagons.
* Since triangle is 'a bit weird', we put it on the least-important type, replica sets.
* Pentagons look a little weirder than octogons (it's the lack of symmetry) so we put octogons on the most common (deployments)
2017-06-27 10:19:04 -07:00
Mike Lang
20754ffd37 Merge pull request #2633 from weaveworks/mike/fix-none-option
Fix issues with union types
2017-06-22 19:11:26 -07:00
Filip Barl
36ee5db1da Improved rendering order of nodes/edges in Graph View (#2623)
* Rendering both nodes and edges from one component.

* Organized the render layers in a more readable manner.

* Rerendering optimization.

* Finer edge rendering layers.

* Moved the constants out of the component file.

* Typo fix.

* Include edge thickness in <Motion /> instead of fade-in effect.
2017-06-22 11:58:31 +02:00
Mike Lang
383ace4d7e Replace 'none' id for the none option in union types with ''
In union option groups, the list of selected ids is encoded as a comma-delimited string.
For example, if 'foo' and 'bar' are selected, the value 'foo,bar' is sent, ie ["foo", "bar"] -> "foo,bar"
Under this scheme, with nothing selected, the empty string should be sent, ie. [] -> ""

Before this change, the frontend code called the "none option" by id 'none'.
There were several issues with this:
* The frontend would send 'none' when nothing was selected, not ''. The backend ignored this as it ignores
  junk values in the options, treating them as though they hadn't been given.
* The backend would attempt to set the default value of an option to "nothing selected", ie. [], by sending ''.
  The frontend would interpret this as nothing selected, *not even the 'none' option*, which caused a visual bug.
* Everything would break if one of the legitimate options had the id 'none', which could easily happen eg.
  if a user had a 'none' k8s namespace. This is perhaps an unusual name, but our code shouldn't break when
  a particular arbitary string is used as an input.

With this change, the none option is called '', which fixes all the above problems:
* The frontend encodes [''] as ''
* The frontend decodes '' as [''], and therefore shows the '' option as selected
* The string '' is not a valid k8s namespace name and is a reasonable "prohibited value" for all other use cases.
  The backend already couldn't handle a value with this id correctly prior to this change anyway.
2017-06-21 15:03:18 -07:00
Filip Barl
eb64d3f09b Make API calls with time travel timestamp (#2600)
* Node details fetching reports at proper timestamp.

* Corrected all the relevant timestamps in the UI.

* Renamed some state variables.

* Time travel works for topologies list.

* Added a whole screen overlay for time travel.

* Polished the backend.

* Make time travel work also with the Resource View.

* Fixed the jest tests.

* Fixed the empty view message for resource view.

* Some naming polishing.

* Addressed the comments.
2017-06-20 12:31:22 +02:00
Filip Barl
fd8f9be9cb Fix the table sorting order bug for numerical values (#2587)
* Fix the table sorting order bug for numerical values.

* Addressed @davkal's comment.
2017-06-19 12:42:33 +02:00
Alfonso Acosta
e42347addc Merge pull request #2590 from weaveworks/release-1.5
Release 1.5.0
2017-06-19 12:13:26 +02:00
Filip Barl
c4e0be45de Moved pause button back to footer. (#2585) 2017-06-14 11:39:45 +02:00
Filip Barl
0869d26ec4 Moved highlighted nodes/edges info to selectors (#2584)
* Use selector for highlighted nodes.

* Use selector for highlighted edges.
2017-06-14 11:11:59 +02:00
Filip Barl
83f557b638 Don't display the empty message when nodes are displayed. (#2597) 2017-06-14 11:03:54 +02:00
Filip Barl
b6dfe25499 Time travel control (#2524)
* Hacky working prototype.

* Operate with time.Duration offset instead of fixed timestamp.

* Polished the backend code.

* Made a nicer UI component.

* Small refactorings of the websockets code.

* Fixed the backend tests.

* Better websocketing and smoother transitions

* Small styling refactoring.

* Detecting empty topologies.

* Improved error messaging.

* Addressed some of David's comments.

* Moved nodesDeltaBuffer to a global state to fix the paused status rendering bug.

* Small styling changes

* Changed the websocket global state variables a bit.

* Polishing & refactoring.

* More polishing.

* Final refactoring.

* Addressed a couple of bugs.

* Hidden the timeline control behind Cloud context and a feature flag.

* Addressed most of @davkal's comments.

* Added mixpanel tracking.
2017-06-12 11:22:17 +02:00
Filip Barl
a585514d90 Hide container images status for pseudo nodes. (#2520) 2017-05-16 15:51:57 +01:00
Filip Barl
5935a32d0a Canvas zoom control (#2513)
* Added a zoom slider control in the bottom-right corner.

* Made the control vertical and added the buttons.

* Adjusted the styles and borders.

* Trying to fix Webpack

* Hide zoom control when there is no content.

* Polished the code.
2017-05-15 11:49:12 +02:00
Filip Barl
6d270fe78b Fix arrow heads positioning (#2505)
* Fix arrow heads positioning.

* Addressed @foot's comment.

* Beautified the code and added some comments.
2017-05-12 10:39:22 +02:00
Filip Barl
10b276c28a Use prop-types library to silence PropTypes deprecation warning (#2498)
* Use prop-types library to fix the deprecation warning.

* Updated weaveworks-ui-components version.
2017-05-05 18:23:43 +02:00
Filip Barl
c897c18810 Display consistent resource consumption info in the resource view. (#2499) 2017-05-05 15:18:18 +02:00
Filip Barl
7669c325d7 Update node libraries (#2292)
* Upgraded Webpack 1.13 -> 2.2

* Made webpack.prodution.config.js work and updated yarn.lock

* Updated a lot of small dependencies.

* Upgraded React

* Bunch of small devDependencies updated.

* Fully updated devDependencies

* Updated optionalDependencies

* Updated everything except D3 zoom.

* Fixed linting error.

* Another update.

* Reverted materialize-css upgrade and applied new eslint rules

* Final fixes to webpack configs.

* Updated yarn.lock again.
2017-05-04 13:12:00 +02:00
jpellizzari
3ec7cc82e6 Added service images widget 2017-05-03 10:31:25 -07:00
David Kaltschmidt
941f51645b Adds a default list to topology options if previous options are missing
This can happen when a new option is introduced while using an old URL
state.

Fixes #2489
2017-05-02 15:31:54 +02:00
Filip Barl
206a88df41 Calculate viewport dimensions from the scope-app div (#2473)
* Calculate viewport dimensions from the scope-app div.

* Addressed @foot's comments.
2017-04-27 15:36:22 +02:00
Filip Barl
65b9b48b53 Added mixpanel tracking for some basic events (#2462)
* Added mixpanel tracking for bunch of events.

* Changed hitEnter action to pinSearch.

* Moved all the event tracking out of app-actions.js

* Addressed @foot's comment.

* Added more keypress events tracking.

* Disable 'r' keyboard shortcut when Resource View is disabled
2017-04-27 14:26:07 +02:00
Filip Barl
23fb14d0be Polished the metric selection logic (#2468)
* Polished the metric selection code

* Fixed hovering advantage over pinning.
2017-04-26 16:18:42 +02:00