Commit Graph

63 Commits

Author SHA1 Message Date
jpellizzari
b417bcda80 Fix for .fail undefined on doRequest 2017-02-28 21:55:56 -08:00
jpellizzari
4f9725612b Fixed window undefined condition for CSRF token 2017-02-27 11:26:29 -08:00
Jordan Pellizzari
0a99d04b4b Consolidated API requests into single helper; added CSRF header 2017-02-20 09:34:18 -08:00
jpellizzari
8b1ca73179 Added changeInstance action; exported actions to public API 2017-02-09 13:44:30 -08:00
jpellizzari
7a1843ca15 Added json type to api requests 2017-02-07 08:48:44 -08:00
Jordan Pellizzari
f65f39b128 Refactored API URL generation to function calls and added tests 2017-02-03 12:32:35 -08:00
David Kaltschmidt
f86dd128e0 Hotfix for URL issue
Pertains to #2154
2017-01-30 13:05:28 +01:00
jpellizzari
5e461cd3ba Fix for URLs in contrast mode 2017-01-27 08:13:17 -08:00
jpellizzari
74ab685343 Added iframe and standalone logic to web-api-utils 2017-01-26 13:54:37 -08:00
jpellizzari
0bf7fa49dd Exported wsUrl constant from web-api-utils for the terminal component 2017-01-24 11:25:03 -08:00
jpellizzari
0575e85ca1 Changed API URLs when running as dependency 2017-01-24 11:25:02 -08:00
jpellizzari
71485db4df Removed leading slash from getAllNodes() api request 2017-01-11 14:20:18 -08:00
jpellizzari
2b83ebd74c Added control status icon to Terminal header 2016-12-13 10:04:05 -08:00
Simon Howe
4004b21fa2 Allow resizing on attached pipes too. 2016-11-04 10:03:51 +01:00
Simon Howe
d3878cc8df Don't resize terminal if we don't receive a resize control (e.g. onAttach)
- Fix text selection in terminal (was our force focus stuff, introduced
  if you clicked on the black border that was not actually the terminal
2016-11-03 10:24:38 +01:00
Simon Howe
487635cb62 Adds terminal resizing on hosts.
Adds terminal resizing on popped out windows
2016-10-31 18:11:10 +01:00
Simon Howe
305bf7680a Resizing working w/ containers! 2016-10-31 15:29:53 +01:00
David Kaltschmidt
60037c8c7c Prevent querystrings from starting with &
Fixes #1953
2016-10-27 16:02:25 +02:00
Alfonso Acosta
ffdcc2367e Only send filters to nodes from the current topology
This reverts commit 699fe45e65.
2016-10-05 16:54:36 +00:00
Simon Howe
699fe45e65 Details panel: send topology options of node type being loaded 2016-10-05 12:23:31 +02:00
Alfonso Acosta
7a3dad2ceb Add filters to details panel request 2016-10-04 17:35:28 +00:00
David Kaltschmidt
c4154bc770 Add browser console logging for websocket to render times
Print a log message when the time from websocket creation to first
render takes too long (100ms).
2016-08-02 17:14:31 +02:00
David Kaltschmidt
3473beec98 Blur search when opening a terminal 2016-05-12 19:35:21 +02:00
David Kaltschmidt
50935dd456 Fetch topologies sequentially on search 2016-05-11 18:08:59 +02:00
David Kaltschmidt
5a325e46fa Search on canvas
* adds a search field next to the topologies
* highlight results on canvas as you type
* non-matching nodes are grayed out
* "prefix:" limits search to field label
2016-05-11 18:08:59 +02:00
David Kaltschmidt
96aae9bc99 Migrate from Flux to Redux
* better state visibility
* pure state changes
* state debug panel (show: crtl-h, move: ctrl-w)
2016-04-27 17:21:46 +02:00
David Kaltschmidt
62ed88cf16 Close details panel when node was removed via control 2016-04-21 18:34:51 +02:00
David Kaltschmidt
8bdebe9848 Reduce CPU consumption if UI cannot connect to backend
* blank keyframes for blinking Connect animation
* increased topology API retry timer interval

Fixes #1220
2016-04-06 11:13:11 +02:00
Simon Howe
17c8bc2b12 Fixes term error handling 2016-03-16 11:33:56 +01:00
David
d9938c80bb Merge pull request #1171 from weaveworks/npm-updates
React/lodash/babel upgrades + updated linting (linted)
2016-03-16 10:19:16 +01:00
Tom Wilkie
581b711eb4 Websocket and pipe fixes. 2016-03-15 17:13:49 +00: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
4b4b27e6a8 Handle server disconnects gracefully in the UI
Keeps the scope UI's CPU usage low in the browser when the backend is
not reachable

* dont update app state when repeated errors come in
* dont update app state when websocket keeps failing
* adjust first loading text, and show icon to draw attention
2016-03-07 19:52:52 +01:00
Simon Howe
186a45e052 Fixes the pipe-alive check when running scope-ui under a path 2016-03-03 14:44:43 +01:00
Alfonso Acosta
b9393e9e39 Review feedback 2016-03-03 12:35:04 +00:00
Alfonso Acosta
579001059a Add pipe/{pipeID}/check endpoint 2016-03-03 11:22:31 +00:00
Simon Howe
ac5d258378 Fixes scope working under a path
- Adds proxy server for easy testing of scope under a path.
2016-02-18 14:17:51 +01:00
David Kaltschmidt
531068179c High contrast mode switch
* added button to the bottom right to switch to higher contrast,
* suitable for projectors
* increased contrast between background and text colors
* thicker strokes around chart elements
* ensure yellow details panel backgrounds are darker
2016-02-15 16:20:40 +00:00
David Kaltschmidt
64f08dcf96 Metric feeder as higher order component to feed sparklines data 2016-02-03 16:25:54 +01:00
David Kaltschmidt
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
Simon Howe
5b390994b8 Fix node controls so they behave independently across nodes
If one node was busy performing an action, any other nodes controls
would also be in a 'blocked and waiting' state.
2016-01-05 19:17:10 +01:00
Simon Howe
dbd789317d Also proxy WS to the BE while in dev mode.
WS weren't using the proxy.
2015-12-15 16:39:57 +01:00
Simon Howe
3b2af2ae6c Terminal UI for pipes
- term.js
- Add eslintignore
- Fix color and es2015 after rebase
- Fix JS test, probably deleted during conflict resolution
- Moves terminal close button to top-right of window
- Consitent w/ details window.
- Changes padding of details window close button so both close buttons
  are horizonally aligned.
- Terminal resizes w/ browser window.
- No longer can drag window around.
- Add tiny big of padding between term and node-details.
- Playing w/ terminal placement.  This one's more drawer-like.
- Send DELETE when we close a terminal window.
- Dont lint or bable JS vendor files
- Ignore ctags 'tags' files.
- Adds popping out terminal out into a new browser window.
- Simplify code as now we've just a single terminal window.
- ESC is back to close the terminal, then the details panel.
- Fixes bug w/ slow response to closing the details panel.
- Moving away from "drawer-style" for terminal size and position to a
  simple window.
- Just gotta handle the case for refreshing a popped out terminal.
- Stop terminal text being auto-deselected.
- window resizes will still deselect.
- Adds state.connected to react.scu check.
- Don't delete pipe when browser closes
- To allow for nicer refresh flows
- scope-app will time out pipe after a while.
- Keep terminal-open/closed state in the url.
- shouldComponentUpdate fix to prevent deselection of text has been
  rolled back so gotta come up w/ another way to handle that...
- Fixes terminal text-selection again.
- Make pipes work for non-raw terminals too.
- Move document.title updating somewhere more sensible.
- Pass rawTty prop along to all terminals.
- Don't render react root into doc.body
- Reconnect the websocket if we lose it.
- First, slightly rough, attempt at displaying if pipe has been deleted
- Refactor controlPipe structure in the AppStore/hash.
- Merge controlPipeId, controlPipeRaw, controlPipeStatus into a single object.
- Adds a status bar to the terminal window.
- Error handling in popout working again.
- Don't show terminal cursor when not connected.
- Simplify controlPipe status and error handling.
- Don't keep the status in the hash.
- Use special new action receiveControlPipeFromParams rather than
  adding lots of branching to receiveControlPipe.
- You can reload a terminal but it doesn't exist in history stack.
- Pull out terminal into its own entry point!
- Fixes prod webpack build
- Fixes terminal-app websocket path when running on prod.
- Fixes old terminals appearing when closing a terminal.
- History hacking wasn't working, this is a little simpler.
2015-12-10 12:52:44 +00:00
David Kaltschmidt
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
40f504022c dont send topology options when requesting node details 2015-11-30 12:59:53 +01:00
David Kaltschmidt
7c6e6277a1 Dont treat missing node as UI error 2015-11-13 17:27:50 +01:00
David Kaltschmidt
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
5c086aeeb3 show message if topology is empty 2015-11-03 18:27:23 +01:00
Paul Bellamy
d7e26228bd Support wss for secure websockets when page was loaded over ssl 2015-10-19 17:42:11 +01:00
David Kaltschmidt
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