Run js-beautify and fixjsstyle on code
Found this pointer on stackoverflow:
https://stackoverflow.com/a/31660434/5508494
End goal is to get the code formatted well enough that
clang format will run correctly against it.
Change-Id: I80053e78d253d8eee49233e42d55e5807ae8fdc8
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/app/multi-server/controllers/multi-server-controller.js b/app/multi-server/controllers/multi-server-controller.js
index 627108f..71ec3ac 100644
--- a/app/multi-server/controllers/multi-server-controller.js
+++ b/app/multi-server/controllers/multi-server-controller.js
@@ -6,53 +6,54 @@
* @name multiServerController
*/
-window.angular && (function (angular) {
- 'use strict';
+window.angular && (function(angular) {
+ 'use strict';
- angular
- .module('app.overview')
- .controller('multiServerController', [
- '$scope',
- '$window',
- 'APIUtils',
- 'dataService',
- function($scope, $window, APIUtils, dataService){
- $scope.dataService = dataService;
- $scope.customSearch = "";
- $scope.searchTerms = [];
- $scope.loading = false;
- $scope.clear = function(){
- $scope.customSearch = "";
- $scope.searchTerms = [];
- }
+ angular
+ .module('app.overview')
+ .controller('multiServerController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService) {
+ $scope.dataService = dataService;
+ $scope.customSearch = '';
+ $scope.searchTerms = [];
+ $scope.loading = false;
+ $scope.clear = function() {
+ $scope.customSearch = '';
+ $scope.searchTerms = [];
+ };
- $scope.doSearchOnEnter = function (event) {
- var search = $scope.customSearch.replace(/^\s+/g,'').replace(/\s+$/g,'');
- if (event.keyCode === 13 &&
- search.length >= 2) {
- $scope.searchTerms = $scope.customSearch.split(" ");
- }else{
- if(search.length == 0){
- $scope.searchTerms = [];
- }
- }
- };
-
- $scope.doSearchOnClick = function() {
- var search = $scope.customSearch.replace(/^\s+/g,'').replace(/\s+$/g,'');
- if (search.length >= 2) {
- $scope.searchTerms = $scope.customSearch.split(" ");
- }else{
- if(search.length == 0){
- $scope.searchTerms = [];
- }
- }
- };
- $scope.addServer = function(){
- $scope.multi_server_add = ! $scope.multi_server_add
- }
+ $scope.doSearchOnEnter = function(event) {
+ var search = $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
+ if (event.keyCode === 13 &&
+ search.length >= 2) {
+ $scope.searchTerms = $scope.customSearch.split(' ');
+ }
+ else {
+ if (search.length == 0) {
+ $scope.searchTerms = [];
}
- ]
- );
+ }
+ };
-})(angular);
\ No newline at end of file
+ $scope.doSearchOnClick = function() {
+ var search = $scope.customSearch.replace(/^\s+/g, '').replace(/\s+$/g, '');
+ if (search.length >= 2) {
+ $scope.searchTerms = $scope.customSearch.split(' ');
+ }
+ else {
+ if (search.length == 0) {
+ $scope.searchTerms = [];
+ }
+ }
+ };
+ $scope.addServer = function() {
+ $scope.multi_server_add = !$scope.multi_server_add;
+ };
+ }
+ ]);
+
+})(angular);
diff --git a/app/multi-server/index.js b/app/multi-server/index.js
index c4f8e61..97bd67a 100644
--- a/app/multi-server/index.js
+++ b/app/multi-server/index.js
@@ -5,23 +5,23 @@
* @exports app/multi-server
*/
-window.angular && (function (angular) {
- 'use strict';
+window.angular && (function(angular) {
+ 'use strict';
- angular
- .module('app.multiServer', [
- 'ngRoute',
- 'app.constants',
- 'app.common.services'
- ])
- // Route configuration
- .config(['$routeProvider', function ($routeProvider) {
- $routeProvider
- .when('/multi-server/overview', {
- 'template': require('./controllers/multi-server-controller.html'),
- 'controller': 'multiServerController',
- authenticated: true
- });
- }]);
+ angular
+ .module('app.multiServer', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function($routeProvider) {
+ $routeProvider
+ .when('/multi-server/overview', {
+ 'template': require('./controllers/multi-server-controller.html'),
+ 'controller': 'multiServerController',
+ authenticated: true
+ });
+ }]);
})(window.angular);