Add 404 page

- User will be redirected to 404 page when navigating to
  undefined routes

Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I5d7bbcfdd279b6f6c993370e3adb39a516dbb1ba
diff --git a/src/router/index.js b/src/router/index.js
index 4f66ae7..6834045 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -17,6 +17,7 @@
 import Kvm from '@/views/Control/Kvm';
 import ManagePowerUsage from '@/views/Control/ManagePowerUsage';
 import NetworkSettings from '@/views/Configuration/NetworkSettings';
+import PageNotFound from '@/views/PageNotFound';
 import RebootBmc from '@/views/Control/RebootBmc';
 import ServerLed from '@/views/Control/ServerLed';
 import SerialOverLan from '@/views/Control/SerialOverLan';
@@ -34,6 +35,54 @@
 // Example meta: {title: 'appPageTitle.overview'}
 const routes = [
   {
+    path: '/login',
+    component: LoginLayout,
+    children: [
+      {
+        path: '',
+        name: 'login',
+        component: Login,
+        meta: {
+          title: 'appPageTitle.login'
+        }
+      },
+      {
+        path: '/change-password',
+        name: 'change-password',
+        component: ChangePassword,
+        meta: {
+          title: 'appPageTitle.changePassword',
+          requiresAuth: true
+        }
+      }
+    ]
+  },
+  {
+    path: '/console',
+    component: ConsoleLayout,
+    meta: {
+      requiresAuth: true
+    },
+    children: [
+      {
+        path: 'serial-over-lan-console',
+        name: 'serial-over-lan-console',
+        component: SerialOverLanConsole,
+        meta: {
+          title: 'appPageTitle.serialOverLan'
+        }
+      },
+      {
+        path: 'kvm',
+        name: 'kvm-console',
+        component: KvmConsole,
+        meta: {
+          title: 'appPageTitle.kvm'
+        }
+      }
+    ]
+  },
+  {
     path: '/',
     meta: {
       requiresAuth: true
@@ -191,53 +240,13 @@
         meta: {
           title: 'appPageTitle.unauthorized'
         }
-      }
-    ]
-  },
-  {
-    path: '/login',
-    component: LoginLayout,
-    children: [
-      {
-        path: '',
-        name: 'login',
-        component: Login,
-        meta: {
-          title: 'appPageTitle.login'
-        }
       },
       {
-        path: '/change-password',
-        name: 'change-password',
-        component: ChangePassword,
+        path: '*',
+        name: 'page-not-found',
+        component: PageNotFound,
         meta: {
-          title: 'appPageTitle.changePassword',
-          requiresAuth: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/console',
-    component: ConsoleLayout,
-    meta: {
-      requiresAuth: true
-    },
-    children: [
-      {
-        path: 'serial-over-lan-console',
-        name: 'serial-over-lan-console',
-        component: SerialOverLanConsole,
-        meta: {
-          title: 'appPageTitle.serialOverLan'
-        }
-      },
-      {
-        path: 'kvm',
-        name: 'kvm-console',
-        component: KvmConsole,
-        meta: {
-          title: 'appPageTitle.kvm'
+          title: 'appPageTitle.pageNotFound'
         }
       }
     ]