diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index b2af552581..577ce739b8 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -149,7 +149,6 @@ var tower = angular.module('Tower', [ 'InventoryHostsDefinition', 'HostsHelper', 'AWFilters', - 'ScanJobsListDefinition', 'HostFormDefinition', 'HostListDefinition', 'GroupFormDefinition', diff --git a/awx/ui/client/src/forms/Inventories.js b/awx/ui/client/src/forms/Inventories.js index 5d96ebfaa5..bde0d2d712 100644 --- a/awx/ui/client/src/forms/Inventories.js +++ b/awx/ui/client/src/forms/Inventories.js @@ -11,8 +11,8 @@ */ export default -angular.module('InventoryFormDefinition', ['ScanJobsListDefinition']) - .factory('InventoryFormObject', ['i18n', function(i18n) { +angular.module('InventoryFormDefinition', []) + .factory('InventoryForm', ['i18n', function(i18n) { return { addTitle: i18n._('New Inventory'), @@ -181,19 +181,4 @@ angular.module('InventoryFormDefinition', ['ScanJobsListDefinition']) }; } - };}]) - - .factory('InventoryForm', ['InventoryFormObject', 'ScanJobsList', - function(InventoryFormObject, ScanJobsList) { - return function() { - var itm; - for (itm in InventoryFormObject.related) { - if (InventoryFormObject.related[itm].include === "ScanJobsList") { - InventoryFormObject.related[itm] = ScanJobsList; - InventoryFormObject.related[itm].generateList = true; // tell form generator to call list generator and inject a list - } - } - return InventoryFormObject; - }; - } - ]); + };}]); diff --git a/awx/ui/client/src/inventories/add/inventory-add.controller.js b/awx/ui/client/src/inventories/add/inventory-add.controller.js index e6f9b7e3a3..a20fb44891 100644 --- a/awx/ui/client/src/inventories/add/inventory-add.controller.js +++ b/awx/ui/client/src/inventories/add/inventory-add.controller.js @@ -34,7 +34,7 @@ function InventoriesAdd($scope, $rootScope, $compile, $location, $log, // Inject dynamic view var defaultUrl = GetBasePath('inventory'), - form = InventoryForm(); + form = InventoryForm; init(); diff --git a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js index 3e26dec8dc..d07a865766 100644 --- a/awx/ui/client/src/inventories/edit/inventory-edit.controller.js +++ b/awx/ui/client/src/inventories/edit/inventory-edit.controller.js @@ -14,11 +14,11 @@ function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Prompt, InitiatePlaybookRun, - TemplatesService, $state, $filter) { + TemplatesService, $state) { // Inject dynamic view var defaultUrl = GetBasePath('inventory'), - form = InventoryForm(), + form = InventoryForm, inventory_id = $stateParams.inventory_id, master = {}, fld, json_data, data; @@ -125,54 +125,11 @@ function InventoriesEdit($scope, $rootScope, $compile, $location, $state.go('inventories'); }; - $scope.addScanJob = function() { - $location.path($location.path() + '/job_templates/add'); - }; - - $scope.launchScanJob = function() { - InitiatePlaybookRun({ scope: $scope, id: this.scan_job_template.id }); - }; - - $scope.scheduleScanJob = function() { - $location.path('/job_templates/' + this.scan_job_template.id + '/schedules'); - }; - - $scope.editScanJob = function() { - $location.path($location.path() + '/job_templates/' + this.scan_job_template.id); - }; - - $scope.deleteScanJob = function () { - var id = this.scan_job_template.id , - action = function () { - $('#prompt-modal').modal('hide'); - Wait('start'); - TemplatesService.deleteJobTemplate(id) - .success(function () { - $('#prompt-modal').modal('hide'); - // @issue: OLD SEARCH - // $scope.search(form.related.scan_job_templates.iterator); - }) - .error(function (data) { - Wait('stop'); - ProcessErrors($scope, data, status, null, { hdr: 'Error!', - msg: 'DELETE returned status: ' + status }); - }); - }; - - Prompt({ - hdr: 'Delete', - body: '