diff --git a/ui/app/templates/allocations/allocation/task/fs.hbs b/ui/app/templates/allocations/allocation/task/fs.hbs index 41ea6bae5..45a6b437e 100644 --- a/ui/app/templates/allocations/allocation/task/fs.hbs +++ b/ui/app/templates/allocations/allocation/task/fs.hbs @@ -11,12 +11,12 @@
{{fs-breadcrumbs task=task path=path}}
- {{#list-table - source=sortedDirectoryEntries - sortProperty=sortProperty - sortDescending=sortDescending - class="boxed-section-body is-full-bleed is-compact" as |t|}} - {{#if directoryEntries}} + {{#if directoryEntries}} + {{#list-table + source=sortedDirectoryEntries + sortProperty=sortProperty + sortDescending=sortDescending + class="boxed-section-body is-full-bleed is-compact" as |t|}} {{#t.head}} {{#t.sort-by prop="Name" class="is-two-thirds"}}Name{{/t.sort-by}} {{#t.sort-by prop="Size" class="has-text-right"}}File Size{{/t.sort-by}} @@ -25,17 +25,17 @@ {{#t.body as |row|}} {{fs-directory-entry path=path task=task entry=row.model}} {{/t.body}} - {{else}} - - - - {{x-icon "alert-circle-outline"}} - Directory is empty - - - - {{/if}} - {{/list-table}} + {{/list-table}} + {{else}} +
+
+

No Files

+

+ Directory is currently empty. +

+
+
+ {{/if}} {{/if}} {{else}} @@ -46,4 +46,4 @@

{{/if}} - \ No newline at end of file + diff --git a/ui/tests/acceptance/task-fs-test.js b/ui/tests/acceptance/task-fs-test.js index 671b8027b..0a098ba1e 100644 --- a/ui/tests/acceptance/task-fs-test.js +++ b/ui/tests/acceptance/task-fs-test.js @@ -344,8 +344,7 @@ module('Acceptance | task fs', function(hooks) { test('viewing an empty directory', async function(assert) { await FS.visitPath({ id: allocation.id, name: task.name, path: '/empty-directory' }); - assert.equal(FS.directoryEntries.length, 1); - assert.ok(FS.directoryEntries[0].isEmpty); + assert.ok(FS.isEmptyDirectory); }); test('viewing paths that produce stat API errors', async function(assert) { diff --git a/ui/tests/pages/allocations/task/fs.js b/ui/tests/pages/allocations/task/fs.js index be147b301..e6b6155b8 100644 --- a/ui/tests/pages/allocations/task/fs.js +++ b/ui/tests/pages/allocations/task/fs.js @@ -42,7 +42,6 @@ export default create({ isFile: isPresent('.icon-is-file-outline'), isDirectory: isPresent('.icon-is-folder-outline'), - isEmpty: isPresent('.icon-is-alert-circle-outline'), size: text('[data-test-size]'), lastModified: text('[data-test-last-modified]'), @@ -51,6 +50,8 @@ export default create({ path: attribute('href', 'a'), }), + isEmptyDirectory: isPresent('[data-test-empty-directory]'), + directoryEntryNames() { return this.directoryEntries.toArray().mapBy('name'); },