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}}