add raw txt download

This commit is contained in:
Jake McDermott 2018-03-29 02:05:55 -04:00
parent 181d7e0e01
commit 66dcf01088
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35
4 changed files with 7 additions and 2 deletions

View File

@ -66,6 +66,7 @@ function JobsIndexController (
vm.status = {
stats: statsEvent,
elapsed: resource.model.get('elapsed'),
download: resource.model.get('related.stdout'),
running: Boolean(resource.model.get('started')) && !resource.model.get('finished'),
plays: null,
tasks: null,

View File

@ -14,6 +14,7 @@
<at-panel class="at-Stdout">
<div class="at-Panel-headingTitle">{{ vm.title }}</div>
<at-stats
download="vm.status.download"
elapsed="vm.status.elapsed"
running="vm.status.running"
stats="vm.status.stats"

View File

@ -48,8 +48,9 @@ function AtStatsController (strings) {
};
vm.init = scope => {
const { elapsed, running, stats, plays, tasks } = scope;
const { download, elapsed, running, stats, plays, tasks } = scope;
vm.download = download;
vm.plays = plays;
vm.tasks = tasks;
vm.elapsed = elapsed;
@ -94,6 +95,7 @@ function atStats () {
AtStatsController
],
scope: {
download: '=',
elapsed: '=',
running: '=',
stats: '=',

View File

@ -27,7 +27,8 @@
<i class="fa fa-arrows-alt"></i>
</button>
<a ng-show="true" href="/api/v2/jobs/{{ job.id }}/stdout?format=txt_download">
<a ng-show="vm.download && !vm.running" href="{{ vm.download }}?format=txt_download">
<button class="btn at-Input-button at-u-noBorder"
aw-tool-tip="{{ standardOutTooltip }}"
data-tip-watch="standardOutTooltip"