diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 926d0703ea..531b3ac0ae 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -29,6 +29,7 @@ import {CredentialsAdd, CredentialsEdit, CredentialsList} from './controllers/Cr import {JobsListController} from './controllers/Jobs'; import {PortalController} from './controllers/Portal'; import systemTracking from './system-tracking/main'; +import inventoryScripts from './inventory-scripts/main'; import routeExtensions from './shared/route-extensions/main'; import breadcrumbs from './shared/breadcrumbs/main'; @@ -67,6 +68,7 @@ import './shared/Socket'; import './job-templates/main'; import './shared/features/main'; + /*#if DEBUG#*/ import {__deferLoadIfEnabled} from './debug'; __deferLoadIfEnabled(); @@ -81,6 +83,7 @@ var tower = angular.module('Tower', [ browserData.name, breadcrumbs.name, systemTracking.name, + inventoryScripts.name, setupMenu.name, mainMenu.name, dashboard.name, @@ -104,7 +107,6 @@ var tower = angular.module('Tower', [ 'PaginationHelpers', 'RefreshHelper', 'AdminListDefinition', - 'CustomInventoryListDefinition', 'AWDirectives', 'AdhocFormDefinition', 'InventoriesListDefinition', @@ -183,8 +185,6 @@ var tower = angular.module('Tower', [ 'PortalJobsListDefinition', 'ConfigureTowerHelper', 'ConfigureTowerJobsListDefinition', - 'CreateCustomInventoryHelper', - 'CustomInventoryListDefinition', 'AdhocHelper', 'features', 'longDateFilter' @@ -896,6 +896,17 @@ var tower = angular.module('Tower', [ } }). + // when('/inventory_scripts', { + // name: 'inventoryScriptsList', + // templateUrl: urlPrefix + 'partials/inventory_scripts.html', + // controller: InventoryScriptsList, + // resolve: { + // features: ['FeaturesService', function(FeaturesService) { + // return FeaturesService.get(); + // }] + // } + // }). + when('/license', { name: 'license', templateUrl: urlPrefix + 'partials/license.html', @@ -933,9 +944,9 @@ var tower = angular.module('Tower', [ }]) .run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer', 'ClearScope', 'HideStream', 'Socket', - 'LoadConfig', 'Store', 'ShowSocketHelp', 'AboutAnsibleHelp', 'ConfigureTower', 'CreateCustomInventory', + 'LoadConfig', 'Store', 'ShowSocketHelp', 'AboutAnsibleHelp', 'ConfigureTower', function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, Timer, ClearScope, HideStream, Socket, - LoadConfig, Store, ShowSocketHelp, AboutAnsibleHelp, ConfigureTower, CreateCustomInventory) { + LoadConfig, Store, ShowSocketHelp, AboutAnsibleHelp, ConfigureTower) { var sock; @@ -1150,12 +1161,6 @@ var tower = angular.module('Tower', [ }); }; - $rootScope.createCustomInv = function(){ - CreateCustomInventory({ - parent_scope: $rootScope - }); - }; - }); // end of 'ConfigReady' diff --git a/awx/ui/client/src/forms.js b/awx/ui/client/src/forms.js index 403fc0bfc2..1620543189 100644 --- a/awx/ui/client/src/forms.js +++ b/awx/ui/client/src/forms.js @@ -7,7 +7,6 @@ import ActivityDetail from "./forms/ActivityDetail"; import Credentials from "./forms/Credentials"; import Adhoc from "./forms/Adhoc"; -import CustomInventory from "./forms/CustomInventory"; import EventsViewer from "./forms/EventsViewer"; import Groups from "./forms/Groups"; import HostGroups from "./forms/HostGroups"; @@ -37,7 +36,6 @@ export { ActivityDetail, Credentials, Adhoc, - CustomInventory, EventsViewer, Groups, HostGroups, diff --git a/awx/ui/client/src/forms/CustomInventory.js b/awx/ui/client/src/forms/CustomInventory.js deleted file mode 100644 index 4a69431954..0000000000 --- a/awx/ui/client/src/forms/CustomInventory.js +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************* - * Copyright (c) 2015 Ansible, Inc. - * - * All Rights Reserved - *************************************************/ - - /** - * @ngdoc function - * @name forms.function:CustomInventory - * @description This form is for adding/editing an organization -*/ - -export default - angular.module('CustomInventoryFormDefinition', []) - .value('CustomInventoryForm', { - - addTitle: 'Create Custom Inventory', //Title in add mode - editTitle: '{{ name }}', //Title in edit mode - name: 'custom_inventory', //entity or model name in singular form - well: false, - showActions: false, - - fields: { - name: { - label: 'Name', - type: 'text', - addRequired: true, - editRequired: true, - capitalize: false - }, - description: { - label: 'Description', - type: 'text', - addRequired: false, - editRequired: false - }, - organization: { - label: 'Organization', - type: 'lookup', - awRequiredWhen: { - variable: "orgrequired", - init: true - }, - sourceModel: 'organization', - sourceField: 'name', - ngClick: 'lookUpOrganization()' - }, - script: { - label: 'Custom Script', - type: 'textarea', - hintText: "Drag and drop an inventory script on the field below", - addRequired: true, - editRequired: true, - awDropFile: true, - 'class': 'ssh-key-field', - 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

", - dataTitle: 'Custom Script', - dataPlacement: 'right', - dataContainer: "body" - }, - }, - - buttons: { //for now always generates - +

View Your License

diff --git a/awx/ui/client/src/setup-menu/setup.controller.js b/awx/ui/client/src/setup-menu/setup.controller.js index f55c4ddc91..75c28b0727 100644 --- a/awx/ui/client/src/setup-menu/setup.controller.js +++ b/awx/ui/client/src/setup-menu/setup.controller.js @@ -3,13 +3,11 @@ export default '$rootScope', 'AboutAnsibleHelp', 'ConfigureTower', - 'CreateCustomInventory', function( $scope, $rootScope, showAboutModal, - configureTower, - showInventoryScriptsModal + configureTower ) { $scope.showAboutModal = showAboutModal; @@ -19,9 +17,5 @@ export default parent_scope: $rootScope }); - $scope.showInventoryScriptsModal = showInventoryScriptsModal.bind(null, - { parent_scope: $rootScope - }); - } ]; diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index 97d55dc7b8..17b4129bd7 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -152,9 +152,9 @@ - + - +