Commit Graph

290 Commits

Author SHA1 Message Date
John Cowen b20f77748d
ui: L7 intentions improvements (#8851)
* Disable source as well as destination on editing

* Various visual/textual amends

* Make errors only appear once you've interacted with a field

* Move tests that involve selecting menus to a create form

* Revert fieldsets and checkboxes
2020-10-08 16:02:31 +01:00
John Cowen 0f14574ba3
ui: Leader API polling (#8814)
* Allow configuring a datasource to poll instead of block

* Add 30 second polling to the leader API request
2020-10-06 14:26:44 +01:00
Kenia 454ce7166b
ui: Service Mesh - Topology tab and basic layout (#8788)
* Create Topology Tab with foundational layout and styling

* Create Toplogy Metrics component with dynamic SVG

* Add ember-render-modifiers addon

* Implement Topology Metrics comp and fix up styling

* Create topology endpoint with tests

* Move arrow drawing to index.js file

* Add topology to show controller

* Fix up conditional wrapper, tabs positioning, links, and styling

* Group upstreams by dc and fix up styling

* Create service/health-percentage helper

* Add health check percentages to upstreams and downstreams

* Basic Layout

* Upgrade @hashicorp/consul-api-double to v5.2.3

* Renamed endpoint to be service-topology

* Refactor styling

* Update to only show Topology tab when Connect is enabled

* Fix bug and changes from review notes

* Remove unused functions that are replaced with SVG markers

* Refactor to resuse svg-curve helper

* Use the render-template helper for the metrics link

* Add topology default null to services show route

* Removed unused ID

* Fix up tests broken by redirect to /topology
2020-10-05 13:07:35 -04:00
Kenia 38ce837a69
ui: Create template-anchor helper and remove component (#8798) 2020-10-05 09:10:00 -04:00
John Cowen 063745af5c
ui: Show service and node checks as a merged list sorted by health (#8797) 2020-10-02 09:09:05 +01:00
John Cowen c0abe1e406
ui: Outlet Loading (#8779)
Moves all Route/model hook loading to use Outlet components which listen on route change.
2020-10-01 09:33:22 +01:00
Kenia 095e5801ae
ui: Update to service index page (#8775)
* Add 'in service mesh ...' to the composite rows in Service List page

* Add associated services count to terminating and ingress gateways in Service List page

* Update mesh icon in icon-defintion files
2020-09-30 09:13:38 -04:00
John Cowen 75271d1667
ui: Centralized Config Intention Permission CRUD (#8762) 2020-09-30 12:33:01 +01:00
John Cowen 10dc269fd4
ui: Upgrades ember and related to latest 3.20 LTS release (#8761)
* ui: Upgrades ember and related to latest 3.20 LTS release

* Delete ember-portal related tests

As we are running inline and block component tests in the same test an
error is raised as we are adding the same named portal twice.

Tests were deleted here as they weren't really testing anything anyway
2020-09-29 16:59:35 +01:00
John Cowen 4a76042989
ui: Correct readonly L7 Intentions API calls (#8725)
* Disable ability to select destination if not creating

* Add a LegacyID for intentions that don't have them

* Use `/exact/` endpoint for reading single intentions

* Fix up test for new API interaction

* Upgrade consul-api-double

* Comment out tests using destination for the moment

Also, removed any intention related things from the old page-navigation
tests
2020-09-24 16:07:13 +01:00
John Cowen d8fb480ca1
ui: Various CSS amends (#8708)
* ui: Various CSS amends

1. Split out %icon-definition from %composite-row
2. Add hover effect to node listing
3. Fix up proxy level list components
4. Rename our various pills to use a 100-900 scale
5. Reogranize other icon related things (consul-kind and
consul-external-source)

* Fix up upstream test
2020-09-22 18:20:44 +01:00
John Cowen 65f2cd891b
ui: Read-only CRD/Centralized Config Intentions (#8659) 2020-09-18 11:14:06 +01:00
John Cowen 5268841eac
ui: Default test latency to 0 (#8640)
During development a HTTP request will pause for 1 minute ONLY when an
?index is set. This gives a realistic emulation of blocking queries.

During testing we can change this latency when we are testing blocking
queries, which we do in numerous places.

A problem can arise during testing on a very slow machine.

If you are not testing blocking queries and therefore not set a latency
to test with, if the machine you are testing on is slow enough a normal
page can assert during a test, yet not tear down before a further
blocking query request is made. This blocking query then uses the default
latency which cause the page to hang for 1 minute, which in turn causes
the test to timeout.

This only seems to happen on a very slow system, but it does potentially
explain why we occasionally see the odd flakey test popping up.
2020-09-09 18:51:18 +01:00
John Cowen fdd891c38e
ui: Reinstate listing of available test steps via CLI (#8614)
* Unignore any bin files underneath the UI folder

* Add previously ignored node exec script

* Rearrange steps file so we can continue to list steps out
2020-09-09 09:12:42 +01:00
John Cowen 4086385e59
ui: [Bugfix] KV creation from within a 'folder' (#8613)
* ui: Prefill an newly created KV for the when we are on a create route

* ui: Add some KV creation tests
2020-09-09 09:12:09 +01:00
John Cowen 6ae3e3ffc7
ui: Delete unused javascript/CSS components (#8597) 2020-09-02 14:45:06 +01:00
John Cowen 2946d823ba
ui: Improved filtering and sorting (#8591) 2020-09-01 19:13:11 +01:00
Kenia d8c14b51a3
ui: Redesign Node list page (#8567)
* Create ConsulNodeList component

* Implement ConsulNodeList and the new Search/Sort to Node List page

* Minor styling fix to align the first icons in composite row

* Fix-up and add tests for the redesigned Node List page

* Add Leader to composite row for Node List page

* Add test for node leader
2020-08-28 09:21:03 -04:00
John Cowen 539b1076e2
ui: Split ember-data service model into service/service-instance (#8557) 2020-08-26 15:24:30 +01:00
John Cowen 7238089fc7
ui: Add new Service.Mesh* properties for improved sorting (#8542)
* ui: Serialize proxies into the model, add Mesh* model props

Serializes the proxies associated with a service onto the Service model
itself, then adds various Mesh* properties

* ui: Uses the new Mesh* properties throughout the app
2020-08-21 08:53:22 +01:00
Kenia 92c2614f6a
ui: Redesign Node Lock Sessions Tab (#8535)
* Add delay svg icon

* Create ConsulLockSessionList component

* Implement ConsulLockSession component in Lock Sessions tab

* Create format-time helper

* Add Invalidate button and fix up styling

* Fixup and add additional tests
2020-08-20 10:29:16 -04:00
John Cowen 913ae5cfb3
ui: Reduce reconnection attempts on disconnection (#8481)
* ui: Reduce reconnection attempts on disconnection

The UI will attempt to reconnect/retry a blocking query to Consul after
a disconnection in certain circumstances.

1. On receipt of a 5xx error (used for keeping blocking queries running
through reverse proxies that have lowertimeouts than consul itself)
2. When a user switches to a different tab and back again)
3. When the connection to Consul is dropped entirely (when Consul itself
has exited)

In the last case the retry attempts where not using a 3 second interval
between attempts like the first case is.

This commit changes the last case to use the same 3 second pause as the
last case.
2020-08-11 18:47:15 +01:00
John Cowen 10fe22c9b4
ui: Add Optgroups and selectedItems to multiple select dropdown and use (#8476)
* ui: Switch selects to use more HTML-like approach for optgroups

* Add KV comparator

* Use new option/optgroup approach for sort/select

* Fix up tests for new order of menu items
2020-08-11 18:02:51 +01:00
Kenia 9e711b2792
ui: Add sorting to namespaces (#8405)
* Add sorting to namespaces

* Add sorting to namespaces

* ui: Fix up default namespace no delete test (#8467)

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
2020-08-10 10:54:51 -04:00
John Cowen b5a40473ab
ui: Rework popover-menu auto closing (#8340)
* ui: Move more menu subcomponents deeper down into popovermenu

* ui: Simplify aria-menu component+remove auto menu close on route change

* Add ember-string-fns

* Use new PopoverMenu sub components and fix up tests

* Fix up wrong closing let

* Remove dcs from the service show page now we have it in the navigation
2020-08-10 09:26:02 +01:00
Kenia de95a6a325
ui: Add sorting to Policies (#8373)
* Add sorting to ACLs policies with comparator

* Add acls/roles sorting test

* Add navigation test for acls/policies

* Update onchange value for sorting policies
2020-07-29 14:36:09 -04:00
Kenia b6cf6ab6cd
ui: Add sorting to Roles (#8369)
* Add sorting to ACLs roles with comparator

* Add acls/roles sorting test

* Add navigation feature test to roles

* Update onchange value target for sorting roles
2020-07-29 10:55:38 -04:00
John Cowen 12c4bddcac
ui: Ensure URLs for tabs change when selecting a different DC (#8397)
* ui: Add URLs to tabs to we can assert them

* Add dcs to the service show page, temporarily

There is an ongoing PR which removes the need to do this by adding a dcs
property to the navigation, hence temporary

* Add a step to assert on whether text _contains_ rather than exact match

* Test whether the URL of the instance tab changes when the user switches dcs using the main navigation menu

* Recompute href-to's on URL change, just like is-href
2020-07-29 16:09:40 +02:00
Kenia 689d1375a3
ui: Add sorting to ACLs tokens with tests (#8359)
* Add sorting to ACLs tokens with tests

* Create token comparator and implement in template

* Upgrade @hashicorp/consul-api-double to 3.1.6

* Add navigation test to acls tokens
2020-07-29 09:41:40 -04:00
Kenia b3eafef6b0
ui: Add sorting to Intentions with tests (#8348)
* Add sorting to Intentions with tests

* Skip Intentions url back test

* Create comparator for intention and implement in template

* Add a intentions navigation feature test
2020-07-28 11:06:32 -04:00
John Cowen 59585f71a7
ui: Namespaces Redesign (#8336)
* ui: Add new consul-nspace-list component

* ui: Use new consul-nspace-list component

* Fix up other components to use linkable list-collection action

* ui: Remove some dead CSS
2020-07-20 18:12:34 +01:00
John Cowen ac629cd51e
ui: KV Form and List Components (#8307)
* Add components for KV form, KV list and Session form

* Pass through a @label attribute for a human label + don't require error

* Ignore transition aborted errors for if you are re-transitioning

* Make old confirmation dialog more ember-like and tagless

* Make sure data-source and data-sink supports KV and sessions

* Use new components and delete all the things

* Fix up tests

* Make list component tagless

* Add component pageobject and fixup tests from that

* Add eslint warning back in
2020-07-20 18:04:43 +01:00
John Cowen 8cb402eae7
ui: Move routes to use data-sources (#8321)
* Add uri identifiers to all data source things and make them the same

1. Add uri identitifer to data-source service
2. Make <EventSource /> and <DataSource /> as close as possible
3. Add extra `.closed` method to get a list of inactive/closed/closing
data-sources from elsewhere

* Make the connections cleanup the least worst connection when required

* Pass the uri/request id through all the things

* Better user erroring

* Make event sources close on error

* Allow <DataLoader /> data slot to be configurable

* Allow the <DataWriter /> removed state to be configurable

* Don't error if meta is undefined

* Stitch together all the repositories into the data-source/sink

* Use data.source over repositories

* Add missing  <EventSource /> components

* Fix up the views/templates

* Disable all the old route based blocking query things

* We still need the repo for the mixin for the moment

* Don't default to default, default != ''
2020-07-17 14:42:45 +01:00
John Cowen fa524b9edb
ui: Move dc sorting to the view/template (#8297)
* ui: Move dc sorting to the view/template

* Cleanup unused coordinates service from Node repo

* Fix up integration test to not expect a sorted result
2020-07-13 14:22:58 +01:00
John Cowen 73a6afc880
ui: Ensure any colons in headers aren't split out (#8293) 2020-07-13 14:22:15 +01:00
John Cowen 60533647a4
ui: Replace dom-buffering components with ember-stargate Portals (#8273)
* ui: Replace dom-buffering components with ember-stargate Portals
2020-07-09 14:30:17 +01:00
John Cowen 84dc2954bd
ui: Extract and organize popover-menu and related from main-nav (#8272) 2020-07-09 14:26:52 +01:00
John Cowen 239d42ebd3
ui: New Intention Form/List components (#8172) 2020-07-09 10:08:47 +01:00
John Cowen f50438e76f
ui: Remove jQuery from the production build (#8088)
* ui: Split up client/http and replace $.ajax

This splits the client/http service more in the following ways:

1. Connections are now split out into its own service
2. The transport is now split out into its own service that returns a
listener based http transport
3. Various string parsing/stringifying functions are now split out into
utils

* Remove jQuery from our production build

* Move the coverage serving to the server.js file

* Self review amends

* Add X-Requested-With header

* Move some files around, externalize some functions

* Move connection tracking to use native Set

* Ensure HTTP parsing doesn't encode headers

In the future this will change to deal with all HTTP parsing in one
place, hence the commented out METHOD_PARSING etc

* Start to fix up integration tests to use requestParams
2020-07-07 19:58:46 +01:00
Kenia b0ecfc4109
ui: Redesign - Node service instances tab (#8204)
* Upgrade consul-api-dobule to version 3.1.3

* Create ConsulInstaceChecks component with test

* Redesign: Service Instaces tab in for a Node

* Update Node tests to work with the ConsulServiceInstancesList

* Style fix to the copy button in the composite-row details

* Delete helper and move logic to ConsulInstanceChecks component

* Delete unused component consul-node-service-list
2020-07-01 10:27:29 -04:00
John Cowen aa938190c4
ui: Make sure right trim doesn't try to overtrim (#8171) 2020-06-23 18:34:21 +01:00
John Cowen ed8d148502
ui: Redesigns for the token/policy/roles listings pages (#8144) 2020-06-23 10:12:04 +01:00
John Cowen c5d0216939
ui: Support for Node Identities (#8137)
* Add all the new data required for NodeIdentities

* Add potential NodeIdentity to the token list component

* Amend the policy-form/selector to allow node identity creation

* Fix up CSS for radio buttons and select label

* Add node-identity policy template component

* Fix up and add acceptance tests for NodeIndentities

* Make sure policy previews take node identities into account

* Only show certain policy markup if those we have those policies

* Potentially temporarily hide dt's that don't have icons yet
2020-06-23 09:59:43 +01:00
John Cowen 6126f24acd
ui: Remove with-listeners mixin (#8142)
This mixin was a very thin mixin over the top of our listeners utility,
and we have been gradually preferring using the utility straight rather
than using the mixin. This commit removes the last places where we still
used the mixin, and also potentially the last few places where we
continued to use the old API for our listeners utility.
2020-06-18 14:54:31 +01:00
John Cowen bb94b6a474
ui: Switch out WithResizingMixin for on-window helper (#8130)
* ui: Add ember-on-helper

* Switch out WithResizingMixin for {{on-window}} helper
2020-06-17 14:26:50 +01:00
John Cowen 52705125a1
ui: Remove WithEventSource mixin, use a component instead (#7953)
The WithEventSource mixin was responsible for catching EventSource
errors and cleaning up events sources then the user left a Controller.

As we are trying to avoid mixin usage, we moved this all to an
`EventSource` component, which can clean up when the component is
removed from the page, and also fires an onerror event.

Moving to a component firing an onerror event means we can also remove
all of our custom computed property work that we were using previously
to catch errors (thrown when a service etc. is removed)
2020-06-17 14:19:50 +01:00
John Cowen b5e08089ab
ui: Change code-editor tested to use querySelectorAll (#8087) (#8131) 2020-06-17 14:17:00 +01:00
John Cowen 84c977faf1
ui: Don't show duplicate services in the intentions form dropdown (#8133)
* Add uniq-by helper
* Pass unique services through to intentions form
* Add acceptance test
2020-06-17 14:11:40 +01:00
John Cowen 9a539f0340
ui: Token listing redesign (#8117) 2020-06-17 10:25:54 +01:00
John Cowen a4c491ae75
ui: Add ...attributes to healthcheck-info (#8120) 2020-06-16 19:22:04 +01:00