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/server-health/controllers/inventory-overview-controller.js b/app/server-health/controllers/inventory-overview-controller.js
index a0dad75..9705395 100644
--- a/app/server-health/controllers/inventory-overview-controller.js
+++ b/app/server-health/controllers/inventory-overview-controller.js
@@ -9,68 +9,64 @@
window.angular && (function(angular) {
'use strict';
- angular
- .module('app.serverHealth')
- .controller('inventoryOverviewController', [
- '$scope',
- '$window',
- 'APIUtils',
- 'dataService',
- function($scope, $window, APIUtils, dataService) {
- $scope.dataService = dataService;
- $scope.hardwares = [];
- $scope.originalData = {};
+ angular.module('app.serverHealth').controller('inventoryOverviewController', [
+ '$scope', '$window', 'APIUtils', 'dataService',
+ function($scope, $window, APIUtils, dataService) {
+ $scope.dataService = dataService;
+ $scope.hardwares = [];
+ $scope.originalData = {};
+ $scope.customSearch = '';
+ $scope.searchTerms = [];
+ $scope.loading = false;
+
+ $scope.loading = true;
+ APIUtils.getHardwares(function(data, originalData) {
+ $scope.hardwares = data;
+ $scope.originalData = JSON.stringify(originalData);
+ $scope.loading = false;
+ });
+
+ $scope.clear = function() {
$scope.customSearch = '';
$scope.searchTerms = [];
- $scope.loading = false;
+ };
- $scope.loading = true;
- APIUtils.getHardwares(function(data, originalData) {
- $scope.hardwares = data;
- $scope.originalData = JSON.stringify(originalData);
- $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(' ');
+ $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 = [];
}
- 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(' ');
+ $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 = [];
}
- else {
- if (search.length == 0) {
- $scope.searchTerms = [];
- }
- }
- };
+ }
+ };
- $scope.filterBySearchTerms = function(hardware) {
+ $scope.filterBySearchTerms = function(hardware) {
- if (!$scope.searchTerms.length) return true;
+ if (!$scope.searchTerms.length) return true;
- for (var i = 0, length = $scope.searchTerms.length; i < length; i++) {
- if (hardware.search_text.indexOf($scope.searchTerms[i].toLowerCase()) == -1) return false;
- }
- return true;
- };
- }
- ]);
+ for (var i = 0, length = $scope.searchTerms.length; i < length; i++) {
+ if (hardware.search_text.indexOf(
+ $scope.searchTerms[i].toLowerCase()) == -1)
+ return false;
+ }
+ return true;
+ };
+ }
+ ]);
})(angular);