From f6e17826329f64e786aa7d30c509518e6296a814 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Tue, 6 Nov 2018 14:45:16 +0200 Subject: [PATCH] refactor(webpack): remove more angular imports --- app/__module.js | 3 --- app/agent/components/file-uploader/file-uploader.js | 2 -- app/agent/rest/host.js | 2 -- app/agent/rest/v1/agent.js | 2 -- app/agent/services/agentService.js | 1 - app/agent/services/pingService.js | 2 -- app/app.js | 2 -- .../components/azure-endpoint-config/azure-endpoint-config.js | 2 -- .../views/containerinstances/containerInstancesController.js | 2 -- app/vendors.js | 1 - 10 files changed, 19 deletions(-) diff --git a/app/__module.js b/app/__module.js index 5683be035..0c9b16f79 100644 --- a/app/__module.js +++ b/app/__module.js @@ -1,6 +1,4 @@ import '../assets/css/app.css'; -import angular from 'angular'; - import './agent/_module'; import './azure/_module'; import './docker/__module'; @@ -26,7 +24,6 @@ angular.module('portainer', [ 'angular-clipboard', 'ngFileSaver', 'luegg.directives', - // 'portainer.templates', 'portainer.app', 'portainer.agent', 'portainer.azure', diff --git a/app/agent/components/file-uploader/file-uploader.js b/app/agent/components/file-uploader/file-uploader.js index d331c8bea..6427bae4a 100644 --- a/app/agent/components/file-uploader/file-uploader.js +++ b/app/agent/components/file-uploader/file-uploader.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.agent').component('fileUploader', { templateUrl: './file-uploader.html', controller: 'FileUploaderController', diff --git a/app/agent/rest/host.js b/app/agent/rest/host.js index c6a75b96a..f184d2544 100644 --- a/app/agent/rest/host.js +++ b/app/agent/rest/host.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.agent').factory('Host', [ '$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', 'StateManager', function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) { diff --git a/app/agent/rest/v1/agent.js b/app/agent/rest/v1/agent.js index f20fc385a..a78755b35 100644 --- a/app/agent/rest/v1/agent.js +++ b/app/agent/rest/v1/agent.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.agent') .factory('AgentVersion1', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) { 'use strict'; diff --git a/app/agent/services/agentService.js b/app/agent/services/agentService.js index c89a3e23d..af471da09 100644 --- a/app/agent/services/agentService.js +++ b/app/agent/services/agentService.js @@ -1,4 +1,3 @@ -import angular from 'angular'; import { AgentViewModel } from '../models/agent'; angular.module('portainer.agent').factory('AgentService', [ diff --git a/app/agent/services/pingService.js b/app/agent/services/pingService.js index 573bef373..765d47a5f 100644 --- a/app/agent/services/pingService.js +++ b/app/agent/services/pingService.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.agent').service('AgentPingService', [ 'AgentPing', function AgentPingService(AgentPing) { diff --git a/app/app.js b/app/app.js index 209d61717..3c54bc3bf 100644 --- a/app/app.js +++ b/app/app.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer') .run(['$rootScope', '$state', 'Authentication', 'authManager', 'StateManager', 'EndpointProvider', 'Notifications', 'Analytics', 'cfpLoadingBar', '$transitions', 'HttpRequestHelper', function ($rootScope, $state, Authentication, authManager, StateManager, EndpointProvider, Notifications, Analytics, cfpLoadingBar, $transitions, HttpRequestHelper) { diff --git a/app/azure/components/azure-endpoint-config/azure-endpoint-config.js b/app/azure/components/azure-endpoint-config/azure-endpoint-config.js index 241726653..2909d3853 100644 --- a/app/azure/components/azure-endpoint-config/azure-endpoint-config.js +++ b/app/azure/components/azure-endpoint-config/azure-endpoint-config.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.azure').component('azureEndpointConfig', { bindings: { applicationId: '=', diff --git a/app/azure/views/containerinstances/containerInstancesController.js b/app/azure/views/containerinstances/containerInstancesController.js index 6a4c7e06c..ecf2c40cd 100644 --- a/app/azure/views/containerinstances/containerInstancesController.js +++ b/app/azure/views/containerinstances/containerInstancesController.js @@ -1,5 +1,3 @@ -import angular from 'angular'; - angular.module('portainer.azure') .controller('AzureContainerInstancesController', ['$scope', '$state', 'AzureService', 'Notifications', function ($scope, $state, AzureService, Notifications) { diff --git a/app/vendors.js b/app/vendors.js index ee66e842f..9baf52d8e 100644 --- a/app/vendors.js +++ b/app/vendors.js @@ -1,4 +1,3 @@ - import '../assets/css/vendor.css'; import angular from 'angular';