Commit Graph

575 Commits

Author SHA1 Message Date
John Cowen ea9701dbd5
ui: Replaces old request method with rpc. (#8298)
`rpc` is used to define how to make a HTTP request/response messages.
This used to be called 'request' but the term is overused  and sounded
like only one leg of the message, so the naming was moved to `rpc` a
while ago, this cleans up the places where we still used the old term.
2020-07-13 14:23:15 +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 1e5212b257
ui: Revert ember-composable-helpers to ~4.0.0 due to faster sort-by (#8289) 2020-07-10 17:38:50 +01:00
John Cowen 12d8660572
ui: Adds definition-table class to RTT values table (#8286)
We changed our default definition list layout in
https://github.com/hashicorp/consul/pull/8117.

We replaced the default with a definition-table class but missed one
place where the old default was previously used.

This adds the definition-table class in RTT where it used to use the
default.
2020-07-10 14:27:02 +01:00
John Cowen e39da2fc14
ui: Lint staged no longer requires git add to be specified (#8285) 2020-07-10 14:25:59 +01:00
John Cowen 4a33c6a3d4
ui: Dependency upgrade (#8276)
* Remove curly brackets and pass through attributes

* yarn upgrade and part manual deps upgrade of non-problematic things

* from-entries from ember-composable helpers receives an array

* PowerSelect destruction bug seems to be fixed upstream

* Ensure all policies have a default 0 date for ember-c-h upgrade

sorting no longer works correctly unless CreateTime has a value
2020-07-09 17:13:41 +01:00
John Cowen 7417aea972
ui: Use top-level 'named index files' instead of in folder index files (#8274)
* Remove unused phrase-editor CSS

* Move index.scss files to top-level named files to make them more obvious
2020-07-09 14:51:08 +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 5b4c3057a5
ui: Enable keyboard access for the sorting dropdown menus (#8267) 2020-07-09 13:41:34 +01:00
John Cowen 239d42ebd3
ui: New Intention Form/List components (#8172) 2020-07-09 10:08:47 +01:00
Kenia c675e99645
ui: Fix up styling for the Tags tab (#8263) 2020-07-08 09:47:04 -04:00
John Cowen 5cbd7d74d0
ui: Use empty-state for our small empty states (#8262) 2020-07-08 14:34:57 +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
John Cowen 088e1d5693
ui: Re-adds gray backgrounds to old style %pills (#8251) 2020-07-07 19:03:15 +01:00
Blake Covarrubias a955632712 Update URLs for gateway docs
PRs #7610 and #7962 changed the locations/URLs for the gateway docs
which results in a HTTP 404 Not Found being returned when accessing
the previous URLs.

Update URLs for gateway docs to point to new URLs.

PR #8243 adds corresponding redirects on consul.io.
2020-07-06 11:34:22 -07: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 91a8c13aa0
ui: Ensure routing tab is shown when connect enabled (#8209)
In https://github.com/hashicorp/consul/pull/8065 we attempted to reduce
the amount of times that the UI requests the discovery chain endpoint
when connect is disabled on a datacenter.

Currently we can only tell if connect is disabled on a datacenter by
detecting a 500 error from a connect related endpoint.

In the above PR we mistakenly returned from a catch instead of
rethrowing the error, which meant that when a none 500 error was caught
the discovery chain data would be removed. Whilst at first glance this
doens't seem like a big problem due to the endpoint erroring, but we
also receive a 0 error when we abort endpoints during blocking queries.
This means that in certain cases we can remove cached data for the
discovery chain and then delay reloading it via a blocking query.

This PR replaces the return with a throw, which means that everything is
dealt with correctly via the blocking query error detection/logic.
2020-07-01 10:21:15 +01:00
John Cowen 3dfb0d3b4d
ui: Don't hide TTL check output (#8187)
We'd assumed that TTL check outputs shouldn't be shown as it seemed like
they never had outputs, but they can be submitted with notes, which are
then converted into the output.

This unhides the output for TTLs and treats them exactly the same as
other healthchecks.
2020-06-29 15:29:20 +01:00
Kenia e67af2b292
ui: Support ingress gateways upstreams with multiple addresses (#8185)
* Upgrade consul-api-double to version 3.1.2

* Display multiple addresses for ingress gateway upstreams
2020-06-25 09:50:39 -04:00
John Cowen f133abe4f1
ui: Ensure the tooltip panel chevron isn't hidden by overflow (#8183) 2020-06-24 18:07:19 +01:00
Kenia 6a581de3cb
ui: Refactor composite rows to use description lists and add Tooltips (#8175)
* Update Consul Service List composite rows with Tooltips and description lists

* Update Consul Service Instance List composite rows with Tooltips and description lists

* Removed line height in reduced pill to match the description lists in the composite rows
2020-06-24 09:54:16 -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 8eb1133cac
ui: Add namespaced versions of templated policies (#8173) 2020-06-23 17:58:43 +01:00
Kenia 6bc1b2be44
ui: Update helper to return Proxy and Service Health if the Service has a Proxy (#8168) 2020-06-23 10:28:29 -04: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
Kenia 15deb4bda1
ui: Refactor Upstreams and Exposed Paths icons (#8139)
* Update Ports to have copy-button to the left

* Update exposed paths use a description list
2020-06-18 09:23:42 -04: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
Kenia 3946a48928
ui: Refactor detailed health checks to use more of the service/instance-checks helper (#8119) 2020-06-16 12:33:11 -04:00
Kenia 599551496f
ui: Add detailed Health Checks to Service Detail page (#8111) 2020-06-16 11:59:31 -04:00
John Cowen d2515ed409
ui: Move healthcheck ordering to use new comparators (#8096) 2020-06-16 14:13:29 +01:00
John Cowen 79029404df
ui: Colocate pageobject components with their components (#8098) 2020-06-12 16:50:09 +01:00
Kenia 2afc032b24
ui: Add health check icon to Ingress Upstreams and add Tooltips in additional areas (#8091)
* Add Health Checks and update Tooltips in Ingress Upstreams

* Update Tooltip in Proxy Info tab Upstreams

* Add Tooltips to Proxy Info tab Exposed Paths

* Add Health Checks with Tooltips to Service List page
2020-06-12 09:35:52 -04:00
John Cowen c92e8ebc7c
ui: Ensure encoder.js polyfill is available (#8094) 2020-06-12 14:28:36 +01:00
John Cowen e22aee73a8
ui: Exclude any component/pageobject.js files from being included (#7978)
This excludes any /components/**/pageobject.js files from our production
builds which means we can co-locate all of our component page objects
(and selectors) along with the components themselves.
2020-06-12 13:06:59 +01:00
John Cowen 256695ac3e
ui: Upgrade consul-api-double to use intention response w/o old fields (#8089) 2020-06-12 09:51:07 +01:00
John Cowen 64ba8177e0
Merge pull request #8080 from hashicorp/ui-staging
ui: UI Release Merge (1.8-beta-3: ui-staging merge)
2020-06-10 17:40:22 +01:00
John Cowen 2dec484724
ui: Reduce discovery-chain log errors (#8065)
* ui: Reduce discovery-chain log spam

Currently the only way that the UI can know whether connect is enabled
or not is whether we get 500 errors from certain endpoints.

One of these endpoints we already use, so aswell as recovering from a
500 error, we also remember that connect is disabled for the rest of the
page 'session' (so until the page is refreshed), and make no further
http requests to the endpoint for that specific datacenter.

This means that log spam is reduced to only 1 log per page refresh/dc
instead of 1 log per service navigation.

Longer term we'll need some way to dynamically discover whether connect
is enabled per datacenter without relying on something that will add
error logs to consul.
2020-06-10 16:07:06 +01:00
John Cowen 7c0db7f8b4
ui: remove sort-control component (#8077)
This was never actually used
2020-06-10 14:27:21 +01:00
Kenia 1449ea8e46
ui: Reorder items in the Proxy Info tab (#8061) 2020-06-09 11:36:04 -04:00
Kenia f2864358d8
ui: Reorder the tabs for Ingress/Terminating Gateway Service Detail page (#8060) 2020-06-09 11:02:13 -04:00
John Cowen 0b9647c3b9
ui: ConsulKind explanatory tooltip panels (#8048)
* ui: Add tooltip panels to ConsulKind
2020-06-09 11:10:14 +01:00
Daniel Nephin b9e4544ec3 intentions: fix a bug in Intention.SetHash
Found using staticcheck.

binary.Write does not accept int types without a size. The error from binary.Write was ignored, so we never saw this error. Casting the data to uint64 produces a correct hash.

Also deprecate the Default{Addr,Port} fields, and prevent them from being encoded. These fields will always be empty and are not used.
Removing these would break backwards compatibility, so they are left in place for now.

Co-authored-by: Hans Hasselberg <me@hans.io>
2020-06-05 14:51:43 -04:00
John Cowen 6b4e321eb0
ui: Blocking with filtering intentions amends (#8027)
* ui: Now intentions use blocking queries invalidation isn't needed

* ui: Ensure reconciliation doesn't happen when filtering for intentions
2020-06-05 14:44:57 +01:00
John Cowen ae1bbb57b2 ui: Switch help menu icons to use the correct icons 2020-06-04 14:31:15 +00:00
John Cowen 43b320be44 ui: Add ability to sort service based on health (#7989)
* ui: Add ability to sort service based on health

* ui: Move custom sorting to sort/comparator Service/Helper (like search)

This moves custom sorting to use the same pattern as custom searching.

* Remove old Controller based comparator
2020-06-03 16:46:57 +00:00
Kenia f4e38d229b ui: Customize link for an Upstream in a different namespace as the ingress gateway (#8006)
* Add configuration default value for findGatewayBySlug

* Customize link for an Upstream in a different nspace as the ingress gateway
2020-06-03 16:46:56 +00:00
John Cowen bb69b0f4d6 ui: Add an Address copy button to the service instance page (#7977)
* ui: Add an Address copy button to the service instance page

* ui: Fallback to Node Address if no Service Address is configured
2020-06-03 16:46:54 +00:00
John Cowen 41c988270f ui: Remove WithSearching mixin, use helpers instead (#7961)
* ui: Remove WithSearching mixin, use composable helpers instead
2020-06-03 16:46:53 +00:00
Kenia 3b0be550b7 ui: Add blocking queries to gateways (#7967)
* Remove gateway endpoint adapter, model, and serializer and tests

* Update service tests to handle gateway-services-nodes

* Upgrade consul-api-double to 2.15.2

* Add a fairly temporary shouldReconcile method

Co-authored-by: John Cowen <jcowen@hashicorp.com>
2020-06-03 16:46:52 +00:00
John Cowen 89a338c804 ui: SSO Icon cleanup (#7959)
1. Removes all icons not supported by the backend
2. Adds other icons supported by the backend
3. If there is no icon available don't add CSS positioning for one
2020-06-03 16:46:51 +00:00
John Cowen 9b256d3da6 ui: New Empty States (#7940)
* ui: CSS and component changes to the <EmptyState /> component

* ui: Reset the auth-form component back to its initial state

Moving forwards we are going to have the auth-form on the page all the
time, even when logged in (for relogging in purposes). This means the
auth-form will not always be removed from the DOM when you log in.

This sets the form back to its idle state before calling onsubmit

* ui: Make a public api for modal-dialog with a single close method

* ui : Move cache reset somewhere that makes more sense, + single refresh

1. Centralize cache resetting elsewhere, for now the store makes most
sense, although I would prefer the Repository class, so using the store
is temporary
2. We only need to refresh on login once, unless we have a differing
nspace

* ui: Ensure visibilitychange events are cleaned up

* ui: Only cache DataSource data if we have any, + only clear the cache

* ui: Add the modal login dialog to both unauth and auth views

This means we can 'relogin' when already logged in

* ui: Add new empty states

* ui: CSS Tweaks

* Remove marketing grays
2020-06-03 16:46:50 +00:00
Kenia b40bcd76c9 ui: Create Tags & Meta tab (#7954) 2020-06-03 16:46:48 +00:00
Kenia 3f1deac804 ui: Make only existing services in Upstreams linkabled with hover effect (#7943)
* Create service/exist helper to be used in ListCollection list items

* Make only existing services in Upstreams linkabled with hover effect
2020-06-03 16:46:47 +00:00
John Cowen 7eacae10f0 ui: remove some components/javascript we are no longer using (#7941) 2020-06-03 16:46:46 +00:00
Kenia aad46b31dc ui: Implement EmberTooltips to Upstreams (#7930)
* Add ember-tooltips addon

* Create Tooltip component with styling and test

* Implement Tooltip into Upstreams
2020-06-03 16:46:44 +00:00
John Cowen 85540ca829 ui: Blink/Webkit input[type=password] workaround (#7929)
It seems that blink/webkit browsers at least will leak memory when using
input[type=password] inputs. This only affects us during testing as we
'refresh' the ember app ~1000 times without actually refreshing
the browser. This means references to these HTML input elements mount
up now that every single page/test has an input[password] on it.

Following this change our memory usage during testing seems to have
reduced by as much as 75%.

During normal usage the single password element is only added to the
page once per login/logout.
2020-06-03 16:46:43 +00:00
John Cowen acf975ca1f ui: Slightly refactor %composite-rows and reuse ConsulServiceList component (#7886)
* ui: Move individual component types into a single %composite-list plus

1. Removes all out separate CSS components (that match HTML components)
to favour not having those separate for the moemnt at least
2. Reuses <ConsulServiceList /> component for Terminating Gateways >
Linked Services

* ui: Tweak breadcrumb spacing for '/' separator

* Fix up the tests i.e. services per tab so we can call them all services
2020-06-03 16:46:42 +00:00
John Cowen 696aeb7840
UI Release Merge (1.8-beta-2: ui-staging merge) (#7919)
* ui: Styling fixes (#7885)

* Move cellHeight to ListCollection js file

* Fix composite row border-top-color onHover state

* Add empty health check icon to CompositeRow styling

* ui: Slightly refactor %composite-rows and reuse ConsulServiceList component (#7886)

* ui: Move individual component types into a single %composite-list plus

1. Removes all out separate CSS components (that match HTML components)
to favour not having those separate for the moemnt at least
2. Reuses <ConsulServiceList /> component for Terminating Gateways >
Linked Services

* ui: Tweak breadcrumb spacing for '/' separator

* Fix up the tests i.e. services per tab so we can call them all services

* ui: Misc discovery chain fixes (#7892)

1. Look for a default splitter before looking for a default resolver in
order to route to.
2. Delay adding svg listeners until afterRender (fixes split tooltip)
3. Make router id's consistent for highlighting default routers in when
clicking the graph

* ui: If an error occurs on the server, surface it in the notification (#7893)

* ui: Delete old unused CSS (#7909)

This commit deletes CSS that we no longer use and we definitely will not
ever use.

We also dedup all of our imports here as it turns out SASS doesn't
dedupe imports. Strangely this increases out CSS weight by ~1kb instead
of reducing but we'd rather keep things deduped as that was the
intention

* ui: Redesign - Exposed Paths (#7912)

* Add new exposed paths icons to codebase

* Redesign Exposed Paths and create copy-button hover on Composite Row

* Refactor FeedbackDialog and CopyButton

* Change this.element to use `{{ref }}` now we don't have an element

We changed this to a tagless component with an eye to moving this to a
glimmer component, without spotting that this would also remove the
`this.element` property.

This adds an equivalent using the ref modifier.

Co-authored-by: John Cowen <jcowen@hashicorp.com>

* ui: Remove box-shadow and pointer cursor from metada list hover effect (#7914)

Co-authored-by: Kenia <19161242+kaxcode@users.noreply.github.com>
2020-05-19 17:18:04 +01:00
John Cowen 511343d2aa
ui: Only save the setting that you've changed (#7918)
Originally we assumed all settings would be editable in the settings
page, but over time we've added thigns to localStorage that aren't user
settable settings. This means we shouldn't save all you localStorage
settings everything time only a single setting has been saved.

This change only changes the setting you've changed via the settings
page, meaning it will never update non-user-settable settings.
2020-05-19 16:20:27 +01:00
John Cowen 55e05b39e2
ui: Ensure datacenter is sent to the API when loading in a policy panel (#7910)
* ui: Policies don't have datacenter properties, use the URL dc instead.

* ui: Ensure policy saving proxy object is destroyed
2020-05-19 14:51:39 +01:00
John Cowen 8602fbaad4
ui: Ensure value is always passed to CONSUL_SSO_ENABLED (#7913)
ACLsEnabled is always set to either true or false. .SSOEnabled is only set if you are running enterprise (the same as .NamespacesEnabled). Therefore .SSOEnabled and .NamespacesEnabled require conditionals to check their existence.

In order to avoid future confusion we moved all go-template variables to use the conditional form, and added a comment to that effect.

Tests have been added to reflect this, but they only test that the template outputs what we expect, true e2e testing here would be advantageous.
2020-05-18 20:22:37 +01:00
John Cowen dfb1b16f72
ui: Misc amends for Safari and Firefox (#7907)
1. Ensure dropdown menus function correctly in Safari
2. Ensure default grey color for buttons is not used
3. Ensure IntersectionObservers are cleaned up properly in Safari
2020-05-18 17:21:10 +01:00
John Cowen 76f97836b2
ui: Quote service names when filtering for intentions (#7888)
* ui: Quote service names for intention filtering

* ui: return null if we ever get an error with anything else
2020-05-14 17:18:24 +01:00
Kenia c07ef3f36a ui: Add namespaces to gateway services (#7868)
* Add namespace info to gateway Linked Services and Upstreams tabs

* Upgrade consul-api-double to version 2.15.1
2020-05-13 13:12:56 -04:00
Kenia 600dea8631 ui: Create Upstreams tab for Ingress Gateways (#7865) 2020-05-13 13:12:56 -04:00
Kenia c548d94450 ui: Create Linked Services Tab for Terminating Gateways (#7858)
* Fix to bottom border not applying to the correct <li>

* Create Linked Services tab with styling and tests

* Add internal endpoint gateway-services-nodes to the codebase with tests

* Upgrade consul-api-double to version 2.15.0
2020-05-13 13:12:55 -04:00
John Cowen 7577f6bfca ui: Test Improvements (#7854)
* ui: Combine all "see/don't see" steps into one step

* Fix up broken tests

* Add some test meta data/titles

* Test out proxies in the service listing

* Remove comments
2020-05-12 17:14:57 +00:00
John Cowen 1ddffb4162 ui: Renames CopyButtonFeedback to CopyButton and use it everywhere (#7834)
* ui: Renames CopyButtonFeedback to CopyButton and use it everywhere

* Uncapitalize output

* Remove the ability to set the contents via an attr, and..

..change the attribute for the string that gets copied to be called
'value' so it feels like HTML
2020-05-12 17:14:56 +00:00
John Cowen df1ae18a41 ui: Restrict %secondary-button to only form buttons in the main content (#7836) 2020-05-12 17:14:56 +00:00
Kenia ed201c3f17 ui: Add and use ProxyFor to get the `connected with proxy` boolean (#7820)
* Add and use ProxyFor to get the `connected with proxy` boolean

* Fix up page-navigation test

* Upgrade to @hashicorp/consul-api-double@2.14.7
2020-05-12 17:14:55 +00:00
John Cowen 7d6f5ef92a ui: refactor out the taglist component to use a recursive pattern (#7837)
* ui: refactor out the taglist component to use a recursive pattern

* Make sure simple rendering tests pass
2020-05-12 17:14:54 +00:00
John Cowen 4c46d2ed6f ui: Remove debugging pause from our acceptance tests (#7852) 2020-05-12 17:14:53 +00:00
John Cowen c96fd3778e ui: Misc SSO w/Namespace amends (#7851)
* ui: If an auth-method is in another namespace than default, make that clear

* Pass through the namespace of the auth method rather than use the current

* Make sure we refresh the application route, before redirecting

This ensure that the nspaces and are refreshed in the main nav menu
2020-05-12 17:14:53 +00:00
Kenia b56ac73327 ui: Update copy button icon margin (#7835) 2020-05-12 17:14:52 +00:00
John Cowen 412eec7f5d UI: Improved Login/Logout flow inc SSO support (#7790)
* 6 new components for new login/logout flow, plus SSO support

UI Components:

1. AuthDialog: Wraps/orchestrates AuthForm and AuthProfile
2. AuthForm: Authorization form shown when logged out.
3. AuthProfile: Simple presentational component to show the users
'Profile'
4. OidcSelect: A 'select' component for selecting an OIDC provider,
dynamically uses either a single select menu or multiple buttons
depending on the amount of providers

Data Components:

1. JwtSource: Given an OIDC provider URL this component will request a
token from the provider and fire an donchange event when it has been
retrieved. Used by TokenSource.
2. TokenSource: Given a oidc provider name or a Consul SecretID,
TokenSource will use whichever method/API requests required to retrieve
Consul ACL Token, which is emitted to the onchange event handler.

Very basic README documentation included here, which is likely to be
refined somewhat.

* CSS required for new auth/SSO UI components

* Remaining app code required to tie the new auth/SSO work together

* CSS code required to help tie the auth/SSO work together

* Test code in order to get current tests passing with new auth/SSO flow

..plus extremely basics/skipped rendering tests for the new components

* Treat the secret received from the server as the truth

Previously we've always treated what the user typed as the truth, this
breaks down when using SSO as the user doesn't type anything to retrieve
a token. Therefore we change this so that we use the secret in the API
response as the truth.

* Make sure removing an dom tree from a buffer only removes its own tree
2020-05-12 17:14:51 +00:00
John Cowen e4d27bc134 ui: Change wording used in the intention forms (#7831)
1. When choosing Services/Nsmapces for intentions you can either choose
a service from autocomplete menus, or write any service name, existing
or not. We previous said this would be a 'Future' service, but it could
also be a service in another datacenter, or a 'virtual service'.

2. Reword the hints underneath the autocomplete menus to reflect point 1
2020-05-12 17:14:50 +00:00
John Cowen 5d9d325966 ui: Improve language surrounding marking a token as local/global (#7830)
This commit moved the checkbox used for marking a token as
local/global to use a more traditional UX, i.e.:

[ ] Question?

Clicking the radiobutton toggles true/false:

true = yes
false = no

instead of:

false=yes
true=no
2020-05-12 17:14:50 +00:00
John Cowen 5ad139d220 ui: Moves/loads policy datacenters info into the detail panel (#7828) 2020-05-12 17:14:49 +00:00
Kenia 7c203a9220 ui: Create PopoverSelect, CatalogToolbar, and update tests (#7489)
* Create PopoverSelect component and styling

* Create CatalogToolbar component and Styling

* ui: Adds `selectable-key-values` helper (#7472)

Preferably we want all copy/text to live in the template. Whilst you can
achieve what we've done here with a combination of different helpers, as
we will be using this approach in various places it's probably best to
make a helper.

We also hit an ember bug related to using the `let` helper and trying to
access `thingThatWasLet.firstObject` (which can also be worked around
using `object-at`).

Moving everything to a helper 'sorted' everything.

Probably worthwhile noting that if the sort option themselves become
dynamic, I'm not sure if the helper here would actually react as you
would expect (I'm aware that ember helpers on react on the root
arguments, not necesarily sub properties of those arguments). If we get
to that point this helper could take the same approach as what I believe
ember-composable-helpers does to get around this, or move them to the
view controller. If we do ever moved this to the view controller, we
can still use the exported function from the new helper here to keep
using the same functionality and tests we have here.

* Create tests for sorting services with CatalogToolbar

* Add rule to print 'ember/no-global-jquery' as a warning

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
2020-05-12 17:14:48 +00:00
John Cowen 2eb34e07ea ui: Small CSS tweaks (#7808)
1. Reinstate top border on in page tabs
2. Keep overflow:hidden just for dom-recycling-tables
2020-05-12 17:14:47 +00:00
Kenia 15ff639b83 ui: Update Gateway headers to include Service Kind (#7805) 2020-05-12 17:14:46 +00:00
Kenia 093c353c4b ui: Redesign - Instance Detail Proxy Info tab (#7745)
* Fix clickFirstAnchor bug

* Create Proxy Info Tab for Instance Detail Page

* Create tests for ProxyInfo and update other scenarios with Proxy data

* ui: Refactors our app-view/%app-view component (#7752)

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
2020-05-12 17:14:46 +00:00
Kenia 697f1f56cf ui: Redesign - Gateway Instances List page (#7796)
* Hide Nav in Instances page for Gateway services

* Fix up tests to have mocked Services with no Kind attribute

* Upgrade consul-api-double to 2.14.4
2020-05-12 17:14:45 +00:00
John Cowen eedd062977 ui: Remove last instances of 'meta data', replace with 'metadata' (#7793) 2020-05-12 17:14:44 +00:00
John Cowen 0680525a8b ui: Fix CSS typo (#7791) 2020-05-12 17:14:43 +00:00
John Cowen d1cbc3f032 ui: Tab Improvements (animations/branding) (#7772)
* ui: Adds a tab selection animation to our app tabs

1. Replace all mentions of `magenta` with a themeable CSS property.
2. Add an easy way to inline style DOM nodes
3. Use CSS properties to add tab animation

* Fix up rendering test

* Avoid DOM noodling as much as possible
2020-05-12 17:14:43 +00:00
Kenia 3e6e16d54f ui: Redesign - Service List page with Gateways (#7781)
* Return all services except Proxies

* Add Gateway icon to the codebase

* Create and implement ConsulExternalSource component

* Fix tests to work with new mock data and add a Gateway test

* Update consul-api-double to 2.14.3
2020-05-12 17:14:42 +00:00
John Cowen 1d65f9e41a ui: Model Layer for SSO Support (#7771)
* ui: Adds model layer required for SSO

1. oidc-provider ember-data triplet plus repo, plus addition of torii
addon
2. Make blocking queries support a Cache-Control: no-cache header
3. Tweaks to the token model layer in preparation for SSO work

* Fix up meta related Cache-Control tests

* Add tests adapter tests for URL shapes

* Reset Cache-Control to the original value, return something from logout
2020-05-12 17:14:41 +00:00
John Cowen 4370e6a346 ui: Metadata cleanup (#7767)
* Use new ConsulMetadataList for service > instance > metadata tab

* Meta Data vs Metadata everywhere (Metadata is correct)

* Fix up wording in tests
2020-05-12 17:14:40 +00:00
Kenia f7de8dc665 ui: Remove headers from the Healthchecks tab (#7751) 2020-05-12 17:14:39 +00:00
John Cowen a9bc935391 ui: Misc CSS amends, mainly changes to empty-state (#7743)
1. empty-state amends to bring it closer to what is in Structure and
optionally support icons.
2. You may have a button that semantically should be a button (it
performs and action not a link), but you want it to look like an anchor,
this means it shouldn't have an outline when :active.
3. Adds `label.type-password` as a `%form-element`
4. Adds an error state to our `%notice` CSS component
2020-05-12 17:14:39 +00:00