Commit Graph

395 Commits

Author SHA1 Message Date
John Cowen f5f31203e0
ui: Use InformedAction for KV table row delete confirmations (#9425) 2020-12-18 09:03:25 +00:00
Kenia 80fd11c1e1
ui: Add Local flag to local dc in dropdown (#9419)
* Add Local flag to local dc in dropdown

* Remove brand color from the check

* Move styling to main-nav-horizonal styling sheets
2020-12-17 13:57:07 -05:00
John Cowen ae049feeab
ui: Misc changes for Catalog area (#9414)
* Use DataLoader errors for Service Detail and Service Instance

* uiCfg > config use the repo-like async interface where possible

* Clean up node show

* Make sure you can put `=` in dev cookie values

* Never default to default

* Tweak chain variable

* Remove env service

* Pass chain through to the template for the tempalte to clean it up

* Delete controller tests

* Remove cleanup in Nodes show as this is still being used in another tab

* Use dc.Local
2020-12-17 16:35:01 +00:00
John Cowen a79a385bf3
ui: Change references to L7 to say Layer 7 (#9412) 2020-12-17 16:04:05 +00:00
John Cowen 2744f32899
ui: Show the No Dependencies message when a Topology has no streams (#9413)
Also changes the upstreams docs link
2020-12-17 15:26:48 +00:00
John Cowen 0f63be390f
ui: Add new dev UI environment variables to the README (#9411) 2020-12-16 16:40:31 +00:00
John Cowen d6b55e6f0f
ui: Set overflow: auto on the tab nav (#9402)
This ensures scroll bars are mainly hidden, yet visible on small screens
if the tabs are large enough for there to be an overflow
2020-12-16 09:19:00 +00:00
John Cowen 78ed71b2c9
ui: Rearrange Service detail page to load Topology and Routing tabs separately (#9401) 2020-12-16 09:18:29 +00:00
Kenia 8c00340b83
ui: Return empty state for no health check in Topology Cards (#9403) 2020-12-15 14:32:03 -05:00
John Cowen 36a1666bdb
ui: Install ember-intl (#9399)
* ui: Install ember-intl

Also:

1. Removes our own format-number in order to use ember-intl's instead
2. Moves format-time to format-short-time so as to not clash with
ember-intls own format-time
2020-12-15 18:29:32 +00:00
John Cowen 75b9151969
ui: Lint get-environment.js (#9400) 2020-12-15 18:14:25 +00:00
John Cowen 751ad844ea
ui: Use InformedAction for intention confirmation dialogs (#9398) 2020-12-15 16:33:05 +00:00
John Cowen c24c70af46
ui: Dev/Test environment configurable metrics (#9345)
In order to test certain setups for our metrics visualizations we need to be able to setup several different `ui_config` settings during development/testing. Generally in the UI, we use the Web Inspector to set various cookie values to configure the UI how we need to see it whilst developing, so this PR:

1. Routes `ui_config` through a dev time only `CONSUL_UI_CONFIG` env variable so we can change it via cookies vars.
2. Adds `CONSUL_METRICS_PROXY_ENABLE`, `CONSUL_METRICS_PROVIDER` and `CONSUL_SERVICE_DASHBOARD_URL` so it's easy to set/unset these only values during development.
3. Adds an acceptance testing step so we can setup `ui_config` to whatever we want during testing.
4. Adds an async 'repository-like' method to the `UiConfig` Service so it feels like a repository - incase we ever need to get this via an HTTP API+blocking query.
5. Vaguely unrelated: we allow cookie values to be set via the location.hash whilst in development only e.g. `/ui/services#CONSUL_METRICS_PROXY_ENABLE=1` so we can link to different setups if we ever need to.

All values added here are empty/falsey by default, so in order to see how it was previously you'll need to set the appropriate cookies values, but you can now also easily preview/test the the metrics viz in different/disabled states (with differing `ui_config`)
2020-12-15 15:34:54 +00:00
John Cowen a1b3f00a69
ui: Show local datacenter by default on first visit (#9377)
* Add `Local` property to Datacenters

* If you have not previous datacenter, redirect the user to the local dc

* Add an `is-local` class to the local datacenter in the DC picker
2020-12-14 15:29:40 +00:00
John Cowen 493ebb0713
ui: Move linting to the `node:test` script (#9385)
* Reconfigure linting to be a node-test

* Fixup linting across the project
2020-12-14 15:28:35 +00:00
John Cowen 13fb1445c0
ui: Add External Sources Filter to Node > Service Instances (#9368)
* Add service collections to get all ExternalServices

* Add a basic collection helper

* Use the collections to get all ExternalSources

* Remove old Controllers
2020-12-14 14:25:33 +00:00
John Cowen 32a0b757d0
ui: Controller dead code removal (#9367)
* ui: Controller dead code removal

This commit removes a little code that became 'dead' as a result of
previous PRs/commits

* Remove a little more from the settings Controller

* Remove CSS related to being able to set the dashboard_url in settings
2020-12-11 11:43:13 +00:00
John Cowen eb85b858d9
ui: Improved Discovery Chain resizing (#9360)
* install on-resize modifier

* Rerrange things to use on-resize modifier for positioning
2020-12-11 09:38:33 +00:00
John Cowen 8d52d8a1d4
ui: Remove random undefined from codemod run (#9370) 2020-12-11 09:33:43 +00:00
John Cowen 16745b04a6
ui: Use pill/badge components for intention filter options (#9357) 2020-12-09 19:12:57 +00:00
John Cowen 7f4cd240b8
ui: Remove old style 'filterable' searching (#9356)
* Switch upstream-instances to use new style of searchable

* Add search action to DataCollection plus basic README

* Use DataCollection for PowerSelect searching in child-selectors

* Remove old style filterable search for role/policies and instances

* Remove old helpers/components related to search/sort/filter
2020-12-09 19:12:17 +00:00
Kenia 778a1bb016
ui: Send item name down to Stats to call endpoint (#9358)
* Refactor Stats and Series components

* Remove unused variable from being passed down to Stats

* Add item name to be passed down to Stats
2020-12-09 13:49:34 -05:00
John Cowen b991588764
ui: Update UI README (#9346) 2020-12-09 18:41:08 +00:00
John Cowen 493cda4bd7
ui: New search/sort/filtering bar for Node > ServiceInstances (#9326)
* Model layer changes to turn Node:ServiceInstances into hasMany

We tried to make something that feels a little like ember-data yet
not leave our approach of re-shaping the JSON directly from the
response.

1. We added transformHasManyResponse for re-shaping JSON for hasMany
relationships. we avoided the normalize word as ember-data serialize
methods usually return something JSON:API shaped and we distinctly don't
want to do that. Transform was the best word we could think of.

2. The integration tests across all of our models here feel very much
like those types of tests that aren't really testing much, or assert
too much to an extent that they get in the way rather than be of any
use. I'd very much like to move a lot of this to unit tests. Currently
most of the fingerprinting functionality is unit tested and these
integration tests were originally to give confidence that IDs and
related properties were being added correctly.

3. We've added a hasMany relationship, but not the corresponding
belongsTo - yet at least. We don't require the belongsTo right now, and
if we do  we can add it later.

* Integrate ServiceInstance search bar for Node:ServiceInstances

* Hide Node.Meta when on the Node:ServiceINstance page

We use a little string replace hack here for a human-like label, this is
soon to be replaced with proper i10n replacement

* Always ensure that a Namespace is set, and add comment explaining
2020-12-09 13:08:30 +00:00
John Cowen c5978b71e8
ui: Change URI helper to a template based approach (#9344)
This moves our uri helper to use a the template renderer we already have for rendering URLs.
2020-12-09 09:22:46 +00:00
John Cowen 7dc1a91edf
ui: document-attrs helper (#9336)
This commit adds a {{document-attrs}} helper, specifically for adding attributes to the root documentElement, which in our case is always <html>
2020-12-09 09:22:01 +00:00
Kenia 811703c302
ui: Refactor topology components (#9339)
* Refactor Stats and Series components

* Refactor metrics error message for ingress-gateway

* Fix upLines icon positioning

* Remove unused variable from being passed down to Stats
2020-12-08 10:47:55 -05:00
John Cowen 0ca087cc77
ui: Native-ize class based helpers (#9337)
* Install ember-decorators/observes

* Remove filter-predicate

* Nativize `env` and inject env service

* Nativize all other class based helpers
2020-12-08 09:27:28 +00:00
John Cowen bf71d76709
ui: Lowercase the word 'instance' in Service listings (#9333) 2020-12-08 09:27:00 +00:00
John Cowen f0c8040141
ui: Don't pluralize words when there is only 1 of the item (#9321) 2020-12-07 09:19:22 +00:00
John Cowen 23adad684b
ui: HealthCheck Search/Sort/Filtering (#9314)
* Adds model layer changes around HealthChecks

1. Makes a HealthCheck model fragment and uses it in ServiceInstances and
Nodes
2. Manually adds a relationship between a ServiceInstance and its
potential ServiceInstanceProxy
3. Misc changes related to the above such as an Exposed property on
MeshChecks, MeshChecks itself

* Add a potential temporary endpoint to distinguish ProxyServiceInstance

* Fix up Node search bar class

* Add search/sort/filter logic

* Fixup Service default sort key

* Add Healthcheck search/sort/filtering

* Tweak CSS add a default Type of 'Serf' when type is blank

* Fix up tests and new test support

* Add ability to search on Service/Node name depending on where you are

* Fixup CheckID search predicate

* Use computed for DataCollection to use caching

* Alpha sort the Type menu

* Temporary fix for new non-changing style Ember Proxys

* Only special case EventSource proxies
2020-12-07 09:14:30 +00:00
John Cowen 1a05bba216
ui: ServiceInstance.Name should be the Service.Name, never the Service.ID (#9316)
* ui: ServiceInstance.Name should be the Service.Name, never the ID

The ServiceInstance.ID should try Service.ID and fallback to
Service.Name, not ServiceInstance.Name. ServiceInstance.Name is just an
alias to Service.Name which is always set.
2020-12-03 09:14:59 +00:00
John Cowen 89a70502e6
ui: Reorganize Tabs CSS (#9313) 2020-12-02 15:48:06 +00:00
John Cowen a0edd6d664
ui: Asyncify Service Model Hooks (#9312)
* ui: Add Kind grouping computed properties

* Use new computed properties and move model hooks to async methods
2020-12-02 15:42:18 +00:00
John Cowen 6ef7c15e51
ui: New overlays (#9305)
Replaces ember-popover with tippy.js based overlay modifier.
2020-12-02 09:43:34 +00:00
John Cowen 7d8ea08da7
ui: Add 'Search Across' for finer grained searching (#9282) 2020-12-01 15:45:09 +00:00
John Cowen ff93782782
ui: Move identity components (#9298) 2020-11-30 18:42:59 +00:00
John Cowen ca25033c56
ui: Add copyable IDs to the Role and Policy views (#9296) 2020-11-30 17:28:33 +00:00
John Cowen 7e9b7f4143
ui: Moves healthcheck list to Glimmer template-only consul component (#9293) 2020-11-30 17:22:43 +00:00
John Cowen d09ff9a1b6
ui: Remove unused helpers or swap for helpers in ember-string-fns (#9294)
* ui: Remove unused helpers or swap for helpers in ember-string-fns

* starts-with > string-starts-with
2020-11-30 17:19:44 +00:00
John Cowen 2b84a3b5e1
ui: Round Trip Time Tooltips (#9290) 2020-11-30 17:02:54 +00:00
John Cowen 62850759c5
ui: Modifier based tooltips (#9288) 2020-11-30 16:52:13 +00:00
John Cowen 59a998c23a
ui: Nestable DataSources (plus glimmer upgrade) (#9275) 2020-11-30 15:05:16 +00:00
John Cowen d010d1b6d0 ui: Add copyable IDs to the Role and Policy views 2020-11-30 14:42:57 +00:00
John Cowen 857fa51fdb
ui: Change metrics link documentation link (#9281)
* ui: Change metrics link documentation link

* Update ui/packages/consul-ui/app/components/topology-metrics/index.hbs

Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
2020-11-27 15:41:13 +00:00
John Cowen 36596e55f5
ui: Ensure the per item logout button logs you out (#9269) 2020-11-24 17:47:53 +00:00
John Cowen 9c5f525bf3
ui: Include nspace in up/downstream link when nspaces are enabled (#9257) 2020-11-24 14:33:34 +00:00
Kenia 39de16af2b
ui: Card component nspace refactor (#9228)
* Refactoring conditional for showing nspaces

* Styling empty state for Stats component
2020-11-19 13:40:05 -05:00
John Cowen 0ba658b74d
ui: Alter background color of filter bars (#9238) 2020-11-19 16:07:58 +00:00
John Cowen b15049aabf
ui: Surface 'detail' of API errors in the error page (#9237)
* ui: Surface 'detail' of API errors in the error page

* Make UI generated 404s look less bare
2020-11-19 16:07:23 +00:00