Commit Graph

21 Commits

Author SHA1 Message Date
David Kaltschmidt
31f7a97016 setState only once in componentWillReceiveProps
setstate does not set this.state immediately, so successive function
calls cant rely on it
2015-09-11 14:42:10 +02:00
David Kaltschmidt
7eb6b93ee9 added test for adjacency 2015-09-09 18:44:54 +02:00
David Kaltschmidt
4fd53e3ae9 Refresh should keep topology options
fixes #457
2015-09-08 00:11:18 +02:00
David Kaltschmidt
27caf0af41 Add dropdown field for topology options, save topology option in url state
- fix nodes reset after topology option change
- set topology on click
- explicitly set default topology options
- set default topo options when topos are received
- prevent JS error on too many nodes layout abort
2015-09-07 14:25:49 +00:00
David Kaltschmidt
398fb7a6ba fix JS error on missing edge target
* replace mergeDeep with merge on node updates to set adjacency to
  updated value
* added json-loader to make json import of websocket frames easier
* console message for this was `Cannot read property 'id' of undefined`
2015-09-04 15:44:11 +02:00
David Kaltschmidt
e8ec3ed5fc fix nodes immutable after socket opens
fix for PR #410
2015-09-02 16:38:24 +02:00
David Kaltschmidt
b17d958b07 use immutable objects for storing nodes
makes checking for topology changes easier, which triggers fewer
re-renders
fix JS store tests with Immutables
only update graph if topology changed
2015-09-02 16:00:28 +02:00
David Kaltschmidt
1dccca2be7 fixed action name typo and added test 2015-08-28 13:10:58 +02:00
David Kaltschmidt
dfd158cceb close details when changing topologies
fixes #297
2015-07-14 16:16:09 +02:00
David Kaltschmidt
ea2d3f51de fixed tests after removing group state 2015-06-17 10:18:45 +02:00
David
6281eff85a Merge pull request #241 from weaveworks/client-coverage
Add JS test coverage reporting to client/
2015-06-16 16:07:10 +02:00
David Kaltschmidt
3dcd3e527f start with closed websocket, so that icon loads 2015-06-16 15:49:36 +02:00
David Kaltschmidt
24bd8d1908 use karma-coverage and istanbul 2015-06-16 15:41:27 +02:00
David Kaltschmidt
35e5335359 keep nodes cache intact while websocket is closed 2015-06-16 15:15:46 +02:00
David Kaltschmidt
c87cc872ee clear nodes cache when websocket closes connection
* also show reconnection status

fixes #162
2015-06-15 18:10:02 +02:00
David Kaltschmidt
816e1e9e99 layout of sub-topologies
* uses injected static topology, see web-api-utils.js
2015-06-12 11:37:49 +02:00
David Kaltschmidt
e69d7ff98c test to show back browsing is broken
after selecting a node
2015-06-11 12:44:28 +02:00
David Kaltschmidt
7d1ee40a2b Fixed lint errors in all js files
- Also added linter configuration, and make linter fail on error
- fixing ES6 errors and added ES6 transformer
- gulp target to try local build
- linted gulpfile
- cant hook into gulp lint yet, because gulp does currently not support
  ES6 which some rules demand, since gulp cant transpile itself, we have a
  chicken and egg problem.
- ES6 transpiler for test runner
- removed old linter config
- adapted editorconfig to reflect linter config
2015-05-28 15:07:13 +00:00
David Kaltschmidt
42a3f57e11 Added linter for js
- use global stricts
- use airbnb linter rules
- gulp lint target
- make target client-lint
2015-05-28 15:06:46 +00:00
David Kaltschmidt
99c76dc4c8 fix indentation to 2 spaces in js/less/html 2015-05-28 15:05:01 +00:00
David Kaltschmidt
66d66a4d01 Fix grouping bar for topologies that don't support grouping
- fixes #61
- dont clear nodes cache if topo is the same
- combined stores that were interdependent
- dont show topology grouping menu if unsupported
- also harmonized some variable names
- removed old grouping switcher
- moved topo actions to app actions, removed search
- get correct topology url
- first JS test using Jest
- make tests run on circle using the build container.
- replaced jest test runner with karma/jasmine
- Use debian for UI build and test container.
- updated karma-browserify
2015-05-22 16:41:48 +00:00