diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js
index ff9d38e8aa..9846c273a7 100644
--- a/awx/ui/client/src/app.js
+++ b/awx/ui/client/src/app.js
@@ -44,7 +44,8 @@ import templateUrl from './shared/template-url/main';
import adhoc from './adhoc/main';
import login from './login/main';
import activityStream from './activity-stream/main';
-import {JobStdoutController} from './controllers/JobStdout';
+import standardOut from './standard-out/main';
+import {JobDetailController} from './controllers/JobDetail';
import {JobTemplatesList, JobTemplatesAdd, JobTemplatesEdit} from './controllers/JobTemplates';
import {LicenseController} from './controllers/License';
import {ScheduleEditController} from './controllers/Schedules';
@@ -96,6 +97,7 @@ var tower = angular.module('Tower', [
activityStream.name,
footer.name,
jobDetail.name,
+ standardOut.name,
'templates',
'Utilities',
'LicenseHelper',
@@ -294,56 +296,6 @@ var tower = angular.module('Tower', [
}
}).
- state('jobsStdout', {
- url: '/jobs/:id/stdout',
- templateUrl: urlPrefix + 'partials/job_stdout.html',
- controller: JobStdoutController,
- ncyBreadcrumb: {
- parent: 'jobDetail',
- label: "STANDARD OUT"
- },
- resolve: {
- features: ['FeaturesService', function(FeaturesService) {
- return FeaturesService.get();
- }],
- jobEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
- if (!$rootScope.event_socket) {
- $rootScope.event_socket = Socket({
- scope: $rootScope,
- endpoint: "job_events"
- });
- $rootScope.event_socket.init();
- return true;
- } else {
- return true;
- }
- }]
- }
- }).
-
- state('adHocJobStdout', {
- url: '/ad_hoc_commands/:id',
- templateUrl: urlPrefix + 'partials/job_stdout_adhoc.html',
- controller: JobStdoutController,
- resolve: {
- features: ['FeaturesService', function(FeaturesService) {
- return FeaturesService.get();
- }],
- adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
- if (!$rootScope.adhoc_event_socket) {
- $rootScope.adhoc_event_socket = Socket({
- scope: $rootScope,
- endpoint: "ad_hoc_command_events"
- });
- $rootScope.adhoc_event_socket.init();
- return true;
- } else {
- return true;
- }
- }]
- }
- }).
-
state('jobTemplates', {
url: '/job_templates',
templateUrl: urlPrefix + 'partials/job_templates.html',
@@ -1036,6 +988,9 @@ var tower = angular.module('Tower', [
$rootScope.$emit('JobStatusChange-jobs', data);
} else if (/\/jobs\/(\d)+\/stdout/.test(urlToCheck) ||
/\/ad_hoc_commands\/(\d)+/.test(urlToCheck)) {
+
+ // TODO: something will need to change here for stdout
+
$log.debug("sending status to standard out");
$rootScope.$emit('JobStatusChange-jobStdout', data);
} else if (/\/jobs\/(\d)+/.test(urlToCheck)) {
diff --git a/awx/ui/client/src/helpers/Jobs.js b/awx/ui/client/src/helpers/Jobs.js
index 7cab25fa9f..6320259ade 100644
--- a/awx/ui/client/src/helpers/Jobs.js
+++ b/awx/ui/client/src/helpers/Jobs.js
@@ -22,12 +22,11 @@ export default
* Initialize calling scope with all the bits required to support a jobs list
*
*/
- .factory('JobsControllerInit', ['$location', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer', '$window',
- function($location, Find, DeleteJob, RelaunchJob, LogViewer, $window) {
+ .factory('JobsControllerInit', ['$state', 'Find', 'DeleteJob', 'RelaunchJob', 'LogViewer', '$window',
+ function($state, Find, DeleteJob, RelaunchJob, LogViewer, $window) {
return function(params) {
var scope = params.scope,
iterator = (params.iterator) ? params.iterator : scope.iterator;
- //base = $location.path().replace(/^\//, '').split('/')[0];
scope.deleteJob = function(id) {
DeleteJob({ scope: scope, id: id });
@@ -70,53 +69,39 @@ export default
};
scope.refreshJobs = function() {
- // if (base !== 'jobs') {
- scope.search(iterator);
- // }
-
+ scope.search(iterator);
};
- scope.viewJobLog = function(id) {
- var list, job;
- if (scope.completed_jobs) {
- list = scope.completed_jobs;
- }
- else if (scope.running_jobs) {
- list = scope.running_jobs;
- }
- else if (scope.queued_jobs) {
- list = scope.queued_jobs;
- }
- else if (scope.jobs) {
- list = scope.jobs;
- }
- else if(scope.all_jobs){
- list = scope.all_jobs;
- }
- else if(scope.portal_jobs){
- list=scope.portal_jobs;
- }
- job = Find({ list: list, key: 'id', val: id });
- if (job.type === 'job') {
+ scope.viewJobDetails = function(job) {
+
+ var goToJobDetails = function(state) {
if(scope.$parent.portalMode===true){
- $window.open('/#/jobs/' + job.id, '_blank');
+ var url = $state.href(state, {id: job.id});
+ $window.open(url, '_blank');
}
else {
- $location.url('/jobs/' + job.id);
+ $state.go(state, {id: job.id});
}
- } else if (job.type === 'ad_hoc_command') {
- if(scope.$parent.portalMode===true){
- $window.open('/#/ad_hoc_commands/' + job.id, '_blank');
- }
- else {
- $location.url('/ad_hoc_commands/' + job.id);
- }
- } else {
- LogViewer({
- scope: scope,
- url: job.url
- });
}
+
+ switch(job.type) {
+ case 'job':
+ goToJobDetails('jobDetail');
+ break;
+ case 'ad_hoc_command':
+ goToJobDetails('adHocJobStdout');
+ break;
+ case 'system_job':
+ goToJobDetails('managementJobStdout');
+ break;
+ case 'project_update':
+ goToJobDetails('scmUpdateStdout');
+ break;
+ case 'inventory_update':
+ goToJobDetails('inventorySyncStdout');
+ break;
+ }
+
};
};
}
diff --git a/awx/ui/client/src/jobs/standard-out-details.block.less b/awx/ui/client/src/jobs/standard-out-details.block.less
deleted file mode 100644
index 99958e9808..0000000000
--- a/awx/ui/client/src/jobs/standard-out-details.block.less
+++ /dev/null
@@ -1,34 +0,0 @@
-/*************************************************
- * Copyright (c) 2015 Ansible, Inc.
- *
- * All Rights Reserved
- *************************************************/
-
- /** @define StandardOutDetails */
-
-// Some of these are left empty as a helpful measure so that you can see how the new
-// SuitCSS styling should work. They can be removed once we've done more
-// SuitCSS
-
-.StandardOutDetails {
-}
-
-.StandardOutDetails-detailRow {
- margin-bottom: 15px;
-}
-
-.StandardOutDetails-detailRow--closable {
- display: none;
-}
-
-.StandardOutDetails-detailLabel {
-}
-
-.StandardOutDetails-detailContent {
-}
-
-.StandardOutDetails-closedToggle {
-}
-
-.StandardOutDetails-closedToggleLink {
-}
diff --git a/awx/ui/client/src/lists/AllJobs.js b/awx/ui/client/src/lists/AllJobs.js
index 3a99817c99..4cc7a995c6 100644
--- a/awx/ui/client/src/lists/AllJobs.js
+++ b/awx/ui/client/src/lists/AllJobs.js
@@ -25,7 +25,7 @@ export default
dataTitle: "{{ all_job.status_popover_title }}",
icon: 'icon-job-{{ all_job.status }}',
iconOnly: true,
- ngClick:"viewJobLog(all_job.id)",
+ ngClick:"viewJobDetails(all_job)",
searchable: true,
searchType: 'select',
nosort: true,
@@ -38,7 +38,7 @@ export default
},
id: {
label: 'ID',
- ngClick:"viewJobLog(all_job.id)",
+ ngClick:"viewJobDetails(all_job)",
searchType: 'int',
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent',
awToolTip: "{{ all_job.status_tip }}",
@@ -47,7 +47,7 @@ export default
name: {
label: 'Name',
columnClass: 'col-lg-3 col-md-3 col-sm-4 col-xs-6',
- ngClick: "viewJobLog(all_job.id, all_job.nameHref)",
+ ngClick: "viewJobDetails(all_job)",
defaultSearchField: true,
awToolTip: "{{ all_job.name | sanitize }}",
dataPlacement: 'top'
@@ -87,13 +87,6 @@ export default
columnClass: 'col-lg-2 col-md-2 col-sm-3 col-xs-4',
- stdout: {
- mode: 'all',
- href: '/#/jobs/{{ all_job.id }}/stdout',
- awToolTip: 'View standard output',
- dataPlacement: 'top',
- ngShow: "all_job.type == 'job'"
- },
submit: {
icon: 'icon-rocket',
mode: 'all',
diff --git a/awx/ui/client/src/lists/CompletedJobs.js b/awx/ui/client/src/lists/CompletedJobs.js
index 4ed0d96dbf..a40a48b0ce 100644
--- a/awx/ui/client/src/lists/CompletedJobs.js
+++ b/awx/ui/client/src/lists/CompletedJobs.js
@@ -27,7 +27,7 @@ export default
dataTitle: "{{ completed_job.status_popover_title }}",
icon: 'icon-job-{{ completed_job.status }}',
iconOnly: true,
- ngClick:"viewJobLog(completed_job.id)",
+ ngClick:"viewJobDetails(completed_job)",
searchable: true,
searchType: 'select',
nosort: true,
@@ -40,7 +40,7 @@ export default
},
id: {
label: 'ID',
- ngClick:"viewJobLog(completed_job.id)",
+ ngClick:"viewJobDetails(completed_job)",
searchType: 'int',
columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent',
awToolTip: "{{ completed_job.status_tip }}",
@@ -49,7 +49,7 @@ export default
name: {
label: 'Name',
columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-6',
- ngClick: "viewJobLog(completed_job.id, completed_job.nameHref)",
+ ngClick: "viewJobDetails(completed_job)",
defaultSearchField: true,
awToolTip: "{{ completed_job.name | sanitize }}",
dataPlacement: 'top'
@@ -89,13 +89,6 @@ export default
columnClass: 'col-lg-2 col-md-2 col-sm-3 col-xs-4',
- stdout: {
- mode: 'all',
- href: '/#/jobs/{{ completed_job.id }}/stdout',
- awToolTip: 'View standard output',
- dataPlacement: 'top',
- ngShow: "completed_job.type == 'job'"
- },
submit: {
icon: 'icon-rocket',
mode: 'all',
@@ -110,11 +103,5 @@ export default
awToolTip: 'Delete the job',
dataPlacement: 'top'
}
- // job_details: {
- // mode: 'all',
- // ngClick: "viewJobLog(completed_job.id)",
- // awToolTip: 'View job details',
- // dataPlacement: 'top'
- // }
}
});
diff --git a/awx/ui/client/src/lists/Jobs.js b/awx/ui/client/src/lists/Jobs.js
index 53b7c74669..0441d1da23 100644
--- a/awx/ui/client/src/lists/Jobs.js
+++ b/awx/ui/client/src/lists/Jobs.js
@@ -20,7 +20,7 @@ export default
fields: {
id: {
label: 'ID',
- ngClick:"viewJobLog(job.id)",
+ ngClick:"viewJobDetails(job)",
key: true,
desc: true,
searchType: 'int',
@@ -36,7 +36,7 @@ export default
dataTitle: "{{ job.status_popover_title }}",
icon: 'icon-job-{{ job.status }}',
iconOnly: true,
- ngClick:"viewJobLog(job.id)",
+ ngClick:"viewJobDetails(job)",
searchable: true,
nosort: true,
searchType: 'select',
@@ -66,7 +66,7 @@ export default
name: {
label: 'Name',
columnClass: 'col-md-3 col-xs-5',
- ngClick: "viewJobLog(job.id, job.nameHref)",
+ ngClick: "viewJobDetails(job)",
defaultSearchField: true
}
},
@@ -74,13 +74,6 @@ export default
actions: { },
fieldActions: {
- stdout: {
- mode: 'all',
- href: '/#/jobs/{{ job.id }}/stdout',
- awToolTip: 'View standard output',
- dataPlacement: 'top',
- ngShow: "job.type == 'job'"
- },
submit: {
mode: 'all',
icon: 'icon-rocket',
diff --git a/awx/ui/client/src/lists/PortalJobs.js b/awx/ui/client/src/lists/PortalJobs.js
index 645eb90e32..753ef764fc 100644
--- a/awx/ui/client/src/lists/PortalJobs.js
+++ b/awx/ui/client/src/lists/PortalJobs.js
@@ -64,7 +64,7 @@ export default
job_details: {
mode: 'all',
- ngClick: "viewJobLog(portal_job.id)",
+ ngClick: "viewJobDetails(portal_job)",
awToolTip: 'View job details',
dataPlacement: 'top'
}
diff --git a/awx/ui/client/src/partials/job_stdout.html b/awx/ui/client/src/partials/job_stdout.html
deleted file mode 100644
index 6412480fcb..0000000000
--- a/awx/ui/client/src/partials/job_stdout.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
diff --git a/awx/ui/client/src/partials/job_stdout_adhoc.html b/awx/ui/client/src/partials/job_stdout_adhoc.html
deleted file mode 100644
index 78637571e9..0000000000
--- a/awx/ui/client/src/partials/job_stdout_adhoc.html
+++ /dev/null
@@ -1,172 +0,0 @@
-
diff --git a/awx/ui/client/src/shared/generator-helpers.js b/awx/ui/client/src/shared/generator-helpers.js
index b355cdcd57..1fc8880e63 100644
--- a/awx/ui/client/src/shared/generator-helpers.js
+++ b/awx/ui/client/src/shared/generator-helpers.js
@@ -172,9 +172,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
case 'schedule':
icon = "fa-calendar";
break;
- case 'stdout':
- icon = "fa-external-link";
- break;
case 'question_cancel':
icon = 'fa-times';
break;
diff --git a/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.partial.html b/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.partial.html
new file mode 100644
index 0000000000..9d6d6ad4ac
--- /dev/null
+++ b/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.partial.html
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+ RESULTS
+
+
+
+
+
Name
+
{{ job.module_name }}
+
+
+
+
STATUS
+
+
+ {{ job.status }}
+
+
+
+
+
STARTED
+
+ {{ job.started | date:'MM/dd/yy HH:mm:ss' }}
+
+
+
+
+
FINISHED
+
+ {{ job.finished | date:'MM/dd/yy HH:mm:ss' }}
+
+
+
+
+
ELAPSED
+
+ {{ job.elapsed }} seconds
+
+
+
+
+
Module Args
+
{{ job.module_args }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Verbosity
+
{{ verbosity }}
+
+
+
+
+
+
+
+
diff --git a/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.route.js b/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.route.js
new file mode 100644
index 0000000000..85c281876f
--- /dev/null
+++ b/awx/ui/client/src/standard-out/adhoc/standard-out-adhoc.route.js
@@ -0,0 +1,36 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+import {templateUrl} from '../../shared/template-url/template-url.factory';
+
+export default {
+ name: 'adHocJobStdout',
+ route: '/ad_hoc_commands/:id/stdout',
+ templateUrl: templateUrl('standard-out/adhoc/standard-out-adhoc'),
+ controller: 'JobStdoutController',
+ data: {
+ jobType: 'ad_hoc_commands'
+ },
+ resolve: {
+ features: ['FeaturesService', function(FeaturesService) {
+ return FeaturesService.get();
+ }],
+ adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
+ // if (!$rootScope.adhoc_event_socket) {
+ // $rootScope.adhoc_event_socket = Socket({
+ // scope: $rootScope,
+ // endpoint: "ad_hoc_command_events"
+ // });
+ // $rootScope.adhoc_event_socket.init();
+ // return true;
+ // } else {
+ // return true;
+ // }
+
+ return true;
+ }]
+ }
+};
diff --git a/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.partial.html b/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.partial.html
new file mode 100644
index 0000000000..747bfc9bfc
--- /dev/null
+++ b/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.partial.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ RESULTS
+
+
+
+
+
STATUS
+
+
+ {{ job.status }}
+
+
+
+
+
+
+
+
+
+
diff --git a/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.route.js b/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.route.js
new file mode 100644
index 0000000000..aaa92bd2d7
--- /dev/null
+++ b/awx/ui/client/src/standard-out/inventory-sync/standard-out-inventory-sync.route.js
@@ -0,0 +1,38 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+import {templateUrl} from '../../shared/template-url/template-url.factory';
+
+// TODO: figure out what this route should be - should it be inventory_sync?
+
+export default {
+ name: 'inventorySyncStdout',
+ route: '/inventory_sync/:id/stdout',
+ templateUrl: templateUrl('standard-out/inventory-sync/standard-out-inventory-sync'),
+ controller: 'JobStdoutController',
+ data: {
+ jobType: 'inventory_updates'
+ },
+ resolve: {
+ features: ['FeaturesService', function(FeaturesService) {
+ return FeaturesService.get();
+ }],
+ adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
+ // if (!$rootScope.adhoc_event_socket) {
+ // $rootScope.adhoc_event_socket = Socket({
+ // scope: $rootScope,
+ // endpoint: "ad_hoc_command_events"
+ // });
+ // $rootScope.adhoc_event_socket.init();
+ // return true;
+ // } else {
+ // return true;
+ // }
+
+ return true;
+ }]
+ }
+};
diff --git a/awx/ui/client/src/standard-out/main.js b/awx/ui/client/src/standard-out/main.js
new file mode 100644
index 0000000000..e8a0946e82
--- /dev/null
+++ b/awx/ui/client/src/standard-out/main.js
@@ -0,0 +1,20 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+import stdoutAdhocRoute from './adhoc/standard-out-adhoc.route';
+import stdoutManagementJobsRoute from './management-jobs/standard-out-management-jobs.route';
+import stdoutInventorySyncRoute from './inventory-sync/standard-out-inventory-sync.route';
+import stdoutScmUpdateRoute from './scm-update/standard-out-scm-update.route';
+import {JobStdoutController} from './standard-out.controller';
+
+export default angular.module('standardOut', [])
+ .controller('JobStdoutController', JobStdoutController)
+ .run(['$stateExtender', function($stateExtender) {
+ $stateExtender.addState(stdoutAdhocRoute);
+ $stateExtender.addState(stdoutManagementJobsRoute);
+ $stateExtender.addState(stdoutInventorySyncRoute);
+ $stateExtender.addState(stdoutScmUpdateRoute);
+ }]);
diff --git a/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.partial.html b/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.partial.html
new file mode 100644
index 0000000000..747bfc9bfc
--- /dev/null
+++ b/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.partial.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ RESULTS
+
+
+
+
+
STATUS
+
+
+ {{ job.status }}
+
+
+
+
+
+
+
+
+
+
diff --git a/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.route.js b/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.route.js
new file mode 100644
index 0000000000..a1f3464ed2
--- /dev/null
+++ b/awx/ui/client/src/standard-out/management-jobs/standard-out-management-jobs.route.js
@@ -0,0 +1,36 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+import {templateUrl} from '../../shared/template-url/template-url.factory';
+
+export default {
+ name: 'managementJobStdout',
+ route: '/management_jobs/:id/stdout',
+ templateUrl: templateUrl('standard-out/management-jobs/standard-out-management-jobs'),
+ controller: 'JobStdoutController',
+ data: {
+ jobType: 'system_jobs'
+ },
+ resolve: {
+ features: ['FeaturesService', function(FeaturesService) {
+ return FeaturesService.get();
+ }],
+ adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
+ // if (!$rootScope.adhoc_event_socket) {
+ // $rootScope.adhoc_event_socket = Socket({
+ // scope: $rootScope,
+ // endpoint: "ad_hoc_command_events"
+ // });
+ // $rootScope.adhoc_event_socket.init();
+ // return true;
+ // } else {
+ // return true;
+ // }
+
+ return true;
+ }]
+ }
+};
diff --git a/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.partial.html b/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.partial.html
new file mode 100644
index 0000000000..747bfc9bfc
--- /dev/null
+++ b/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.partial.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ RESULTS
+
+
+
+
+
STATUS
+
+
+ {{ job.status }}
+
+
+
+
+
+
+
+
+
+
diff --git a/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.route.js b/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.route.js
new file mode 100644
index 0000000000..6ffc812160
--- /dev/null
+++ b/awx/ui/client/src/standard-out/scm-update/standard-out-scm-update.route.js
@@ -0,0 +1,38 @@
+/*************************************************
+ * Copyright (c) 2016 Ansible, Inc.
+ *
+ * All Rights Reserved
+ *************************************************/
+
+import {templateUrl} from '../../shared/template-url/template-url.factory';
+
+// TODO: figure out what this route should be - should it be scm_update?
+
+export default {
+ name: 'scmUpdateStdout',
+ route: '/scm_update/:id/stdout',
+ templateUrl: templateUrl('standard-out/scm-update/standard-out-scm-update'),
+ controller: 'JobStdoutController',
+ data: {
+ jobType: 'project_updates'
+ },
+ resolve: {
+ features: ['FeaturesService', function(FeaturesService) {
+ return FeaturesService.get();
+ }],
+ adhocEventsSocket: ['Socket', '$rootScope', function(Socket, $rootScope) {
+ // if (!$rootScope.adhoc_event_socket) {
+ // $rootScope.adhoc_event_socket = Socket({
+ // scope: $rootScope,
+ // endpoint: "ad_hoc_command_events"
+ // });
+ // $rootScope.adhoc_event_socket.init();
+ // return true;
+ // } else {
+ // return true;
+ // }
+
+ return true;
+ }]
+ }
+};
diff --git a/awx/ui/client/src/standard-out/standard-out.block.less b/awx/ui/client/src/standard-out/standard-out.block.less
new file mode 100644
index 0000000000..7fcd0aa9b6
--- /dev/null
+++ b/awx/ui/client/src/standard-out/standard-out.block.less
@@ -0,0 +1,60 @@
+@import "../shared/branding/colors.default.less";
+
+/** @define StandardOut */
+
+.StandardOut {
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+}
+
+.StandardOut-leftPanel {
+ flex: 0 0 400px;
+}
+
+.StandardOut-rightPanel {
+ flex: 1 0;
+ margin-left: 20px;
+}
+
+.StandardOut-panelHeader {
+ color: @default-interface-txt;
+ font-size: 14px;
+ font-weight: bold;
+ margin-right: 10px;
+ text-transform: uppercase;
+}
+
+.StandardOut-consoleOutput {
+ margin-top: 25px;
+ min-height: 200px;
+ background-color: @default-secondary-bg;
+ border-radius: 5px;
+}
+
+.StandardOut-details {
+ margin-top: 25px;
+}
+
+.StandardOut-detailsRow {
+ display: flex;
+}
+
+.StandardOut-detailsRow:not(:last-child) {
+ margin-bottom: 20px;
+}
+
+.StandardOut-detailsLabel {
+ width: 130px;
+ flex: 0 0 130px;
+ color: @default-interface-txt;
+ text-transform: uppercase;
+}
+
+.StandardOut-detailsContent {
+ flex: 1 0;
+}
+
+.StandardOut-statusText {
+ margin-left: 6px;
+}
diff --git a/awx/ui/client/src/controllers/JobStdout.js b/awx/ui/client/src/standard-out/standard-out.controller.js
similarity index 85%
rename from awx/ui/client/src/controllers/JobStdout.js
rename to awx/ui/client/src/standard-out/standard-out.controller.js
index 91c0f3f322..efca57eeb1 100644
--- a/awx/ui/client/src/controllers/JobStdout.js
+++ b/awx/ui/client/src/standard-out/standard-out.controller.js
@@ -3,7 +3,7 @@
*
* All Rights Reserved
*************************************************/
-
+
/**
* @ngdoc function
* @name controllers.function:JobStdout
@@ -11,11 +11,12 @@
*/
-export function JobStdoutController ($location, $log, $rootScope, $scope, $compile, $stateParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors) {
+export function JobStdoutController ($location, $log, $rootScope, $scope, $compile, $state, $stateParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, ModelToBasePathKey) {
ClearScope();
var job_id = $stateParams.id,
+ jobType = $state.current.data.jobType,
api_complete = false,
stdout_url,
current_range,
@@ -32,26 +33,27 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
$scope.isClosed = true;
- function openSockets() {
- if (/\/jobs\/(\d)+\/stdout/.test($location.$$url)) {
- $log.debug("socket watching on job_events-" + job_id);
- $rootScope.event_socket.on("job_events-" + job_id, function() {
- $log.debug("socket fired on job_events-" + job_id);
- if (api_complete) {
- event_queue++;
- }
- });
- } else if (/\/ad_hoc_commands\/(\d)+/.test($location.$$url)) {
- $log.debug("socket watching on ad_hoc_command_events-" + job_id);
- $rootScope.adhoc_event_socket.on("ad_hoc_command_events-" + job_id, function() {
- $log.debug("socket fired on ad_hoc_command_events-" + job_id);
- if (api_complete) {
- event_queue++;
- }
- });
- }
- }
- openSockets();
+ // function openSockets() {
+ // if (/\/jobs\/(\d)+\/stdout/.test($location.$$url)) {
+ // $log.debug("socket watching on job_events-" + job_id);
+ // $rootScope.event_socket.on("job_events-" + job_id, function() {
+ // $log.debug("socket fired on job_events-" + job_id);
+ // if (api_complete) {
+ // event_queue++;
+ // }
+ // });
+ // } else if (/\/ad_hoc_commands\/(\d)+/.test($location.$$url)) {
+ // $log.debug("socket watching on ad_hoc_command_events-" + job_id);
+ // $rootScope.adhoc_event_socket.on("ad_hoc_command_events-" + job_id, function() {
+ // $log.debug("socket fired on ad_hoc_command_events-" + job_id);
+ // if (api_complete) {
+ // event_queue++;
+ // }
+ // });
+ // }
+ // }
+ //
+ // openSockets();
if ($rootScope.removeJobStatusChange) {
$rootScope.removeJobStatusChange();
@@ -158,9 +160,7 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
$(".StandardOut").height($("body").height() - 60);
- // Note: could be ad_hoc_commands or jobs
- var jobType = $location.path().replace(/^\//, '').split('/')[0];
- Rest.setUrl(GetBasePath(jobType) + job_id + '/');
+ Rest.setUrl(GetBasePath('base') + jobType + '/' + job_id + '/');
Rest.get()
.success(function(data) {
$scope.job = data;
@@ -182,13 +182,15 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
$scope.verbosity = data.verbosity;
$scope.job_tags = data.job_tags;
stdout_url = data.related.stdout;
- if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') {
- live_event_processing = false;
- if ($rootScope.jobStdOutInterval) {
- window.clearInterval($rootScope.jobStdOutInterval);
- }
+ // if (data.status === 'successful' || data.status === 'failed' || data.status === 'error' || data.status === 'canceled') {
+ // live_event_processing = false;
+ // if ($rootScope.jobStdOutInterval) {
+ // window.clearInterval($rootScope.jobStdOutInterval);
+ // }
+ // }
+ if(stdout_url) {
+ $scope.$emit('LoadStdout');
}
- $scope.$emit('LoadStdout');
})
.error(function(data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!',
@@ -197,11 +199,9 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
$scope.refresh = function(){
if (loaded_sections.length === 0) { ////this if statement for refresh
- $log.debug('calling LoadStdout');
$scope.$emit('LoadStdout');
}
else if (live_event_processing) {
- $log.debug('calling getNextSection');
getNextSection();
}
};
@@ -281,4 +281,4 @@ export function JobStdoutController ($location, $log, $rootScope, $scope, $compi
}
-JobStdoutController.$inject = [ '$location', '$log', '$rootScope', '$scope', '$compile', '$stateParams', 'ClearScope', 'GetBasePath', 'Wait', 'Rest', 'ProcessErrors'];
+JobStdoutController.$inject = [ '$location', '$log', '$rootScope', '$scope', '$compile', '$state', '$stateParams', 'ClearScope', 'GetBasePath', 'Wait', 'Rest', 'ProcessErrors', 'ModelToBasePathKey'];
diff --git a/awx/ui/client/src/standard-out/standardOut.block.less b/awx/ui/client/src/standard-out/standardOut.block.less
deleted file mode 100644
index 497471a7eb..0000000000
--- a/awx/ui/client/src/standard-out/standardOut.block.less
+++ /dev/null
@@ -1,47 +0,0 @@
-/** @define StandardOut */
-
-.StandardOut {
- height: 100%;
- display: flex;
- flex-direction: column;
-}
-
-.StandardOut-header {
- flex: initial;
-}
-
-.StandardOut-breadcrumbs {
- padding-left: 15px;
-}
-
-.StandardOut-form {
- padding-left: 15px;
-}
-
-.StandardOut-panel {
- flex: 1 0 0;
- display: flex;
- flex-direction: column;
- margin-bottom: -41px;
-}
-
-.StandardOut-panelHeading {
- flex: initial;
-}
-
-.StandardOut-panelBody {
- flex: 1 0 auto;
- padding: 0;
- position: relative;
-}
-
-.StandardOut-preContainer {
- position: absolute;
- height: 100%;
- padding-left: 15px;
- padding-right: 15px;
-}
-
-.StandardOut-preContent {
- position: absolute;
-}