Commit Graph
127 Commits
Author SHA1 Message Date
David Kaltschmidt af887418b9 Dont scale nodes after browser window resize
* track browser dimensions as chart state
* only override on force layout

Fixes #1096
2016-04-12 16:33:43 +02:00
David f3c9ff2ce4 Merge pull request #1262 from weaveworks/1242-fix-layoutnodes
Keep edge and node movement in sync
2016-04-12 09:35:14 +02:00
David Kaltschmidt 34e9e9d85d Keep edge and node movement in sync
Fixes regression introduced by #1186 (comparing wrong layout state
objects)

Fixes #1242
2016-04-11 20:22:18 +02:00
David Kaltschmidt cd12d867ec Cache pan/zoom per topology
* remembers canvas position/zoom per topology
* makes it easy to go back to the last position in a prev topology

Fixes #1238
2016-04-11 18:51:39 +02:00
Simon Howe 6754c03980 Selected-node-size review feedback
- Tighten up method definition
2016-04-11 15:33:23 +02:00
Simon Howe b9ce725561 Don't enlarge focused nodes.
- Calculate size based on number of nodes that come up into the
  selection area.
2016-04-11 15:11:03 +02:00
David Kaltschmidt 392589744c Fix zooming regression
Introduced in #1186

Fixes #1233
2016-04-06 15:23:13 +02:00
David Kaltschmidt 0a1740cbe6 Fix metrics rebase 2016-04-05 18:15:28 +02:00
David Kaltschmidt d520cffec7 Performance tweaks
Add debug.html to show toolbar

Perfjankie test runner

Playing w/ the pure mixin for perf. improvements

* Works well! Smoother zooming/panning when things have settled.
* Extract node movement to node-container, make nodes pure

Extracted node chart elements into own components

Keep control objects immutable while in components

Keep layout state objects alive

Made other components pure, removed mixin from stateless components

Remove font size adjustment from scaling

Fix zoomscale

Move node transform to node

* makes more sense there because the coords are rounded in the container

dynamic coords precision based on topology size

Make edge points immutable

Remove nodes maximum for layout engine

Dont send all canvas state down to next component

moving layout handling back to nodes-chart.js

Omit some props for edges/nodes, dont animate edges on low precision

Moved AppStore access out of lower components
2016-04-05 15:45:13 +02:00
Simon Howe 4ec8b97fef metrics-on-canvas review feedback updates.
- Refactor some things.
- Fixes heptagon moc rendering
- Experiment w/ duller colors.
2016-04-04 21:02:30 +02:00
Simon Howe 432ea920fe Terminology change from lock -> pin
In meetings etc the term pin is more often used.
2016-04-04 17:48:44 +02:00
Simon Howe 9d968a789b Tidying up MoC
- no rand ids, org code
- Fixes tests, no .includes in jest for now
- Small comment on moc stuff
- Patch up differences after MoC rebase
2016-04-04 17:48:44 +02:00
Simon Howe 1ad7c2c7a3 Return to mock-metrics for now.
- Bring MoC under new linting rules
- adds support for immutable-console-renderer
- fixes up metrics actually displaying after bad fixes when rebasing.
- Mock all metrics client side for demoing
2016-04-04 17:48:43 +02:00
Simon Howe ef1c69eb2a Basic hover to select metric 2016-04-04 17:48:40 +02:00
Simon Howe d31aadf7b1 Metrics on canvas!
- Adds metric on canvas support for more shapes
- More variation from the debug bar.
2016-04-04 17:48:40 +02:00
Paul Bellamy 80dc714c1e rename LabelMajor to Label 2016-03-29 14:00:11 +01:00
David Kaltschmidt 88abeb7168 Topology filter overhaul, still needs backend support 2016-03-29 13:26:49 +02:00
David Kaltschmidt 2ce5a39d45 Make node/edge highlighter objects immutable in app store
* refactor, no functionality changed
2016-03-16 11:29:40 +01:00
David Kaltschmidt e4270f69b7 Upgraded dev deps and linted JS according to latest airbnb rules 2016-03-15 18:09:45 +01:00
David Kaltschmidt 833b78c2e7 Fix embedded logo size
* CSS transform is ignored in Safari, using SVG transform instead

Fixes #1071
2016-03-01 16:12:38 +01:00
David Kaltschmidt bd821c159e Inject weavescope logo into exported SVG 2016-02-24 17:03:27 +01:00
David Kaltschmidt 1566727e45 SVG export button
* applies CSS styles inline
* exports SVG chart node
* injects A tag to download
* based on SVG-crowbar

Fixes #555
2016-02-24 16:17:45 +01:00
David Kaltschmidt 9dafaef9a9 Force-relayout button
* new button in footer
* when clicked, forces a relayout that could help with degraded graphs
* sets a store flag that will be unset on next nodes delta update
* fixes #863
2016-02-24 15:55:36 +01:00
Simon Howe 2c626776a1 Grey out bottom of stack when there aren't 3 nodes in the stack
E.g. greying out the bottom 2/3 visual nodes if the stack actually only
has a single node.

- Server returns "node_count" for agg nodes.
2016-02-22 12:42:37 +01:00
David KaltschmidtandSimon Howe 476b7917e4 Let shape be determined by backend 2016-02-22 12:42:36 +01:00
Simon Howe a34d9c97b8 Adds node-shapes to the canvas
- circle
- rect (w/ radius)
- fluffy cloud shape
- hexagons
- stacks
2016-02-22 12:42:36 +01:00
Simon Howe ab75bb5e41 Move details panel styling dimensions into common constants file.
They are used in a couple of places around the code base.
2016-01-29 13:16:33 +01:00
David KaltschmidtandSimon Howe d39fd847b7 Details Panel UI Redesign
Refactored nodedetails to support multiple data sets, probably broke some tests
  Allow api requests to out-of-view topologies
  Fix ESC behavior with details panel
  Stack details panel like cards
  Details pain side-by-side
  Details panel piles
  Fix node details table header styles
  Render load and not-found captions like relatives
  Fix topology click action
  Make node detail tables sortable
  Grouped metrics for details health
  Group metrics in same style
  Link node details children
  Fix scroll issues on double-details
  Fix DESC sort order for node details table
  Save selected node labels in state - allows rendering of node labels from other topologies before details are loaded
  Change detail card UX, newest one at top, pile at bottom
  Details panel one pile w/ animation
  Sort details table nodes by metadata too
  Animate sidepanel from children too
  Fix radial layout
  Dont set origin if a node was already selected, suppresses animation
  stack effect: shift top cards to the left, shrink lower cards vertically
  Clear details card stack if sibling is selected
  Check if node is still selected on API response
  Make detail table sorters robust against non-uniform metadata
  Dont show scrollbar all the time, fix sort icon issue
  Button to show topology for relative
  Overflow metrics for details panel health
  Fix JS error when no metrics are available for container image details
  Column-based rendering of node details table
  Fix JS tests
  Review feedback (UI)
2016-01-19 16:47:05 +01:00
David KaltschmidtandSimon Howe 6b445466ef Move JS to ES2015
Refactored mixins into utils

ES2015 module exports

ES2015-style imports

WIP Fixing tests

Fixes tests after es2015 code migrations.

We we're require()ing an ES2015 module[1]. Have to make sure you account
for the .default in this case.

[1] We had to use ES5 `require` in Jest:
(https://github.com/babel/babel-jest/issues/16)
2015-12-01 14:35:22 +01:00
David Kaltschmidt 9fb3099a89 Dont scale graph on resize, only selected nodes 2015-11-12 17:22:33 +01:00
David Kaltschmidt b6905d136d Undo pan/zoom after unselecting a node 2015-11-12 15:00:06 +01:00
David Kaltschmidt 3ca7415d47 Always center selected node
* dont allow panning while node is selected
* Shift nodes, not canvas on circling selection
* scale nodes on window resize
* Scale selected node to viewable size
2015-11-12 13:59:26 +01:00
David Kaltschmidt acbf8a665d Upgrade eslint, react and react-motion
* get rid of material-ui
* reduced bundle size by 20%
2015-11-11 15:51:27 +01:00
David KaltschmidtandTom Wilkie abcb94b1f1 UI for controls.
- Make backend address configurable via env variable
- `BACKEND_HOST=1.2.3.4:4040 npm start` points the frontend to the app on that server. Just for development
- Render control icons
  - removed close x for details panel
  - added control icons in its space
  - closing of panel still works by clicking on same node, or background
- Dont allow control while pending
- Render and auto-dismiss control error
- Make tests pass
2015-11-06 17:44:28 +00:00
David Kaltschmidt af175b62bc Review feedback 2015-11-05 11:02:18 +01:00
David Kaltschmidt 1fe036ab6a Simplified dance heuristics 2015-11-05 11:00:31 +01:00
David Kaltschmidt 83d7a87d43 dont relayout when node dissappears 2015-11-05 11:00:31 +01:00
David Kaltschmidt 47ba0ff2a4 Skip layout when only edges changed 2015-11-05 11:00:31 +01:00
David Kaltschmidt 7306e8fb5f Rewrote nodes-layout to use immutablejs 2015-11-05 11:00:31 +01:00
David Kaltschmidt e4da515fa1 Refactored doLayout signature 2015-11-05 10:58:13 +01:00
David Kaltschmidt 5c086aeeb3 show message if topology is empty 2015-11-03 18:27:23 +01:00
David KaltschmidtandTom Wilkie 2d7e546ae5 Render filtered node count in status bar
* always set updated topology object when received
* track whether route was set on initial load
* removed connection count from status bar (was not deemed important)
* fixed issue where topology option changes did not affect details pane
* only show filtered nodes when count > 0
* clear nodes graph when empty topology is loaded
* also prevent JS error if nodes are hovered over that should be gone
* fixed options sync issue between graph and status bar
* implemented topology options with immutable DS
2015-09-29 08:51:56 +00:00
David Kaltschmidt a3597c9639 Fix zooming and autoshift
* track panning to not trigger mouse up event
* offset angle for circle
* fixed panning/zooming
* center the center node if radius bigger than screen
2015-09-21 11:44:26 +02:00
David Kaltschmidt 808fc55832 filter loopback adjacents on radial layout
needed to adjust size of nodes, too
2015-09-18 18:08:35 +02:00
David Kaltschmidt 6e3883d07e Dont shift canvas after it has been autoshifted 2015-09-18 18:07:52 +02:00
David 79bf8badd7 Merge pull request #501 from weaveworks/495-cover-nodes
Dont cover other nodes on radial layout
2015-09-18 18:07:00 +02:00
David Kaltschmidt 5b4e084c01 Dont cover other nodes on radial layout
* shift center of radial layout a bit
* shrink blurred nodes
* blow up focused nodes a bit
2015-09-16 21:05:12 +02:00
David Kaltschmidt 438e25df6f s/topology/view/ 2015-09-16 16:29:23 +02:00
David Kaltschmidt 74840169a5 changed topo max nodes text, fade in topo 2015-09-16 15:39:53 +02:00
David Kaltschmidt 7f4673ae4b Show message in UI when topology too big to render 2015-09-16 12:53:33 +02:00