mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
UI implementation of downloadable standard out
This commit is contained in:
parent
c231601b76
commit
071b699ca8
@ -2030,3 +2030,25 @@ tr td button i {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
@ -98,7 +98,9 @@ export default
|
||||
$('#logview-tabs li:eq(1)').show();
|
||||
AddPreFormattedText({
|
||||
id: 'stdout-form-container',
|
||||
val: data.result_stdout
|
||||
val: data.result_stdout,
|
||||
standardOut: true,
|
||||
jobUrl: data.url
|
||||
});
|
||||
}
|
||||
|
||||
@ -360,8 +362,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"><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,8 @@
|
||||
<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"><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/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"><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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user