From 12e2c93e6bd9c17444e4ec72d4bab456976bc3c1 Mon Sep 17 00:00:00 2001 From: Kenia <19161242+kaxcode@users.noreply.github.com> Date: Tue, 5 May 2020 12:29:51 -0400 Subject: [PATCH] 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 --- .../consul-external-source/index.hbs | 2 +- ui-v2/app/components/consul-kind/index.hbs | 11 ++++++ ui-v2/app/components/consul-kind/index.js | 5 +++ .../components/consul-service-list/index.hbs | 5 +++ ui-v2/app/controllers/dc/services/index.js | 2 +- .../styles/base/components/pill/layout.scss | 20 +++++++++++ .../app/styles/base/components/pill/skin.scss | 22 ++++++++++++ .../app/styles/base/icons/base-variables.scss | 1 + .../styles/base/icons/icon-placeholders.scss | 10 ++++++ .../components/consul-external-source.scss | 35 ------------------- ui-v2/app/styles/components/index.scss | 1 - ui-v2/app/styles/components/pill.scss | 5 +++ ui-v2/ember-cli-build.js | 9 ++++- .../components/catalog-filter.feature | 12 +++---- ui-v2/tests/acceptance/dc/error.feature | 11 +++--- .../acceptance/dc/nspaces/manage.feature | 20 ++++------- .../acceptance/dc/services/dc-switch.feature | 20 ++++------- .../acceptance/dc/services/index.feature | 33 ++++++++++++++++- .../tests/acceptance/dc/services/list.feature | 11 +++--- .../tests/acceptance/page-navigation.feature | 2 +- .../integration/components/consul-kind.js | 26 ++++++++++++++ ui-v2/tests/pages/dc/services/index.js | 1 + ui-v2/yarn.lock | 6 ++-- 23 files changed, 179 insertions(+), 91 deletions(-) create mode 100644 ui-v2/app/components/consul-kind/index.hbs create mode 100644 ui-v2/app/components/consul-kind/index.js delete mode 100644 ui-v2/app/styles/components/consul-external-source.scss create mode 100644 ui-v2/tests/integration/components/consul-kind.js diff --git a/ui-v2/app/components/consul-external-source/index.hbs b/ui-v2/app/components/consul-external-source/index.hbs index b18e8e3023..f2e7e8c2f3 100644 --- a/ui-v2/app/components/consul-external-source/index.hbs +++ b/ui-v2/app/components/consul-external-source/index.hbs @@ -6,7 +6,7 @@ (component 'consul-external-source' item=item _externalSource=externalSource) }} {{else}} - + {{#if (eq externalSource 'aws')}} Registered via {{uppercase externalSource}} {{else}} diff --git a/ui-v2/app/components/consul-kind/index.hbs b/ui-v2/app/components/consul-kind/index.hbs new file mode 100644 index 0000000000..2d7bbce76e --- /dev/null +++ b/ui-v2/app/components/consul-kind/index.hbs @@ -0,0 +1,11 @@ +{{#if item.Kind}} + {{#if (has-block)}} + {{yield + (component 'consul-kind' item=item) + }} + {{else}} + + {{titleize (humanize item.Kind)}} + + {{/if}} +{{/if}} diff --git a/ui-v2/app/components/consul-kind/index.js b/ui-v2/app/components/consul-kind/index.js new file mode 100644 index 0000000000..4798652642 --- /dev/null +++ b/ui-v2/app/components/consul-kind/index.js @@ -0,0 +1,5 @@ +import Component from '@ember/component'; + +export default Component.extend({ + tagName: '', +}); diff --git a/ui-v2/app/components/consul-service-list/index.hbs b/ui-v2/app/components/consul-service-list/index.hbs index 50f53c7c76..432c90c8ed 100644 --- a/ui-v2/app/components/consul-service-list/index.hbs +++ b/ui-v2/app/components/consul-service-list/index.hbs @@ -5,6 +5,11 @@ {{item.Name}}