diff --git a/awx/ui/static/js/helpers/LogViewer.js b/awx/ui/static/js/helpers/LogViewer.js index 41aee6384d..c04c49df93 100644 --- a/awx/ui/static/js/helpers/LogViewer.js +++ b/awx/ui/static/js/helpers/LogViewer.js @@ -3,12 +3,12 @@ * * All Rights Reserved *************************************************/ - - /** - * @ngdoc function - * @name helpers.function:LogViewer - * @description logviewer -*/ + + /** + * @ngdoc function + * @name helpers.function:LogViewer + * @description logviewer + */ export default angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator', 'VariablesHelper']) @@ -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/static/js/shared/download-standard.out.block.less b/awx/ui/static/js/shared/download-standard.out.block.less new file mode 100644 index 0000000000..984fe1b2e3 --- /dev/null +++ b/awx/ui/static/js/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; +} diff --git a/awx/ui/static/partials/job_stdout.html b/awx/ui/static/partials/job_stdout.html index 27fe31db5e..1a4148d2cf 100644 --- a/awx/ui/static/partials/job_stdout.html +++ b/awx/ui/static/partials/job_stdout.html @@ -20,8 +20,10 @@
-
-

Standard Output

+
+

Standard Output + + Download

diff --git a/awx/ui/static/partials/job_stdout_adhoc.html b/awx/ui/static/partials/job_stdout_adhoc.html index 8d520c278b..a48b8d4df1 100644 --- a/awx/ui/static/partials/job_stdout_adhoc.html +++ b/awx/ui/static/partials/job_stdout_adhoc.html @@ -158,8 +158,10 @@
-
-

Standard Output

+
+

Standard Output + Download +