diff --git a/awx/ui/client/src/helpers/LogViewer.js b/awx/ui/client/src/helpers/LogViewer.js index 41aee6384d..e098e782dd 100644 --- a/awx/ui/client/src/helpers/LogViewer.js +++ b/awx/ui/client/src/helpers/LogViewer.js @@ -96,9 +96,12 @@ export default if (data.result_stdout) { $('#logview-tabs li:eq(1)').show(); + var showStandardOut = (data.type !== "system_job") ? true : false; AddPreFormattedText({ id: 'stdout-form-container', - val: data.result_stdout + val: data.result_stdout, + standardOut: showStandardOut, + jobUrl: data.url }); } @@ -360,8 +363,11 @@ export default return function(params) { var id = params.id, val = params.val, - html; - html = "
" + val + "
\n"; + html = ""; + if (params.standardOut) { + html += 'Download'; + } + html += "
" + val + "
\n"; $('#' + id).empty().html(html); }; }]) diff --git a/awx/ui/client/src/partials/job_stdout.html b/awx/ui/client/src/partials/job_stdout.html index 27fe31db5e..8c113d908c 100644 --- a/awx/ui/client/src/partials/job_stdout.html +++ b/awx/ui/client/src/partials/job_stdout.html @@ -21,7 +21,10 @@
-

Standard Output

+

Standard Output + + Download +

diff --git a/awx/ui/client/src/partials/job_stdout_adhoc.html b/awx/ui/client/src/partials/job_stdout_adhoc.html index 8d520c278b..3dcac4097e 100644 --- a/awx/ui/client/src/partials/job_stdout_adhoc.html +++ b/awx/ui/client/src/partials/job_stdout_adhoc.html @@ -159,7 +159,9 @@
-

Standard Output

+

Standard Output + Download +

diff --git a/awx/ui/client/src/shared/download-standard-out.block.less b/awx/ui/client/src/shared/download-standard-out.block.less new file mode 100644 index 0000000000..984fe1b2e3 --- /dev/null +++ b/awx/ui/client/src/shared/download-standard-out.block.less @@ -0,0 +1,23 @@ +/** @define DownloadStandardOut */ + +.DownloadStandardOut { + color: #fff !important; +} + +.DownloadStandardOut--onStandardOutPage { + margin-top: -3px; + margin-right: -9px; + float: right; +} + +.DownloadStandardOut--onModal { + margin-bottom: 10px; +} + +.DownloadStandardOut-icon { + color: #fff; +} + +.DownloadStandardOut-icon--withText { + margin-right: 5px; +}