changing jobDetail to jobResults throughout the app

This commit is contained in:
jaredevantabor 2017-02-28 13:44:40 -08:00
parent daa3746ef7
commit dc5716f0ea
23 changed files with 92 additions and 92 deletions

View File

@ -347,19 +347,19 @@ var tower = angular.module('Tower', [
$rootScope.$on("$stateChangeStart", function (event, next) {
// Remove any lingering intervals
// except on jobDetails.* states
var jobDetailStates = [
'jobDetail',
'jobDetail.host-summary',
'jobDetail.host-event.details',
'jobDetail.host-event.json',
'jobDetail.host-events',
'jobDetail.host-event.stdout'
// except on jobResults.* states
var jobResultStates = [
'jobResult',
'jobResult.host-summary',
'jobResult.host-event.details',
'jobResult.host-event.json',
'jobResult.host-events',
'jobResult.host-event.stdout'
];
if ($rootScope.jobDetailInterval && !_.includes(jobDetailStates, next.name) ) {
window.clearInterval($rootScope.jobDetailInterval);
if ($rootScope.jobResultInterval && !_.includes(jobResultStates, next.name) ) {
window.clearInterval($rootScope.jobResultInterval);
}
if ($rootScope.jobStdOutInterval && !_.includes(jobDetailStates, next.name) ) {
if ($rootScope.jobStdOutInterval && !_.includes(jobResultStates, next.name) ) {
window.clearInterval($rootScope.jobStdOutInterval);
}

View File

@ -9,7 +9,7 @@
</a>
<span class="HostEvent-title">{{event.host_name}}</span>
<!-- close -->
<button ui-sref="jobDetail" type="button" class="close">
<button ui-sref="jobResult" type="button" class="close">
<i class="fa fa-times-circle"></i>
</button>
</div>
@ -40,19 +40,19 @@
<div class="HostEvent-nav">
<!-- view navigation buttons -->
<button ui-sref="jobDetail.host-event.json" type="button"
<button ui-sref="jobResult.host-event.json" type="button"
class="btn btn-sm btn-default HostEvent-tab"
ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.json')}">
ng-class="{'HostEvent-tab--selected' : isActiveState('jobResult.host-event.json')}">
JSON
</button>
<button ng-if="stdout" ui-sref="jobDetail.host-event.stdout"
<button ng-if="stdout" ui-sref="jobResult.host-event.stdout"
type="button" class="btn btn-sm btn-default HostEvent-tab"
ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.stdout')}">
ng-class="{'HostEvent-tab--selected' : isActiveState('jobResult.host-event.stdout')}">
Standard Out
</button>
<button ng-if="stderr" ui-sref="jobDetail.host-event.stderr"
<button ng-if="stderr" ui-sref="jobResult.host-event.stderr"
type="button" class="btn btn-sm btn-default HostEvent-tab"
ng-class="{'HostEvent-tab--selected' : isActiveState('jobDetail.host-event.stderr')}">
ng-class="{'HostEvent-tab--selected' : isActiveState('jobResult.host-event.stderr')}">
Standard Error
</button>
@ -64,7 +64,7 @@
<!-- controls -->
<div class="HostEvent-controls">
<button ui-sref="jobDetail" class="btn btn-sm btn-default HostEvent-close">Close</button>
<button ui-sref="jobResult" class="btn btn-sm btn-default HostEvent-close">Close</button>
</div>
</div>
</div>

View File

@ -56,7 +56,7 @@
}
// instantiate Codemirror
// try/catch pattern prevents the abstract-state controller from complaining about element being null
if ($state.current.name === 'jobDetail.host-event.json'){
if ($state.current.name === 'jobResult.host-event.json'){
try{
initCodeMirror('HostEvent-codemirror', JSON.stringify($scope.json, null, 4), {name: "javascript", json: true});
}
@ -64,7 +64,7 @@
// element with id HostEvent-codemirror is not the view controlled by this instance of HostEventController
}
}
else if ($state.current.name === 'jobDetail.host-event.stdout'){
else if ($state.current.name === 'jobResult.host-event.stdout'){
try{
initCodeMirror('HostEvent-codemirror', $scope.stdout, 'shell');
}
@ -72,7 +72,7 @@
// element with id HostEvent-codemirror is not the view controlled by this instance of HostEventController
}
}
else if ($state.current.name === 'jobDetail.host-event.stderr'){
else if ($state.current.name === 'jobResult.host-event.stderr'){
try{
initCodeMirror('HostEvent-codemirror', $scope.stderr, 'shell');
}

View File

@ -7,7 +7,7 @@
import { templateUrl } from '../../shared/template-url/template-url.factory';
var hostEventModal = {
name: 'jobDetail.host-event',
name: 'jobResult.host-event',
url: '/host-event/:eventId',
controller: 'HostEventController',
templateUrl: templateUrl('job-results/host-event/host-event-modal'),
@ -31,21 +31,21 @@ var hostEventModal = {
};
var hostEventJson = {
name: 'jobDetail.host-event.json',
name: 'jobResult.host-event.json',
url: '/json',
controller: 'HostEventController',
templateUrl: templateUrl('job-results/host-event/host-event-codemirror')
};
var hostEventStdout = {
name: 'jobDetail.host-event.stdout',
name: 'jobResult.host-event.stdout',
url: '/stdout',
controller: 'HostEventController',
templateUrl: templateUrl('job-results/host-event/host-event-stdout')
};
var hostEventStderr = {
name: 'jobDetail.host-event.stderr',
name: 'jobResult.host-event.stderr',
url: '/stderr',
controller: 'HostEventController',
templateUrl: templateUrl('job-results/host-event/host-event-stderr')

View File

@ -108,7 +108,7 @@
ng-show="!previousTaskFailed">
{{job.job_explanation}}
</div>
<div class="JobDetail-resultRowText "
<div class="jobResult-resultRowText "
ng-show="previousTaskFailed">Previous Task Failed
<a
href=""

View File

@ -13,7 +13,7 @@ const defaultParams = {
};
export default {
name: 'jobDetail',
name: 'jobResult',
url: '/jobs/{id: int}',
searchPrefix: 'job_event',
ncyBreadcrumb: {

View File

@ -199,33 +199,33 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
processEventStatus: function(event){
if (event.event === 'runner_on_unreachable'){
return {
class: 'HostEvents-status--unreachable',
class: 'HostEvent-status--unreachable',
status: 'unreachable'
};
}
// equiv to 'runner_on_error' && 'runner on failed'
if (event.failed){
return {
class: 'HostEvents-status--failed',
class: 'HostEvent-status--failed',
status: 'failed'
};
}
// catch the changed case before ok, because both can be true
if (event.changed){
return {
class: 'HostEvents-status--changed',
class: 'HostEvent-status--changed',
status: 'changed'
};
}
if (event.event === 'runner_on_ok' || event.event === 'runner_on_async_ok'){
return {
class: 'HostEvents-status--ok',
class: 'HostEvent-status--ok',
status: 'ok'
};
}
if (event.event === 'runner_on_skipped'){
return {
class: 'HostEvents-status--skipped',
class: 'HostEvent-status--skipped',
status: 'skipped'
};
}

View File

@ -77,7 +77,7 @@ export default ['$log', 'moment', function($log, moment){
return `"`;
}
else{
return ` JobResultsStdOut-stdoutColumn--clickable" ui-sref="jobDetail.host-event.json({eventId: ${event.id}, taskUuid: '${event.event_data.task_uuid}' })" aw-tool-tip="Event ID: ${event.id} <br>Status: ${event.event_display} <br>Click for details" data-placement="top"`;
return ` JobResultsStdOut-stdoutColumn--clickable" ui-sref="jobResult.host-event.json({eventId: ${event.id}, taskUuid: '${event.event_data.task_uuid}' })" aw-tool-tip="Event ID: ${event.id} <br>Status: ${event.event_display} <br>Click for details" data-placement="top"`;
}
},

View File

@ -124,12 +124,12 @@ export default
if($rootScope.portalMode===false && Empty(data.system_job) || (base === 'home')){
// use $state.go with reload: true option to re-instantiate sockets in
var goToJobDetails = function(state) {
var goTojobResults = function(state) {
$state.go(state, {id: job}, {reload:true});
};
if(_.has(data, 'job')) {
goToJobDetails('jobDetail');
goTojobResults('jobResult');
} else if(base === 'jobs'){
if(scope.clearDialog) {
scope.clearDialog();
@ -137,20 +137,20 @@ export default
return;
} else if(data.type && data.type === 'workflow_job') {
job = data.id;
goToJobDetails('workflowResults');
goTojobResults('workflowResults');
}
else if(_.has(data, 'ad_hoc_command')) {
goToJobDetails('adHocJobStdout');
goTojobResults('adHocJobStdout');
}
else if(_.has(data, 'system_job')) {
goToJobDetails('managementJobStdout');
goTojobResults('managementJobStdout');
}
else if(_.has(data, 'project_update')) {
// If we are on the projects list or any child state of that list
// then we want to stay on that page. Otherwise go to the stdout
// view.
if(!$state.includes('projects')) {
goToJobDetails('scmUpdateStdout');
goTojobResults('scmUpdateStdout');
}
}
else if(_.has(data, 'inventory_update')) {
@ -158,7 +158,7 @@ export default
// page then we want to stay on that page. Otherwise go to the stdout
// view.
if(!$state.includes('inventoryManage')) {
goToJobDetails('inventorySyncStdout');
goTojobResults('inventorySyncStdout');
}
}
}

View File

@ -136,7 +136,7 @@ export default
// As of 3.0, the only place the user can relaunch a
// playbook is on jobTemplates.edit (completed_jobs tab),
// jobs, and jobDetails $states.
// jobs, and jobResults $states.
if (!$scope.submitJobRelaunch) {
if($scope.submitJobType && $scope.submitJobType === 'job_template') {
@ -236,18 +236,18 @@ export default
// Go out and get some of the job details like inv, cred, name
Rest.setUrl(GetBasePath('jobs') + $scope.submitJobId);
Rest.get()
.success(function (jobDetailData) {
.success(function (jobResultData) {
$scope.job_template_data = {
name: jobDetailData.name
name: jobResultData.name
};
$scope.defaults = {};
if(jobDetailData.summary_fields.inventory) {
$scope.defaults.inventory = angular.copy(jobDetailData.summary_fields.inventory);
$scope.selected_inventory = angular.copy(jobDetailData.summary_fields.inventory);
if(jobResultData.summary_fields.inventory) {
$scope.defaults.inventory = angular.copy(jobResultData.summary_fields.inventory);
$scope.selected_inventory = angular.copy(jobResultData.summary_fields.inventory);
}
if(jobDetailData.summary_fields.credential) {
$scope.defaults.credential = angular.copy(jobDetailData.summary_fields.credential);
$scope.selected_credential = angular.copy(jobDetailData.summary_fields.credential);
if(jobResultData.summary_fields.credential) {
$scope.defaults.credential = angular.copy(jobResultData.summary_fields.credential);
$scope.selected_credential = angular.copy(jobResultData.summary_fields.credential);
updateRequiredPasswords();
}
initiateModal();

View File

@ -112,29 +112,29 @@
RelaunchJob({ scope: $scope, id: typeId, type: job.type, name: job.name });
};
$scope.viewJobDetails = function(job) {
$scope.viewjobResults = function(job) {
var goToJobDetails = function(state) {
var goTojobResults = function(state) {
$state.go(state, { id: job.id }, { reload: true });
};
switch (job.type) {
case 'job':
goToJobDetails('jobDetail');
goTojobResults('jobResult');
break;
case 'ad_hoc_command':
goToJobDetails('adHocJobStdout');
goTojobResults('adHocJobStdout');
break;
case 'system_job':
goToJobDetails('managementJobStdout');
goTojobResults('managementJobStdout');
break;
case 'project_update':
goToJobDetails('scmUpdateStdout');
goTojobResults('scmUpdateStdout');
break;
case 'inventory_update':
goToJobDetails('inventorySyncStdout');
goTojobResults('inventorySyncStdout');
break;
case 'workflow_job':
goToJobDetails('workflowResults');
goTojobResults('workflowResults');
break;
}

View File

@ -30,12 +30,12 @@ export default
dataTitle: "{{ job.status_popover_title }}",
icon: 'icon-job-{{ job.status }}',
iconOnly: true,
ngClick:"viewJobDetails(job)",
ngClick:"viewjobResults(job)",
nosort: true
},
id: {
label: 'ID',
ngClick:"viewJobDetails(job)",
ngClick:"viewjobResults(job)",
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent',
awToolTip: "{{ job.status_tip }}",
dataPlacement: 'top',
@ -44,7 +44,7 @@ export default
name: {
label: i18n._('Name'),
columnClass: 'col-lg-2 col-md-3 col-sm-4 col-xs-6',
ngClick: "viewJobDetails(job)",
ngClick: "viewjobResults(job)",
badgePlacement: 'right',
badgeCustom: true,
badgeIcon: `<a href="{{ job.workflow_result_link }}"
@ -90,7 +90,7 @@ export default
columnClass: 'col-lg-2 col-md-2 col-sm-3 col-xs-4',
"view": {
mode: "all",
ngClick: "viewJobDetails(job)",
ngClick: "viewjobResults(job)",
awToolTip: i18n._("View the job"),
dataPlacement: "top"
},

View File

@ -30,11 +30,11 @@ export default
dataTitle: "{{ completed_job.status_popover_title }}",
icon: 'icon-job-{{ completed_job.status }}',
iconOnly: true,
ngClick:"viewJobDetails(completed_job)",
ngClick:"viewjobResults(completed_job)",
},
id: {
label: 'ID',
ngClick:"viewJobDetails(completed_job)",
ngClick:"viewjobResults(completed_job)",
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent',
awToolTip: "{{ completed_job.status_tip }}",
dataPlacement: 'top'
@ -42,7 +42,7 @@ export default
name: {
label: i18n._('Name'),
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-6',
ngClick: "viewJobDetails(completed_job)",
ngClick: "viewjobResults(completed_job)",
awToolTip: "{{ completed_job.name | sanitize }}",
dataPlacement: 'top'
},

View File

@ -20,7 +20,7 @@ export default
fields: {
id: {
label: 'ID',
ngClick:"viewJobDetails(job)",
ngClick:"viewjobResults(job)",
key: true,
desc: true,
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2',
@ -35,7 +35,7 @@ export default
dataTitle: "{{ job.status_popover_title }}",
icon: 'icon-job-{{ job.status }}',
iconOnly: true,
ngClick:"viewJobDetails(job)"
ngClick:"viewjobResults(job)"
},
started: {
label: 'Started',
@ -52,7 +52,7 @@ export default
name: {
label: 'Name',
columnClass: 'col-md-3 col-xs-5',
ngClick: "viewJobDetails(job)",
ngClick: "viewjobResults(job)",
}
},

View File

@ -177,10 +177,10 @@ export default ['$scope', '$rootScope', '$location', '$log',
$state.go('projects.edit', { project_id: id });
};
if ($scope.removeGoToJobDetails) {
$scope.removeGoToJobDetails();
if ($scope.removeGoTojobResults) {
$scope.removeGoTojobResults();
}
$scope.removeGoToJobDetails = $scope.$on('GoToJobDetails', function(e, data) {
$scope.removeGoTojobResults = $scope.$on('GoTojobResults', function(e, data) {
if (data.summary_fields.current_update || data.summary_fields.last_update) {
Wait('start');
@ -207,7 +207,7 @@ export default ['$scope', '$rootScope', '$location', '$log',
Rest.setUrl(project.url);
Rest.get()
.success(function(data) {
$scope.$emit('GoToJobDetails', data);
$scope.$emit('GoTojobResults', data);
})
.error(function(data, status) {
ProcessErrors($scope, data, status, null, {

View File

@ -132,10 +132,10 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
$state.go('projects.edit', { project_id: id });
};
if ($scope.removeGoToJobDetails) {
$scope.removeGoToJobDetails();
if ($scope.removeGoTojobResults) {
$scope.removeGoTojobResults();
}
$scope.removeGoToJobDetails = $scope.$on('GoToJobDetails', function(e, data) {
$scope.removeGoTojobResults = $scope.$on('GoTojobResults', function(e, data) {
if (data.summary_fields.current_update || data.summary_fields.last_update) {
Wait('start');
@ -162,7 +162,7 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
Rest.setUrl(project.url);
Rest.get()
.success(function(data) {
$scope.$emit('GoToJobDetails', data);
$scope.$emit('GoTojobResults', data);
})
.error(function(data, status) {
ProcessErrors($scope, data, status, null, { hdr: i18n._('Error!'),

View File

@ -8,9 +8,9 @@
RESULTS
</div>
<div class="StandardOut-actions">
<button id="relaunch-job-button" class="List-actionButton JobDetail-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="Relaunch using the same parameters" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
<button id="relaunch-job-button" class="List-actionButton jobResult-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="Relaunch using the same parameters" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
</div>
</div>
<div class="StandardOut-details">

View File

@ -8,9 +8,9 @@
RESULTS
</div>
<div class="StandardOut-actions">
<button id="relaunch-job-button" class="List-actionButton JobDetail-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="Relaunch using the same parameters" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
<button id="relaunch-job-button" class="List-actionButton jobResult-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="Relaunch using the same parameters" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
</div>
</div>
<div class="StandardOut-details">

View File

@ -20,7 +20,7 @@ export default ['$log', '$rootScope', '$scope', '$state', '$stateParams', 'Proce
// Open up a socket for events depending on the type of job
function openSockets() {
if ($state.current.name === 'jobDetail') {
if ($state.current.name === 'jobResult') {
$log.debug("socket watching on job_events-" + job_id);
$scope.$on(`ws-job_events-${job_id}`, function() {
$log.debug("socket fired on job_events-" + job_id);

View File

@ -8,8 +8,8 @@
RESULTS
</div>
<div class="StandardOut-actions">
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="Cancel" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="Delete" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
</div>
</div>
<div class="StandardOut-details">

View File

@ -8,9 +8,9 @@
RESULTS
</div>
<div class="StandardOut-actions">
<button id="relaunch-job-button" class="List-actionButton JobDetail-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="{{'Relaunch using the same parameters'|translate}}" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="{{'Cancel'|translate}}" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete JobDetail-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="{{'Delete'|translate}}" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
<button id="relaunch-job-button" class="List-actionButton jobResult-launchButton" data-placement="top" mode="all" ng-click="relaunchJob()" aw-tool-tip="{{'Relaunch using the same parameters'|translate}}" data-original-title="" title=""><i class="icon-launch"></i> </button>
<button id="cancel-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-show="job.status === 'waiting' || job.status === 'running' || job.status === 'pending'" aw-tool-tip="{{'Cancel'|translate}}" data-original-title="" title=""><i class="fa fa-minus-circle"></i> </button>
<button id="delete-job-button" class="List-actionButton List-actionButton--delete jobResult-launchButton" data-placement="top" ng-click="deleteJob()" ng-hide="job.status === 'waiting' || job.status === 'running' || job.status === 'pending' " aw-tool-tip="{{'Delete'|translate}}" data-original-title="" title=""><i class="fa fa-trash-o"></i> </button>
</div>
</div>
<div class="StandardOut-details">

View File

@ -33,14 +33,14 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
if (data.status === 'failed' || data.status === 'canceled' || data.status === 'error' || data.status === 'successful') {
// Go out and refresh the job details
getJobDetails();
getjobResults();
}
});
// Set the parse type so that CodeMirror knows how to display extra params YAML/JSON
$scope.parseType = 'yaml';
function getJobDetails() {
function getjobResults() {
// Go out and get the job details based on the job type. jobType gets defined
// in the data block of the route declaration for each of the different types
@ -260,7 +260,7 @@ export function JobStdoutController ($rootScope, $scope, $state, $stateParams,
RelaunchJob({ scope: $scope, id: typeId, type: job.type, name: job.name });
};
getJobDetails();
getjobResults();
}

View File

@ -830,7 +830,7 @@ export default [ '$state','moment', '$timeout', '$window',
this.on("click", function(d) {
if(d.job.id && d.unifiedJobTemplate) {
if(d.unifiedJobTemplate.unified_job_type === 'job') {
$state.go('jobDetail', {id: d.job.id});
$state.go('jobResult', {id: d.job.id});
}
else if(d.unifiedJobTemplate.unified_job_type === 'inventory_update') {
$state.go('inventorySyncStdout', {id: d.job.id});