99 Commits

Author SHA1 Message Date
John Cowen
b41cad6fdf
UI: CSS refactor (#4430) + Fullscreen Layout (#4435)
* Begin refactoring CSS into component folders. Moved most
components into layout/skin folders, left out a couple of ones I want
to think about more.
* Adjust grays based on recent Structure changes 
* Switch to fullscreen layout for lists and detail, left aligned forms (#4435)
* Specifically use the 'actions_close' label, not just the :last-child (actions-group)
* Replace some non-var-ed colours in vaults code skin, plus prefixing (black and white)
2018-08-29 12:11:58 +01:00
John Cowen
7bb35c4c78
UI: Repo layer integration tests (#4454) (#4563)
ui: Repo layer integration tests for methods that touch the API

Includes a `repo` test helper to make repetitive tasks easier, plus a
injectable reporter for sending performance metrics to a centralized metrics
system

Also noticed somewhere in the ember models that I'd like to improve, but left
for the moment to make sure I concentrate on one task at a time, more or less:

The tests currently asserts against the existing JSON tree, which doesn't
seem to be a very nice tree.

The work at hand here is to refactor what is there, so test for the not
nice tree to ensure we don't get any regression, and add a skipped test
so I can come back here later
2018-08-29 10:00:15 +01:00
John Cowen
1b3d566a7a
UI: Begin unskipping some more trivial tests (#4574)
WIP Unskip some lower level trivial tests.

This is the beginning of work to unskip some of the more trivial tests that I'd skipped a while back (if the thing they are testing broke, they would have failed higher up in other acceptance tests).

I'd rather keep the tests, as they do test things in a more isolated manner, and the plan was to always come back and work to unskip them time allowing.

I didn't get to far into this work in progress here, but I'd rather merge what I've done all the same and come back at a later date and continue.
2018-08-29 09:59:02 +01:00
John Cowen
4ebd70e6cd
UI: Fixes healthy node listing resize on large portrait screens (#4564)
1. Split the resizing functionality of into a separate mixin to be
shared across components
2. Add basic integration tests to prove that everything is getting
called through out the lifetime of the app. I decided against unit
testing as there isn't really any isolated logic to be tested, more
checking that things are being called in the correct order etc i.e. the
integration is correct.

Adds assertion to with-resizing so its obvious to override `resize`
2018-08-24 12:35:52 +02:00
John Cowen
fde41467cf
ui: Adds bottom breathing space on the bottom of forms (#4433) 2018-07-30 17:58:13 +01:00
John Cowen
12811c0844
UI - Refactor Adapter.handleResponse (#4398)
* Add some tests to check the correct GET API endpoints are called

* Refactor adapters

1. Add integration tests for `urlFor...` and majority `handleResponse` methods
2. Refactor out `handleResponse` a little more into single/batch/boolean
methods
3. Move setting of the `Datacenter` property into the `handleResponse`
method, basically the same place that the uid is being set using the dc
parsed form the URL
4. Add some Errors for if you don't pass ids to certain `urlFor` methods
2018-07-30 17:55:44 +01:00
John Cowen
0663bdbe90
Merge pull request #4410 from hashicorp/bugfix/gh-4175-service-ip
UI - Bugfix: Show Service IP not the Node IP
2018-07-18 18:39:39 +01:00
John Cowen
e7a3235afc Use some for the tags search instead of munging and searching 2018-07-18 18:15:03 +01:00
John Cowen
d510e1e6d3 Add basic searching by tags using the freetext search near-term 2018-07-18 18:14:19 +01:00
John Cowen
1d31bef0a4 Show the Service.IP address instead of the Node.IP address in detail 2018-07-18 13:37:14 +01:00
John Cowen
7202f6e771
Merge pull request #4387 from hashicorp/feature/ui-service-ids
UI - Show/search by service ids
2018-07-13 09:38:35 +01:00
John Cowen
56d2052345
Merge pull request #4373 from hashicorp/bugfix/gh-4324-kv-trailing-slashes
UI Bugfix - kv trailing slashes
2018-07-13 09:38:02 +01:00
John Cowen
310a038f87 Show Service.ID's throughout the app, allow searching by Service.ID
1. In the Services > Services detail page for both healthy and unhealthy
nodes, also add searching by Service.ID here
2. In the Nodes > Node detail > [Services] tab only if its different
from the Service name, add searching by Service.ID here
2018-07-12 13:36:47 +01:00
John Cowen
4179afae06 Instead of rewriting the API call, use ember to rewrite the URL
We now essentially do 2 redirects if you hit a `folder/`

1. If you visit `/ui/dc1/kv/folder/`, `consul` will redirect you to `/ui/dc1/kv/folder`
2. Once redirected to `/ui/dc1/kv/folder` via a 301, use ember/history
API to redirect you back to `/ui/dc1/kv/folder/`.

Bit long winded, but achieves what we want without having to get stuck
into `consul` itself to remove the 301 for the UI
2018-07-11 10:44:37 +01:00
John Cowen
887d4e9dde If we are indexing or foldering then its going to be folder-like
...therefore add a trailing slash to the API call
2018-07-09 15:52:22 +01:00
John Cowen
fb91d05eb4 Don't assume the last item in the healthcheck listing is passing 2018-07-06 16:40:04 +01:00
John Cowen
25477761f7
Merge pull request #4343 from hashicorp/bugfix/gh-4336-update-empty-kv
UI - Bugfix: Saving empty key/value pairs
2018-07-06 13:13:01 +01:00
John Cowen
c01fb37c46 Don't clone prev, there's no need 2018-07-06 13:09:23 +01:00
John Cowen
67402b3d26 Tests and comments regarding the previous 2 commits 2018-07-05 13:43:03 +01:00
John Cowen
b29546e578 Looking into atob functionality, consequence of Value: null
The Consul API can pass through `Value: null` which does not get cast to
a string by ember-data. This snowballs into problems with `atob` which
then tried to decode `null`.

There are 2 problems here.

1. `Value` should never be `null`
  - I've added a removeNull function to shallowly loop though props and
  remove properties that are `null`, for the moment this is only on
  single KV JSON responses - therefore `Value` will never be `null`
  which is the root of the problem

2. `atob` doesn't quite follow the `window.atob` API in that the
`window.atob` API casts everything down to a string first, therefore it
will try to decode `null` > `'null'` > `crazy unicode thing`.
  - I've commented in a fix for this, but whilst this shouldn't be
  causing anymore problems in our UI (now that `Value` is never `null`),
  I'll uncomment it in another future release. Tests are already written
  for it which more closely follow `window.atob` but skipped for now
  (next commit)
2018-07-05 13:35:06 +01:00
John Cowen
6a407a044e Remove validation for presence of KV values 2018-07-05 13:33:02 +01:00
John Cowen
f85369c375 Add some navigation testing for back buttons and create buttons 2018-07-04 17:23:33 +01:00
John Cowen
649d777714 Acceptance test for using tokens from listing and detail pages 2018-07-04 16:37:41 +01:00
John Cowen
701d6a3a72 Move deleting to a top level feature 2018-07-04 15:58:09 +01:00
John Cowen
e0f7cdb128 Start purifying page objects 2018-07-04 15:06:20 +01:00
John Cowen
e3ce2a8beb Lock Session invalidation acceptance test 2018-07-04 13:41:44 +01:00
John Cowen
ed286585e9 Add some low hanging intention tests, basically add intentions to others
1. There are various things tests that can just have intentions added
into them, like filters and such like, add intentions to these
2. Start thinking about being able to negate steps easily, which will
lead on to a cleanup of the steps
2018-07-04 13:21:30 +01:00
John Cowen
87a0ad9483
Merge pull request #4331 from hashicorp/feature/hedge-empty-node-ids
Hedge for when consul sends nodes with an empty ID
2018-07-03 16:11:31 +01:00
John Cowen
b445df39bb Use html5 oninput instead of onkeyup for native textual inputs
This enables people to enter things using the mouse to paste for
example, plus possible other things.

As an aside it also answers my query regarding `fillIn` for testing,
nothing needs to be actually _typed_ anymore! Doh
2018-07-03 15:40:15 +01:00
John Cowen
6398fb02c7 Ensure we catch empty ID's for single nodes also
I don't think this would have a large effect on the UI whichever but
best to make sure
2018-07-03 14:48:04 +01:00
John Cowen
a47a0b617f Hedge for when consul sends nodes with an empty ID 2018-07-03 13:23:45 +01:00
John Cowen
8e7e224f3f Encode all the hexcodes 2018-06-26 10:48:26 +01:00
mkeeler
6813a99081 Merge remote-tracking branch 'connect/f-connect' 2018-06-25 19:42:51 +00:00
John Cowen
5ac19b164e Change the appearance of * for intention listings
1. Use 'All Services (*)' as opposed to '*'
2. Set 'Destination' in teh same bold font as 'Source'
3. Ensure you can search for all services by using '*' or 'All Services
(*)'
2018-06-25 12:26:18 -07:00
John Cowen
9f8b87cdda Check for NOT connect-proxy 2018-06-25 12:25:40 -07:00
John Cowen
cc3d578271 Filter Source and Destination menus by Kind 2018-06-25 12:25:40 -07:00
John Cowen
d61a09ea28 Fix linting typo, caused the selection of future services to break 2018-06-25 12:25:40 -07:00
John Cowen
f600d8fcc9 Move intentions menu item to after ACLs 2018-06-25 12:25:37 -07:00
John Cowen
b0ff68cd7d Lint 2018-06-25 12:25:16 -07:00
John Cowen
e736b546f8 Icons in the filter bar 2018-06-25 12:25:15 -07:00
John Cowen
f4218b4bea Validate all the things, all the time 2018-06-25 12:25:15 -07:00
John Cowen
ee3a32d771 More detailed error messages for duplicate intentions 2018-06-25 12:25:15 -07:00
John Cowen
ea3e4a720a Only offer to create a future service if the name doesn't already exist 2018-06-25 12:25:15 -07:00
John Cowen
50507b34a5 Make sure future services are available when editing intentions 2018-06-25 12:25:15 -07:00
John Cowen
5575455053 Add support for specifying future services and wildcards 2018-06-25 12:25:15 -07:00
John Cowen
55bc45832e Tie up real endpoints 2018-06-25 12:25:15 -07:00
John Cowen
24f6155efc Switch to single selects rather than inputs 2018-06-25 12:25:15 -07:00
John Cowen
148621d98e Have a look at power select for select elements 2018-06-25 12:25:14 -07:00
John Cowen
8023bb9b03 Add intentions actions mixin 2018-06-25 12:25:14 -07:00
John Cowen
9d6b9b7717 Remove SourceType for the moment 2018-06-25 12:25:14 -07:00