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