diff --git a/ui-v2/app/components/app-view/index.hbs b/ui-v2/app/components/app-view/index.hbs
index b66f00fbca..0bbbfc76c5 100644
--- a/ui-v2/app/components/app-view/index.hbs
+++ b/ui-v2/app/components/app-view/index.hbs
@@ -6,11 +6,11 @@
{{#let (lowercase component.flashType) (lowercase flash.action) as |status type|}}
{{! flashes automatically ucfirst the type }}
-
+
{{capitalize status}}!
- {{#yield-slot name="notification" params=(block-params status type flash.item)}}
+ {{#yield-slot name="notification" params=(block-params status type flash.item flash.error)}}
{{yield}}
{{#if (eq type 'logout')}}
{{#if (eq status 'success') }}
diff --git a/ui-v2/app/components/consul-metadata-list/index.hbs b/ui-v2/app/components/consul-metadata-list/index.hbs
index 3d1febfaae..21cc09abf8 100644
--- a/ui-v2/app/components/consul-metadata-list/index.hbs
+++ b/ui-v2/app/components/consul-metadata-list/index.hbs
@@ -1,5 +1,6 @@
diff --git a/ui-v2/app/components/consul-service-instance-list/index.hbs b/ui-v2/app/components/consul-service-instance-list/index.hbs
index 6ac671e593..c99875dab4 100644
--- a/ui-v2/app/components/consul-service-instance-list/index.hbs
+++ b/ui-v2/app/components/consul-service-instance-list/index.hbs
@@ -1,6 +1,6 @@
{{yield}}
{{#if (gt items.length 0)}}
-
+
{{item.Service.ID}}
diff --git a/ui-v2/app/components/consul-service-list/index.hbs b/ui-v2/app/components/consul-service-list/index.hbs
index a4f10402a9..fa05e1d96d 100644
--- a/ui-v2/app/components/consul-service-list/index.hbs
+++ b/ui-v2/app/components/consul-service-list/index.hbs
@@ -1,10 +1,17 @@
{{yield}}
{{#if (gt items.length 0)}}
-
+
{{item.Name}}
+ {{#if (and nspace (env 'CONSUL_NSPACES_ENABLED'))}}
+ {{#if (not-eq item.Namespace nspace)}}
+
+ {{item.Namespace}}
+
+ {{/if}}
+ {{/if}}
diff --git a/ui-v2/app/components/copy-button/index.hbs b/ui-v2/app/components/copy-button/index.hbs
index f1ee923884..5d76e035fa 100644
--- a/ui-v2/app/components/copy-button/index.hbs
+++ b/ui-v2/app/components/copy-button/index.hbs
@@ -1,4 +1,4 @@
-
+
diff --git a/ui-v2/app/components/discovery-chain/index.hbs b/ui-v2/app/components/discovery-chain/index.hbs
index d5638d5d01..838d311ca6 100644
--- a/ui-v2/app/components/discovery-chain/index.hbs
+++ b/ui-v2/app/components/discovery-chain/index.hbs
@@ -95,7 +95,7 @@
' item.NextNode}}
class="split"
- data-percentage={{item.Weight}}
+ data-percentage={{or item.Weight 0}}
d={{
svg-curve (hash
x=dest.x
diff --git a/ui-v2/app/components/discovery-chain/index.js b/ui-v2/app/components/discovery-chain/index.js
index 5d3110dd71..7cf7863116 100644
--- a/ui-v2/app/components/discovery-chain/index.js
+++ b/ui-v2/app/components/discovery-chain/index.js
@@ -1,13 +1,9 @@
import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { set, get, computed } from '@ember/object';
+import { schedule } from '@ember/runloop';
-import {
- createRoute,
- getSplitters,
- getRoutes,
- getResolvers,
-} from 'consul-ui/utils/components/discovery-chain/index';
+import { createRoute, getSplitters, getRoutes, getResolvers } from './utils';
export default Component.extend({
dom: service('dom'),
@@ -67,13 +63,15 @@ export default Component.extend({
let nextNode;
const resolverID = `resolver:${this.chain.ServiceName}.${this.chain.Namespace}.${this.chain.Datacenter}`;
const splitterID = `splitter:${this.chain.ServiceName}.${this.chain.Namespace}`;
- if (typeof this.chain.Nodes[resolverID] !== 'undefined') {
- nextNode = resolverID;
- } else if (typeof this.chain.Nodes[splitterID] !== 'undefined') {
+ // The default router should look for a splitter first,
+ // if there isn't one try the default resolver
+ if (typeof this.chain.Nodes[splitterID] !== 'undefined') {
nextNode = splitterID;
+ } else if (typeof this.chain.Nodes[resolverID] !== 'undefined') {
+ nextNode = resolverID;
}
if (typeof nextNode !== 'undefined') {
- routes.push({
+ const route = {
Default: true,
ID: `route:${this.chain.ServiceName}`,
Name: this.chain.ServiceName,
@@ -85,7 +83,8 @@ export default Component.extend({
},
},
NextNode: nextNode,
- });
+ };
+ routes.push(createRoute(route, this.chain.ServiceName, this.dom.guid));
}
}
return routes;
@@ -98,16 +97,14 @@ export default Component.extend({
get(this, 'chain.Nodes')
);
}),
- graph: computed('splitters', 'routes', function() {
+ graph: computed('splitters', 'routes.[]', function() {
const graph = this.dataStructs.graph();
- const router = this.chain.ServiceName;
this.splitters.forEach(item => {
item.Splits.forEach(splitter => {
graph.addLink(item.ID, splitter.NextNode);
});
});
this.routes.forEach((route, i) => {
- route = createRoute(route, router, this.dom.guid);
graph.addLink(route.ID, route.NextNode);
});
return graph;
@@ -146,22 +143,29 @@ export default Component.extend({
// the developer access to the mouse event therefore we just use JS to add our events
// revisit this post Octane
addPathListeners: function() {
- this._listeners.remove();
- this._listeners.add(this.dom.document(), {
- click: e => {
- // all route/splitter/resolver components currently
- // have classes that end in '-card'
- if (!this.dom.closest('[class$="-card"]', e.target)) {
- set(this, 'active', false);
- set(this, 'selectedId', '');
- }
- },
- });
- [...this.dom.elements('path.split', this.element)].forEach(item => {
- this._listeners.add(item, {
- mouseover: e => this.actions.showSplit.apply(this, [e]),
- mouseout: e => this.actions.hideSplit.apply(this, [e]),
- });
+ schedule('afterRender', () => {
+ this._listeners.remove();
+ // as this is now afterRender, theoretically
+ // it could happen after the component is destroyed?
+ // watch for that incase
+ if (this.element && !this.isDestroyed) {
+ this._listeners.add(this.dom.document(), {
+ click: e => {
+ // all route/splitter/resolver components currently
+ // have classes that end in '-card'
+ if (!this.dom.closest('[class$="-card"]', e.target)) {
+ set(this, 'active', false);
+ set(this, 'selectedId', '');
+ }
+ },
+ });
+ [...this.dom.elements('path.split', this.element)].forEach(item => {
+ this._listeners.add(item, {
+ mouseover: e => this.actions.showSplit.apply(this, [e]),
+ mouseout: e => this.actions.hideSplit.apply(this, [e]),
+ });
+ });
+ }
});
// TODO: currently don't think there is a way to listen
// for an element being removed inside a component, possibly
diff --git a/ui-v2/app/utils/components/discovery-chain/index.js b/ui-v2/app/components/discovery-chain/utils.js
similarity index 98%
rename from ui-v2/app/utils/components/discovery-chain/index.js
rename to ui-v2/app/components/discovery-chain/utils.js
index 0263ced36f..4dd42d1ff5 100644
--- a/ui-v2/app/utils/components/discovery-chain/index.js
+++ b/ui-v2/app/components/discovery-chain/utils.js
@@ -138,7 +138,7 @@ export const getResolvers = function(dc, nspace = 'default', targets = {}, nodes
export const createRoute = function(route, router, uid) {
return {
...route,
- Default: typeof route.Definition.Match === 'undefined',
+ Default: route.Default || typeof route.Definition.Match === 'undefined',
ID: `route:${router}-${uid(route.Definition)}`,
};
};
diff --git a/ui-v2/app/components/feedback-dialog/index.hbs b/ui-v2/app/components/feedback-dialog/index.hbs
index aae12c5c77..18961c1bb2 100644
--- a/ui-v2/app/components/feedback-dialog/index.hbs
+++ b/ui-v2/app/components/feedback-dialog/index.hbs
@@ -1,9 +1,11 @@
-{{yield}}
-{{#if (eq state 'success') }}
- {{yield}}
-{{else if (eq state 'error') }}
- {{yield}}
-{{/if}}
-{{#if (or permanent (eq state 'ready')) }}
- {{yield}}{{message}}
-{{/if}}
\ No newline at end of file
+
+ {{yield}}
+ {{#if (eq state 'success') }}
+ {{yield}}
+ {{else if (eq state 'error') }}
+ {{yield}}
+ {{/if}}
+ {{#if (or permanent (eq state 'ready')) }}
+ {{yield}}{{message}}
+ {{/if}}
+
diff --git a/ui-v2/app/components/feedback-dialog/index.js b/ui-v2/app/components/feedback-dialog/index.js
index 22d1021172..441d2fa884 100644
--- a/ui-v2/app/components/feedback-dialog/index.js
+++ b/ui-v2/app/components/feedback-dialog/index.js
@@ -9,11 +9,11 @@ const STATE_ERROR = 'error';
export default Component.extend(SlotsMixin, {
wait: service('timeout'),
dom: service('dom'),
- classNames: ['with-feedback'],
transition: '',
transitionClassName: 'feedback-dialog-out',
state: STATE_READY,
permanent: true,
+ tagName: '',
init: function() {
this._super(...arguments);
this.success = this._success.bind(this);
@@ -31,7 +31,7 @@ export default Component.extend(SlotsMixin, {
.then(() => {
return new Promise(resolve => {
this.dom
- .element(`.${className}`, this.element)
+ .element(`.${className}`, this.$feedback)
.addEventListener('transitionend', resolve);
});
})
diff --git a/ui-v2/app/components/list-collection/index.js b/ui-v2/app/components/list-collection/index.js
index 23c3cc8394..1507e3bcfb 100644
--- a/ui-v2/app/components/list-collection/index.js
+++ b/ui-v2/app/components/list-collection/index.js
@@ -10,6 +10,7 @@ export default Component.extend(WithResizing, {
tagName: 'div',
attributeBindings: ['style'],
height: 500,
+ cellHeight: 73,
style: style('getStyle'),
classNames: ['list-collection'],
init: function() {
diff --git a/ui-v2/app/routes/dc/services/show.js b/ui-v2/app/routes/dc/services/show.js
index 31aaed6d93..e5b699de58 100644
--- a/ui-v2/app/routes/dc/services/show.js
+++ b/ui-v2/app/routes/dc/services/show.js
@@ -17,6 +17,7 @@ export default Route.extend({
item: this.repo.findBySlug(params.name, dc, nspace),
urls: this.settings.findBySlug('urls'),
dc: dc,
+ nspace: nspace || 'default',
proxies: [],
})
.then(model => {
diff --git a/ui-v2/app/services/feedback.js b/ui-v2/app/services/feedback.js
index dddca84722..fd71648b36 100644
--- a/ui-v2/app/services/feedback.js
+++ b/ui-v2/app/services/feedback.js
@@ -55,6 +55,7 @@ export default Service.extend({
...notificationDefaults(),
type: getStatus(TYPE_ERROR, e),
action: getAction(),
+ error: e,
});
}
})
diff --git a/ui-v2/app/styles/app.scss b/ui-v2/app/styles/app.scss
index 5b0a65497a..ae8bb8e873 100644
--- a/ui-v2/app/styles/app.scss
+++ b/ui-v2/app/styles/app.scss
@@ -1,5 +1,4 @@
@charset 'utf-8';
-
@import 'base/reset/index';
@import 'base/index';
@import 'variables/index';
@@ -8,13 +7,13 @@
@import 'ember-power-select';
/**/
+@import 'base/components/index';
@import 'components/index';
@import 'core/typography';
@import 'core/layout';
@import 'routes/dc/settings/index';
@import 'routes/dc/nodes/index';
-@import 'routes/dc/services/index';
@import 'routes/dc/intention/index';
@import 'routes/dc/kv/index';
@import 'routes/dc/acls/index';
diff --git a/ui-v2/app/styles/base/components/action-group/index.scss b/ui-v2/app/styles/base/components/action-group/index.scss
deleted file mode 100644
index 21a6ef1bae..0000000000
--- a/ui-v2/app/styles/base/components/action-group/index.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@import '../toggle-button/index';
-@import '../menu-panel/index';
-@import '../confirmation-alert/index';
-@import './skin';
-@import './layout';
-
-%action-group > div {
- @extend %menu-panel;
-}
-%action-group > label:first-of-type {
- @extend %toggle-button;
-}
-%action-group .confirmation-alert {
- @extend %confirmation-alert;
-}
-%action-group .type-delete {
- @extend %internal-button-dangerous;
-}
diff --git a/ui-v2/app/styles/base/components/action-group/layout.scss b/ui-v2/app/styles/base/components/action-group/layout.scss
deleted file mode 100644
index 2c937bdfa7..0000000000
--- a/ui-v2/app/styles/base/components/action-group/layout.scss
+++ /dev/null
@@ -1,57 +0,0 @@
-%action-group {
- display: inline-block;
- position: relative;
- width: 30px;
- height: 30px;
-}
-%action-group > div {
- transition: min-height 150ms;
- min-height: 0;
- width: 192px;
-}
-%action-group .confirmation-alert {
- position: absolute;
- top: 0;
- left: 100%;
- width: 100%;
-}
-%action-group > label span {
- display: none;
-}
-%action-group > label {
- display: block;
- height: 100%;
-}
-%action-group > label:last-of-type {
- position: absolute;
- width: 100%;
- z-index: -1;
- top: 0;
-}
-%action-group input[type='radio'],
-%action-group input[type='radio'] ~ div,
-%action-group input[type='radio'] ~ .with-confirmation > ul {
- display: none;
-}
-%action-group input[type='radio']:checked ~ div,
-%action-group input[type='radio']:checked ~ .with-confirmation > ul {
- display: block;
-}
-/*TODO: If anything this is %toggle-button*/
-%action-group input[type='radio']:checked ~ label[for='actions_close'] {
- z-index: 1;
-}
-%action-group input[type='checkbox'] {
- @extend %action-group-confirm-toggle;
-}
-%action-group-confirm-toggle {
- display: none;
-}
-%action-group-confirm-toggle + div > ul,
-%action-group-confirm-toggle + div > ul + div {
- transition: transform 150ms;
-}
-%action-group-confirm-toggle:checked + div > ul,
-%action-group-confirm-toggle:checked + div > ul + div {
- transform: translateX(-100%);
-}
diff --git a/ui-v2/app/styles/base/components/action-group/skin.scss b/ui-v2/app/styles/base/components/action-group/skin.scss
deleted file mode 100644
index b1afbb5861..0000000000
--- a/ui-v2/app/styles/base/components/action-group/skin.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-%action-group input[type='radio']:checked + label:first-of-type {
- /* frame-gray */
- background-color: $gray-050;
-}
-%action-group > label {
- cursor: pointer;
-}
-%action-group > label:first-of-type::after {
- @extend %with-more-horizontal-icon;
- @extend %as-pseudo;
- opacity: 0.7;
-}
diff --git a/ui-v2/app/styles/base/components/breadcrumbs/layout.scss b/ui-v2/app/styles/base/components/breadcrumbs/layout.scss
index 4ffda16d91..d24dd0b748 100644
--- a/ui-v2/app/styles/base/components/breadcrumbs/layout.scss
+++ b/ui-v2/app/styles/base/components/breadcrumbs/layout.scss
@@ -7,7 +7,9 @@
display: inline-block;
}
%breadcrumb {
- margin-left: 8px;
+ /* as the separator is a '/' the left margin needs */
+ /* to be different from the right in order to center it */
+ margin-left: 6px;
}
%breadcrumb::before {
margin-right: 8px;
diff --git a/ui-v2/app/styles/base/components/index.scss b/ui-v2/app/styles/base/components/index.scss
new file mode 100644
index 0000000000..e4017d5ee0
--- /dev/null
+++ b/ui-v2/app/styles/base/components/index.scss
@@ -0,0 +1,20 @@
+@import './anchors/index';
+@import './breadcrumbs/index';
+@import './buttons/index';
+@import './checkbox-group/index';
+@import './confirmation-alert/index';
+@import './display-toggle/index';
+@import './form-elements/index';
+@import './inline-alert/index';
+@import './menu-panel/index';
+@import './modal-dialog/index';
+@import './notice/index';
+@import './pill/index';
+@import './popover-menu/index';
+@import './radio-group/index';
+@import './sliding-toggle/index';
+@import './stats-card/index';
+@import './table/index';
+@import './tabs/index';
+@import './toggle-button/index';
+@import './tooltip/index';
diff --git a/ui-v2/app/styles/base/components/popover-menu/index.scss b/ui-v2/app/styles/base/components/popover-menu/index.scss
index 00d566ba45..239df86085 100644
--- a/ui-v2/app/styles/base/components/popover-menu/index.scss
+++ b/ui-v2/app/styles/base/components/popover-menu/index.scss
@@ -1,7 +1,3 @@
-@import '../display-toggle/index';
-@import '../toggle-button/index';
-@import '../menu-panel/index';
-@import '../confirmation-alert/index';
@import './skin';
@import './layout';
%with-popover-menu > input {
diff --git a/ui-v2/app/styles/base/components/popover-menu/layout.scss b/ui-v2/app/styles/base/components/popover-menu/layout.scss
index 8800f03bd5..6de7f20273 100644
--- a/ui-v2/app/styles/base/components/popover-menu/layout.scss
+++ b/ui-v2/app/styles/base/components/popover-menu/layout.scss
@@ -1,7 +1,9 @@
%with-popover-menu {
position: relative;
}
-
+%with-popover-menu > [type='checkbox'] {
+ @extend %popover-menu;
+}
%more-popover-menu {
@extend %display-toggle-siblings;
}
diff --git a/ui-v2/app/styles/base/components/popover-menu/skin.scss b/ui-v2/app/styles/base/components/popover-menu/skin.scss
index 7bec6b1400..df9b801f8e 100644
--- a/ui-v2/app/styles/base/components/popover-menu/skin.scss
+++ b/ui-v2/app/styles/base/components/popover-menu/skin.scss
@@ -14,6 +14,3 @@
font-size: 0;
background-color: $transparent;
}
-%popover-menu + label > * {
- @extend %split-button, %sort-button;
-}
diff --git a/ui-v2/app/styles/base/components/sort-control/index.scss b/ui-v2/app/styles/base/components/sort-control/index.scss
deleted file mode 100644
index 0650ebf9ba..0000000000
--- a/ui-v2/app/styles/base/components/sort-control/index.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import './skin';
diff --git a/ui-v2/app/styles/base/components/sort-control/skin.scss b/ui-v2/app/styles/base/components/sort-control/skin.scss
deleted file mode 100644
index 4b9f1e6bff..0000000000
--- a/ui-v2/app/styles/base/components/sort-control/skin.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-%sort-control input {
- display: none;
-}
-%sort-control label {
- @extend %user-select-none;
- cursor: pointer;
-}
-%sort-control input[type='checkbox'] + label::after {
- @extend %as-pseudo;
- opacity: 0.7;
-}
-%sort-control input[type='checkbox'] + label::after {
- @extend %with-arrow-down-icon;
-}
-%sort-control input[type='checkbox']:checked + label::after {
- @extend %with-arrow-up-icon;
-}
diff --git a/ui-v2/app/styles/base/icons/base-variables.scss b/ui-v2/app/styles/base/icons/base-variables.scss
index 885dbbadb8..845c23d98a 100644
--- a/ui-v2/app/styles/base/icons/base-variables.scss
+++ b/ui-v2/app/styles/base/icons/base-variables.scss
@@ -126,10 +126,13 @@ $notification-outline-svg: url('data:image/svg+xml;charset=UTF-8, ');
$page-outline-svg: url('data:image/svg+xml;charset=UTF-8, ');
$partner-svg: url('data:image/svg+xml;charset=UTF-8, ');
+$path-svg: url('data:image/svg+xml;charset=UTF-8, ');
$plus-circle-fill-svg: url('data:image/svg+xml;charset=UTF-8, ');
$plus-circle-outline-svg: url('data:image/svg+xml;charset=UTF-8, ');
$plus-plain-svg: url('data:image/svg+xml;charset=UTF-8, ');
$plus-square-fill-svg: url('data:image/svg+xml;charset=UTF-8, ');
+$port-svg: url('data:image/svg+xml;charset=UTF-8, ');
+$protocol-svg: url('data:image/svg+xml;charset=UTF-8, ');
$provider-svg: url('data:image/svg+xml;charset=UTF-8, ');
$public-default-svg: url('data:image/svg+xml;charset=UTF-8, ');
$public-locked-svg: url('data:image/svg+xml;charset=UTF-8, ');
diff --git a/ui-v2/app/styles/base/icons/icon-placeholders.scss b/ui-v2/app/styles/base/icons/icon-placeholders.scss
index cea679dd0c..9c3fa6f2c2 100644
--- a/ui-v2/app/styles/base/icons/icon-placeholders.scss
+++ b/ui-v2/app/styles/base/icons/icon-placeholders.scss
@@ -1268,6 +1268,16 @@
mask-image: $partner-svg;
}
+%with-path-icon {
+ @extend %with-icon;
+ background-image: $path-svg;
+}
+%with-path-mask {
+ @extend %with-mask;
+ -webkit-mask-image: $path-svg;
+ mask-image: $path-svg;
+}
+
%with-plus-circle-fill-icon {
@extend %with-icon;
background-image: $plus-circle-fill-svg;
@@ -1308,6 +1318,26 @@
mask-image: $plus-square-fill-svg;
}
+%with-port-icon {
+ @extend %with-icon;
+ background-image: $port-svg;
+}
+%with-port-mask {
+ @extend %with-mask;
+ -webkit-mask-image: $port-svg;
+ mask-image: $port-svg;
+}
+
+%with-protocol-icon {
+ @extend %with-icon;
+ background-image: $protocol-svg;
+}
+%with-protocol-mask {
+ @extend %with-mask;
+ -webkit-mask-image: $protocol-svg;
+ mask-image: $protocol-svg;
+}
+
%with-provider-icon {
@extend %with-icon;
background-image: $provider-svg;
diff --git a/ui-v2/app/styles/components/anchors.scss b/ui-v2/app/styles/components/anchors.scss
index 0a8a9215b5..d1a4ce320f 100644
--- a/ui-v2/app/styles/components/anchors.scss
+++ b/ui-v2/app/styles/components/anchors.scss
@@ -1,4 +1,3 @@
-@import '../base/components/anchors/index';
a[rel*='external']::after {
@extend %with-exit-icon, %as-pseudo;
margin-left: 8px;
diff --git a/ui-v2/app/styles/components/app-view.scss b/ui-v2/app/styles/components/app-view.scss
index dff8408a82..650b6a87ce 100644
--- a/ui-v2/app/styles/components/app-view.scss
+++ b/ui-v2/app/styles/components/app-view.scss
@@ -1,8 +1,4 @@
@import './app-view/index';
-@import './filter-bar/index';
-@import '../base/components/buttons/index';
-
-@import '../base/components/popover-menu/index';
%app-view-actions label + div {
/* We need this extra to allow tooltips to show */
diff --git a/ui-v2/app/styles/components/breadcrumbs.scss b/ui-v2/app/styles/components/breadcrumbs.scss
index 3ac07023c2..de5937dee1 100644
--- a/ui-v2/app/styles/components/breadcrumbs.scss
+++ b/ui-v2/app/styles/components/breadcrumbs.scss
@@ -1,4 +1,3 @@
-@import '../base/components/breadcrumbs/index';
main header nav:first-child {
position: absolute;
top: -38px;
diff --git a/ui-v2/app/styles/components/buttons.scss b/ui-v2/app/styles/components/buttons.scss
index 2bdbb51600..b7971e439b 100644
--- a/ui-v2/app/styles/components/buttons.scss
+++ b/ui-v2/app/styles/components/buttons.scss
@@ -1,4 +1,3 @@
-@import '../base/components/buttons/index';
button[type='submit'],
a.type-create {
@extend %primary-button;
diff --git a/ui-v2/app/styles/components/composite-row.scss b/ui-v2/app/styles/components/composite-row.scss
new file mode 100644
index 0000000000..38b5f584f6
--- /dev/null
+++ b/ui-v2/app/styles/components/composite-row.scss
@@ -0,0 +1,28 @@
+@import './composite-row/index';
+
+.proxy-upstreams > ul > li,
+.proxy-exposed-paths > ul > li,
+.list-collection > ul > li:not(:first-child) {
+ @extend %composite-row;
+}
+/* hoverable rows */
+.consul-upstream-list > ul > li:not(:first-child),
+.consul-gateway-service-list > ul > li:not(:first-child),
+.consul-service-instance-list > ul > li:not(:first-child),
+.consul-service-list > ul > li:not(:first-child) {
+ @extend %with-composite-row-intent;
+}
+.proxy-exposed-paths tbody tr {
+ cursor: default !important;
+}
+.proxy-exposed-paths tbody tr:hover {
+ box-shadow: none !important;
+}
+.proxy-exposed-paths tbody tr .combined-address button:hover {
+ // In this case we do not need a background on the icon
+ background-color: $transparent !important;
+}
+.proxy-upstreams > ul,
+.proxy-exposed-paths > ul {
+ border-top: 1px solid $gray-200;
+}
diff --git a/ui-v2/app/styles/components/composite-row/layout.scss b/ui-v2/app/styles/components/composite-row/layout.scss
index 7826a7b722..ef8ef68ed7 100644
--- a/ui-v2/app/styles/components/composite-row/layout.scss
+++ b/ui-v2/app/styles/components/composite-row/layout.scss
@@ -25,13 +25,25 @@
%composite-row-detail .node::before {
margin-top: 2px;
}
-// In this case we do not need a background on the icon
-%composite-row-detail .port button {
+
+// Copy Button with Feedback
+%composite-row .copy-button button {
padding: 0 !important;
- margin-top: 1px !important;
+ margin: 0 !important;
}
-%composite-row-detail .port button:hover {
- background-color: transparent !important;
+%composite-row-detail .copy-button {
+ margin-left: 4px;
+}
+%composite-row-header .copy-button {
+ top: 3px;
+}
+%composite-row-header .copy-button,
+%composite-row-detail .copy-button {
+ display: none;
+}
+%composite-row-header:hover .copy-button,
+%composite-row-detail:hover .copy-button {
+ display: inline-flex;
}
// Tooltip
diff --git a/ui-v2/app/styles/components/composite-row/skin.scss b/ui-v2/app/styles/components/composite-row/skin.scss
index 3f7b6fc4d5..1ea49497e1 100644
--- a/ui-v2/app/styles/components/composite-row/skin.scss
+++ b/ui-v2/app/styles/components/composite-row/skin.scss
@@ -8,6 +8,7 @@
%composite-row-intent {
border-color: $gray-200;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ border-top-color: $transparent;
cursor: pointer;
}
%composite-row-header {
@@ -30,6 +31,10 @@
@extend %with-cancel-square-fill-color-mask, %as-pseudo;
background-color: $red-500;
}
+%composite-row .empty::before {
+ @extend %with-minus-square-fill-color-mask, %as-pseudo;
+ background-color: $gray-500;
+}
// Metadata
%composite-row .node a {
@@ -59,3 +64,20 @@
@extend %with-folder-outline-mask, %as-pseudo;
background-color: $gray-500;
}
+%composite-row-detail .path::before {
+ @extend %with-path-mask, %as-pseudo;
+ background-color: $gray-500;
+}
+%composite-row-detail .port::before {
+ @extend %with-port-mask, %as-pseudo;
+ background-color: $gray-500;
+}
+%composite-row-detail .protocol::before {
+ @extend %with-protocol-mask, %as-pseudo;
+ background-color: $gray-500;
+}
+// In this case we do not need a background on the icon
+%composite-row .combined-address .copy-button button:hover,
+%composite-row-detail .port .copy-button button:hover {
+ background-color: transparent !important;
+}
diff --git a/ui-v2/app/styles/components/consul-intention-list.scss b/ui-v2/app/styles/components/consul-intention-list.scss
deleted file mode 100644
index ee488116c3..0000000000
--- a/ui-v2/app/styles/components/consul-intention-list.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-@import './consul-intention-list/index';
-.consul-intention-list {
- @extend %consul-intention-list;
-}
-@media #{$--lt-wide-table} {
- %consul-intention-list tr > :nth-last-child(2) {
- display: none;
- }
-}
diff --git a/ui-v2/app/styles/components/consul-intention-list/index.scss b/ui-v2/app/styles/components/consul-intention-list/index.scss
deleted file mode 100644
index 47a153ed1e..0000000000
--- a/ui-v2/app/styles/components/consul-intention-list/index.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-@import './skin';
-@import './layout';
-%consul-intention-list td.destination {
- @extend %tbody-th;
-}
diff --git a/ui-v2/app/styles/components/consul-intention-list/layout.scss b/ui-v2/app/styles/components/consul-intention-list/layout.scss
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/ui-v2/app/styles/components/consul-intention-list/skin.scss b/ui-v2/app/styles/components/consul-intention-list/skin.scss
deleted file mode 100644
index b69ee10cc1..0000000000
--- a/ui-v2/app/styles/components/consul-intention-list/skin.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-%consul-intention-list td strong {
- visibility: hidden;
-}
-%consul-intention-list td.intent-allow strong::before {
- @extend %with-arrow-right-color-icon, %as-pseudo;
- background-size: 24px;
-}
-%consul-intention-list td.intent-deny strong::before {
- @extend %with-deny-color-icon, %as-pseudo;
-}
diff --git a/ui-v2/app/styles/components/consul-service-instance-list.scss b/ui-v2/app/styles/components/consul-service-instance-list.scss
deleted file mode 100644
index 55b68c798a..0000000000
--- a/ui-v2/app/styles/components/consul-service-instance-list.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-.consul-service-instance-list > ul {
- @extend %consul-service-instance-list;
-}
-%consul-service-instance-list > li:not(:first-child) {
- @extend %consul-service-instance-row;
-}
-%consul-service-instance-row {
- @extend %composite-row, %with-composite-row-intent;
-}
diff --git a/ui-v2/app/styles/components/consul-service-list.scss b/ui-v2/app/styles/components/consul-service-list.scss
deleted file mode 100644
index 82c9cc3d1f..0000000000
--- a/ui-v2/app/styles/components/consul-service-list.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.consul-service-list > ul {
- @extend %consul-service-list;
-}
-%consul-service-list > li:not(:first-child) {
- @extend %consul-service-row;
-}
-%consul-service-row {
- @extend %composite-row, %with-composite-row-intent;
-}
-%consul-service-row > ul {
- margin-left: 26px;
-}
diff --git a/ui-v2/app/styles/components/discovery-chain.scss b/ui-v2/app/styles/components/discovery-chain.scss
index 00f507d709..ab2c2eeb10 100644
--- a/ui-v2/app/styles/components/discovery-chain.scss
+++ b/ui-v2/app/styles/components/discovery-chain.scss
@@ -1,4 +1,3 @@
-@import './card/index';
@import './discovery-chain/index';
.discovery-chain {
@extend %discovery-chain;
diff --git a/ui-v2/app/styles/components/form-elements.scss b/ui-v2/app/styles/components/form-elements.scss
index 6a2d70b2ee..b84dc515d8 100644
--- a/ui-v2/app/styles/components/form-elements.scss
+++ b/ui-v2/app/styles/components/form-elements.scss
@@ -1,10 +1,3 @@
-/*TODO: This remains a mix of form-elements */
-/* form-elements should probably be a collection of these */
-@import '../base/components/inline-alert/index';
-@import '../base/components/form-elements/index';
-@import '../base/components/sliding-toggle/index';
-@import '../base/components/radio-group/index';
-@import '../base/components/checkbox-group/index';
label span {
@extend %user-select-none;
}
diff --git a/ui-v2/app/styles/components/healthchecked-resource.scss b/ui-v2/app/styles/components/healthchecked-resource.scss
index 1f04593e5a..b9037c1c38 100644
--- a/ui-v2/app/styles/components/healthchecked-resource.scss
+++ b/ui-v2/app/styles/components/healthchecked-resource.scss
@@ -1,4 +1,3 @@
-@import '../base/components/stats-card/index';
.healthchecked-resource > div {
@extend %stats-card;
}
diff --git a/ui-v2/app/styles/components/index.scss b/ui-v2/app/styles/components/index.scss
index 9905e17c55..058c04a4c4 100644
--- a/ui-v2/app/styles/components/index.scss
+++ b/ui-v2/app/styles/components/index.scss
@@ -1,3 +1,4 @@
+@import './card/index';
@import './form-elements';
@import './breadcrumbs';
@import './anchors';
@@ -8,14 +9,12 @@
@import './tabs';
@import './pill';
@import './table';
-@import './form-elements';
@import './tooltip';
@import './tag-list';
@import './healthcheck-output';
@import './healthcheck-info';
@import './healthchecked-resource';
@import './freetext-filter';
-@import './phrase-editor';
@import './filter-bar';
@import './tomography-graph';
@import './flash-message';
@@ -26,17 +25,13 @@
@import './auth-form';
@import './auth-modal';
@import './notice';
-@import './sort-control';
@import './oidc-select';
@import './discovery-chain';
-@import './consul-intention-list';
@import './empty-state';
@import './tabular-details';
@import './tabular-collection';
@import './list-collection';
@import './grid-collection';
-@import './consul-service-list';
-@import './consul-service-instance-list';
@import './popover-select';
/**/
diff --git a/ui-v2/app/styles/components/modal-dialog.scss b/ui-v2/app/styles/components/modal-dialog.scss
index 1fc7f9a6b1..25c2fc8fd0 100644
--- a/ui-v2/app/styles/components/modal-dialog.scss
+++ b/ui-v2/app/styles/components/modal-dialog.scss
@@ -1,4 +1,3 @@
-@import '../base/components/modal-dialog/index';
[role='dialog'] {
@extend %modal-dialog;
}
diff --git a/ui-v2/app/styles/components/notice.scss b/ui-v2/app/styles/components/notice.scss
index 140825dc57..ee025c83b6 100644
--- a/ui-v2/app/styles/components/notice.scss
+++ b/ui-v2/app/styles/components/notice.scss
@@ -1,4 +1,3 @@
-@import '../base/components/notice/index';
%notice {
margin-bottom: 1em;
}
diff --git a/ui-v2/app/styles/components/phrase-editor/index.scss b/ui-v2/app/styles/components/phrase-editor/index.scss
deleted file mode 100644
index bc18252196..0000000000
--- a/ui-v2/app/styles/components/phrase-editor/index.scss
+++ /dev/null
@@ -1,2 +0,0 @@
-@import './skin';
-@import './layout';
diff --git a/ui-v2/app/styles/components/phrase-editor/layout.scss b/ui-v2/app/styles/components/phrase-editor/layout.scss
deleted file mode 100644
index aa7e5c5ded..0000000000
--- a/ui-v2/app/styles/components/phrase-editor/layout.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-%phrase-editor {
- display: flex;
- margin-top: 14px;
- margin-bottom: 5px;
-}
-%phrase-editor ul {
- overflow: hidden;
-}
-%phrase-editor li {
- @extend %pill;
- float: left;
- margin-right: 4px;
-}
-%phrase-editor span {
- display: none;
-}
-%phrase-editor label {
- flex-grow: 1;
-}
-%phrase-editor input {
- width: 100%;
- height: 33px;
- padding: 8px 10px;
- box-sizing: border-box;
-}
-%phrase-editor button::before {
- // TODO: Look at why this isn't automatically centering
- vertical-align: inherit !important;
-}
-@media #{$--horizontal-selects} {
- %phrase-editor {
- margin-top: 14px;
- }
- %phrase-editor ul {
- padding-top: 5px;
- padding-left: 5px;
- }
- %phrase-editor input {
- padding-left: 3px;
- }
-}
-@media #{$--lt-horizontal-selects} {
- %phrase-editor {
- margin-top: 9px;
- }
- %phrase-editor label {
- display: block;
- margin-top: 5px;
- }
-}
diff --git a/ui-v2/app/styles/components/phrase-editor/skin.scss b/ui-v2/app/styles/components/phrase-editor/skin.scss
deleted file mode 100644
index 78046d57bc..0000000000
--- a/ui-v2/app/styles/components/phrase-editor/skin.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@media #{$--horizontal-selects} {
- %phrase-editor {
- border: 1px solid $gray-300;
- border-radius: 2px;
- }
- %phrase-editor input:focus {
- outline: 0;
- }
-}
-@media #{$--lt-horizontal-selects} {
- %phrase-editor label {
- border: 1px solid $gray-300;
- border-radius: 2px;
- }
-}
-%phrase-editor input {
- -webkit-appearance: none;
-}
diff --git a/ui-v2/app/styles/components/pill.scss b/ui-v2/app/styles/components/pill.scss
index 12449f961a..b1d38702ad 100644
--- a/ui-v2/app/styles/components/pill.scss
+++ b/ui-v2/app/styles/components/pill.scss
@@ -1,4 +1,3 @@
-@import '../base/components/pill/index';
td strong {
@extend %pill;
margin-right: 3px;
diff --git a/ui-v2/app/styles/components/popover-select.scss b/ui-v2/app/styles/components/popover-select.scss
index a0f8ec50b7..4f75f3a432 100644
--- a/ui-v2/app/styles/components/popover-select.scss
+++ b/ui-v2/app/styles/components/popover-select.scss
@@ -1,11 +1,13 @@
.popover-select {
@extend %popover-select;
}
-%popover-select > [type='checkbox'] {
- @extend %popover-menu;
+%popover-select {
+ @extend %with-popover-menu;
+}
+%popover-select label > * {
+ @extend %split-button, %sort-button;
}
%popover-select {
- position: relative;
z-index: 3;
padding-left: 12px;
height: 100%;
diff --git a/ui-v2/app/styles/components/sort-control.scss b/ui-v2/app/styles/components/sort-control.scss
deleted file mode 100644
index aa08af693b..0000000000
--- a/ui-v2/app/styles/components/sort-control.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-@import '../base/components/sort-control/index';
-.sort-control {
- @extend %sort-control;
-}
diff --git a/ui-v2/app/styles/components/table.scss b/ui-v2/app/styles/components/table.scss
index e5090ffe2f..a4bc8c3df1 100644
--- a/ui-v2/app/styles/components/table.scss
+++ b/ui-v2/app/styles/components/table.scss
@@ -1,5 +1,3 @@
-@import '../base/components/table/index';
-@import '../base/components/popover-menu/index';
%main-content table {
@extend %table;
}
@@ -60,16 +58,35 @@ td.folder::before {
margin-top: 1px;
margin-right: 5px;
}
+td.destination {
+ @extend %tbody-th;
+}
+td.intent-allow strong,
+td.intent-deny strong {
+ visibility: hidden;
+}
+td.intent-allow strong::before {
+ @extend %with-arrow-right-color-icon, %as-pseudo;
+ background-size: 24px;
+}
+td.intent-deny strong::before {
+ @extend %with-deny-color-icon, %as-pseudo;
+}
table:not(.sessions) tbody tr {
cursor: pointer;
}
table:not(.sessions) td:first-child {
padding: 0;
}
-
table:not(.sessions) tbody tr:hover {
box-shadow: $decor-elevation-300;
}
+table.consul-metadata-list tbody tr {
+ cursor: default;
+}
+table.consul-metadata-list tbody tr:hover {
+ box-shadow: none;
+}
/* Header Tooltips/Icon*/
th {
overflow: visible;
@@ -111,4 +128,7 @@ th span em {
html.template-node.template-show #lock-sessions td:last-child {
padding: 0;
}
+ .consul-intention-list tr > :nth-last-child(2) {
+ display: none;
+ }
}
diff --git a/ui-v2/app/styles/components/tabs.scss b/ui-v2/app/styles/components/tabs.scss
index cc54ac03e8..608a1dfa81 100644
--- a/ui-v2/app/styles/components/tabs.scss
+++ b/ui-v2/app/styles/components/tabs.scss
@@ -1,4 +1,3 @@
-@import '../base/components/tabs/index';
.tab-nav {
@extend %tab-nav;
}
diff --git a/ui-v2/app/styles/components/tooltip.scss b/ui-v2/app/styles/components/tooltip.scss
index efbb678065..dc369de5bb 100644
--- a/ui-v2/app/styles/components/tooltip.scss
+++ b/ui-v2/app/styles/components/tooltip.scss
@@ -1,4 +1,3 @@
-@import '../base/components/tooltip/index';
%app-view h1 span[data-tooltip] {
@extend %with-pseudo-tooltip;
text-indent: -9000px;
diff --git a/ui-v2/app/styles/routes/dc/services/index.scss b/ui-v2/app/styles/routes/dc/services/index.scss
deleted file mode 100644
index 6f4f8c89f8..0000000000
--- a/ui-v2/app/styles/routes/dc/services/index.scss
+++ /dev/null
@@ -1,31 +0,0 @@
-// Services - Linked Services tab
-// TODO - move this into composite-row
-.consul-gateway-services-list > ul {
- @extend %consul-gateway-services-list;
-}
-%consul-gateway-services-list > li:not(:first-child) {
- @extend %gateway-service-row;
-}
-%gateway-service-row {
- @extend %composite-row, %with-composite-row-intent;
-}
-
-// Service Detail - Proxy Info tab
-.proxy-upstreams > ul {
- @extend %proxy-upstreams-list;
- border-top: 1px solid $gray-200;
-}
-%proxy-upstreams-list > li {
- @extend %composite-row;
-}
-.proxy-exposed-paths tbody tr {
- @extend %proxy-exposed-paths-row;
- cursor: default !important;
-}
-%proxy-exposed-paths-row:hover {
- box-shadow: none !important;
-}
-%proxy-exposed-paths-row .combined-address button:hover {
- // In this case we do not need a background on the icon
- background-color: transparent !important;
-}
diff --git a/ui-v2/app/templates/dc/acls/policies/-notifications.hbs b/ui-v2/app/templates/dc/acls/policies/-notifications.hbs
index 99ed439a7d..64ae640e72 100644
--- a/ui-v2/app/templates/dc/acls/policies/-notifications.hbs
+++ b/ui-v2/app/templates/dc/acls/policies/-notifications.hbs
@@ -17,4 +17,9 @@
There was an error deleting your policy.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/acls/policies/edit.hbs b/ui-v2/app/templates/dc/acls/policies/edit.hbs
index cdc0ac6bc2..495648c019 100644
--- a/ui-v2/app/templates/dc/acls/policies/edit.hbs
+++ b/ui-v2/app/templates/dc/acls/policies/edit.hbs
@@ -13,7 +13,7 @@
@authorized={{isAuthorized}}
@enabled={{isEnabled}}
>
-
+
{{partial 'dc/acls/policies/notifications'}}
diff --git a/ui-v2/app/templates/dc/acls/roles/-notifications.hbs b/ui-v2/app/templates/dc/acls/roles/-notifications.hbs
index fbbf8aa656..15f44721fd 100644
--- a/ui-v2/app/templates/dc/acls/roles/-notifications.hbs
+++ b/ui-v2/app/templates/dc/acls/roles/-notifications.hbs
@@ -17,4 +17,9 @@
There was an error deleting your role.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/acls/roles/edit.hbs b/ui-v2/app/templates/dc/acls/roles/edit.hbs
index 964084d0d8..f07dc5d35b 100644
--- a/ui-v2/app/templates/dc/acls/roles/edit.hbs
+++ b/ui-v2/app/templates/dc/acls/roles/edit.hbs
@@ -13,7 +13,7 @@
@authorized={{isAuthorized}}
@enabled={{isEnabled}}
>
-
+
{{partial 'dc/acls/roles/notifications'}}
diff --git a/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs b/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs
index c5770bf1e3..34a59cbafb 100644
--- a/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs
+++ b/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs
@@ -29,4 +29,9 @@
There was an error using that ACL token.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/acls/tokens/edit.hbs b/ui-v2/app/templates/dc/acls/tokens/edit.hbs
index 86cd683681..2b52dc6a6c 100644
--- a/ui-v2/app/templates/dc/acls/tokens/edit.hbs
+++ b/ui-v2/app/templates/dc/acls/tokens/edit.hbs
@@ -13,7 +13,7 @@
@authorized={{isAuthorized}}
@enabled={{isEnabled}}
>
-
+
{{partial 'dc/acls/tokens/notifications'}}
diff --git a/ui-v2/app/templates/dc/intentions/-notifications.hbs b/ui-v2/app/templates/dc/intentions/-notifications.hbs
index 15e86dc6bf..f1d60449c0 100644
--- a/ui-v2/app/templates/dc/intentions/-notifications.hbs
+++ b/ui-v2/app/templates/dc/intentions/-notifications.hbs
@@ -19,4 +19,9 @@
There was an error deleting your intention.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/intentions/edit.hbs b/ui-v2/app/templates/dc/intentions/edit.hbs
index f5e46939de..12d38a121f 100644
--- a/ui-v2/app/templates/dc/intentions/edit.hbs
+++ b/ui-v2/app/templates/dc/intentions/edit.hbs
@@ -5,7 +5,7 @@
{{/if}}
-
+
{{partial 'dc/intentions/notifications'}}
diff --git a/ui-v2/app/templates/dc/kv/-notifications.hbs b/ui-v2/app/templates/dc/kv/-notifications.hbs
index 61bc051170..74777e138e 100644
--- a/ui-v2/app/templates/dc/kv/-notifications.hbs
+++ b/ui-v2/app/templates/dc/kv/-notifications.hbs
@@ -2,13 +2,13 @@
{{#if (eq status 'success') }}
Your key has been added.
{{else}}
- There was an error adding your key.
+ There was an error adding your key.
{{/if}}
{{else if (eq type 'update') }}
{{#if (eq status 'success') }}
Your key has been saved.
{{else}}
- There was an error saving your key.
+ There was an error saving your key.
{{/if}}
{{ else if (eq type 'delete')}}
{{#if (eq status 'success') }}
@@ -23,4 +23,9 @@
There was an error invalidating your session.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/kv/edit.hbs b/ui-v2/app/templates/dc/kv/edit.hbs
index b4ce90641a..bc71677269 100644
--- a/ui-v2/app/templates/dc/kv/edit.hbs
+++ b/ui-v2/app/templates/dc/kv/edit.hbs
@@ -4,7 +4,7 @@
{{title 'Edit Key/Value'}}
{{/if}}
-
+
{{partial 'dc/kv/notifications'}}
diff --git a/ui-v2/app/templates/dc/nspaces/-notifications.hbs b/ui-v2/app/templates/dc/nspaces/-notifications.hbs
index 4861714112..498750c3d2 100644
--- a/ui-v2/app/templates/dc/nspaces/-notifications.hbs
+++ b/ui-v2/app/templates/dc/nspaces/-notifications.hbs
@@ -17,4 +17,9 @@
There was an error deleting your namespace.
{{/if}}
{{/if}}
+{{#let error.errors.firstObject as |error|}}
+ {{#if error.detail }}
+ {{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}}
+ {{/if}}
+{{/let}}
diff --git a/ui-v2/app/templates/dc/nspaces/edit.hbs b/ui-v2/app/templates/dc/nspaces/edit.hbs
index 42e71394c0..da9c675882 100644
--- a/ui-v2/app/templates/dc/nspaces/edit.hbs
+++ b/ui-v2/app/templates/dc/nspaces/edit.hbs
@@ -4,7 +4,7 @@
{{title 'Edit Namespace'}}
{{/if}}
-
+
{{partial 'dc/nspaces/notifications'}}
diff --git a/ui-v2/app/templates/dc/services/instance/proxy.hbs b/ui-v2/app/templates/dc/services/instance/proxy.hbs
index 234194c17c..98d1644100 100644
--- a/ui-v2/app/templates/dc/services/instance/proxy.hbs
+++ b/ui-v2/app/templates/dc/services/instance/proxy.hbs
@@ -32,11 +32,11 @@
{{#if (gt item.LocalBindPort 0)}}
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress| }}
+ {{combinedAddress}}
- {{combinedAddress}}
{{/let}}
{{/if}}
@@ -47,50 +47,52 @@
{{/if}}
- {{#if (gt proxy.Proxy.Upstreams.length 0)}}
+ {{#if (gt proxy.Proxy.Expose.Paths.length 0)}}
Exposed paths
The following list shows individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation.
-
-
- Path
- Protocol
- Listener port
- Local path port
- Combined addressService address, listener port, and path all combined into one URL.
-
-
- {{#each proxy.Proxy.Expose.Paths as |path|}}
-
-
- {{or path.Path '-'}}
-
-
- {{or path.Protocol '-'}}
-
-
- {{or path.ListenerPort '-'}}
-
-
- {{or path.LocalPathPort '-'}}
-
- {{#let (concat item.Address ':' path.ListenerPort path.Path) as |combinedAddress| }}
-
- {{#if combinedAddress}}
- {{combinedAddress}}
-
- {{else}}
- {{'-'}}
- {{/if}}
-
- {{/let}}
-
- {{/each}}
-
-
+
{{/if}}
-
+
\ No newline at end of file
diff --git a/ui-v2/app/templates/dc/services/show/services.hbs b/ui-v2/app/templates/dc/services/show/services.hbs
index 1d2a29f48b..e93ef13e9f 100644
--- a/ui-v2/app/templates/dc/services/show/services.hbs
+++ b/ui-v2/app/templates/dc/services/show/services.hbs
@@ -4,35 +4,9 @@
The following services may receive traffic from external services through this gateway. Learn more about configuring gateways in our
- step-by-step guide.
-
+ step-by-step guide .
- {{#let item.Service.Namespace as |nspace|}}
-
-
- {{item.Name}}
-
-
- {{#if (env 'CONSUL_NSPACES_ENABLED')}}
- {{#if (not-eq item.Namespace nspace)}}
-
- {{item.Namespace}}
-
- {{/if}}
- {{/if}}
- {{#if (not-eq item.InstanceCount 0)}}
-
- {{format-number item.InstanceCount}} {{pluralize item.InstanceCount 'Instance' without-count=true}}
-
- {{/if}}
-
-
-
-
-
-
-
- {{/let}}
+
{{else}}
diff --git a/ui-v2/app/templates/dc/services/show/upstreams.hbs b/ui-v2/app/templates/dc/services/show/upstreams.hbs
index 61764e1a3e..fde1adc483 100644
--- a/ui-v2/app/templates/dc/services/show/upstreams.hbs
+++ b/ui-v2/app/templates/dc/services/show/upstreams.hbs
@@ -3,11 +3,10 @@
{{#if (gt gateway.Services.length 0)}}
- Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our
- documentation.
+ Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our documentation .
{{#let item.Service.Namespace as |nspace|}}
-
+
{{item.Name}}
@@ -21,11 +20,11 @@
{{/if}}
{{#if (not-eq item.GatewayConfig.ListenerPort 0)}}
+ :{{item.GatewayConfig.ListenerPort}}
- :{{item.GatewayConfig.ListenerPort}}
{{/if}}
diff --git a/ui-v2/tests/acceptance/dc/services/show/services.feature b/ui-v2/tests/acceptance/dc/services/show/services.feature
index cc576c6c18..6871bae396 100644
--- a/ui-v2/tests/acceptance/dc/services/show/services.feature
+++ b/ui-v2/tests/acceptance/dc/services/show/services.feature
@@ -1,57 +1,57 @@
-@setupApplicationTest
-Feature: dc / services / show / services
- Background:
- Given 1 datacenter model with the value "dc1"
- And 1 node models
- And 1 service model from yaml
- ---
- - Service:
- Name: terminating-gateway-1
- Kind: terminating-gateway
- ---
- Scenario: Seeing the Linked Services tab
- When I visit the service page for yaml
- ---
- dc: dc1
- service: terminating-gateway-1
- ---
- And the title should be "terminating-gateway-1 - Consul"
- And I see linkedServices on the tabs
- When I click linkedServices on the tabs
- And I see linkedServicesIsSelected on the tabs
- Scenario: Seeing the list of Linked Services
- Given 3 service models from yaml
- When I visit the service page for yaml
- ---
- dc: dc1
- service: terminating-gateway-1
- ---
- And the title should be "terminating-gateway-1 - Consul"
- When I click linkedServices on the tabs
- Then I see 3 service models
- Scenario: Don't see the Linked Services tab
- Given 1 datacenter model with the value "dc1"
- And 1 node models
- And 1 service model from yaml
- ---
- - Service:
- Name: [Name]
- Kind: [Kind]
- ---
- When I visit the service page for yaml
- ---
- dc: dc1
- service: [Name]
- ---
- And the title should be "[Name] - Consul"
- And I don't see linkedServices on the tabs
- Where:
- ---------------------------------------------
- | Name | Kind |
- | service | ~ |
- | ingress-gateway | ingress-gateway |
- | mesh-gateway | mesh-gateway |
- ---------------------------------------------
-
-
-
+@setupApplicationTest
+Feature: dc / services / show / services
+ Background:
+ Given 1 datacenter model with the value "dc1"
+ And 1 node models
+ And 1 service model from yaml
+ ---
+ - Service:
+ Name: terminating-gateway-1
+ Kind: terminating-gateway
+ ---
+ Scenario: Seeing the Linked Services tab
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: terminating-gateway-1
+ ---
+ And the title should be "terminating-gateway-1 - Consul"
+ And I see linkedServices on the tabs
+ When I click linkedServices on the tabs
+ And I see linkedServicesIsSelected on the tabs
+ Scenario: Seeing the list of Linked Services
+ Given 3 service models from yaml
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: terminating-gateway-1
+ ---
+ And the title should be "terminating-gateway-1 - Consul"
+ When I click linkedServices on the tabs
+ Then I see 3 service models on the tabs.linkedServicesTab component
+ Scenario: Don't see the Linked Services tab
+ Given 1 datacenter model with the value "dc1"
+ And 1 node models
+ And 1 service model from yaml
+ ---
+ - Service:
+ Name: [Name]
+ Kind: [Kind]
+ ---
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: [Name]
+ ---
+ And the title should be "[Name] - Consul"
+ And I don't see linkedServices on the tabs
+ Where:
+ ---------------------------------------------
+ | Name | Kind |
+ | service | ~ |
+ | ingress-gateway | ingress-gateway |
+ | mesh-gateway | mesh-gateway |
+ ---------------------------------------------
+
+
+
diff --git a/ui-v2/tests/acceptance/dc/services/show/upstreams.feature b/ui-v2/tests/acceptance/dc/services/show/upstreams.feature
index 4e0def9205..cc703e4a43 100644
--- a/ui-v2/tests/acceptance/dc/services/show/upstreams.feature
+++ b/ui-v2/tests/acceptance/dc/services/show/upstreams.feature
@@ -1,54 +1,54 @@
-@setupApplicationTest
-Feature: dc / services / show / upstreams
- Background:
- Given 1 datacenter model with the value "dc1"
- And 1 node models
- And 1 service model from yaml
- ---
- - Service:
- Name: ingress-gateway-1
- Kind: ingress-gateway
- ---
- Scenario: Seeing the Upstreams tab
- When I visit the service page for yaml
- ---
- dc: dc1
- service: ingress-gateway-1
- ---
- And the title should be "ingress-gateway-1 - Consul"
- And I see upstreams on the tabs
- When I click upstreams on the tabs
- And I see upstreamsIsSelected on the tabs
- Scenario: Seeing the list of Upstreams
- Given 3 service models from yaml
- When I visit the service page for yaml
- ---
- dc: dc1
- service: ingress-gateway-1
- ---
- And the title should be "ingress-gateway-1 - Consul"
- When I click upstreams on the tabs
- Then I see 3 service models
- Scenario: Don't see the Upstreams tab
- Given 1 datacenter model with the value "dc1"
- And 1 node models
- And 1 service model from yaml
- ---
- - Service:
- Name: [Name]
- Kind: [Kind]
- ---
- When I visit the service page for yaml
- ---
- dc: dc1
- service: [Name]
- ---
- And the title should be "[Name] - Consul"
- And I don't see upstreams on the tabs
- Where:
- ---------------------------------------------
- | Name | Kind |
- | service | ~ |
- | terminating-gateway | terminating-gateway |
- | mesh-gateway | mesh-gateway |
- ---------------------------------------------
+@setupApplicationTest
+Feature: dc / services / show / upstreams
+ Background:
+ Given 1 datacenter model with the value "dc1"
+ And 1 node models
+ And 1 service model from yaml
+ ---
+ - Service:
+ Name: ingress-gateway-1
+ Kind: ingress-gateway
+ ---
+ Scenario: Seeing the Upstreams tab
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: ingress-gateway-1
+ ---
+ And the title should be "ingress-gateway-1 - Consul"
+ And I see upstreams on the tabs
+ When I click upstreams on the tabs
+ And I see upstreamsIsSelected on the tabs
+ Scenario: Seeing the list of Upstreams
+ Given 3 service models
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: ingress-gateway-1
+ ---
+ And the title should be "ingress-gateway-1 - Consul"
+ When I click upstreams on the tabs
+ Then I see 3 service models on the tabs.upstreamsTab component
+ Scenario: Don't see the Upstreams tab
+ Given 1 datacenter model with the value "dc1"
+ And 1 node models
+ And 1 service model from yaml
+ ---
+ - Service:
+ Name: [Name]
+ Kind: [Kind]
+ ---
+ When I visit the service page for yaml
+ ---
+ dc: dc1
+ service: [Name]
+ ---
+ And the title should be "[Name] - Consul"
+ And I don't see upstreams on the tabs
+ Where:
+ ---------------------------------------------
+ | Name | Kind |
+ | service | ~ |
+ | terminating-gateway | terminating-gateway |
+ | mesh-gateway | mesh-gateway |
+ ---------------------------------------------
diff --git a/ui-v2/tests/pages/dc/services/show.js b/ui-v2/tests/pages/dc/services/show.js
index c9fd7bc304..9483168274 100644
--- a/ui-v2/tests/pages/dc/services/show.js
+++ b/ui-v2/tests/pages/dc/services/show.js
@@ -1,5 +1,5 @@
export default function(visitable, attribute, collection, text, intentions, filter, tabs) {
- return {
+ const page = {
visit: visitable('/:dc/services/:service'),
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
scope: '.title',
@@ -22,8 +22,16 @@ export default function(visitable, attribute, collection, text, intentions, filt
address: text('[data-test-address]'),
}),
intentions: intentions(),
- services: collection('.consul-gateway-services-list> ul > li:not(:first-child)', {
+ };
+ page.tabs.upstreamsTab = {
+ services: collection('.consul-upstream-list > ul > li:not(:first-child)', {
name: text('[data-test-service-name]'),
}),
};
+ page.tabs.linkedServicesTab = {
+ services: collection('.consul-service-list > ul > li:not(:first-child)', {
+ name: text('[data-test-service-name]'),
+ }),
+ };
+ return page;
}
diff --git a/ui-v2/tests/unit/utils/components/discovery-chain/get-alternate-services-test.js b/ui-v2/tests/unit/components/discovery-chain/get-alternate-services-test.js
similarity index 90%
rename from ui-v2/tests/unit/utils/components/discovery-chain/get-alternate-services-test.js
rename to ui-v2/tests/unit/components/discovery-chain/get-alternate-services-test.js
index a641d722b7..56152a97d6 100644
--- a/ui-v2/tests/unit/utils/components/discovery-chain/get-alternate-services-test.js
+++ b/ui-v2/tests/unit/components/discovery-chain/get-alternate-services-test.js
@@ -1,7 +1,7 @@
-import { getAlternateServices } from 'consul-ui/utils/components/discovery-chain/index';
+import { getAlternateServices } from 'consul-ui/components/discovery-chain/utils';
import { module, test } from 'qunit';
-module('Unit | Utility | components/discovery-chain/get-alternative-services', function() {
+module('Unit | Component | discovery-chain/get-alternative-services', function() {
test('it guesses a different namespace', function(assert) {
const expected = {
Type: 'Namespace',
diff --git a/ui-v2/tests/unit/utils/components/discovery-chain/get-resolvers-test.js b/ui-v2/tests/unit/components/discovery-chain/get-resolvers-test.js
similarity index 98%
rename from ui-v2/tests/unit/utils/components/discovery-chain/get-resolvers-test.js
rename to ui-v2/tests/unit/components/discovery-chain/get-resolvers-test.js
index 8223d60c37..4ec4b9d101 100644
--- a/ui-v2/tests/unit/utils/components/discovery-chain/get-resolvers-test.js
+++ b/ui-v2/tests/unit/components/discovery-chain/get-resolvers-test.js
@@ -1,4 +1,4 @@
-import { getResolvers } from 'consul-ui/utils/components/discovery-chain/index';
+import { getResolvers } from 'consul-ui/components/discovery-chain/utils';
import { module, test } from 'qunit';
import { get } from 'consul-ui/tests/helpers/api';
@@ -7,7 +7,7 @@ const nspace = 'default';
const request = {
url: `/v1/discovery-chain/service-name?dc=${dc}`,
};
-module('Unit | Utility | components/discovery-chain/get-resolvers', function() {
+module('Unit | Component | discovery-chain/get-resolvers', function() {
test('it assigns Subsets correctly', function(assert) {
return get(request.url, {
headers: {
diff --git a/ui-v2/tests/unit/utils/components/discovery-chain/get-splitters-test.js b/ui-v2/tests/unit/components/discovery-chain/get-splitters-test.js
similarity index 87%
rename from ui-v2/tests/unit/utils/components/discovery-chain/get-splitters-test.js
rename to ui-v2/tests/unit/components/discovery-chain/get-splitters-test.js
index ca1dc500d6..78e89af428 100644
--- a/ui-v2/tests/unit/utils/components/discovery-chain/get-splitters-test.js
+++ b/ui-v2/tests/unit/components/discovery-chain/get-splitters-test.js
@@ -1,7 +1,7 @@
-import { getSplitters } from 'consul-ui/utils/components/discovery-chain/index';
+import { getSplitters } from 'consul-ui/components/discovery-chain/utils';
import { module, test } from 'qunit';
-module('Unit | Utility | components/discovery-chain/get-splitters', function() {
+module('Unit | Component | discovery-chain/get-splitters', function() {
test('it collects and correctly parses splitter Names', function(assert) {
const actual = getSplitters({
'splitter:splitter-name.default': {