mirror of
https://github.com/ansible/awx.git
synced 2026-01-29 23:34:42 -03:30
Merge pull request #355 from jlmitch5/jlm_727_add_dl_stdout
Jlm 727 add dl stdout
This commit is contained in:
commit
8c9059b1dc
@ -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 = "<pre ng-non-bindable>" + val + "</pre>\n";
|
||||
html = "";
|
||||
if (params.standardOut) {
|
||||
html += '<a href="' + params.jobUrl + 'stdout?format=txt_download" class="btn btn-primary btn-xs DownloadStandardOut DownloadStandardOut--onModal" id="download-stdout-button" type="button" aw-tool-tip="Download standard out as a .txt file" data-placement="top" ng-show="status === \'cancelled\' || status === \'failed\' || status === \'error\' || status === \'successful\'"><i class="fa fa-download DownloadStandardOut-icon DownloadStandardOut-icon--withText"></i>Download</a>';
|
||||
}
|
||||
html += "<pre ng-non-bindable>" + val + "</pre>\n";
|
||||
$('#' + id).empty().html(html);
|
||||
};
|
||||
}])
|
||||
|
||||
@ -21,7 +21,10 @@
|
||||
<div class="row">
|
||||
<div class="panel panel-default job-stdout-panel">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Standard Output</h3>
|
||||
<h3 class="panel-title">Standard Output
|
||||
<a href="/api/v1/jobs/{{ job.id }}/stdout?format=txt_download" class="btn btn-primary btn-xs DownloadStandardOut DownloadStandardOut--onStandardOutPage" id="download-stdout-button" type="button" aw-tool-tip="Download standard out as a .txt file" data-placement="top" ng-show="job.status === 'cancelled' || job.status === 'failed' || job.status === 'error' || job.status === 'successful'">
|
||||
<i class="fa fa-download DownloadStandardOut-icon DownloadStandardOut-icon--withText"></i>Download
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel-body stdout-panel-body">
|
||||
<div class="row">
|
||||
|
||||
@ -159,7 +159,9 @@
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Standard Output</h3>
|
||||
<h3 class="panel-title">Standard Output
|
||||
<a href="/api/v1/ad_hoc_commands/{{ job.id }}/stdout?format=txt_download" class="btn btn-primary btn-xs DownloadStandardOut DownloadStandardOut--onStandardOutPage" id="download-stdout-button" type="button" aw-tool-tip="Download standard out as a .txt file" data-placement="top" ng-show="job.status === 'cancelled' || job.status === 'failed' || job.status === 'error' || job.status === 'successful'"><i class="fa fa-download DownloadStandardOut-icon DownloadStandardOut-icon--withText"></i>Download</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body stdout-panel-body">
|
||||
<div class="row">
|
||||
|
||||
23
awx/ui/client/src/shared/download-standard-out.block.less
Normal file
23
awx/ui/client/src/shared/download-standard-out.block.less
Normal file
@ -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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user