diff --git a/awx/ui/client/src/controllers/Jobs.js b/awx/ui/client/src/controllers/Jobs.js
index 3f0e3bdcfd..0e2f46f736 100644
--- a/awx/ui/client/src/controllers/Jobs.js
+++ b/awx/ui/client/src/controllers/Jobs.js
@@ -13,7 +13,7 @@
export function JobsListController ($rootScope, $log, $scope, $compile, $stateParams,
ClearScope, LoadSchedulesScope,
- LoadJobsScope, AllJobsList, ScheduledJobsList, GetChoices, GetBasePath, Wait) {
+ LoadJobsScope, AllJobsList, ScheduledJobsList, GetChoices, GetBasePath, Wait, $state) {
ClearScope();
@@ -61,6 +61,11 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
}
}
jobs_scope = $scope.$new(true);
+
+ jobs_scope.viewJob = function (id) {
+ $state.transitionTo('jobDetail', {id: id});
+ };
+
jobs_scope.showJobType = true;
LoadJobsScope({
parent_scope: $scope,
@@ -153,4 +158,4 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
JobsListController.$inject = ['$rootScope', '$log', '$scope', '$compile', '$stateParams',
'ClearScope', 'LoadSchedulesScope', 'LoadJobsScope',
-'AllJobsList', 'ScheduledJobsList', 'GetChoices', 'GetBasePath', 'Wait'];
+'AllJobsList', 'ScheduledJobsList', 'GetChoices', 'GetBasePath', 'Wait', '$state'];
diff --git a/awx/ui/client/src/inventory-scripts/edit/edit.controller.js b/awx/ui/client/src/inventory-scripts/edit/edit.controller.js
index 41d3309cc1..40a6eda216 100644
--- a/awx/ui/client/src/inventory-scripts/edit/edit.controller.js
+++ b/awx/ui/client/src/inventory-scripts/edit/edit.controller.js
@@ -17,6 +17,7 @@ export default
LookUpInit, OrganizationList, inventory_script,
$scope, $state
) {
+
var generator = GenerateForm,
id = inventory_script.id,
form = inventoryScriptsFormObject,
@@ -24,13 +25,15 @@ export default
url = GetBasePath('inventory_scripts');
- $scope.canEdit = false;
+ $scope.canEditInvScripts = false;
Rest.setUrl(GetBasePath('inventory_scripts') + id);
Rest.options()
.success(function(data) {
if (data.actions.PUT) {
- $scope.canEdit = true;
+ $scope.canEditInvScripts = true;
+ } else {
+ $scope.canEditInvScripts = false;
}
});
diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js
index 082126a975..6a2f538421 100644
--- a/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js
+++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.form.js
@@ -25,14 +25,14 @@ export default function() {
addRequired: true,
editRequired: true,
capitalize: false,
- ngDisabled: '!canEdit'
+ ngDisabled: '!canEditInvScripts'
},
description: {
label: 'Description',
type: 'text',
addRequired: false,
editRequired: false,
- ngDisabled: '!canEdit'
+ ngDisabled: '!canEditInvScripts'
},
organization: {
label: 'Organization',
@@ -44,7 +44,7 @@ export default function() {
sourceModel: 'organization',
sourceField: 'name',
ngClick: 'lookUpOrganization()',
- ngDisabled: '!canEdit'
+ ngDisabled: '!canEditInvScripts'
},
script: {
label: 'Custom Script',
@@ -54,7 +54,7 @@ export default function() {
addRequired: true,
editRequired: true,
awDropFile: true,
- ngDisabled: '!canEdit',
+ ngDisabled: '!canEditInvScripts',
rows: 10,
awPopOver: "
Drag and drop your custom inventory script file here or create one in the field to import your custom inventory. " +
"
Script must begin with a hashbang sequence: i.e.... #!/usr/bin/env python
",
@@ -67,16 +67,16 @@ export default function() {
buttons: { //for now always generates