From cde8a2d2d24ec045ea7bf86385f1e73b0a8419e9 Mon Sep 17 00:00:00 2001
From: 1ambda <1amb4a@gmail.com>
Date: Sat, 15 Apr 2017 00:38:50 +0900
Subject: [PATCH] fix: dot-location
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/configuration/configuration.controller.js (2/0)
✖ 25:67 Expected dot to be on same line as property dot-location
✖ 28:7 Expected dot to be on same line as property dot-location
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/credential/credential.controller.js (8/0)
✖ 28:59 Expected dot to be on same line as property dot-location
✖ 34:7 Expected dot to be on same line as property dot-location
✖ 67:74 Expected dot to be on same line as property dot-location
✖ 78:7 Expected dot to be on same line as property dot-location
✖ 142:69 Expected dot to be on same line as property dot-location
✖ 147:7 Expected dot to be on same line as property dot-location
✖ 169:78 Expected dot to be on same line as property dot-location
✖ 174:13 Expected dot to be on same line as property dot-location
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/helium/helium.controller.js (4/0)
✖ 135:73 Expected dot to be on same line as property dot-location
✖ 139:13 Expected dot to be on same line as property dot-location
✖ 262:38 Expected dot to be on same line as property dot-location
✖ 266:13 Expected dot to be on same line as property dot-location
```
---
zeppelin-web/.eslintrc | 1 -
.../configuration/configuration.controller.js | 8 ++---
.../app/credential/credential.controller.js | 32 +++++++++----------
.../src/app/helium/helium.controller.js | 16 +++++-----
.../src/app/notebook/notebook.controller.js | 16 +++++-----
5 files changed, 36 insertions(+), 37 deletions(-)
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,