From 55349dcceee341a3aeaa4530a097659bd49b028b Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 25 Jul 2019 10:53:45 -0700 Subject: [PATCH] Add unsupported file type state --- ui/app/components/task-file.js | 1 + ui/app/templates/components/task-file.hbs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/app/components/task-file.js b/ui/app/components/task-file.js index a73551598..d8ca0b05f 100644 --- a/ui/app/components/task-file.js +++ b/ui/app/components/task-file.js @@ -43,6 +43,7 @@ export default Component.extend({ return this.stat.Size > 50000; }), + fileTypeIsUnknown: equal('fileComponent', 'unknown'), isStreamable: equal('fileComponent', 'stream'), isStreaming: false, diff --git a/ui/app/templates/components/task-file.hbs b/ui/app/templates/components/task-file.hbs index be8621bfc..dbe4d0ddc 100644 --- a/ui/app/templates/components/task-file.hbs +++ b/ui/app/templates/components/task-file.hbs @@ -7,7 +7,10 @@
{{yield}} - View Raw File + + {{#if (not fileTypeIsUnknown)}} + View Raw File + {{/if}} {{#if (and isLarge isStreamable)}} @@ -25,6 +28,12 @@ {{else if (eq fileComponent "image")}} {{image-file src=catUrl alt=stat.Name size=stat.Size}} {{else}} -

No component

+
+

Unsupported File Type

+

The Nomad UI could not render this file, but you can still call view the file directly.

+

+ View Raw File +

+
{{/if}}