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) { $rootScope.$on("$stateChangeStart", function (event, next) {
// Remove any lingering intervals // Remove any lingering intervals
// except on jobDetails.* states // except on jobResults.* states
var jobDetailStates = [ var jobResultStates = [
'jobDetail', 'jobResult',
'jobDetail.host-summary', 'jobResult.host-summary',
'jobDetail.host-event.details', 'jobResult.host-event.details',
'jobDetail.host-event.json', 'jobResult.host-event.json',
'jobDetail.host-events', 'jobResult.host-events',
'jobDetail.host-event.stdout' 'jobResult.host-event.stdout'
]; ];
if ($rootScope.jobDetailInterval && !_.includes(jobDetailStates, next.name) ) { if ($rootScope.jobResultInterval && !_.includes(jobResultStates, next.name) ) {
window.clearInterval($rootScope.jobDetailInterval); window.clearInterval($rootScope.jobResultInterval);
} }
if ($rootScope.jobStdOutInterval && !_.includes(jobDetailStates, next.name) ) { if ($rootScope.jobStdOutInterval && !_.includes(jobResultStates, next.name) ) {
window.clearInterval($rootScope.jobStdOutInterval); window.clearInterval($rootScope.jobStdOutInterval);
} }

View File

@@ -9,7 +9,7 @@
</a> </a>
<span class="HostEvent-title">{{event.host_name}}</span> <span class="HostEvent-title">{{event.host_name}}</span>
<!-- close --> <!-- close -->
<button ui-sref="jobDetail" type="button" class="close"> <button ui-sref="jobResult" type="button" class="close">
<i class="fa fa-times-circle"></i> <i class="fa fa-times-circle"></i>
</button> </button>
</div> </div>
@@ -40,19 +40,19 @@
<div class="HostEvent-nav"> <div class="HostEvent-nav">
<!-- view navigation buttons --> <!-- 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" 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 JSON
</button> </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" 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 Standard Out
</button> </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" 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 Standard Error
</button> </button>
@@ -64,7 +64,7 @@
<!-- controls --> <!-- controls -->
<div class="HostEvent-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> </div>
</div> </div>

View File

@@ -56,7 +56,7 @@
} }
// instantiate Codemirror // instantiate Codemirror
// try/catch pattern prevents the abstract-state controller from complaining about element being null // 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{ try{
initCodeMirror('HostEvent-codemirror', JSON.stringify($scope.json, null, 4), {name: "javascript", json: true}); 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 // 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{ try{
initCodeMirror('HostEvent-codemirror', $scope.stdout, 'shell'); 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 // 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{ try{
initCodeMirror('HostEvent-codemirror', $scope.stderr, 'shell'); initCodeMirror('HostEvent-codemirror', $scope.stderr, 'shell');
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -77,7 +77,7 @@ export default ['$log', 'moment', function($log, moment){
return `"`; return `"`;
} }
else{ 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')){ if($rootScope.portalMode===false && Empty(data.system_job) || (base === 'home')){
// use $state.go with reload: true option to re-instantiate sockets in // 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}); $state.go(state, {id: job}, {reload:true});
}; };
if(_.has(data, 'job')) { if(_.has(data, 'job')) {
goToJobDetails('jobDetail'); goTojobResults('jobResult');
} else if(base === 'jobs'){ } else if(base === 'jobs'){
if(scope.clearDialog) { if(scope.clearDialog) {
scope.clearDialog(); scope.clearDialog();
@@ -137,20 +137,20 @@ export default
return; return;
} else if(data.type && data.type === 'workflow_job') { } else if(data.type && data.type === 'workflow_job') {
job = data.id; job = data.id;
goToJobDetails('workflowResults'); goTojobResults('workflowResults');
} }
else if(_.has(data, 'ad_hoc_command')) { else if(_.has(data, 'ad_hoc_command')) {
goToJobDetails('adHocJobStdout'); goTojobResults('adHocJobStdout');
} }
else if(_.has(data, 'system_job')) { else if(_.has(data, 'system_job')) {
goToJobDetails('managementJobStdout'); goTojobResults('managementJobStdout');
} }
else if(_.has(data, 'project_update')) { else if(_.has(data, 'project_update')) {
// If we are on the projects list or any child state of that list // 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 // then we want to stay on that page. Otherwise go to the stdout
// view. // view.
if(!$state.includes('projects')) { if(!$state.includes('projects')) {
goToJobDetails('scmUpdateStdout'); goTojobResults('scmUpdateStdout');
} }
} }
else if(_.has(data, 'inventory_update')) { 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 // page then we want to stay on that page. Otherwise go to the stdout
// view. // view.
if(!$state.includes('inventoryManage')) { 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 // As of 3.0, the only place the user can relaunch a
// playbook is on jobTemplates.edit (completed_jobs tab), // playbook is on jobTemplates.edit (completed_jobs tab),
// jobs, and jobDetails $states. // jobs, and jobResults $states.
if (!$scope.submitJobRelaunch) { if (!$scope.submitJobRelaunch) {
if($scope.submitJobType && $scope.submitJobType === 'job_template') { 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 // Go out and get some of the job details like inv, cred, name
Rest.setUrl(GetBasePath('jobs') + $scope.submitJobId); Rest.setUrl(GetBasePath('jobs') + $scope.submitJobId);
Rest.get() Rest.get()
.success(function (jobDetailData) { .success(function (jobResultData) {
$scope.job_template_data = { $scope.job_template_data = {
name: jobDetailData.name name: jobResultData.name
}; };
$scope.defaults = {}; $scope.defaults = {};
if(jobDetailData.summary_fields.inventory) { if(jobResultData.summary_fields.inventory) {
$scope.defaults.inventory = angular.copy(jobDetailData.summary_fields.inventory); $scope.defaults.inventory = angular.copy(jobResultData.summary_fields.inventory);
$scope.selected_inventory = angular.copy(jobDetailData.summary_fields.inventory); $scope.selected_inventory = angular.copy(jobResultData.summary_fields.inventory);
} }
if(jobDetailData.summary_fields.credential) { if(jobResultData.summary_fields.credential) {
$scope.defaults.credential = angular.copy(jobDetailData.summary_fields.credential); $scope.defaults.credential = angular.copy(jobResultData.summary_fields.credential);
$scope.selected_credential = angular.copy(jobDetailData.summary_fields.credential); $scope.selected_credential = angular.copy(jobResultData.summary_fields.credential);
updateRequiredPasswords(); updateRequiredPasswords();
} }
initiateModal(); initiateModal();

View File

@@ -112,29 +112,29 @@
RelaunchJob({ scope: $scope, id: typeId, type: job.type, name: job.name }); 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 }); $state.go(state, { id: job.id }, { reload: true });
}; };
switch (job.type) { switch (job.type) {
case 'job': case 'job':
goToJobDetails('jobDetail'); goTojobResults('jobResult');
break; break;
case 'ad_hoc_command': case 'ad_hoc_command':
goToJobDetails('adHocJobStdout'); goTojobResults('adHocJobStdout');
break; break;
case 'system_job': case 'system_job':
goToJobDetails('managementJobStdout'); goTojobResults('managementJobStdout');
break; break;
case 'project_update': case 'project_update':
goToJobDetails('scmUpdateStdout'); goTojobResults('scmUpdateStdout');
break; break;
case 'inventory_update': case 'inventory_update':
goToJobDetails('inventorySyncStdout'); goTojobResults('inventorySyncStdout');
break; break;
case 'workflow_job': case 'workflow_job':
goToJobDetails('workflowResults'); goTojobResults('workflowResults');
break; break;
} }

View File

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

View File

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

View File

@@ -20,7 +20,7 @@ export default
fields: { fields: {
id: { id: {
label: 'ID', label: 'ID',
ngClick:"viewJobDetails(job)", ngClick:"viewjobResults(job)",
key: true, key: true,
desc: true, desc: true,
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2', columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2',
@@ -35,7 +35,7 @@ export default
dataTitle: "{{ job.status_popover_title }}", dataTitle: "{{ job.status_popover_title }}",
icon: 'icon-job-{{ job.status }}', icon: 'icon-job-{{ job.status }}',
iconOnly: true, iconOnly: true,
ngClick:"viewJobDetails(job)" ngClick:"viewjobResults(job)"
}, },
started: { started: {
label: 'Started', label: 'Started',
@@ -52,7 +52,7 @@ export default
name: { name: {
label: 'Name', label: 'Name',
columnClass: 'col-md-3 col-xs-5', 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 }); $state.go('projects.edit', { project_id: id });
}; };
if ($scope.removeGoToJobDetails) { if ($scope.removeGoTojobResults) {
$scope.removeGoToJobDetails(); $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) { if (data.summary_fields.current_update || data.summary_fields.last_update) {
Wait('start'); Wait('start');
@@ -207,7 +207,7 @@ export default ['$scope', '$rootScope', '$location', '$log',
Rest.setUrl(project.url); Rest.setUrl(project.url);
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
$scope.$emit('GoToJobDetails', data); $scope.$emit('GoTojobResults', data);
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, null, { 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 }); $state.go('projects.edit', { project_id: id });
}; };
if ($scope.removeGoToJobDetails) { if ($scope.removeGoTojobResults) {
$scope.removeGoToJobDetails(); $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) { if (data.summary_fields.current_update || data.summary_fields.last_update) {
Wait('start'); Wait('start');
@@ -162,7 +162,7 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
Rest.setUrl(project.url); Rest.setUrl(project.url);
Rest.get() Rest.get()
.success(function(data) { .success(function(data) {
$scope.$emit('GoToJobDetails', data); $scope.$emit('GoTojobResults', data);
}) })
.error(function(data, status) { .error(function(data, status) {
ProcessErrors($scope, data, status, null, { hdr: i18n._('Error!'), ProcessErrors($scope, data, status, null, { hdr: i18n._('Error!'),

View File

@@ -8,9 +8,9 @@
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <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="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 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="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 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="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> </div>
<div class="StandardOut-details"> <div class="StandardOut-details">

View File

@@ -8,9 +8,9 @@
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <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="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 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="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 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="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> </div>
<div class="StandardOut-details"> <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 // Open up a socket for events depending on the type of job
function openSockets() { function openSockets() {
if ($state.current.name === 'jobDetail') { if ($state.current.name === 'jobResult') {
$log.debug("socket watching on job_events-" + job_id); $log.debug("socket watching on job_events-" + job_id);
$scope.$on(`ws-job_events-${job_id}`, function() { $scope.$on(`ws-job_events-${job_id}`, function() {
$log.debug("socket fired on job_events-" + job_id); $log.debug("socket fired on job_events-" + job_id);

View File

@@ -8,8 +8,8 @@
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <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="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 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="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> </div>
<div class="StandardOut-details"> <div class="StandardOut-details">

View File

@@ -8,9 +8,9 @@
RESULTS RESULTS
</div> </div>
<div class="StandardOut-actions"> <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="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 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="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 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="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> </div>
<div class="StandardOut-details"> <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') { if (data.status === 'failed' || data.status === 'canceled' || data.status === 'error' || data.status === 'successful') {
// Go out and refresh the job details // Go out and refresh the job details
getJobDetails(); getjobResults();
} }
}); });
// Set the parse type so that CodeMirror knows how to display extra params YAML/JSON // Set the parse type so that CodeMirror knows how to display extra params YAML/JSON
$scope.parseType = 'yaml'; $scope.parseType = 'yaml';
function getJobDetails() { function getjobResults() {
// Go out and get the job details based on the job type. jobType gets defined // 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 // 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 }); 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) { this.on("click", function(d) {
if(d.job.id && d.unifiedJobTemplate) { if(d.job.id && d.unifiedJobTemplate) {
if(d.unifiedJobTemplate.unified_job_type === 'job') { 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') { else if(d.unifiedJobTemplate.unified_job_type === 'inventory_update') {
$state.go('inventorySyncStdout', {id: d.job.id}); $state.go('inventorySyncStdout', {id: d.job.id});