Add local user page

- Add Bootstrap out of box table component
- Import layout plugin
- Add user role privilege table
- Add local user modals
- Add inline table actions
- Add local user store
- Add Axios requests

Initial setup to use Vuex store for local user
management page. For now using a timeout to
fake fetching async data. Data flow is working
between store and component.

Using Axios in very unrefined way, just to get some
API requests going. Simple user request working if
base, username, password variables defined.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I3b0d757857268feff32c6bec1c3fd95c302a568f
diff --git a/src/store/modules/AccessControl/LocalUserMangementStore.js b/src/store/modules/AccessControl/LocalUserMangementStore.js
new file mode 100644
index 0000000..dddfd2c
--- /dev/null
+++ b/src/store/modules/AccessControl/LocalUserMangementStore.js
@@ -0,0 +1,56 @@
+import Axios from "axios";
+
+const LocalUserManagementStore = {
+  namespaced: true,
+  state: {
+    allUsers: []
+  },
+  getters: {
+    allUsers(state) {
+      return state.allUsers;
+    }
+  },
+  mutations: {
+    setUsers(state, allUsers) {
+      state.allUsers = allUsers;
+    }
+  },
+  actions: {
+    getUsers({ commit }) {
+      let base;
+      let username;
+      let password;
+      if (base && username && password) {
+        Axios.defaults.baseURL = base;
+        Axios.defaults.auth = {};
+        Axios.defaults.auth.username = username;
+        Axios.defaults.auth.password = password;
+        Axios.get("redfish/v1/AccountService/Accounts")
+          .then(response => {
+            return response.data.Members.map(user => user["@odata.id"]);
+          })
+          .then(userIds => {
+            return Axios.all(userIds.map(user => Axios.get(user)));
+          })
+          .then(users => {
+            const userData = users.map(user => user.data);
+            commit("setUsers", userData);
+          })
+          .catch(error => {
+            console.log(error);
+          });
+      } else {
+        // Faking async call with timeout
+        setTimeout(() => {
+          const users = [
+            { UserName: "root", RoleId: "Admin", Locked: false, Enabled: true },
+            { UserName: "user1", RoleId: "user", Locked: false, Enabled: false }
+          ];
+          commit("setUsers", users);
+        }, 3000);
+      }
+    }
+  }
+};
+
+export default LocalUserManagementStore;