mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 05:17:36 -02:30
Wired stdout page into Jobs tab page. Replaced View drop-down with icons for view details and stdout.
This commit is contained in:
@@ -214,7 +214,7 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
|
|
||||||
// In the case that the job is already completed, or an error already happened,
|
// In the case that the job is already completed, or an error already happened,
|
||||||
// populate scope.job_status info
|
// populate scope.job_status info
|
||||||
scope.job_status.status = data.status;
|
scope.job_status.status = (data.status === 'waiting' || data.status === 'new') ? 'pending' : data.status;
|
||||||
scope.job_status.started = data.started;
|
scope.job_status.started = data.started;
|
||||||
scope.job_status.status_class = ((data.status === 'error' || data.status === 'failed') && data.job_explanation) ? "alert alert-danger" : "";
|
scope.job_status.status_class = ((data.status === 'error' || data.status === 'failed') && data.job_explanation) ? "alert alert-danger" : "";
|
||||||
scope.job_status.finished = data.finished;
|
scope.job_status.finished = data.finished;
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ angular.module('CompletedJobsDefinition', [])
|
|||||||
label: 'Job ID',
|
label: 'Job ID',
|
||||||
ngClick:"viewJobLog(completed_job.id)",
|
ngClick:"viewJobLog(completed_job.id)",
|
||||||
searchType: 'int',
|
searchType: 'int',
|
||||||
columnClass: 'col-md-1 col-sm-2 col-xs-2'
|
columnClass: 'col-md-1 col-sm-2 col-xs-2',
|
||||||
|
awToolTip: "{{ completed_job.status_tip }}",
|
||||||
|
dataPlacement: 'top'
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
@@ -94,7 +96,19 @@ angular.module('CompletedJobsDefinition', [])
|
|||||||
awToolTip: 'Delete the job',
|
awToolTip: 'Delete the job',
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top'
|
||||||
},
|
},
|
||||||
dropdown: {
|
job_details: {
|
||||||
|
mode: 'all',
|
||||||
|
href: '/#/jobs/{{ completed_job.id }}',
|
||||||
|
awToolTip: 'View job details',
|
||||||
|
dataPlacement: 'top'
|
||||||
|
},
|
||||||
|
stdout: {
|
||||||
|
mode: 'all',
|
||||||
|
href: '/#/jobs/{{ completed_job.id }}/stdout',
|
||||||
|
awToolTip: 'View standard output. Opens in a new window or tab.',
|
||||||
|
dataPlacement: 'top'
|
||||||
|
}
|
||||||
|
/*dropdown: {
|
||||||
type: 'DropDown',
|
type: 'DropDown',
|
||||||
ngShow: "completed_job.type === 'job'",
|
ngShow: "completed_job.type === 'job'",
|
||||||
label: 'View',
|
label: 'View',
|
||||||
@@ -105,6 +119,6 @@ angular.module('CompletedJobsDefinition', [])
|
|||||||
{ ngHref: '/#/job_events/{{ completed_job.id }}', label: 'Events', ngHide: "completed_job.status == 'new'" },
|
{ ngHref: '/#/job_events/{{ completed_job.id }}', label: 'Events', ngHide: "completed_job.status == 'new'" },
|
||||||
{ ngHref: '/#/job_host_summaries/{{ completed_job.id }}', label: 'Host Summary' }
|
{ ngHref: '/#/job_host_summaries/{{ completed_job.id }}', label: 'Host Summary' }
|
||||||
]
|
]
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ angular.module('QueuedJobsDefinition', [])
|
|||||||
key: true,
|
key: true,
|
||||||
desc: true,
|
desc: true,
|
||||||
searchType: 'int',
|
searchType: 'int',
|
||||||
columnClass: 'col-md-1 col-sm-2 col-xs-2'
|
columnClass: 'col-md-1 col-sm-2 col-xs-2',
|
||||||
|
awToolTip: "{{ queued_job.status_tip }}",
|
||||||
|
awTipPlacement: "top",
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
@@ -78,6 +80,12 @@ angular.module('QueuedJobsDefinition', [])
|
|||||||
ngClick: 'deleteJob(queued_job.id)',
|
ngClick: 'deleteJob(queued_job.id)',
|
||||||
awToolTip: 'Delete the job',
|
awToolTip: 'Delete the job',
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top'
|
||||||
|
},
|
||||||
|
job_details: {
|
||||||
|
mode: 'all',
|
||||||
|
href: '/#/jobs/{{ queued_job.id }}',
|
||||||
|
awToolTip: 'View job details',
|
||||||
|
dataPlacement: 'top'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ angular.module('RunningJobsDefinition', [])
|
|||||||
key: true,
|
key: true,
|
||||||
desc: true,
|
desc: true,
|
||||||
searchType: 'int',
|
searchType: 'int',
|
||||||
columnClass: 'col-md-1 col-sm-2 col-xs-2'
|
columnClass: 'col-md-1 col-sm-2 col-xs-2',
|
||||||
|
awToolTip: "{{ running_job.status_tip }}",
|
||||||
|
awTipPlacement: "top",
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
@@ -79,7 +81,19 @@ angular.module('RunningJobsDefinition', [])
|
|||||||
awToolTip: 'Cancel the job',
|
awToolTip: 'Cancel the job',
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top'
|
||||||
},
|
},
|
||||||
dropdown: {
|
job_details: {
|
||||||
|
mode: 'all',
|
||||||
|
href: '/#/jobs/{{ running_job.id }}',
|
||||||
|
awToolTip: 'View job details',
|
||||||
|
dataPlacement: 'top'
|
||||||
|
},
|
||||||
|
stdout: {
|
||||||
|
mode: 'all',
|
||||||
|
href: '/#/jobs/{{ running_job.id }}/stdout',
|
||||||
|
awToolTip: 'View standard output. Opens in a new window or tab.',
|
||||||
|
dataPlacement: 'top'
|
||||||
|
}
|
||||||
|
/*dropdown: {
|
||||||
type: 'DropDown',
|
type: 'DropDown',
|
||||||
ngShow: "running_job.type === 'job'",
|
ngShow: "running_job.type === 'job'",
|
||||||
label: 'View',
|
label: 'View',
|
||||||
@@ -90,6 +104,6 @@ angular.module('RunningJobsDefinition', [])
|
|||||||
{ ngHref: '/#/job_events/{{ running_job.id }}', label: 'Events' },
|
{ ngHref: '/#/job_events/{{ running_job.id }}', label: 'Events' },
|
||||||
{ ngHref: '/#/job_host_summaries/{{ running_job.id }}', label: 'Host Summary' }
|
{ ngHref: '/#/job_host_summaries/{{ running_job.id }}', label: 'Host Summary' }
|
||||||
]
|
]
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -633,6 +633,7 @@ legend {
|
|||||||
|
|
||||||
.pagination > li > a {
|
.pagination > li > a {
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
|
|||||||
@@ -20,9 +20,15 @@
|
|||||||
thead >tr >th, .page-row {
|
thead >tr >th, .page-row {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
}
|
||||||
|
.pagination li {
|
||||||
|
|
||||||
}
|
}
|
||||||
.pagination li a {
|
.pagination li a {
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
|
padding-left: 3px;
|
||||||
|
padding-right: 3px;
|
||||||
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
i[class*="icon-job-"] {
|
i[class*="icon-job-"] {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@@ -144,6 +144,12 @@ angular.module('GeneratorHelpers', [])
|
|||||||
case 'schedule':
|
case 'schedule':
|
||||||
icon = "fa-calendar";
|
icon = "fa-calendar";
|
||||||
break;
|
break;
|
||||||
|
case 'stdout':
|
||||||
|
icon = "fa-external-link";
|
||||||
|
break;
|
||||||
|
case 'job_details':
|
||||||
|
icon = 'fa-list-ul';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
icon += (size) ? " " + size : "";
|
icon += (size) ? " " + size : "";
|
||||||
return Icon(icon);
|
return Icon(icon);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<div class="col-lg-2 col-md-2 col-sm-4 col-xs-4 status-column"><i class="fa icon-job-{{ job_status.status }}"></i> {{ job_status.status }}</div>
|
<div class="col-lg-2 col-md-2 col-sm-4 col-xs-4 status-column"><i class="fa icon-job-{{ job_status.status }}"></i> {{ job_status.status }}</div>
|
||||||
<div class="col-lg-7 col-md-7 col-sm-4 col-xs-4">{{ job_status.explanation }}</div>
|
<div class="col-lg-7 col-md-7 col-sm-4 col-xs-4">{{ job_status.explanation }}</div>
|
||||||
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 text-right">
|
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 text-right">
|
||||||
<a href="/#/jobs/{{ job_id }}/stdout" target="_blank" type="button" class="btn btn-default btn-xs" aw-tool-tip="View standard out. Opens in new tab or window." data-placement="top"><i class="fa fa-external-link"></i></a>
|
<a href="/#/jobs/{{ job_id }}/stdout" target="_blank" type="button" class="btn btn-default btn-xs" aw-tool-tip="View standard out. Opens in new tab or window." data-placement="top" ng-show="job_status == 'successful' || job_status == 'failed' || job_status == 'error'"><i class="fa fa-external-link"></i></a>
|
||||||
<button type="button" id="summary-button" class="btn btn-default btn-xs" ng-click="toggleSummary()" aw-tool-tip="View summary" data-placement="top"><i class="fa fa-arrow-circle-left fa-lg"></i></button>
|
<button type="button" id="summary-button" class="btn btn-default btn-xs" ng-click="toggleSummary()" aw-tool-tip="View summary" data-placement="top"><i class="fa fa-arrow-circle-left fa-lg"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user