) */
-html.template-service.template-list td:first-child a span,
-html.template-node.template-show #services td:first-child a span {
- @extend %with-external-source-icon;
- float: left;
- margin-right: 10px;
- margin-top: 2px;
-}
/*TODO: trs only live in tables, get rid of table */
html.template-service.template-list main table tr {
@extend %services-row;
}
+html.template-service.template-show #instances table tr {
+ @extend %instances-row;
+}
+html.template-instance.template-show #upstreams table tr {
+ @extend %upstreams-row;
+}
html.template-intention.template-list main table tr {
@extend %intentions-row;
}
@@ -146,6 +145,12 @@ html.template-node.template-show main table.sessions tr {
html.template-token.template-list main table tr td.me ~ td:nth-of-type(5) {
display: none;
}
+ html.template-service.template-show #instances tr > :nth-child(3) {
+ display: none;
+ }
+ %instances-row > * {
+ width: calc(100% / 4);
+ }
}
%kvs-row > *:first-child {
@@ -155,7 +160,7 @@ html.template-node.template-show main table.sessions tr {
@extend %table-actions;
}
%node-services-row > * {
- width: 33%;
+ width: calc(100% / 3);
}
%policies-row > * {
width: calc(33% - 20px);
@@ -172,3 +177,9 @@ html.template-node.template-show main table.sessions tr {
%services-row > * {
width: auto;
}
+%instances-row > * {
+ width: calc(100% / 5);
+}
+%upstreams-row > * {
+ width: calc(100% / 3);
+}
diff --git a/ui-v2/app/styles/components/tag-list.scss b/ui-v2/app/styles/components/tag-list.scss
new file mode 100644
index 000000000000..6bc2ea8e709d
--- /dev/null
+++ b/ui-v2/app/styles/components/tag-list.scss
@@ -0,0 +1,5 @@
+@import './tag-list/index';
+.tag-list,
+td.tags {
+ @extend %tag-list;
+}
diff --git a/ui-v2/app/styles/components/tag-list/index.scss b/ui-v2/app/styles/components/tag-list/index.scss
new file mode 100644
index 000000000000..bc182521964a
--- /dev/null
+++ b/ui-v2/app/styles/components/tag-list/index.scss
@@ -0,0 +1,2 @@
+@import './skin';
+@import './layout';
diff --git a/ui-v2/app/styles/components/tag-list/layout.scss b/ui-v2/app/styles/components/tag-list/layout.scss
new file mode 100644
index 000000000000..2590f8b4c144
--- /dev/null
+++ b/ui-v2/app/styles/components/tag-list/layout.scss
@@ -0,0 +1,10 @@
+%tag-list dt {
+ display: none;
+}
+// TODO: Currently this is here to overwrite
+// the default definition list layout used in edit pages
+// ideally we'd be more specific with those to say
+// only add padding to dl's in edit pages
+%tag-list dd {
+ padding-left: 0;
+}
diff --git a/ui-v2/app/styles/components/tag-list/skin.scss b/ui-v2/app/styles/components/tag-list/skin.scss
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/ui-v2/app/styles/core/typography.scss b/ui-v2/app/styles/core/typography.scss
index 2331c49c901c..bc945842a88f 100644
--- a/ui-v2/app/styles/core/typography.scss
+++ b/ui-v2/app/styles/core/typography.scss
@@ -36,10 +36,10 @@ h1,
h2,
%header-nav,
%healthchecked-resource header span,
-%healthcheck-status dt,
+%healthcheck-output dt,
%copy-button,
%app-content div > dl > dt,
-td a {
+td:first-child a {
font-weight: $typo-weight-semibold;
}
%form-element > span,
@@ -51,7 +51,7 @@ caption {
font-weight: $typo-weight-semibold !important;
}
th,
-%breadcrumbs a,
+%breadcrumbs li > *,
%action-group-action,
%tab-nav,
%tooltip-bubble {
diff --git a/ui-v2/app/styles/routes/dc/service/index.scss b/ui-v2/app/styles/routes/dc/service/index.scss
index c38a957a9ddf..e69de29bb2d1 100644
--- a/ui-v2/app/styles/routes/dc/service/index.scss
+++ b/ui-v2/app/styles/routes/dc/service/index.scss
@@ -1,17 +0,0 @@
-@import '../../../components/pill/index';
-html.template-service.template-show main dl {
- display: flex;
- margin-bottom: 1.4em;
-}
-html.template-service.template-show main dt {
- display: none;
-}
-// TODO: Generalize this, also see nodes/index
-html.template-service.template-list td.tags span,
-html.template-service.template-show main dd span {
- @extend %pill;
-}
-html.template-node.template-show #services th:first-child,
-html.template-service.template-list main th:first-child {
- text-indent: 28px;
-}
diff --git a/ui-v2/app/styles/variables/custom-query.scss b/ui-v2/app/styles/variables/custom-query.scss
index 56895ef26631..8e7160e678c3 100644
--- a/ui-v2/app/styles/variables/custom-query.scss
+++ b/ui-v2/app/styles/variables/custom-query.scss
@@ -26,8 +26,8 @@ $--lt-wide-footer: '(max-width: 420px)';
$--spacious-page-header: '(min-width: 850px)';
$--lt-spacious-page-header: '(max-width: 849px)';
-$--spacious-healthcheck-status: '(min-width: 421px)';
-$--lt-spacious-healthcheck-status: '(max-width: 420px)';
+$--spacious-healthcheck-output: '(min-width: 421px)';
+$--lt-spacious-healthcheck-output: '(max-width: 420px)';
$--wide-form: '(min-width: 421px)';
$--lt-wide-form: '(max-width: 420px)';
diff --git a/ui-v2/app/templates/components/healthcheck-info.hbs b/ui-v2/app/templates/components/healthcheck-info.hbs
new file mode 100644
index 000000000000..13b62ac08c33
--- /dev/null
+++ b/ui-v2/app/templates/components/healthcheck-info.hbs
@@ -0,0 +1,9 @@
+{{#if (and (lt passing 1) (lt warning 1) (lt critical 1) )}}
+ 0
+{{else}}
+
+ {{healthcheck-status width=passingWidth name='passing' value=passing}}
+ {{healthcheck-status width=warningWidth name='warning' value=warning}}
+ {{healthcheck-status width=criticalWidth name='critical' value=critical}}
+
+{{/if}}
diff --git a/ui-v2/app/templates/components/healthcheck-list.hbs b/ui-v2/app/templates/components/healthcheck-list.hbs
new file mode 100644
index 000000000000..4b5774588e07
--- /dev/null
+++ b/ui-v2/app/templates/components/healthcheck-list.hbs
@@ -0,0 +1,5 @@
+
+{{#each (sort-by (action 'sortChecksByImportance') items) as |check| }}
+ {{healthcheck-output data-test-node-healthcheck=check.Name tagName='li' name=check.Name class=check.Status status=check.Status notes=check.Notes output=check.Output}}
+{{/each}}
+
diff --git a/ui-v2/app/templates/components/healthcheck-output.hbs b/ui-v2/app/templates/components/healthcheck-output.hbs
new file mode 100644
index 000000000000..05a75e40a249
--- /dev/null
+++ b/ui-v2/app/templates/components/healthcheck-output.hbs
@@ -0,0 +1,25 @@
+{{#feedback-dialog type='inline'}}
+ {{#block-slot 'action' as |success error|}}
+ {{#copy-button success=(action success) error=(action error) clipboardText=output title='copy output to clipboard'}}
+ Copy Output
+ {{/copy-button}}
+ {{/block-slot}}
+ {{#block-slot 'success' as |transition|}}
+
+ Copied IP Address!
+
+ {{/block-slot}}
+ {{#block-slot 'error' as |transition|}}
+
+ Sorry, something went wrong!
+
+ {{/block-slot}}
+{{/feedback-dialog}}
+
+ {{name}}
+ {{notes}}
+ Output
+
+ {{output}}
+
+
\ No newline at end of file
diff --git a/ui-v2/app/templates/components/healthcheck-status.hbs b/ui-v2/app/templates/components/healthcheck-status.hbs
index 05a75e40a249..383f67386c56 100644
--- a/ui-v2/app/templates/components/healthcheck-status.hbs
+++ b/ui-v2/app/templates/components/healthcheck-status.hbs
@@ -1,25 +1,3 @@
-{{#feedback-dialog type='inline'}}
- {{#block-slot 'action' as |success error|}}
- {{#copy-button success=(action success) error=(action error) clipboardText=output title='copy output to clipboard'}}
- Copy Output
- {{/copy-button}}
- {{/block-slot}}
- {{#block-slot 'success' as |transition|}}
-
- Copied IP Address!
-
- {{/block-slot}}
- {{#block-slot 'error' as |transition|}}
-
- Sorry, something went wrong!
-
- {{/block-slot}}
-{{/feedback-dialog}}
-
- {{name}}
- {{notes}}
- Output
-
- {{output}}
-
-
\ No newline at end of file
+{{!-- we use concat here to avoid ember adding returns between words, which causes a layout issue--}}
+{{ concat 'Healthchecks ' (capitalize name) }}
+{{format-number count}}
\ No newline at end of file
diff --git a/ui-v2/app/templates/components/tag-list.hbs b/ui-v2/app/templates/components/tag-list.hbs
new file mode 100644
index 000000000000..c51ea2a41883
--- /dev/null
+++ b/ui-v2/app/templates/components/tag-list.hbs
@@ -0,0 +1,8 @@
+{{#if (gt items.length 0)}}
+ Tags
+
+ {{#each items as |item|}}
+ {{item}}
+ {{/each}}
+
+{{/if}}
diff --git a/ui-v2/app/templates/dc/nodes/-healthchecks.hbs b/ui-v2/app/templates/dc/nodes/-healthchecks.hbs
index a956fad63133..19acae8c38e7 100644
--- a/ui-v2/app/templates/dc/nodes/-healthchecks.hbs
+++ b/ui-v2/app/templates/dc/nodes/-healthchecks.hbs
@@ -1,9 +1,5 @@
{{#if (gt item.Checks.length 0) }}
-
-{{#each (sort-by (action 'sortChecksByImportance') item.Checks) as |check| }}
- {{healthcheck-status data-test-node-healthcheck=check.Name tagName='li' name=check.Name class=check.Status status=check.Status notes=check.Notes output=check.Output}}
-{{/each}}
-
+ {{healthcheck-list items=item.Checks}}
{{else}}
This node has no health checks.
diff --git a/ui-v2/app/templates/dc/nodes/-services.hbs b/ui-v2/app/templates/dc/nodes/-services.hbs
index 856e51b172de..e692bb0d522e 100644
--- a/ui-v2/app/templates/dc/nodes/-services.hbs
+++ b/ui-v2/app/templates/dc/nodes/-services.hbs
@@ -19,7 +19,7 @@
- {{item.Service}}{{#if (not-eq item.ID item.Service) }}({{item.ID}}) {{/if}}
+ {{item.Service}}{{#if (not-eq item.ID item.Service) }} ({{item.ID}}) {{/if}}
diff --git a/ui-v2/app/templates/dc/services/-instances.hbs b/ui-v2/app/templates/dc/services/-instances.hbs
new file mode 100644
index 000000000000..7ef34c3400e8
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/-instances.hbs
@@ -0,0 +1,55 @@
+{{#if (gt items.length 0) }}
+
+
+{{/if}}
+ {{#changeable-set dispatcher=searchable}}
+ {{#block-slot 'set' as |filtered|}}
+ {{#tabular-collection
+ data-test-instances
+ items=filtered as |item index|
+ }}
+ {{#block-slot 'header'}}
+ ID
+ Node
+ Address
+ Node Checks
+ Service Checks
+ {{/block-slot}}
+ {{#block-slot 'row'}}
+
+
+
+ {{ or item.Service.ID item.Service.Service }}
+
+
+
+ {{item.Node.Node}}
+
+
+ {{item.Service.Address}}:{{item.Service.Port}}
+
+
+ {{#with (reject-by 'ServiceID' '' item.Checks) as |checks|}}
+ {{healthcheck-info
+ passing=(filter-by 'Status' 'passing' checks) warning=(filter-by 'Status' 'warning' checks) critical=(filter-by 'Status' 'critical' checks)
+ }}
+ {{/with}}
+
+
+ {{#with (filter-by 'ServiceID' '' item.Checks) as |checks|}}
+ {{healthcheck-info
+ passing=(filter-by 'Status' 'passing' checks) warning=(filter-by 'Status' 'warning' checks) critical=(filter-by 'Status' 'critical' checks)
+ }}
+ {{/with}}
+
+ {{/block-slot}}
+ {{/tabular-collection}}
+ {{/block-slot}}
+ {{#block-slot 'empty'}}
+
+ There are no services.
+
+ {{/block-slot}}
+ {{/changeable-set}}
diff --git a/ui-v2/app/templates/dc/services/-nodechecks.hbs b/ui-v2/app/templates/dc/services/-nodechecks.hbs
new file mode 100644
index 000000000000..487db34fc9e9
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/-nodechecks.hbs
@@ -0,0 +1,8 @@
+{{#if (gt item.NodeChecks.length 0) }}
+ {{healthcheck-list items=item.NodeChecks}}
+{{else}}
+
+ This instance has no node health checks.
+
+{{/if}}
+
diff --git a/ui-v2/app/templates/dc/services/-servicechecks.hbs b/ui-v2/app/templates/dc/services/-servicechecks.hbs
new file mode 100644
index 000000000000..424772e70591
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/-servicechecks.hbs
@@ -0,0 +1,8 @@
+{{#if (gt item.ServiceChecks.length 0) }}
+ {{healthcheck-list items=item.ServiceChecks}}
+{{else}}
+
+ This instance has no service health checks.
+
+{{/if}}
+
diff --git a/ui-v2/app/templates/dc/services/-tags.hbs b/ui-v2/app/templates/dc/services/-tags.hbs
new file mode 100644
index 000000000000..c0a3a0f7830a
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/-tags.hbs
@@ -0,0 +1,7 @@
+{{#if (gt item.Tags.length 0) }}
+{{tag-list items=item.Tags}}
+{{else}}
+
+ There are no tags.
+
+{{/if}}
diff --git a/ui-v2/app/templates/dc/services/-upstreams.hbs b/ui-v2/app/templates/dc/services/-upstreams.hbs
new file mode 100644
index 000000000000..f4ad6fcc8139
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/-upstreams.hbs
@@ -0,0 +1,27 @@
+{{#if (gt item.Proxy.Upstreams.length 0) }}
+{{#tabular-collection
+ data-test-upstreams
+ items=item.Proxy.Upstreams as |item index|
+}}
+ {{#block-slot 'header'}}
+ Destination Name
+ Destination Type
+ Local Bind Port
+ {{/block-slot}}
+ {{#block-slot 'row'}}
+
+ {{item.DestinationName}}
+
+
+ {{item.DestinationType}}
+
+
+ {{item.LocalBindPort}}
+
+ {{/block-slot}}
+{{/tabular-collection}}
+{{else}}
+
+ There are no upstreams.
+
+{{/if}}
diff --git a/ui-v2/app/templates/dc/services/index.hbs b/ui-v2/app/templates/dc/services/index.hbs
index aee20a971833..7306ea10f314 100644
--- a/ui-v2/app/templates/dc/services/index.hbs
+++ b/ui-v2/app/templates/dc/services/index.hbs
@@ -35,18 +35,10 @@
- {{#if (and (lt item.ChecksPassing 1) (lt item.ChecksWarning 1) (lt item.ChecksCritical 1) )}}
- 0
- {{else}}
-
- Healthchecks Passing
- {{format-number item.ChecksPassing}}
- Healthchecks Warning
- {{format-number item.ChecksWarning}}
- Healthchecks Critical
- {{format-number item.ChecksCritical}}
-
- {{/if}}
+ {{healthcheck-info
+ passing=item.ChecksPassing warning=item.ChecksWarning critical=item.ChecksCritical
+ passingWidth=passingWidth warningWidth=warningWidth criticalWidth=criticalWidth
+ }}
{{#if (gt item.Tags.length 0)}}
diff --git a/ui-v2/app/templates/dc/services/instance.hbs b/ui-v2/app/templates/dc/services/instance.hbs
new file mode 100644
index 000000000000..063855210426
--- /dev/null
+++ b/ui-v2/app/templates/dc/services/instance.hbs
@@ -0,0 +1,72 @@
+{{#app-view class="instance show"}}
+ {{#block-slot 'breadcrumbs'}}
+
+ All Services
+ Service ({{item.Service}})
+ Instance
+
+ {{/block-slot}}
+ {{#block-slot 'header'}}
+
+ {{ item.ID }}
+{{#with (service/external-source item) as |externalSource| }}
+ {{#with (css-var (concat '--' externalSource '-color-svg') 'none') as |bg| }}
+ {{#if (not-eq bg 'none') }}
+ Registered via {{externalSource}}
+ {{/if}}
+ {{/with}}
+{{/with}}
+
+
+ Service Name
+ {{item.Service}}
+
+
+ Node Name
+ {{item.Node.Node}}
+
+{{#if proxy}}
+
+ Sidecar Proxy
+ {{proxy.ServiceID}}
+
+{{/if}}
+{{#if (eq item.Kind 'connect-proxy')}}
+
+ Dest. Service Instance
+ {{item.Proxy.DestinationServiceID}}
+
+
+ Local Service Address
+ {{item.Proxy.LocalServiceAddress}}:{{item.Proxy.LocalServicePort}}
+
+{{/if}}
+ {{/block-slot}}
+ {{#block-slot 'content'}}
+ {{tab-nav
+ items=(compact
+ (array
+ 'Service Checks'
+ 'Node Checks'
+(if (eq item.Kind 'connect-proxy') 'Upstreams' '')
+ 'Tags'
+ )
+ )
+ selected=selectedTab
+ }}
+ {{#each
+ (compact
+ (array
+ (hash id=(slugify 'Service Checks') partial='dc/services/servicechecks')
+ (hash id=(slugify 'Node Checks') partial='dc/services/nodechecks')
+(if (eq item.Kind 'connect-proxy') (hash id=(slugify 'Upstreams') partial='dc/services/upstreams') '')
+ (hash id=(slugify 'Tags') partial='dc/services/tags')
+ )
+ ) as |panel|
+ }}
+ {{#tab-section id=panel.id selected=(eq (if selectedTab selectedTab '') panel.id) onchange=(action "change")}}
+ {{partial panel.partial}}
+ {{/tab-section}}
+ {{/each}}
+ {{/block-slot}}
+{{/app-view}}
\ No newline at end of file
diff --git a/ui-v2/app/templates/dc/services/show.hbs b/ui-v2/app/templates/dc/services/show.hbs
index 5a75f0055f9b..bd693d9b854b 100644
--- a/ui-v2/app/templates/dc/services/show.hbs
+++ b/ui-v2/app/templates/dc/services/show.hbs
@@ -15,76 +15,29 @@
{{/with}}
{{/with}}
- {{/block-slot}}
- {{#block-slot 'toolbar'}}
-{{#if (gt items.length 0) }}
- {{catalog-filter searchable=(array searchableHealthy searchableUnhealthy) filters=healthFilters search=s status=filters.status onchange=(action 'filter')}}
-{{/if}}
+
+ {{tab-nav
+ items=(compact
+ (array
+ 'Instances'
+ 'Tags'
+ )
+ )
+ selected=selectedTab
+ }}
{{/block-slot}}
{{#block-slot 'content'}}
-{{#if (gt item.Tags.length 0)}}
-
- Tags
-
- {{#each item.Tags as |item|}}
- {{item}}
- {{/each}}
-
-
-{{/if}}
-{{#if (gt unhealthy.length 0) }}
-
-{{/if}}
-{{#if (gt healthy.length 0) }}
-
-
Healthy Nodes
- {{#changeable-set dispatcher=searchableHealthy}}
- {{#block-slot 'set' as |healthy|}}
- {{#list-collection cellHeight=113 items=healthy as |item index|}}
- {{healthchecked-resource
- href=(href-to 'dc.nodes.show' item.Node.Node)
- data-test-node=item.Node.Node
- name=item.Node.Node
- service=item.Service.ID
- address=(concat (default item.Service.Address item.Node.Address) ':' item.Service.Port)
- checks=item.Checks
- status=item.Checks.[0].Status
- }}
- {{/list-collection}}
- {{/block-slot}}
- {{#block-slot 'empty'}}
-
- There are no healthy nodes for that search.
-
- {{/block-slot}}
- {{/changeable-set}}
-
-{{/if}}
+ {{#each
+ (compact
+ (array
+ (hash id=(slugify 'Instances') partial='dc/services/instances')
+ (hash id=(slugify 'Tags') partial='dc/services/tags')
+ )
+ ) as |panel|
+ }}
+ {{#tab-section id=panel.id selected=(eq (if selectedTab selectedTab '') panel.id) onchange=(action "change")}}
+ {{partial panel.partial}}
+ {{/tab-section}}
+ {{/each}}
{{/block-slot}}
{{/app-view}}
diff --git a/ui-v2/app/utils/computed/purify.js b/ui-v2/app/utils/computed/purify.js
index 3c9eba3410a5..1008ed8c4766 100644
--- a/ui-v2/app/utils/computed/purify.js
+++ b/ui-v2/app/utils/computed/purify.js
@@ -1,4 +1,4 @@
-import { get } from '@ember/object';
+import { get, computed } from '@ember/object';
/**
* Converts a conventional non-pure Ember `computed` function into a pure one
@@ -8,20 +8,18 @@ import { get } from '@ember/object';
* @param {function} filter - Optional string filter function to pre-process the names of computed properties
* @returns {function} - A pure `computed` function
*/
-
-export default function(computed, filter) {
+const _success = function(value) {
+ return value;
+};
+const purify = function(computed, filter = args => args) {
return function() {
let args = [...arguments];
- let success = function(value) {
- return value;
- };
+ let success = _success;
// pop the user function off the end
if (typeof args[args.length - 1] === 'function') {
success = args.pop();
}
- if (typeof filter === 'function') {
- args = filter(args);
- }
+ args = filter(args);
// this is the 'conventional' `computed`
const cb = function(name) {
return success.apply(
@@ -39,4 +37,6 @@ export default function(computed, filter) {
// concat/push the user function back on
return computed(...args.concat([cb]));
};
-}
+};
+export const subscribe = purify(computed);
+export default purify;
diff --git a/ui-v2/tests/acceptance/components/catalog-filter.feature b/ui-v2/tests/acceptance/components/catalog-filter.feature
index ed11e247bd16..3b5dad1177ea 100644
--- a/ui-v2/tests/acceptance/components/catalog-filter.feature
+++ b/ui-v2/tests/acceptance/components/catalog-filter.feature
@@ -123,31 +123,6 @@ Feature: components / catalog-filter
| Model | Page | Url |
| service | node | /dc-1/nodes/node-0 |
-------------------------------------------------
- Scenario: Filtering [Model] in [Page]
- Given 1 datacenter model with the value "dc1"
- And 2 [Model] models from yaml
- ---
- - ID: node-0
- ---
- When I visit the [Page] page for yaml
- ---
- dc: dc1
- service: service-0
- ---
- Then I fill in with yaml
- ---
- s: service-0-with-id
- ---
- And I see 1 [Model] model
- Then I see id on the unhealthy like yaml
- ---
- - service-0-with-id
- ---
- Where:
- -------------------------------------------------
- | Model | Page | Url |
- | nodes | service | /dc-1/services/service-0 |
- -------------------------------------------------
Scenario:
Given 1 datacenter model with the value "dc-1"
And 3 service models from yaml
diff --git a/ui-v2/tests/acceptance/dc/services/show.feature b/ui-v2/tests/acceptance/dc/services/show.feature
index 5fa48f0defa0..0c707f31b986 100644
--- a/ui-v2/tests/acceptance/dc/services/show.feature
+++ b/ui-v2/tests/acceptance/dc/services/show.feature
@@ -52,7 +52,7 @@ Feature: dc / services / show: Show Service
Then I see the text "Tag1" in "[data-test-tags] span:nth-child(1)"
Then I see the text "Tag2" in "[data-test-tags] span:nth-child(2)"
Then I see the text "Tag3" in "[data-test-tags] span:nth-child(3)"
- Scenario: Given various services the various ports on their nodes are displayed
+ Scenario: Given various services the various nodes on their instances are displayed
Given 1 datacenter model with the value "dc1"
And 3 node models
And 1 service model from yaml
@@ -83,21 +83,9 @@ Feature: dc / services / show: Show Service
dc: dc1
service: service-0
---
- Then I see address on the healthy like yaml
+ Then I see address on the instances like yaml
---
- "1.1.1.1:8080"
- ---
- Then I see address on the unhealthy like yaml
- ---
- "2.2.2.2:8000"
- "3.3.3.3:8888"
---
- Then I see id on the healthy like yaml
- ---
- - "passing-service-8080"
- ---
- Then I see id on the unhealthy like yaml
- ---
- - "service-8000"
- - "service-8888"
- ---
diff --git a/ui-v2/tests/integration/components/healthcheck-info-test.js b/ui-v2/tests/integration/components/healthcheck-info-test.js
new file mode 100644
index 000000000000..613a65065779
--- /dev/null
+++ b/ui-v2/tests/integration/components/healthcheck-info-test.js
@@ -0,0 +1,22 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('healthcheck-info', 'Integration | Component | healthcheck info', {
+ integration: true,
+});
+
+test('it renders', function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{healthcheck-info}}`);
+
+ assert.equal(this.$('dl').length, 1);
+
+ // Template block usage:
+ this.render(hbs`
+ {{#healthcheck-info}}
+ {{/healthcheck-info}}
+ `);
+ assert.equal(this.$('dl').length, 1);
+});
diff --git a/ui-v2/tests/integration/components/healthcheck-list-test.js b/ui-v2/tests/integration/components/healthcheck-list-test.js
new file mode 100644
index 000000000000..a85c4866de8f
--- /dev/null
+++ b/ui-v2/tests/integration/components/healthcheck-list-test.js
@@ -0,0 +1,23 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('healthcheck-list', 'Integration | Component | healthcheck list', {
+ integration: true,
+});
+
+test('it renders', function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{healthcheck-list}}`);
+
+ assert.equal(this.$('ul').length, 1);
+
+ // Template block usage:
+ this.render(hbs`
+ {{#healthcheck-list}}
+ {{/healthcheck-list}}
+ `);
+
+ assert.equal(this.$('ul').length, 1);
+});
diff --git a/ui-v2/tests/integration/components/healthcheck-output-test.js b/ui-v2/tests/integration/components/healthcheck-output-test.js
new file mode 100644
index 000000000000..b72e7412f9be
--- /dev/null
+++ b/ui-v2/tests/integration/components/healthcheck-output-test.js
@@ -0,0 +1,34 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('healthcheck-output', 'Integration | Component | healthcheck output', {
+ integration: true,
+});
+
+test('it renders', function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{healthcheck-output}}`);
+
+ assert.notEqual(
+ this.$()
+ .text()
+ .trim()
+ .indexOf('Output'),
+ -1
+ );
+
+ // Template block usage:
+ this.render(hbs`
+ {{#healthcheck-output}}{{/healthcheck-output}}
+ `);
+
+ assert.notEqual(
+ this.$()
+ .text()
+ .trim()
+ .indexOf('Output'),
+ -1
+ );
+});
diff --git a/ui-v2/tests/integration/components/healthcheck-status-test.js b/ui-v2/tests/integration/components/healthcheck-status-test.js
index b19207e5a4cf..f4e9bd78ff22 100644
--- a/ui-v2/tests/integration/components/healthcheck-status-test.js
+++ b/ui-v2/tests/integration/components/healthcheck-status-test.js
@@ -10,25 +10,11 @@ test('it renders', function(assert) {
// Handle any actions with this.on('myAction', function(val) { ... });
this.render(hbs`{{healthcheck-status}}`);
-
- assert.notEqual(
- this.$()
- .text()
- .trim()
- .indexOf('Output'),
- -1
- );
+ assert.equal(this.$('dt').length, 1);
// Template block usage:
this.render(hbs`
{{#healthcheck-status}}{{/healthcheck-status}}
`);
-
- assert.notEqual(
- this.$()
- .text()
- .trim()
- .indexOf('Output'),
- -1
- );
+ assert.equal(this.$('dt').length, 1);
});
diff --git a/ui-v2/tests/integration/components/tag-list-test.js b/ui-v2/tests/integration/components/tag-list-test.js
new file mode 100644
index 000000000000..6924c8562cd3
--- /dev/null
+++ b/ui-v2/tests/integration/components/tag-list-test.js
@@ -0,0 +1,33 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('tag-list', 'Integration | Component | tag list', {
+ integration: true,
+});
+
+test('it renders', function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });
+
+ this.render(hbs`{{tag-list}}`);
+
+ assert.equal(
+ this.$()
+ .text()
+ .trim(),
+ ''
+ );
+
+ // Template block usage:
+ this.render(hbs`
+ {{#tag-list}}
+ {{/tag-list}}
+ `);
+
+ assert.equal(
+ this.$()
+ .text()
+ .trim(),
+ ''
+ );
+});
diff --git a/ui-v2/tests/pages/dc/services/show.js b/ui-v2/tests/pages/dc/services/show.js
index f50c60c834dd..5b5fb2e3813b 100644
--- a/ui-v2/tests/pages/dc/services/show.js
+++ b/ui-v2/tests/pages/dc/services/show.js
@@ -2,18 +2,8 @@ export default function(visitable, attribute, collection, text, filter) {
return {
visit: visitable('/:dc/services/:service'),
externalSource: attribute('data-test-external-source', 'h1 span'),
- nodes: collection('[data-test-node]', {
- name: attribute('data-test-node'),
- }),
- healthy: collection('[data-test-healthy] [data-test-node]', {
- name: attribute('data-test-node'),
- address: text('header strong'),
- id: text('header em'),
- }),
- unhealthy: collection('[data-test-unhealthy] [data-test-node]', {
- name: attribute('data-test-node'),
- address: text('header strong'),
- id: text('header em'),
+ instances: collection('#instances [data-test-tabular-row]', {
+ address: text('[data-test-address]'),
}),
filter: filter,
};
diff --git a/ui-v2/tests/unit/adapters/proxy-test.js b/ui-v2/tests/unit/adapters/proxy-test.js
new file mode 100644
index 000000000000..13859457edeb
--- /dev/null
+++ b/ui-v2/tests/unit/adapters/proxy-test.js
@@ -0,0 +1,12 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+
+module('Unit | Adapter | proxy', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let adapter = this.owner.lookup('adapter:proxy');
+ assert.ok(adapter);
+ });
+});
diff --git a/ui-v2/tests/unit/controllers/dc/services/instance-test.js b/ui-v2/tests/unit/controllers/dc/services/instance-test.js
new file mode 100644
index 000000000000..2b0693934f04
--- /dev/null
+++ b/ui-v2/tests/unit/controllers/dc/services/instance-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:dc/services/instance', 'Unit | Controller | dc/services/instance', {
+ // Specify the other units that are required for this test.
+ // needs: ['controller:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+ let controller = this.subject();
+ assert.ok(controller);
+});
diff --git a/ui-v2/tests/unit/models/proxy-test.js b/ui-v2/tests/unit/models/proxy-test.js
new file mode 100644
index 000000000000..b37e80f56d29
--- /dev/null
+++ b/ui-v2/tests/unit/models/proxy-test.js
@@ -0,0 +1,14 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { run } from '@ember/runloop';
+
+module('Unit | Model | proxy', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let model = run(() => store.createRecord('proxy', {}));
+ assert.ok(model);
+ });
+});
diff --git a/ui-v2/tests/unit/routes/dc/services/instance-test.js b/ui-v2/tests/unit/routes/dc/services/instance-test.js
new file mode 100644
index 000000000000..122dc9ee163e
--- /dev/null
+++ b/ui-v2/tests/unit/routes/dc/services/instance-test.js
@@ -0,0 +1,11 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:dc/services/instance', 'Unit | Route | dc/services/instance', {
+ // Specify the other units that are required for this test.
+ needs: ['service:repository/service', 'service:repository/proxy'],
+});
+
+test('it exists', function(assert) {
+ let route = this.subject();
+ assert.ok(route);
+});
diff --git a/ui-v2/tests/unit/serializers/proxy-test.js b/ui-v2/tests/unit/serializers/proxy-test.js
new file mode 100644
index 000000000000..44090cfe02d1
--- /dev/null
+++ b/ui-v2/tests/unit/serializers/proxy-test.js
@@ -0,0 +1,24 @@
+import { module, test } from 'qunit';
+import { setupTest } from 'ember-qunit';
+import { run } from '@ember/runloop';
+
+module('Unit | Serializer | proxy', function(hooks) {
+ setupTest(hooks);
+
+ // Replace this with your real tests.
+ test('it exists', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let serializer = store.serializerFor('proxy');
+
+ assert.ok(serializer);
+ });
+
+ test('it serializes records', function(assert) {
+ let store = this.owner.lookup('service:store');
+ let record = run(() => store.createRecord('proxy', {}));
+
+ let serializedRecord = record.serialize();
+
+ assert.ok(serializedRecord);
+ });
+});