AC-1118 added job_explanation to log viewer. Also, fixed issue where once 'standard out' or 'traceback' tabs were hidden, they would never reappear.

This commit is contained in:
Chris Houseknecht
2014-04-01 19:15:38 -04:00
parent 4d6ce4b5fa
commit fb5b069273
4 changed files with 22 additions and 16 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
awx/settings/local_settings.py* awx/settings/local_settings.py*
awx/*.sqlite3 awx/*.sqlite3
awx/job_status
awx/projects awx/projects
awx/job_output awx/job_output
awx/public/media awx/public/media

View File

@@ -18,6 +18,16 @@ angular.module('LogViewerStatusDefinition', [])
type: "text", type: "text",
readonly: true, readonly: true,
}, },
"status": {
label: "Status",
type: "text",
readonly: true
},
"license_error": {
label: "License Error",
type: "text",
readonly: true
},
"started": { "started": {
label: "Started", label: "Started",
type: "text", type: "text",
@@ -37,16 +47,6 @@ angular.module('LogViewerStatusDefinition', [])
label: "Launch Type", label: "Launch Type",
type: "text", type: "text",
readonly: true readonly: true
},
"status": {
label: "Status",
type: "text",
readonly: true
},
"license_error": {
label: "License Error",
type: "text",
readonly: true
} }
} }

View File

@@ -73,7 +73,6 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
scope.viewJobLog = function(id, url) { scope.viewJobLog = function(id, url) {
var list, job; var list, job;
if (url) { if (url) {
console.log(url);
$location.url(url); $location.url(url);
} }
else { else {

View File

@@ -41,6 +41,7 @@ angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator',
AddTable({ scope: scope, form: LogViewerOptionsForm, id: 'options-form-container', getIcon: getIcon }); AddTable({ scope: scope, form: LogViewerOptionsForm, id: 'options-form-container', getIcon: getIcon });
if (data.result_stdout) { if (data.result_stdout) {
$('#logview-tabs li:eq(1)').show();
AddPreFormattedText({ AddPreFormattedText({
id: 'stdout-form-container', id: 'stdout-form-container',
val: data.result_stdout val: data.result_stdout
@@ -51,6 +52,7 @@ angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator',
} }
if (data.result_traceback) { if (data.result_traceback) {
$('#logview-tabs li:eq(2)').show();
AddPreFormattedText({ AddPreFormattedText({
id: 'traceback-form-container', id: 'traceback-form-container',
val: data.result_traceback val: data.result_traceback
@@ -236,12 +238,16 @@ angular.module('LogViewerHelper', ['ModalDialog', 'Utilities', 'FormGenerator',
else if (fld === 'elapsed') { else if (fld === 'elapsed') {
html += scope[fld] + " <span class=\"small-text\">seconds</span>"; html += scope[fld] + " <span class=\"small-text\">seconds</span>";
} }
else if (getIcon && fld === 'status') {
html += "<i class=\"fa icon-job-" + getIcon(scope[fld]) + "\"></i> " + scope[fld];
//html += "<i class=\"fa " + status_icon + scope[fld] + "\"></i> " + scope[fld];
}
else if (fld === 'status') { else if (fld === 'status') {
html += "<i class=\"fa icon-job-" + scope[fld] + "\"></i> " + scope[fld]; if (getIcon) {
html += "<i class=\"fa icon-job-" + getIcon(scope[fld]) + "\"></i> " + scope[fld];
}
else {
html += "<i class=\"fa icon-job-" + scope[fld] + "\"></i> " + scope[fld];
}
if (scope.job_explanation) {
html += "<p style=\"padding-top: 12px\">" + scope.job_explanation + "</p>";
}
} }
else { else {
html += scope[fld]; html += scope[fld];