Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Fix lint warnings and errors #445

Merged
merged 1 commit into from
Jul 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/view/application.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
var account = this.modelManager.retrieve('app.model.account');

// Fetch the list of services instances
/* eslint-disable */
// TODO: If this fails, we should show a notification message
/* eslint-enable */
this.modelManager.retrieve('app.model.serviceInstance')
.list()
.then(function onSuccess(data) {
Expand All @@ -148,7 +150,7 @@
} else {
var userServiceInstanceModel = that.modelManager.retrieve('app.model.serviceInstance.user');
// Need to get the user's service list to determine if they have any connected
return userServiceInstanceModel.list().then(function() {
return userServiceInstanceModel.list().then(function () {
// Developer - allow user to connect services, if we have some and none are connected
that.showRegistration = userServiceInstanceModel.numValid === 0;
});
Expand Down
4 changes: 1 addition & 3 deletions src/app/view/application.directive.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Scheme: 'https',
Host: 'api.test.com',
Path: ''
}
};

beforeEach(module('templates'));
beforeEach(module('green-box-console'));
Expand Down Expand Up @@ -160,7 +160,6 @@
expect(applicationCtrl.serverFailedToRespond).toBe(false);
});


it('invoke `login` method - failure with bad credentials', function () {
applicationCtrl.loggedIn = false;
$httpBackend.when('POST', '/pp/v1/auth/login/uaa').respond(400, {});
Expand Down Expand Up @@ -279,7 +278,6 @@
});

it('should not show service instance registration if we have registered services', function () {
var mockUser = {id: 1, username: 'dev', registered: true};
var future = 50000 + (new Date()).getTime() / 1000;

$httpBackend.when('GET', '/pp/v1/cnsis/registered').respond(200, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
'$stateParams'
];

function ClusterOrgController(modelManager, $stateParams) { }
function ClusterOrgController(modelManager, $stateParams) {} // eslint-disable-line no-unused-vars

angular.extend(ClusterOrgController.prototype, {});

})();
6 changes: 3 additions & 3 deletions src/app/view/endpoints/clusters/clusters.module.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
(function () {
'use strict';

angular
Expand Down Expand Up @@ -27,8 +27,8 @@
return new Clusters();
}

function Clusters() { }
function Clusters() {}

angular.extend(Clusters.prototype, { });
angular.extend(Clusters.prototype, {});

})();
4 changes: 2 additions & 2 deletions src/app/view/endpoints/endpoints.module.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
(function () {
'use strict';

angular
Expand Down Expand Up @@ -46,7 +46,7 @@

angular.extend(Endpoints.prototype, {

onLoggedIn: function() {
onLoggedIn: function () {
var menu = this.modelManager.retrieve('app.model.navigation').menu;
menu.addMenuItem('endpoints', 'endpoint.dashboard', gettext('Endpoints'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* @function stateServiceFactory
* @name cloud-foundry.model.application.stateService
* @memberof cloud-foundry.model.application
* @description Service to map app states to user-friendly state names, presentation and actions.
* @returns {object} The Application State Service
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
appStateService = $injector.get('cloud-foundry.model.application.stateService');
}));

afterEach(function() {
afterEach(function () {
$httpBackend.verifyNoOutstandingExpectation();
$httpBackend.verifyNoOutstandingRequest();
});
Expand All @@ -31,7 +31,7 @@
};
var instances = [];
var running = 0;
_.each(instanceSstates, function(s) {
_.each(instanceSstates, function (s) {
instances.push({state: s});
if (s === 'RUNNING') { running++; }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
var that = this;
this.ready = false;
this.model.getAppSummary(this.cnsiGuid, this.id, true)
.finally(function() {
.finally(function () {
that.ready = true;
});

Expand Down