From b15494963962d9f245d6ce0463109f55549810d9 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 25 Apr 2018 17:36:43 -0700 Subject: [PATCH] Removes dupclicate Angular import, and removes tower.app.js module from network UI --- awx/ui/client/src/app.js | 4 ++-- awx/ui/client/src/network-ui/main.js | 5 ----- awx/ui/client/src/network-ui/network.ui.app.js | 6 ++---- awx/ui/client/src/network-ui/network.ui.controller.js | 1 - awx/ui/client/src/network-ui/tower.app.js | 8 -------- 5 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 awx/ui/client/src/network-ui/main.js delete mode 100644 awx/ui/client/src/network-ui/tower.app.js diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 376e4589e7..8ed9133251 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -43,7 +43,7 @@ import atLibComponents from '~components'; import atLibModels from '~models'; import atLibServices from '~services'; -import networkUI from '~network-ui/main'; +import networkUI from '~network-ui/network.ui.app'; start.bootstrap(() => { angular.bootstrap(document.body, ['awApp']); @@ -91,7 +91,7 @@ angular users.name, projects.name, scheduler.name, - networkUI.tower.name, + networkUI.name, 'Utilities', 'templates', diff --git a/awx/ui/client/src/network-ui/main.js b/awx/ui/client/src/network-ui/main.js deleted file mode 100644 index 0a9e8d5120..0000000000 --- a/awx/ui/client/src/network-ui/main.js +++ /dev/null @@ -1,5 +0,0 @@ -/* Copyright (c) 2017 Red Hat, Inc. */ -var networkUI = require('./network.ui.app.js'); -var tower = require('./tower.app.js'); -exports.networkUI = networkUI.networkUI; -exports.tower = tower.tower; diff --git a/awx/ui/client/src/network-ui/network.ui.app.js b/awx/ui/client/src/network-ui/network.ui.app.js index bc71fd4a3e..7fb414950d 100644 --- a/awx/ui/client/src/network-ui/network.ui.app.js +++ b/awx/ui/client/src/network-ui/network.ui.app.js @@ -5,7 +5,6 @@ import networkDetailsDirective from './network-details/main'; import networkZoomWidget from './zoom-widget/main'; //console.log = function () { }; -var angular = require('angular'); var NetworkUIController = require('./network.ui.controller.js'); var cursor = require('./cursor.directive.js'); var router = require('./router.directive.js'); @@ -21,7 +20,8 @@ var debug = require('./debug.directive.js'); var test_results = require('./test_results.directive.js'); var awxNetworkUI = require('./network.ui.directive.js'); -var networkUI = angular.module('networkUI', [ +export default + angular.module('networkUI', [ 'monospaced.mousewheel', atFeaturesNetworking, networkDetailsDirective.name, @@ -41,5 +41,3 @@ var networkUI = angular.module('networkUI', [ .directive('awxNetInventoryToolbox', inventoryToolbox.inventoryToolbox) .directive('awxNetTestResults', test_results.test_results) .directive('awxNetworkUi', awxNetworkUI.awxNetworkUI); - -exports.networkUI = networkUI; diff --git a/awx/ui/client/src/network-ui/network.ui.controller.js b/awx/ui/client/src/network-ui/network.ui.controller.js index de30650caa..a0875b0d64 100644 --- a/awx/ui/client/src/network-ui/network.ui.controller.js +++ b/awx/ui/client/src/network-ui/network.ui.controller.js @@ -1,5 +1,4 @@ /* Copyright (c) 2017 Red Hat, Inc. */ -var angular = require('angular'); var fsm = require('./fsm.js'); var mode_fsm = require('./mode.fsm.js'); var hotkeys = require('./hotkeys.fsm.js'); diff --git a/awx/ui/client/src/network-ui/tower.app.js b/awx/ui/client/src/network-ui/tower.app.js deleted file mode 100644 index 200d5078ce..0000000000 --- a/awx/ui/client/src/network-ui/tower.app.js +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (c) 2017 Red Hat, Inc. */ - -var angular = require('angular'); - -var tower = angular.module('tower', ['networkUI', 'ui.router']); - -exports.tower = tower; -