fix: dot-location

```
/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

```
This commit is contained in:
1ambda 2017-04-15 00:38:50 +09:00
parent d62af8d31b
commit cde8a2d2d2
5 changed files with 36 additions and 37 deletions

View file

@ -31,7 +31,6 @@
"process": false
},
"rules": {
"dot-location": 0,
"brace-style": 0,
"one-var": 0,
"prefer-rest-params": 0,

View file

@ -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',

View file

@ -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);
});
}

View file

@ -132,12 +132,12 @@ export default function HeliumCtrl($scope, $rootScope, $sce,
confirm.$modalFooter.find('button').addClass('disabled');
confirm.$modalFooter.find('button:contains("OK")')
.html('<i class="fa fa-circle-o-notch fa-spin"></i> 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('<i class="fa fa-circle-o-notch fa-spin"></i> 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({

View file

@ -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,