mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 10:10:01 -03:30
UI implementation of downloadable standard out
This commit is contained in:
@@ -2030,3 +2030,25 @@ tr td button i {
|
|||||||
margin-bottom: 15px;
|
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();
|
$('#logview-tabs li:eq(1)').show();
|
||||||
AddPreFormattedText({
|
AddPreFormattedText({
|
||||||
id: 'stdout-form-container',
|
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) {
|
return function(params) {
|
||||||
var id = params.id,
|
var id = params.id,
|
||||||
val = params.val,
|
val = params.val,
|
||||||
html;
|
html = "";
|
||||||
html = "<pre ng-non-bindable>" + val + "</pre>\n";
|
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);
|
$('#' + id).empty().html(html);
|
||||||
};
|
};
|
||||||
}])
|
}])
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="panel panel-default job-stdout-panel">
|
<div class="panel panel-default job-stdout-panel">
|
||||||
<div class="panel-heading">
|
<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>
|
||||||
<div class="panel-body stdout-panel-body">
|
<div class="panel-body stdout-panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -159,7 +159,9 @@
|
|||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<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>
|
||||||
<div class="panel-body stdout-panel-body">
|
<div class="panel-body stdout-panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
Reference in New Issue
Block a user