Skip to content

Commit

Permalink
Make the no connection error on the logs page dismissable
Browse files Browse the repository at this point in the history
  • Loading branch information
DingoEatingFuzz committed Apr 28, 2020
1 parent 185891f commit 30a12a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ui/app/templates/components/task-log.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{{#if noConnection}}
<div data-test-connection-error class="notification is-error">
<h3 class="title is-4">Cannot fetch logs</h3>
<p>The logs for this task are inaccessible. Check the condition of the node the allocation is on.</p>
<div class="columns">
<div class="column">
<h3 class="title is-4">Cannot fetch logs</h3>
<p>The logs for this task are inaccessible. Check the condition of the node the allocation is on.</p>
</div>
<div class="column is-centered is-minimum">
<button data-test-connection-error-dismiss class="button is-danger" onclick={{action (mut noConnection) false}}>Okay</button>
</div>
</div>
</div>
{{/if}}
<div class="boxed-section-head">
Expand Down
4 changes: 4 additions & 0 deletions ui/tests/integration/task-log-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ module('Integration | Component | task log', function(hooks) {
'Log request was later made to the server'
);
assert.ok(find('[data-test-connection-error]'), 'An error message is shown');

await click('[data-test-connection-error-dismiss]');
// await settled();
assert.notOk(find('[data-test-connection-error]'), 'The error message is dismissable');
});

test('When the client is inaccessible, the server is accessible, and stderr is pressed before the client timeout occurs, the no connection error is not shown', async function(assert) {
Expand Down

0 comments on commit 30a12a9

Please sign in to comment.