zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: [MINOR] Replace angular inject with ngInject
Date Sun, 12 Feb 2017 08:32:59 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master d954687e0 -> 1ae4f0338


[MINOR] Replace angular inject with ngInject

### What is this PR for?

Replaced angular inject with ngInject to reduce duplication and keep simple. There is no reason
to use angular inject since

- it can make human-error (e.g. fixing only inject while doesn't modify function args.)
- ngInject is a way to enforce single source of truth (function args)
- we are already applying [ng-annotate](https://github.com/olov/ng-annotate) in webpack. (https://github.com/apache/zeppelin/blob/0589e27e7bb84ec81e1438bcbf3f2fd80ee5a963/zeppelin-web/webpack.config.js#L142)

```javascript
ParagraphCtrl.$inject = [
  '$scope',
  '$rootScope',
  '$route',
  '$window',
  '$routeParams',
  '$location',
  '$timeout',
  '$compile',
  '$http',
  '$q',
  'websocketMsgSrv',
  'baseUrlSrv',
  'ngToast',
  'saveAsService',
  'noteVarShareService',
  'heliumService'
 ];

// can be replaced with one line
'ngInject';
```

### What type of PR is it?
[Improvement]

### What is the Jira issue?

MINOR

### How should this be tested?

will be tested by CI

### Screenshots (if appropriate)

NONE

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <1amb4a@gmail.com>

Closes #1994 from 1ambda/MINOR/remove-angular-inject and squashes the following commits:

b880905 [1ambda] chore: Remove angular inject with ngInject


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/1ae4f033
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/1ae4f033
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/1ae4f033

Branch: refs/heads/master
Commit: 1ae4f03382a4412722b481a8ca2b40c8809948e7
Parents: d954687
Author: 1ambda <1amb4a@gmail.com>
Authored: Thu Feb 9 11:16:15 2017 +0900
Committer: Lee moon soo <moon@apache.org>
Committed: Sun Feb 12 17:32:52 2017 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/app.controller.js          |  4 ++--
 .../configuration/configuration.controller.js   |  4 ++--
 .../src/app/credential/credential.controller.js |  4 ++--
 .../src/app/helium/helium.controller.js         |  4 ++--
 zeppelin-web/src/app/home/home.controller.js    | 13 ++----------
 .../app/interpreter/interpreter.controller.js   |  4 ++--
 .../src/app/jobmanager/jobmanager.controller.js |  4 ++--
 .../src/app/jobmanager/jobs/job.controller.js   |  4 ++--
 .../src/app/notebook/notebook.controller.js     | 19 +----------------
 .../notebook/paragraph/paragraph.controller.js  | 21 ++-----------------
 .../paragraph/result/result.controller.js       | 22 +-------------------
 .../notebookRepos/notebookRepos.controller.js   |  4 ++--
 .../src/app/search/result-list.controller.js    |  4 ++--
 .../arrayOrderingSrv/arrayOrdering.service.js   |  4 ++--
 .../clipboard/clipboard.controller.js           |  3 ++-
 .../src/components/helium/helium.service.js     |  3 +--
 .../interpreter/interpreter.directive.js        |  4 ++--
 .../src/components/login/login.controller.js    |  3 ++-
 .../src/components/navbar/navbar.controller.js  | 16 ++------------
 .../components/noteAction/noteAction.service.js |  4 ++--
 .../noteListDataFactory/noteList.datafactory.js |  4 ++--
 .../noteName-create/notename.controller.js      |  9 ++------
 .../notenameImport.controller.js                |  4 ++--
 .../notevarshareService/notevarshare.service.js |  4 ++--
 .../popover-html-unsafe.directive.js            |  4 ++--
 .../src/components/rename/rename.controller.js  |  4 ++--
 .../src/components/rename/rename.service.js     |  4 ++--
 .../src/components/saveAs/saveAs.service.js     |  4 ++--
 .../components/searchService/search.service.js  |  4 ++--
 .../websocketEvents/websocketEvents.factory.js  |  4 ++--
 .../websocketEvents/websocketMsg.service.js     |  4 ++--
 31 files changed, 59 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/app.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/app.controller.js b/zeppelin-web/src/app/app.controller.js
index 95be93d..30c96a1 100644
--- a/zeppelin-web/src/app/app.controller.js
+++ b/zeppelin-web/src/app/app.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('MainCtrl', MainCtrl);
 
-MainCtrl.$inject = ['$scope', '$rootScope', '$window', 'arrayOrderingSrv'];
-
 function MainCtrl($scope, $rootScope, $window, arrayOrderingSrv) {
+  'ngInject';
+
   $scope.looknfeel = 'default';
 
   var init = function() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/configuration/configuration.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/configuration/configuration.controller.js b/zeppelin-web/src/app/configuration/configuration.controller.js
index 4d6ad9f..70c9fe0 100644
--- a/zeppelin-web/src/app/configuration/configuration.controller.js
+++ b/zeppelin-web/src/app/configuration/configuration.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('ConfigurationCtrl', ConfigurationCtrl);
 
-ConfigurationCtrl.$inject = ['$scope', '$rootScope', '$http', 'baseUrlSrv', 'ngToast'];
-
 function ConfigurationCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) {
+  'ngInject';
+
   $scope.configrations = [];
   $scope._ = _;
   ngToast.dismiss();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/credential/credential.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/credential/credential.controller.js b/zeppelin-web/src/app/credential/credential.controller.js
index d0fdd1e..30edfe9 100644
--- a/zeppelin-web/src/app/credential/credential.controller.js
+++ b/zeppelin-web/src/app/credential/credential.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('CredentialCtrl', CredentialCtrl);
 
-CredentialCtrl.$inject = ['$scope', '$rootScope', '$http', 'baseUrlSrv', 'ngToast'];
-
 function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) {
+  'ngInject';
+
   $scope._ = _;
   ngToast.dismiss();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/helium/helium.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/helium/helium.controller.js b/zeppelin-web/src/app/helium/helium.controller.js
index b68c1bb..7734180 100644
--- a/zeppelin-web/src/app/helium/helium.controller.js
+++ b/zeppelin-web/src/app/helium/helium.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('HeliumCtrl', HeliumCtrl);
 
-HeliumCtrl.$inject = ['$scope', '$rootScope', '$sce', 'baseUrlSrv', 'ngToast', 'heliumService'];
-
 function HeliumCtrl($scope, $rootScope, $sce, baseUrlSrv, ngToast, heliumService) {
+  'ngInject';
+
   $scope.packageInfos = {};
   $scope.defaultVersions = {};
   $scope.showVersions = {};

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/home/home.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/home/home.controller.js b/zeppelin-web/src/app/home/home.controller.js
index 0fa055d..65332ce 100644
--- a/zeppelin-web/src/app/home/home.controller.js
+++ b/zeppelin-web/src/app/home/home.controller.js
@@ -14,19 +14,10 @@
 
 angular.module('zeppelinWebApp').controller('HomeCtrl', HomeCtrl);
 
-HomeCtrl.$inject = [
-  '$scope',
-  'noteListDataFactory',
-  'websocketMsgSrv',
-  '$rootScope',
-  'arrayOrderingSrv',
-  'ngToast',
-  'noteActionSrv',
-  'TRASH_FOLDER_ID'
-];
-
 function HomeCtrl($scope, noteListDataFactory, websocketMsgSrv, $rootScope, arrayOrderingSrv,
                   ngToast, noteActionSrv, TRASH_FOLDER_ID) {
+  'ngInject';
+
   ngToast.dismiss();
   var vm = this;
   vm.notes = noteListDataFactory;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/interpreter/interpreter.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.controller.js b/zeppelin-web/src/app/interpreter/interpreter.controller.js
index 3c9ec01..0c2d343 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.controller.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('InterpreterCtrl', InterpreterCtrl);
 
-InterpreterCtrl.$inject = ['$rootScope', '$scope', '$http', 'baseUrlSrv', 'ngToast', '$timeout',
'$route'];
-
 function InterpreterCtrl($rootScope, $scope, $http, baseUrlSrv, ngToast, $timeout, $route)
{
+  'ngInject';
+
   var interpreterSettingsTmp = [];
   $scope.interpreterSettings = [];
   $scope.availableInterpreters = {};

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/jobmanager/jobmanager.controller.js b/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
index 37c599b..5503be4 100644
--- a/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
+++ b/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
@@ -15,9 +15,9 @@
 angular.module('zeppelinWebApp')
   .controller('JobmanagerCtrl', JobmanagerCtrl);
 
-JobmanagerCtrl.$inject = ['$scope', 'websocketMsgSrv', '$interval', 'ngToast', '$q', '$timeout',
'jobManagerFilter'];
-
 function JobmanagerCtrl($scope, websocketMsgSrv, $interval, ngToast, $q, $timeout, jobManagerFilter)
{
+  'ngInject';
+
   ngToast.dismiss();
   var asyncNotebookJobFilter = function(jobInfomations, filterConfig) {
     return $q(function(resolve, reject) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/jobmanager/jobs/job.controller.js b/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
index 8bf9d87..50c3ad4 100644
--- a/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
+++ b/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('JobCtrl', JobCtrl);
 
-JobCtrl.$inject = ['$scope', '$http', 'baseUrlSrv'];
-
 function JobCtrl($scope, $http, baseUrlSrv) {
+  'ngInject';
+
   $scope.init = function(jobInformation) {
     $scope.progressValue = 0;
   };

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index 11c2c58..0510879 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -14,28 +14,11 @@
 
 angular.module('zeppelinWebApp').controller('NotebookCtrl', NotebookCtrl);
 
-NotebookCtrl.$inject = [
-  '$scope',
-  '$route',
-  '$routeParams',
-  '$location',
-  '$rootScope',
-  '$http',
-  'websocketMsgSrv',
-  'baseUrlSrv',
-  '$timeout',
-  'saveAsService',
-  'ngToast',
-  'noteActionSrv',
-  'noteVarShareService',
-  'TRASH_FOLDER_ID',
-  'heliumService',
-];
-
 function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
                       $http, websocketMsgSrv, baseUrlSrv, $timeout, saveAsService,
                       ngToast, noteActionSrv, noteVarShareService, TRASH_FOLDER_ID,
                       heliumService) {
+  'ngInject';
 
   ngToast.dismiss();
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index e6f3244..c589e37 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -18,29 +18,12 @@ import {
 
 angular.module('zeppelinWebApp').controller('ParagraphCtrl', ParagraphCtrl);
 
-ParagraphCtrl.$inject = [
-  '$scope',
-  '$rootScope',
-  '$route',
-  '$window',
-  '$routeParams',
-  '$location',
-  '$timeout',
-  '$compile',
-  '$http',
-  '$q',
-  'websocketMsgSrv',
-  'baseUrlSrv',
-  'ngToast',
-  'saveAsService',
-  'noteVarShareService',
-  'heliumService'
-];
-
 function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $location,
                        $timeout, $compile, $http, $q, websocketMsgSrv,
                        baseUrlSrv, ngToast, saveAsService, noteVarShareService,
                        heliumService) {
+  'ngInject';
+
   var ANGULAR_FUNCTION_OBJECT_NAME_PREFIX = '_Z_ANGULAR_FUNC_';
   $scope.parentNote = null;
   $scope.paragraph = {};

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
index 5f0ae00..0430370 100644
--- a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
@@ -26,30 +26,10 @@ import {
 
 angular.module('zeppelinWebApp').controller('ResultCtrl', ResultCtrl);
 
-ResultCtrl.$inject = [
-  '$scope',
-  '$rootScope',
-  '$route',
-  '$window',
-  '$routeParams',
-  '$location',
-  '$timeout',
-  '$compile',
-  '$http',
-  '$q',
-  '$templateRequest',
-  '$sce',
-  'websocketMsgSrv',
-  'baseUrlSrv',
-  'ngToast',
-  'saveAsService',
-  'noteVarShareService',
-  'heliumService'
-];
-
 function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location,
                     $timeout, $compile, $http, $q, $templateRequest, $sce, websocketMsgSrv,
                     baseUrlSrv, ngToast, saveAsService, noteVarShareService, heliumService)
{
+  'ngInject';
 
   /**
    * Built-in visualizations

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/notebookRepos/notebookRepos.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebookRepos/notebookRepos.controller.js b/zeppelin-web/src/app/notebookRepos/notebookRepos.controller.js
index 3d82206..14357fd 100644
--- a/zeppelin-web/src/app/notebookRepos/notebookRepos.controller.js
+++ b/zeppelin-web/src/app/notebookRepos/notebookRepos.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('NotebookReposCtrl', NotebookReposCtrl);
 
-NotebookReposCtrl.$inject = ['$http', 'baseUrlSrv', 'ngToast'];
-
 function NotebookReposCtrl($http, baseUrlSrv, ngToast) {
+  'ngInject';
+
   var vm = this;
   vm.notebookRepos = [];
   vm.showDropdownSelected = showDropdownSelected;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/app/search/result-list.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/search/result-list.controller.js b/zeppelin-web/src/app/search/result-list.controller.js
index 30c8325..f3ceb6a 100644
--- a/zeppelin-web/src/app/search/result-list.controller.js
+++ b/zeppelin-web/src/app/search/result-list.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('SearchResultCtrl', SearchResultCtrl);
 
-SearchResultCtrl.$inject = ['$scope', '$routeParams', 'searchService'];
-
 function SearchResultCtrl($scope, $routeParams, searchService) {
+  'ngInject';
+
   $scope.isResult = true ;
   $scope.searchTerm = $routeParams.searchTerm;
   var results = searchService.search({'q': $routeParams.searchTerm}).query();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/arrayOrderingSrv/arrayOrdering.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/arrayOrderingSrv/arrayOrdering.service.js b/zeppelin-web/src/components/arrayOrderingSrv/arrayOrdering.service.js
index 7b9d41a..70d9f6a 100644
--- a/zeppelin-web/src/components/arrayOrderingSrv/arrayOrdering.service.js
+++ b/zeppelin-web/src/components/arrayOrderingSrv/arrayOrdering.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('arrayOrderingSrv', arrayOrderingSrv);
 
-arrayOrderingSrv.$inject = ['TRASH_FOLDER_ID'];
-
 function arrayOrderingSrv(TRASH_FOLDER_ID) {
+  'ngInject';
+
   var arrayOrderingSrv = this;
 
   this.noteListOrdering = function(note) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/clipboard/clipboard.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/clipboard/clipboard.controller.js b/zeppelin-web/src/components/clipboard/clipboard.controller.js
index a989920..685f04e 100644
--- a/zeppelin-web/src/components/clipboard/clipboard.controller.js
+++ b/zeppelin-web/src/components/clipboard/clipboard.controller.js
@@ -12,9 +12,10 @@
  * limitations under the License.
  */
 angular.module('zeppelinWebApp').controller('clipboardCtrl', clipboardCtrl);
-clipboardCtrl.$inject = ['$scope'];
 
 function clipboardCtrl($scope) {
+  'ngInject';
+
   $scope.complete = function(e) {
     $scope.copied = true;
     $scope.tooltip = 'Copied!';

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/helium/helium.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/helium/helium.service.js b/zeppelin-web/src/components/helium/helium.service.js
index a8664d3..ee7bddc 100644
--- a/zeppelin-web/src/components/helium/helium.service.js
+++ b/zeppelin-web/src/components/helium/helium.service.js
@@ -16,9 +16,8 @@ import { HeliumType, } from './helium-type';
 
 angular.module('zeppelinWebApp').service('heliumService', heliumService);
 
-heliumService.$inject = ['$http', 'baseUrlSrv', 'ngToast'];
-
 function heliumService($http, baseUrlSrv, ngToast) {
+  'ngInject';
 
   var url = baseUrlSrv.getRestApiBase() + '/helium/bundle/load';
   if (process.env.HELIUM_BUNDLE_DEV) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/interpreter/interpreter.directive.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/interpreter/interpreter.directive.js b/zeppelin-web/src/components/interpreter/interpreter.directive.js
index b207e34..0ec6353 100644
--- a/zeppelin-web/src/components/interpreter/interpreter.directive.js
+++ b/zeppelin-web/src/components/interpreter/interpreter.directive.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').directive('interpreterDirective', interpreterDirective);
 
-interpreterDirective.$inject = ['$timeout'];
-
 function interpreterDirective($timeout) {
+  'ngInject';
+
   return {
     restrict: 'A',
     link: function(scope, element, attr) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/login/login.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/login/login.controller.js b/zeppelin-web/src/components/login/login.controller.js
index f4a6dd9..8b761a4 100644
--- a/zeppelin-web/src/components/login/login.controller.js
+++ b/zeppelin-web/src/components/login/login.controller.js
@@ -14,8 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('LoginCtrl', LoginCtrl);
 
-LoginCtrl.$inject = ['$scope', '$rootScope', '$http', '$httpParamSerializer', 'baseUrlSrv'];
 function LoginCtrl($scope, $rootScope, $http, $httpParamSerializer, baseUrlSrv) {
+  'ngInject';
+
   $scope.SigningIn = false;
   $scope.loginParams = {};
   $scope.login = function() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/navbar/navbar.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/navbar/navbar.controller.js b/zeppelin-web/src/components/navbar/navbar.controller.js
index 4be0e68..a7a7cde 100644
--- a/zeppelin-web/src/components/navbar/navbar.controller.js
+++ b/zeppelin-web/src/components/navbar/navbar.controller.js
@@ -14,23 +14,11 @@
 
 angular.module('zeppelinWebApp').controller('NavCtrl', NavCtrl);
 
-NavCtrl.$inject = [
-  '$scope',
-  '$rootScope',
-  '$http',
-  '$routeParams',
-  '$location',
-  'noteListDataFactory',
-  'baseUrlSrv',
-  'websocketMsgSrv',
-  'arrayOrderingSrv',
-  'searchService',
-  'TRASH_FOLDER_ID'
-];
-
 function NavCtrl($scope, $rootScope, $http, $routeParams, $location,
                  noteListDataFactory, baseUrlSrv, websocketMsgSrv,
                  arrayOrderingSrv, searchService, TRASH_FOLDER_ID) {
+  'ngInject';
+
   var vm = this;
   vm.arrayOrderingSrv = arrayOrderingSrv;
   vm.connected = websocketMsgSrv.isConnected();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/noteAction/noteAction.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteAction/noteAction.service.js b/zeppelin-web/src/components/noteAction/noteAction.service.js
index 0b9160b..e08a6c3 100644
--- a/zeppelin-web/src/components/noteAction/noteAction.service.js
+++ b/zeppelin-web/src/components/noteAction/noteAction.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('noteActionSrv', noteActionSrv);
 
-noteActionSrv.$inject = ['websocketMsgSrv', '$location', 'renameSrv', 'noteListDataFactory'];
-
 function noteActionSrv(websocketMsgSrv, $location, renameSrv, noteListDataFactory) {
+  'ngInject';
+
   this.moveNoteToTrash = function(noteId, redirectToHome) {
     BootstrapDialog.confirm({
       closable: true,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/noteListDataFactory/noteList.datafactory.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteListDataFactory/noteList.datafactory.js b/zeppelin-web/src/components/noteListDataFactory/noteList.datafactory.js
index 9b20033..f92bfaf 100644
--- a/zeppelin-web/src/components/noteListDataFactory/noteList.datafactory.js
+++ b/zeppelin-web/src/components/noteListDataFactory/noteList.datafactory.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').factory('noteListDataFactory', noteListDataFactory);
 
-noteListDataFactory.$inject = ['TRASH_FOLDER_ID'];
-
 function noteListDataFactory(TRASH_FOLDER_ID) {
+  'ngInject';
+
   var notes = {
     root: {children: []},
     flatList: [],

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/noteName-create/notename.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteName-create/notename.controller.js b/zeppelin-web/src/components/noteName-create/notename.controller.js
index e6e66c3..43269a6 100644
--- a/zeppelin-web/src/components/noteName-create/notename.controller.js
+++ b/zeppelin-web/src/components/noteName-create/notename.controller.js
@@ -14,14 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('NotenameCtrl', NotenameCtrl);
 
-NotenameCtrl.$inject = [
-  '$scope',
-  'noteListDataFactory',
-  '$routeParams',
-  'websocketMsgSrv'
-];
-
 function NotenameCtrl($scope, noteListDataFactory, $routeParams, websocketMsgSrv) {
+  'ngInject';
+
   var vm = this;
   vm.clone = false;
   vm.notes = noteListDataFactory;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/noteName-import/notenameImport.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteName-import/notenameImport.controller.js b/zeppelin-web/src/components/noteName-import/notenameImport.controller.js
index 10f04f4..74c9c59 100644
--- a/zeppelin-web/src/components/noteName-import/notenameImport.controller.js
+++ b/zeppelin-web/src/components/noteName-import/notenameImport.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('NoteImportCtrl', NoteImportCtrl);
 
-NoteImportCtrl.$inject = ['$scope', '$timeout', 'websocketMsgSrv'];
-
 function NoteImportCtrl($scope, $timeout, websocketMsgSrv) {
+  'ngInject';
+  
   var vm = this;
   $scope.note = {};
   $scope.note.step1 = true;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/notevarshareService/notevarshare.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/notevarshareService/notevarshare.service.js b/zeppelin-web/src/components/notevarshareService/notevarshare.service.js
index 0a3b7db..a4bf7bc 100644
--- a/zeppelin-web/src/components/notevarshareService/notevarshare.service.js
+++ b/zeppelin-web/src/components/notevarshareService/notevarshare.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('noteVarShareService', noteVarShareService);
 
-noteVarShareService.$inject = [];
-
 function noteVarShareService() {
+  'ngInject';
+
   var store = {};
 
   this.clear = function() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/popover-html-unsafe/popover-html-unsafe.directive.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/popover-html-unsafe/popover-html-unsafe.directive.js
b/zeppelin-web/src/components/popover-html-unsafe/popover-html-unsafe.directive.js
index 386a358..ad2f7ea 100644
--- a/zeppelin-web/src/components/popover-html-unsafe/popover-html-unsafe.directive.js
+++ b/zeppelin-web/src/components/popover-html-unsafe/popover-html-unsafe.directive.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').directive('popoverHtmlUnsafe', popoverHtmlUnsafe);
 
-popoverHtmlUnsafe.$inject = ['$tooltip'];
-
 function popoverHtmlUnsafe($tooltip) {
+  'ngInject';
+
   return $tooltip('popoverHtmlUnsafe', 'popover', 'click');
 }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/rename/rename.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/rename/rename.controller.js b/zeppelin-web/src/components/rename/rename.controller.js
index 232f1e7..61fe1d6 100644
--- a/zeppelin-web/src/components/rename/rename.controller.js
+++ b/zeppelin-web/src/components/rename/rename.controller.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').controller('RenameCtrl', RenameCtrl);
 
-RenameCtrl.$inject = ['$scope'];
-
 function RenameCtrl($scope) {
+  'ngInject';
+
   var self = this;
 
   $scope.params = {newName: ''};

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/rename/rename.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/rename/rename.service.js b/zeppelin-web/src/components/rename/rename.service.js
index 2c252d5..c25e145 100644
--- a/zeppelin-web/src/components/rename/rename.service.js
+++ b/zeppelin-web/src/components/rename/rename.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('renameSrv', renameSrv);
 
-renameSrv.$inject = ['$rootScope'];
-
 function renameSrv($rootScope) {
+  'ngInject';
+
   var self = this;
 
   /**

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/saveAs/saveAs.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/saveAs/saveAs.service.js b/zeppelin-web/src/components/saveAs/saveAs.service.js
index 378da4c..5324fe0 100644
--- a/zeppelin-web/src/components/saveAs/saveAs.service.js
+++ b/zeppelin-web/src/components/saveAs/saveAs.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('saveAsService', saveAsService);
 
-saveAsService.$inject = ['browserDetectService'];
-
 function saveAsService(browserDetectService) {
+  'ngInject';
+
   this.saveAs = function(content, filename, extension) {
     var BOM = '\uFEFF';
     if (browserDetectService.detectIE()) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/searchService/search.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/searchService/search.service.js b/zeppelin-web/src/components/searchService/search.service.js
index 97468dd..460a3d4 100644
--- a/zeppelin-web/src/components/searchService/search.service.js
+++ b/zeppelin-web/src/components/searchService/search.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('searchService', searchService);
 
-searchService.$inject = ['$resource', 'baseUrlSrv'];
-
 function searchService($resource, baseUrlSrv) {
+  'ngInject';
+
   this.search = function(term) {
     this.searchTerm = term.q;
     console.log('Searching for: %o', term.q);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
index df0ea48..821884b 100644
--- a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
+++ b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').factory('websocketEvents', websocketEvents);
 
-websocketEvents.$inject = ['$rootScope', '$websocket', '$location', 'baseUrlSrv'];
-
 function websocketEvents($rootScope, $websocket, $location, baseUrlSrv) {
+  'ngInject';
+
   var websocketCalls = {};
   var pingIntervalId;
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1ae4f033/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js b/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js
index 4fd4b95..8d6863d 100644
--- a/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js
+++ b/zeppelin-web/src/components/websocketEvents/websocketMsg.service.js
@@ -14,9 +14,9 @@
 
 angular.module('zeppelinWebApp').service('websocketMsgSrv', websocketMsgSrv);
 
-websocketMsgSrv.$inject = ['$rootScope', 'websocketEvents'];
-
 function websocketMsgSrv($rootScope, websocketEvents) {
+  'ngInject';
+
   return {
 
     getHomeNote: function() {


Mime
View raw message