\ No newline at end of file
+
+{{/let}}
\ No newline at end of file
diff --git a/ui-v2/app/templates/dc/nodes/show/sessions.hbs b/ui-v2/app/templates/dc/nodes/show/sessions.hbs
index 8b3a50d43..6a39b5e6e 100644
--- a/ui-v2/app/templates/dc/nodes/show/sessions.hbs
+++ b/ui-v2/app/templates/dc/nodes/show/sessions.hbs
@@ -39,14 +39,14 @@
-
+
{{message}}
-
+
diff --git a/ui-v2/app/templates/dc/services/instance.hbs b/ui-v2/app/templates/dc/services/instance.hbs
index cfe57a7ec..b3d2672cb 100644
--- a/ui-v2/app/templates/dc/services/instance.hbs
+++ b/ui-v2/app/templates/dc/services/instance.hbs
@@ -1,6 +1,7 @@
{{title item.ID}}
+
{{partial 'dc/services/notifications'}}
diff --git a/ui-v2/app/templates/dc/services/show.hbs b/ui-v2/app/templates/dc/services/show.hbs
index 737c32dbb..0519602f6 100644
--- a/ui-v2/app/templates/dc/services/show.hbs
+++ b/ui-v2/app/templates/dc/services/show.hbs
@@ -2,6 +2,8 @@
+
+
{{partial 'dc/services/notifications'}}
diff --git a/ui-v2/app/utils/dom/event-source/callable.js b/ui-v2/app/utils/dom/event-source/callable.js
index 86b1433cf..f8b232586 100644
--- a/ui-v2/app/utils/dom/event-source/callable.js
+++ b/ui-v2/app/utils/dom/event-source/callable.js
@@ -57,6 +57,7 @@ export default function(
// close after the dispatch so we can tell if it was an error whilst closed or not
// but make sure its before the promise tick
this.readyState = 2; // CLOSE
+ this.dispatchEvent({ type: 'close' });
})
.then(() => {
// This only gets called when the promise chain completely finishes
diff --git a/ui-v2/tests/integration/adapters/coordinate-test.js b/ui-v2/tests/integration/adapters/coordinate-test.js
index c9a7e6c81..6989ae9c2 100644
--- a/ui-v2/tests/integration/adapters/coordinate-test.js
+++ b/ui-v2/tests/integration/adapters/coordinate-test.js
@@ -7,10 +7,10 @@ module('Integration | Adapter | coordinate', function(hooks) {
const adapter = this.owner.lookup('adapter:coordinate');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/coordinate/nodes?dc=${dc}`;
- const actual = adapter.requestForQuery(client.url, {
+ const actual = adapter.requestForQuery(client.requestParams.bind(client), {
dc: dc,
});
- assert.equal(actual, expected);
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test('requestForQuery returns the correct body', function(assert) {
const adapter = this.owner.lookup('adapter:coordinate');
diff --git a/ui-v2/tests/integration/adapters/discovery-chain-test.js b/ui-v2/tests/integration/adapters/discovery-chain-test.js
index 3ded7b1f2..3faac8c4f 100644
--- a/ui-v2/tests/integration/adapters/discovery-chain-test.js
+++ b/ui-v2/tests/integration/adapters/discovery-chain-test.js
@@ -11,11 +11,11 @@ module('Integration | Adapter | discovery-chain', function(hooks) {
const adapter = this.owner.lookup('adapter:discovery-chain');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/discovery-chain/${id}?dc=${dc}`;
- const actual = adapter.requestForQueryRecord(client.url, {
+ const actual = adapter.requestForQueryRecord(client.requestParams.bind(client), {
dc: dc,
id: id,
});
- assert.equal(actual, expected);
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test("requestForQueryRecord throws if you don't specify an id", function(assert) {
const adapter = this.owner.lookup('adapter:discovery-chain');
diff --git a/ui-v2/tests/integration/adapters/intention-test.js b/ui-v2/tests/integration/adapters/intention-test.js
index aa0a05fd8..f6204453f 100644
--- a/ui-v2/tests/integration/adapters/intention-test.js
+++ b/ui-v2/tests/integration/adapters/intention-test.js
@@ -8,10 +8,10 @@ module('Integration | Adapter | intention', function(hooks) {
const adapter = this.owner.lookup('adapter:intention');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/connect/intentions?dc=${dc}`;
- const actual = adapter.requestForQuery(client.url, {
+ const actual = adapter.requestForQuery(client.requestParams.bind(client), {
dc: dc,
});
- assert.equal(actual, expected);
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test('requestForQueryRecord returns the correct url', function(assert) {
const adapter = this.owner.lookup('adapter:intention');
diff --git a/ui-v2/tests/integration/adapters/node-test.js b/ui-v2/tests/integration/adapters/node-test.js
index 5eb3b0cdc..3efca49ad 100644
--- a/ui-v2/tests/integration/adapters/node-test.js
+++ b/ui-v2/tests/integration/adapters/node-test.js
@@ -8,20 +8,20 @@ module('Integration | Adapter | node', function(hooks) {
const adapter = this.owner.lookup('adapter:node');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/internal/ui/nodes?dc=${dc}`;
- const actual = adapter.requestForQuery(client.url, {
+ const actual = adapter.requestForQuery(client.requestParams.bind(client), {
dc: dc,
});
- assert.equal(actual, expected);
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test('requestForQueryRecord returns the correct url', function(assert) {
const adapter = this.owner.lookup('adapter:node');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/internal/ui/node/${id}?dc=${dc}`;
- const actual = adapter.requestForQueryRecord(client.url, {
+ const actual = adapter.requestForQueryRecord(client.requestParams.bind(client), {
dc: dc,
id: id,
});
- assert.equal(actual, expected);
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test("requestForQueryRecord throws if you don't specify an id", function(assert) {
const adapter = this.owner.lookup('adapter:node');
diff --git a/ui-v2/tests/integration/adapters/nspace-test.js b/ui-v2/tests/integration/adapters/nspace-test.js
index b0333ec8a..ecfde700a 100644
--- a/ui-v2/tests/integration/adapters/nspace-test.js
+++ b/ui-v2/tests/integration/adapters/nspace-test.js
@@ -9,8 +9,8 @@ module('Integration | Adapter | nspace', function(hooks) {
const adapter = this.owner.lookup('adapter:nspace');
const client = this.owner.lookup('service:client/http');
const expected = `GET /v1/namespaces`;
- const actual = adapter.requestForQuery(client.url, {});
- assert.equal(actual, expected);
+ const actual = adapter.requestForQuery(client.requestParams.bind(client), {});
+ assert.equal(`${actual.method} ${actual.url}`, expected);
});
test('requestForQueryRecord returns the correct url/method', function(assert) {
const adapter = this.owner.lookup('adapter:nspace');
diff --git a/ui-v2/tests/unit/controllers/dc/nodes/show-test.js b/ui-v2/tests/unit/services/encoder-test.js
similarity index 54%
rename from ui-v2/tests/unit/controllers/dc/nodes/show-test.js
rename to ui-v2/tests/unit/services/encoder-test.js
index be580fc41..9ba371371 100644
--- a/ui-v2/tests/unit/controllers/dc/nodes/show-test.js
+++ b/ui-v2/tests/unit/services/encoder-test.js
@@ -1,12 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
-module('Unit | Controller | dc/nodes/show', function(hooks) {
+module('Unit | Service | encoder', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
- let controller = this.owner.lookup('controller:dc/nodes/show');
- assert.ok(controller);
+ let service = this.owner.lookup('service:encoder');
+ assert.ok(service);
});
});