Format code using clang-format-5.0
Once merged, this repository will have CI enforce
the coding guidelines in the .clang-format file.
Change-Id: I96a05972665f9c67625c6850c3da25edc540be06
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/app/common/services/dataService.js b/app/common/services/dataService.js
index 79a3a0e..ffe15a2 100644
--- a/app/common/services/dataService.js
+++ b/app/common/services/dataService.js
@@ -10,9 +10,9 @@
window.angular && (function(angular) {
'use strict';
- angular
- .module('app.common.services')
- .service('dataService', ['Constants', function(Constants) {
+ angular.module('app.common.services').service('dataService', [
+ 'Constants',
+ function(Constants) {
this.server_health = Constants.SERVER_HEALTH.unknown;
this.server_state = 'Unreachable';
this.server_status = -2;
@@ -45,20 +45,23 @@
};
this.getHost = function() {
- if (sessionStorage.getItem(Constants.API_CREDENTIALS.host_storage_key) !== null) {
- return sessionStorage.getItem(Constants.API_CREDENTIALS.host_storage_key);
- }
- else {
+ if (sessionStorage.getItem(
+ Constants.API_CREDENTIALS.host_storage_key) !== null) {
+ return sessionStorage.getItem(
+ Constants.API_CREDENTIALS.host_storage_key);
+ } else {
return Constants.API_CREDENTIALS.default_protocol + '://' +
- window.location.hostname +
- (window.location.port ? ':' + window.location.port : '');
+ window.location.hostname +
+ (window.location.port ? ':' + window.location.port : '');
}
};
this.setHost = function(hostWithPort) {
hostWithPort = hostWithPort.replace(/^https?\:\/\//ig, '');
- var hostURL = Constants.API_CREDENTIALS.default_protocol + '://' + hostWithPort;
- sessionStorage.setItem(Constants.API_CREDENTIALS.host_storage_key, hostURL);
+ var hostURL =
+ Constants.API_CREDENTIALS.default_protocol + '://' + hostWithPort;
+ sessionStorage.setItem(
+ Constants.API_CREDENTIALS.host_storage_key, hostURL);
this.host = hostURL;
this.reloadServerId();
};
@@ -128,16 +131,15 @@
this.activateErrorModal = function(data) {
if (data && data.hasOwnProperty('title')) {
this.errorModalDetails.title = data.title;
- }
- else {
+ } else {
this.errorModalDetails.title = Constants.MESSAGES.ERROR_MODAL.TITLE;
}
if (data && data.hasOwnProperty('description')) {
this.errorModalDetails.description = data.description;
- }
- else {
- this.errorModalDetails.description = Constants.MESSAGES.ERROR_MODAL.DESCRIPTION;
+ } else {
+ this.errorModalDetails.description =
+ Constants.MESSAGES.ERROR_MODAL.DESCRIPTION;
}
this.displayErrorModal = true;
};
@@ -145,6 +147,7 @@
this.deactivateErrorModal = function() {
this.displayErrorModal = false;
};
- }]);
+ }
+ ]);
})(window.angular);