IA update: Add resource management section

This is the sixth commit for information architecture changes and has
the following changes:

- Resource management section has been added
- Carbon icon used for resource management section is data--base--alt
- Manage power usage page from operations has been moved to
resource management
- Manage power usage page has been updated to power page

Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: If3feb994dbad19dd6cfb1507d976d09643c8e4d6
diff --git a/src/components/AppNavigation/AppNavigationMixin.js b/src/components/AppNavigation/AppNavigationMixin.js
index da8a59c..edeabc5 100644
--- a/src/components/AppNavigation/AppNavigationMixin.js
+++ b/src/components/AppNavigation/AppNavigationMixin.js
@@ -5,6 +5,7 @@
 import IconSettings from '@carbon/icons-vue/es/settings/16';
 import IconSecurity from '@carbon/icons-vue/es/security/16';
 import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
+import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16';
 
 const AppNavigationMixin = {
   components: {
@@ -15,6 +16,7 @@
     iconSettings: IconSettings,
     iconSecurityAndAccess: IconSecurity,
     iconExpand: IconChevronUp,
+    iconResourceManagement: IconDataBase,
   },
   data() {
     return {
@@ -80,11 +82,6 @@
               route: '/operations/firmware',
             },
             {
-              id: 'manage-power-usage',
-              label: this.$t('appNavigation.managePowerUsage'),
-              route: '/operations/manage-power-usage',
-            },
-            {
               id: 'reboot-bmc',
               label: this.$t('appNavigation.rebootBmc'),
               route: '/operations/reboot-bmc',
@@ -160,6 +157,18 @@
             },
           ],
         },
+        {
+          id: 'resource-management',
+          label: this.$t('appNavigation.resourceManagement'),
+          icon: 'iconResourceManagement',
+          children: [
+            {
+              id: 'power',
+              label: this.$t('appNavigation.power'),
+              route: '/resource-management/power',
+            },
+          ],
+        },
       ],
     };
   },
diff --git a/src/env/components/AppNavigation/ibm.js b/src/env/components/AppNavigation/ibm.js
index cbf0db5..32f5c9f 100644
--- a/src/env/components/AppNavigation/ibm.js
+++ b/src/env/components/AppNavigation/ibm.js
@@ -5,6 +5,7 @@
 import IconSettings from '@carbon/icons-vue/es/settings/16';
 import IconSecurity from '@carbon/icons-vue/es/security/16';
 import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
+import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16';
 
 const AppNavigationMixin = {
   components: {
@@ -15,6 +16,7 @@
     iconSettings: IconSettings,
     iconSecurityAndAccess: IconSecurity,
     iconExpand: IconChevronUp,
+    iconResourceManagement: IconDataBase,
   },
   data() {
     return {
@@ -80,11 +82,6 @@
               route: '/operations/firmware',
             },
             {
-              id: 'manage-power-usage',
-              label: this.$t('appNavigation.managePowerUsage'),
-              route: '/operations/manage-power-usage',
-            },
-            {
               id: 'reboot-bmc',
               label: this.$t('appNavigation.rebootBmc'),
               route: '/operations/reboot-bmc',
@@ -155,6 +152,18 @@
             },
           ],
         },
+        {
+          id: 'resource-management',
+          label: this.$t('appNavigation.resourceManagement'),
+          icon: 'iconResourceManagement',
+          children: [
+            {
+              id: 'power',
+              label: this.$t('appNavigation.power'),
+              route: '/resource-management/power',
+            },
+          ],
+        },
       ],
     };
   },
diff --git a/src/env/components/AppNavigation/intel.js b/src/env/components/AppNavigation/intel.js
index a67828d..a43c1ea 100644
--- a/src/env/components/AppNavigation/intel.js
+++ b/src/env/components/AppNavigation/intel.js
@@ -5,6 +5,7 @@
 import IconSettings from '@carbon/icons-vue/es/settings/16';
 import IconSecurity from '@carbon/icons-vue/es/security/16';
 import IconChevronUp from '@carbon/icons-vue/es/chevron--up/16';
+import IconDataBase from '@carbon/icons-vue/es/data--base--alt/16';
 
 const AppNavigationMixin = {
   components: {
@@ -15,6 +16,7 @@
     iconSettings: IconSettings,
     iconSecurityAndAccess: IconSecurity,
     iconExpand: IconChevronUp,
+    iconResourceManagement: IconDataBase,
   },
   data() {
     return {
@@ -70,11 +72,6 @@
               route: '/operations/firmware',
             },
             {
-              id: 'manage-power-usage',
-              label: this.$t('appNavigation.managePowerUsage'),
-              route: '/operations/manage-power-usage',
-            },
-            {
               id: 'reboot-bmc',
               label: this.$t('appNavigation.rebootBmc'),
               route: '/operations/reboot-bmc',
@@ -140,6 +137,18 @@
             },
           ],
         },
+        {
+          id: 'resource-management',
+          label: this.$t('appNavigation.resourceManagement'),
+          icon: 'iconResourceManagement',
+          children: [
+            {
+              id: 'power',
+              label: this.$t('appNavigation.power'),
+              route: '/resource-management/power',
+            },
+          ],
+        },
       ],
     };
   },
diff --git a/src/env/router/ibm.js b/src/env/router/ibm.js
index f32635f..c6ac61f 100644
--- a/src/env/router/ibm.js
+++ b/src/env/router/ibm.js
@@ -11,7 +11,6 @@
 import UserManagement from '@/views/SecurityAndAccess/UserManagement';
 import Login from '@/views/Login';
 import LoginLayout from '@/layouts/LoginLayout';
-import ManagePowerUsage from '@/views/Operations/ManagePowerUsage';
 import Network from '@/views/Settings/Network';
 import Overview from '@/views/Overview';
 import PageNotFound from '@/views/PageNotFound';
@@ -25,6 +24,7 @@
 import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole';
 import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
 import Certificates from '@/views/SecurityAndAccess/Certificates';
+import Power from '@/views/ResourceManagement/Power';
 import i18n from '@/i18n';
 
 // Custom components
@@ -191,14 +191,6 @@
         },
       },
       {
-        path: '/operations/manage-power-usage',
-        name: 'manage-power-usage',
-        component: ManagePowerUsage,
-        meta: {
-          title: i18n.t('appPageTitle.managePowerUsage'),
-        },
-      },
-      {
         path: '/settings/network',
         name: 'network',
         component: Network,
@@ -215,6 +207,14 @@
         },
       },
       {
+        path: '/resource-management/power',
+        name: 'power',
+        component: Power,
+        meta: {
+          title: i18n.t('appPageTitle.power'),
+        },
+      },
+      {
         path: '/operations/factory-reset',
         name: 'factory-reset',
         component: FactoryReset,
diff --git a/src/env/router/intel.js b/src/env/router/intel.js
index dec42af..9f69805 100644
--- a/src/env/router/intel.js
+++ b/src/env/router/intel.js
@@ -11,7 +11,6 @@
 import UserManagement from '@/views/SecurityAndAccess/UserManagement';
 import Login from '@/views/Login';
 import LoginLayout from '@/layouts/LoginLayout';
-import ManagePowerUsage from '@/views/Operations/ManagePowerUsage';
 import Network from '@/views/Settings/Network';
 import Overview from '@/views/Overview';
 import PageNotFound from '@/views/PageNotFound';
@@ -24,6 +23,7 @@
 import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
 import Certificates from '@/views/SecurityAndAccess/Certificates';
 import VirtualMedia from '@/views/Operations/VirtualMedia';
+import Power from '@/views/ResourceManagement/Power';
 import i18n from '@/i18n';
 
 const routes = [
@@ -179,14 +179,6 @@
         },
       },
       {
-        path: '/operations/manage-power-usage',
-        name: 'manage-power-usage',
-        component: ManagePowerUsage,
-        meta: {
-          title: i18n.t('appPageTitle.managePowerUsage'),
-        },
-      },
-      {
         path: '/settings/network',
         name: 'network',
         component: Network,
@@ -195,6 +187,14 @@
         },
       },
       {
+        path: '/resource-management/power',
+        name: 'power',
+        component: Power,
+        meta: {
+          title: i18n.t('appPageTitle.power'),
+        },
+      },
+      {
         path: '/operations/reboot-bmc',
         name: 'reboot-bmc',
         component: RebootBmc,
diff --git a/src/locales/en-US.json b/src/locales/en-US.json
index 33e65f5..e4fb94a 100644
--- a/src/locales/en-US.json
+++ b/src/locales/en-US.json
@@ -98,6 +98,7 @@
     "titleRefresh": "Refresh application data"
   },
   "appNavigation": {
+    "resourceManagement": "Resource management",
     "securityAndAccess": "Security and access",
     "sessions": "@:appPageTitle.sessions",
     "settings": "Settings",
@@ -113,7 +114,6 @@
     "ldap": "@:appPageTitle.ldap",
     "logs": "Logs",
     "userManagement": "@:appPageTitle.userManagement",
-    "managePowerUsage": "@:appPageTitle.managePowerUsage",
     "network": "@:appPageTitle.network",
     "overview": "@:appPageTitle.overview",
     "primaryNavigation": "Primary navigation",
@@ -125,10 +125,12 @@
     "serialOverLan": "SOL console",
     "serverPowerOperations": "@:appPageTitle.serverPowerOperations",
     "certificates": "@:appPageTitle.certificates",
-    "virtualMedia": "@:appPageTitle.virtualMedia"
+    "virtualMedia": "@:appPageTitle.virtualMedia",
+    "power": "@:appPageTitle.power"
   },
   "appPageTitle": {
     "changePassword": "Change password",
+    "power": "Power",
     "sessions": "Sessions",
     "dateTime": "Date and time",
     "dumps": "Dumps",
@@ -140,7 +142,6 @@
     "ldap": "LDAP",
     "userManagement": "User management",
     "login": "Login",
-    "managePowerUsage": "Manage power usage",
     "network": "Network",
     "overview": "Overview",
     "pageNotFound": "Page not found",
@@ -621,14 +622,6 @@
       "successSaveSettings": "Successfully saved account settings."
     }
   },
-  "pageManagePowerUsage": {
-    "description": "Set a power cap to keep power consumption at or below the specified value in watts",
-    "powerCapLabel": "Power cap value (in watts)",
-    "powerCapLabelTextInfo": " Value must be between %{min} and %{max}",
-    "powerCapSettingData": "Apply power cap",
-    "powerCapSettingLabel": "Power cap setting",
-    "powerConsumption": "Current power consumption"
-  },
   "pageNetwork": {
     "dhcp": "DHCP",
     "ipv4": "IPV4",
@@ -721,6 +714,15 @@
       "successSshEnabled": "Successfully enabled SSH security setting."
     }
   },
+  "pagePower": {
+    "description": "Set a power cap to keep power consumption at or below the specified value in watts",
+    "powerCapLabel": "Power cap value (in watts)",
+    "powerCapLabelTextInfo": " Value must be between %{min} and %{max}",
+    "powerCapSettingData": "Apply power cap",
+    "powerCapSettingLabel": "Power cap setting",
+    "powerConsumption": "Current power consumption",
+    "serverPowCapSetting": "Server power cap setting"
+  },
   "pageSensors": {
     "exportFilePrefix": "sensors_",
     "searchForSensors": "Search for sensors",
diff --git a/src/router/routes.js b/src/router/routes.js
index da10375..b99aac5 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -13,7 +13,6 @@
 import UserManagement from '@/views/SecurityAndAccess/UserManagement';
 import Login from '@/views/Login';
 import LoginLayout from '@/layouts/LoginLayout';
-import ManagePowerUsage from '@/views/Operations/ManagePowerUsage';
 import Network from '@/views/Settings/Network';
 import Overview from '@/views/Overview';
 import PageNotFound from '@/views/PageNotFound';
@@ -28,6 +27,7 @@
 import ServerPowerOperations from '@/views/Operations/ServerPowerOperations';
 import Certificates from '@/views/SecurityAndAccess/Certificates';
 import VirtualMedia from '@/views/Operations/VirtualMedia';
+import Power from '@/views/ResourceManagement/Power';
 import i18n from '@/i18n';
 
 const routes = [
@@ -207,14 +207,6 @@
         },
       },
       {
-        path: '/operations/manage-power-usage',
-        name: 'manage-power-usage',
-        component: ManagePowerUsage,
-        meta: {
-          title: i18n.t('appPageTitle.managePowerUsage'),
-        },
-      },
-      {
         path: '/settings/network',
         name: 'network',
         component: Network,
@@ -231,6 +223,14 @@
         },
       },
       {
+        path: '/resource-management/power',
+        name: 'power',
+        component: Power,
+        meta: {
+          title: i18n.t('appPageTitle.power'),
+        },
+      },
+      {
         path: '/operations/reboot-bmc',
         name: 'reboot-bmc',
         component: RebootBmc,
diff --git a/src/views/Operations/ManagePowerUsage/index.js b/src/views/Operations/ManagePowerUsage/index.js
deleted file mode 100644
index f3e95ac..0000000
--- a/src/views/Operations/ManagePowerUsage/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import ManagePowerUsage from './ManagePowerUsage.vue';
-export default ManagePowerUsage;
diff --git a/src/views/Operations/ManagePowerUsage/ManagePowerUsage.vue b/src/views/ResourceManagement/Power.vue
similarity index 85%
rename from src/views/Operations/ManagePowerUsage/ManagePowerUsage.vue
rename to src/views/ResourceManagement/Power.vue
index 38dbf0b..8e4acdd 100644
--- a/src/views/Operations/ManagePowerUsage/ManagePowerUsage.vue
+++ b/src/views/ResourceManagement/Power.vue
@@ -1,11 +1,11 @@
 <template>
   <b-container fluid="xl">
-    <page-title :description="$t('pageManagePowerUsage.description')" />
+    <page-title :description="$t('pagePower.description')" />
 
     <b-row>
       <b-col sm="8" md="6" xl="12">
         <dl>
-          <dt>{{ $t('pageManagePowerUsage.powerConsumption') }}</dt>
+          <dt>{{ $t('pagePower.powerConsumption') }}</dt>
           <dd>
             {{
               powerConsumptionValue
@@ -21,15 +21,13 @@
       <b-form-group :disabled="loading">
         <b-row>
           <b-col sm="8" md="6" xl="12">
-            <b-form-group
-              :label="$t('pageManagePowerUsage.powerCapSettingLabel')"
-            >
+            <b-form-group :label="$t('pagePower.powerCapSettingLabel')">
               <b-form-checkbox
                 v-model="isPowerCapFieldEnabled"
-                data-test-id="managePowerUsage-checkbox-togglePowerCapField"
+                data-test-id="power-checkbox-togglePowerCapField"
                 name="power-cap-setting"
               >
-                {{ $t('pageManagePowerUsage.powerCapSettingData') }}
+                {{ $t('pagePower.powerCapSettingData') }}
               </b-form-checkbox>
             </b-form-group>
           </b-col>
@@ -39,12 +37,12 @@
           <b-col sm="8" md="6" xl="3">
             <b-form-group
               id="input-group-1"
-              :label="$t('pageManagePowerUsage.powerCapLabel')"
+              :label="$t('pagePower.powerCapLabel')"
               label-for="input-1"
             >
               <b-form-text id="power-help-text">
                 {{
-                  $t('pageManagePowerUsage.powerCapLabelTextInfo', {
+                  $t('pagePower.powerCapLabelTextInfo', {
                     min: 1,
                     max: 10000,
                   })
@@ -55,7 +53,7 @@
                 id="input-1"
                 v-model.number="powerCapValue"
                 :disabled="!isPowerCapFieldEnabled"
-                data-test-id="managePowerUsage-input-powerCapValue"
+                data-test-id="power-input-powerCapValue"
                 type="number"
                 aria-describedby="power-help-text"
                 :state="getValidationState($v.powerCapValue)"
@@ -76,7 +74,7 @@
         <b-button
           variant="primary"
           type="submit"
-          data-test-id="managePowerUsage-button-savePowerCapValue"
+          data-test-id="power-button-savePowerCapValue"
         >
           {{ $t('global.action.save') }}
         </b-button>
@@ -94,7 +92,7 @@
 import { mapGetters } from 'vuex';
 
 export default {
-  name: 'ManagePowerUsage',
+  name: 'Power',
   components: { PageTitle },
   mixins: [VuelidateMixin, BVToastMixin, LoadingBarMixin],
   beforeRouteLeave(to, from, next) {
diff --git a/src/views/ResourceManagement/index.js b/src/views/ResourceManagement/index.js
new file mode 100644
index 0000000..5882dec
--- /dev/null
+++ b/src/views/ResourceManagement/index.js
@@ -0,0 +1,2 @@
+import Power from './Power.vue';
+export default Power;
diff --git a/tests/unit/__snapshots__/AppNavigation.spec.js.snap b/tests/unit/__snapshots__/AppNavigation.spec.js.snap
index d87d44e..37609d3 100644
--- a/tests/unit/__snapshots__/AppNavigation.spec.js.snap
+++ b/tests/unit/__snapshots__/AppNavigation.spec.js.snap
@@ -323,15 +323,6 @@
                 </a>
                 <a
                   class="nav-link"
-                  data-test-id="nav-item-manage-power-usage"
-                  href="#/operations/manage-power-usage"
-                >
-                  
-                  appNavigation.managePowerUsage
-                
-                </a>
-                <a
-                  class="nav-link"
                   data-test-id="nav-item-reboot-bmc"
                   href="#/operations/reboot-bmc"
                 >
@@ -580,6 +571,84 @@
             </ul>
           </transition-stub>
         </li>
+        <li
+          class="nav-item"
+        >
+          <button
+            aria-controls="resource-management"
+            aria-expanded="false"
+            class="btn btn-link collapsed"
+            data-test-id="nav-button-resource-management"
+            type="button"
+          >
+            <svg
+              aria-hidden="true"
+              fill="currentColor"
+              focusable="false"
+              height="16"
+              preserveAspectRatio="xMidYMid meet"
+              viewBox="0 0 32 32"
+              width="16"
+              xmlns="http://www.w3.org/2000/svg"
+            >
+              <path
+                d="M19 24H26V26H19zM19 20H26V22H19zM19 16H26V18H19zM6 24H13V26H6zM6 20H13V22H6z"
+              />
+              <path
+                d="M28,4H17a2.0023,2.0023,0,0,0-2,2v6H4a2.0023,2.0023,0,0,0-2,2V28a2.0023,2.0023,0,0,0,2,2H28a2.0023,2.0023,0,0,0,2-2V6A2.0023,2.0023,0,0,0,28,4ZM15,28H4V14H15Zm2,0V6H28V28Z"
+              />
+            </svg>
+            
+              appNavigation.resourceManagement
+              
+            <svg
+              aria-hidden="true"
+              class="icon-expand"
+              fill="currentColor"
+              focusable="false"
+              height="16"
+              preserveAspectRatio="xMidYMid meet"
+              viewBox="0 0 16 16"
+              width="16"
+              xmlns="http://www.w3.org/2000/svg"
+            >
+              <path
+                d="M8 5L13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"
+              />
+            </svg>
+          </button>
+           
+          <transition-stub
+            class="nav-item__nav"
+            css="true"
+            enteractiveclass="collapsing"
+            enterclass=""
+            entertoclass="collapse show"
+            leaveactiveclass="collapsing"
+            leaveclass="collapse show"
+            leavetoclass="collapse"
+          >
+            <ul
+              class="collapse"
+              id="resource-management"
+              style="display: none;"
+            >
+              <li
+                class="nav-item"
+              >
+                <a
+                  class="nav-link"
+                  data-test-id="nav-item-power"
+                  href="#/resource-management/power"
+                >
+                  
+                  appNavigation.power
+                
+                </a>
+              </li>
+            </ul>
+          </transition-stub>
+        </li>
       </ul>
     </nav>
   </div>
@@ -915,15 +984,6 @@
                 </a>
                 <a
                   class="nav-link"
-                  data-test-id="nav-item-manage-power-usage"
-                  href="#/operations/manage-power-usage"
-                >
-                  
-                  appNavigation.managePowerUsage
-                
-                </a>
-                <a
-                  class="nav-link"
                   data-test-id="nav-item-reboot-bmc"
                   href="#/operations/reboot-bmc"
                 >
@@ -1172,6 +1232,84 @@
             </ul>
           </transition-stub>
         </li>
+        <li
+          class="nav-item"
+        >
+          <button
+            aria-controls="resource-management"
+            aria-expanded="false"
+            class="btn btn-link collapsed"
+            data-test-id="nav-button-resource-management"
+            type="button"
+          >
+            <svg
+              aria-hidden="true"
+              fill="currentColor"
+              focusable="false"
+              height="16"
+              preserveAspectRatio="xMidYMid meet"
+              viewBox="0 0 32 32"
+              width="16"
+              xmlns="http://www.w3.org/2000/svg"
+            >
+              <path
+                d="M19 24H26V26H19zM19 20H26V22H19zM19 16H26V18H19zM6 24H13V26H6zM6 20H13V22H6z"
+              />
+              <path
+                d="M28,4H17a2.0023,2.0023,0,0,0-2,2v6H4a2.0023,2.0023,0,0,0-2,2V28a2.0023,2.0023,0,0,0,2,2H28a2.0023,2.0023,0,0,0,2-2V6A2.0023,2.0023,0,0,0,28,4ZM15,28H4V14H15Zm2,0V6H28V28Z"
+              />
+            </svg>
+            
+              appNavigation.resourceManagement
+              
+            <svg
+              aria-hidden="true"
+              class="icon-expand"
+              fill="currentColor"
+              focusable="false"
+              height="16"
+              preserveAspectRatio="xMidYMid meet"
+              viewBox="0 0 16 16"
+              width="16"
+              xmlns="http://www.w3.org/2000/svg"
+            >
+              <path
+                d="M8 5L13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"
+              />
+            </svg>
+          </button>
+           
+          <transition-stub
+            class="nav-item__nav"
+            css="true"
+            enteractiveclass="collapsing"
+            enterclass=""
+            entertoclass="collapse show"
+            leaveactiveclass="collapsing"
+            leaveclass="collapse show"
+            leavetoclass="collapse"
+          >
+            <ul
+              class="collapse"
+              id="resource-management"
+              style="display: none;"
+            >
+              <li
+                class="nav-item"
+              >
+                <a
+                  class="nav-link"
+                  data-test-id="nav-item-power"
+                  href="#/resource-management/power"
+                >
+                  
+                  appNavigation.power
+                
+                </a>
+              </li>
+            </ul>
+          </transition-stub>
+        </li>
       </ul>
     </nav>
   </div>