Commit Graph

851 Commits

Author SHA1 Message Date
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
Roland Schilter
debbb95cee Merge pull request #2605 from weaveworks/downgrade-d3transition-deps
Fix zoom for `npm start`
2017-06-19 10:59:05 +02:00
Roland Schilter
64ba2b2a89 Fix zoom for npm start
Pins d3-transition and d3-drag dependencies which were previously
pulled in as deps from d3zoom as version 1.1.0 each. This broke
the zoom feature for `npm start`.

Fixes #2545
2017-06-15 23:29:15 +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
Roland Schilter
8067ac93ae Bump client version in package.json 2017-06-13 16:40:45 +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
Roland Schilter
5ef7bd151a es6ify server.js and include in eslint (#2560) 2017-06-08 18:39:53 +02:00
Roland Schilter
a1e58c13e5 bump package.json version to current scope version 2017-06-01 18:24:58 +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
jpellizzari
ee084dffd6 Changed client to use minor Node version when used as an npm package 2017-05-02 14:53:53 -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
Filip Barl
c7bf7df975 Fixed view mode switching keyboard shortcuts (#2471)
* Replaced toggleGridMode with working actions.

* Addressed @foot's comment.
2017-04-26 14:26:47 +02:00
David Kaltschmidt
11d9903d8f Remove zoom on double-click
This was confusing in demos at KubeCon and DockerCon this year, as
clicking on nodes kept the UI zooming in.
Plus, when asked, users had no idea that double-click meant zoom in.

Fixes weaveworks/service-ui#453
2017-04-21 17:00:09 +02:00
Filip Barl
7c22c97382 Fix node highlight for all shapes (#2430)
* Render highlight with strokes & use non-scaled highlight for stacks.

* Reverted part of the changes made to node stack highlighting.
2017-04-11 09:11:31 +02:00
Filip Barl
9c566562c9 Made view mode selector responsive. (#2421) 2017-04-07 15:04:38 +02:00
Filip Barl
d71fc313b6 Not showing metric selector when empty. (#2426) 2017-04-07 12:36:21 +02:00
Filip Barl
82e373777a Increase cloud node thickness in graph view (#2418)
* Unified node shapes rendering templates.

* Addressed @foot's comments (fix shadow thickness across all shapes).

* Made getClipPathDefinition slightly more readable.
2017-04-06 14:44:52 +02:00
Filip Barl
60629d3325 Fix the click origin of the details panel in the table mode. (#2423) 2017-04-05 16:27:42 +02:00
Filip Barl
43720bd7c7 Show sublabel in tooltip for Internet nodes in table view mode (#2410)
* Show sublabel in tooltip for Internet nodes in table view.

* Improves fake internet node from debug-toolbar.
2017-03-28 16:42:17 +02:00
Simon Howe
2c61635347 Fixes loading of viewState from localStorage into URL
Needed another serialization to avoid "[Object object]" in the url.
2017-03-28 14:53:35 +02:00
Filip Barl
b2f06a63ee Don't reset zoom on refresh layout. (#2407) 2017-03-28 14:30:23 +02:00
Filip Barl
3e039a3143 Hide the opened help panel when clicking on the search bar icon. (#2406) 2017-03-28 13:04:41 +02:00
jpellizzari
24e56dfe78 Add check for old options 2017-03-27 18:57:33 -07:00
Jordan Pellizzari
984092f826 Merge pull request #2400 from weaveworks/release-1.3
Release 1.3.0
2017-03-27 15:02:48 -07:00
Jordan Pellizzari
066e80d60d Merge pull request #2382 from weaveworks/2378-nan-path
Add default values for edge waypoints
2017-03-27 14:31:17 -07:00
jpellizzari
aced163601 Bumped packge.json version 2017-03-27 14:15:33 -07:00
Jordan Pellizzari
1f390567d2 Merge pull request #2403 from weaveworks/2402-download-json
Fix for incorrect report.json URL in cloud
2017-03-27 14:12:36 -07:00
Filip Barl
4158fb1474 Keep the resource metric pinned on mouse out 2017-03-27 13:54:04 -07:00
jpellizzari
8e20ae5ac2 Added logic to default to noneLabel when no options are selected 2017-03-27 12:53:11 -07:00
jpellizzari
9bccc9918e Added noneLabel button to topology options 2017-03-27 12:53:10 -07:00
jpellizzari
bdea399a5a Fix for incorrect report.json URL in cloud 2017-03-27 12:32:30 -07:00
jpellizzari
fff47ee609 Added 'addOrRemove' flag to change topology action 2017-03-27 10:06:56 -07:00
jpellizzari
4612738580 Added comma-separated URL params 2017-03-27 10:06:56 -07:00
jpellizzari
454acdd999 Changed option value to list 2017-03-27 10:05:49 -07:00