WebUI: Support for configure failed login attempts

This commit adds the support for failed login attempts
configuration. With this user can configure the number of
failed login attempts and account lockout duration.
This also adds provision to view other user account
properties like MaxPassword, MinPassword etc.

Tested By:
 Loaded the Webui and modified values like
 Failed login Attempts and Account lockout duration.
 Also tested other account properties view.

Change-Id: I6abd5a16771956640ba6b6d81c1c7ad9503067b1
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 743d3fa..9711ba6 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -685,6 +685,39 @@
           }
           return deferred.promise;
         },
+
+        getAllUserAccountProperties: function(callback) {
+          return $http({
+                   method: 'GET',
+                   url: DataService.getHost() + '/redfish/v1/AccountService',
+                   withCredentials: true
+                 })
+              .then(
+                  function(response) {
+                    return response.data;
+                  },
+                  function(error) {
+                    console.log(error);
+                  });
+        },
+
+        saveUserAccountProperties: function(lockoutduration, lockoutthreshold) {
+          var data = {};
+          if (lockoutduration != undefined) {
+            data['AccountLockoutDuration'] = lockoutduration;
+          }
+          if (lockoutthreshold != undefined) {
+            data['AccountLockoutThreshold'] = lockoutthreshold;
+          }
+
+          return $http({
+            method: 'PATCH',
+            url: DataService.getHost() + '/redfish/v1/AccountService',
+            withCredentials: true,
+            data: data
+          });
+        },
+
         createUser: function(user, passwd, role, enabled) {
           if (DataService.configJson.redfishSupportEnabled == true) {
             var data = {};