diff --git a/zeppelin-web/.eslintrc b/zeppelin-web/.eslintrc index 8e32a083b4..b41aca072c 100644 --- a/zeppelin-web/.eslintrc +++ b/zeppelin-web/.eslintrc @@ -31,7 +31,6 @@ "process": false }, "rules": { - "dot-location": 0, "brace-style": 0, "one-var": 0, "prefer-rest-params": 0, diff --git a/zeppelin-web/src/app/configuration/configuration.controller.js b/zeppelin-web/src/app/configuration/configuration.controller.js index 70c9fe07bf..39035a8688 100644 --- a/zeppelin-web/src/app/configuration/configuration.controller.js +++ b/zeppelin-web/src/app/configuration/configuration.controller.js @@ -22,11 +22,11 @@ function ConfigurationCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { ngToast.dismiss(); var getConfigurations = function() { - $http.get(baseUrlSrv.getRestApiBase() + '/configurations/all'). - success(function(data, status, headers, config) { + $http.get(baseUrlSrv.getRestApiBase() + '/configurations/all') + .success(function(data, status, headers, config) { $scope.configurations = data.body; - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { if (status === 401) { ngToast.danger({ content: 'You don\'t have permission on this page', diff --git a/zeppelin-web/src/app/credential/credential.controller.js b/zeppelin-web/src/app/credential/credential.controller.js index 30edfe9458..e64803eb4a 100644 --- a/zeppelin-web/src/app/credential/credential.controller.js +++ b/zeppelin-web/src/app/credential/credential.controller.js @@ -25,14 +25,14 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { $scope.availableInterpreters = []; var getCredentialInfo = function() { - $http.get(baseUrlSrv.getRestApiBase() + '/credential'). - success(function(data, status, headers, config) { + $http.get(baseUrlSrv.getRestApiBase() + '/credential') + .success(function(data, status, headers, config) { $scope.credentialInfo = _.map(data.body.userCredentials, function(value, prop) { return {entity: prop, password: value.password, username: value.username}; }); console.log('Success %o %o', status, $scope.credentialInfo); - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { if (status === 401) { ngToast.danger({ content: 'You don\'t have permission on this page', @@ -64,8 +64,8 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { 'password': $scope.password }; - $http.put(baseUrlSrv.getRestApiBase() + '/credential', newCredential). - success(function(data, status, headers, config) { + $http.put(baseUrlSrv.getRestApiBase() + '/credential', newCredential) + .success(function(data, status, headers, config) { ngToast.success({ content: 'Successfully saved credentials.', verticalPosition: 'bottom', @@ -75,8 +75,8 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { resetCredentialInfo(); $scope.showAddNewCredentialInfo = false; console.log('Success %o %o', status, data.message); - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { ngToast.danger({ content: 'Error saving credentials', verticalPosition: 'bottom', @@ -139,13 +139,13 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { password: data.password }; - $http.put(baseUrlSrv.getRestApiBase() + '/credential/', request). - success(function(data, status, headers, config) { + $http.put(baseUrlSrv.getRestApiBase() + '/credential/', request) + .success(function(data, status, headers, config) { var index = _.findIndex($scope.credentialInfo, {'entity': entity}); $scope.credentialInfo[index] = request; return true; - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { console.log('Error %o %o', status, data.message); ngToast.danger({ content: 'We couldn\'t save the credential', @@ -166,13 +166,13 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) { message: 'Do you want to delete this credential information?', callback: function(result) { if (result) { - $http.delete(baseUrlSrv.getRestApiBase() + '/credential/' + entity). - success(function(data, status, headers, config) { + $http.delete(baseUrlSrv.getRestApiBase() + '/credential/' + entity) + .success(function(data, status, headers, config) { var index = _.findIndex($scope.credentialInfo, {'entity': entity}); $scope.credentialInfo.splice(index, 1); console.log('Success %o %o', status, data.message); - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { console.log('Error %o %o', status, data.message); }); } diff --git a/zeppelin-web/src/app/helium/helium.controller.js b/zeppelin-web/src/app/helium/helium.controller.js index 615f81161f..f0e49311e2 100644 --- a/zeppelin-web/src/app/helium/helium.controller.js +++ b/zeppelin-web/src/app/helium/helium.controller.js @@ -132,12 +132,12 @@ export default function HeliumCtrl($scope, $rootScope, $sce, confirm.$modalFooter.find('button').addClass('disabled'); confirm.$modalFooter.find('button:contains("OK")') .html(' Enabling'); - heliumService.setVisualizationPackageOrder($scope.bundleOrder). - success(function(data, status) { + heliumService.setVisualizationPackageOrder($scope.bundleOrder) + .success(function(data, status) { init(); confirm.close(); - }). - error(function(data, status) { + }) + .error(function(data, status) { confirm.close(); console.log('Failed to save order'); BootstrapDialog.show({ @@ -259,12 +259,12 @@ export default function HeliumCtrl($scope, $rootScope, $sce, confirm.$modalFooter.find('button').addClass('disabled'); confirm.$modalFooter.find('button:contains("OK")') .html(' Disabling'); - heliumService.disable(name). - success(function(data, status) { + heliumService.disable(name) + .success(function(data, status) { init(); confirm.close(); - }). - error(function(data, status) { + }) + .error(function(data, status) { confirm.close(); console.log('Failed to disable package %o. %o', name, data); BootstrapDialog.show({ diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index 7ecaeaa789..b669fbfc55 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -610,8 +610,8 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, }; var getPermissions = function(callback) { - $http.get(baseUrlSrv.getRestApiBase() + '/notebook/' + $scope.note.id + '/permissions'). - success(function(data, status, headers, config) { + $http.get(baseUrlSrv.getRestApiBase() + '/notebook/' + $scope.note.id + '/permissions') + .success(function(data, status, headers, config) { $scope.permissions = data.body; $scope.permissionsOrig = angular.copy($scope.permissions); // to check dirty @@ -675,8 +675,8 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, if (callback) { callback(); } - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { if (status !== 0) { console.log('Error %o %o', status, data.message); } @@ -753,8 +753,8 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, $scope.savePermissions = function() { convertPermissionsToArray(); $http.put(baseUrlSrv.getRestApiBase() + '/notebook/' + $scope.note.id + '/permissions', - $scope.permissions, {withCredentials: true}). - success(function(data, status, headers, config) { + $scope.permissions, {withCredentials: true}) + .success(function(data, status, headers, config) { getPermissions(function() { console.log('Note permissions %o saved', $scope.permissions); BootstrapDialog.alert({ @@ -765,8 +765,8 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, }); $scope.showPermissions = false; }); - }). - error(function(data, status, headers, config) { + }) + .error(function(data, status, headers, config) { console.log('Error %o %o', status, data.message); BootstrapDialog.show({ closable: false,