1import AppLayout from '@/layouts/AppLayout.vue'; 2import ChangePassword from '@/views/ChangePassword'; 3import Sessions from '@/views/SecurityAndAccess/Sessions'; 4import ConsoleLayout from '@/layouts/ConsoleLayout.vue'; 5import DateTime from '@/views/Settings/DateTime'; 6import EventLogs from '@/views/Logs/EventLogs'; 7import FactoryReset from '@/views/Operations/FactoryReset'; 8import Firmware from '@/views/Operations/Firmware'; 9import Inventory from '@/views/HardwareStatus/Inventory'; 10import Ldap from '@/views/SecurityAndAccess/Ldap'; 11import UserManagement from '@/views/SecurityAndAccess/UserManagement'; 12import Login from '@/views/Login'; 13import LoginLayout from '@/layouts/LoginLayout'; 14import Network from '@/views/Settings/Network'; 15import Overview from '@/views/Overview'; 16import PageNotFound from '@/views/PageNotFound'; 17import PostCodeLogs from '@/views/Logs/PostCodeLogs'; 18import PowerRestorePolicy from '@/views/Settings/PowerRestorePolicy'; 19import ProfileSettings from '@/views/ProfileSettings'; 20import RebootBmc from '@/views/Operations/RebootBmc'; 21import Policies from '@/views/SecurityAndAccess/Policies'; 22import KeyClear from '@/views/Operations/KeyClear'; 23import Sensors from '@/views/HardwareStatus/Sensors'; 24import SerialOverLan from '@/views/Operations/SerialOverLan'; 25import SerialOverLanConsole from '@/views/Operations/SerialOverLan/SerialOverLanConsole'; 26import ServerPowerOperations from '@/views/Operations/ServerPowerOperations'; 27import Certificates from '@/views/SecurityAndAccess/Certificates'; 28import Power from '@/views/ResourceManagement/Power'; 29import i18n from '@/i18n'; 30 31// Custom components 32import Dumps from '@/views/Logs/Dumps'; 33 34const routes = [ 35 { 36 path: '/login', 37 component: LoginLayout, 38 children: [ 39 { 40 path: '', 41 name: 'login', 42 component: Login, 43 meta: { 44 title: i18n.t('appPageTitle.login'), 45 }, 46 }, 47 { 48 path: '/change-password', 49 name: 'change-password', 50 component: ChangePassword, 51 meta: { 52 title: i18n.t('appPageTitle.changePassword'), 53 requiresAuth: true, 54 }, 55 }, 56 ], 57 }, 58 { 59 path: '/console', 60 component: ConsoleLayout, 61 meta: { 62 requiresAuth: true, 63 }, 64 children: [ 65 { 66 path: 'serial-over-lan-console', 67 name: 'serial-over-lan-console', 68 component: SerialOverLanConsole, 69 meta: { 70 title: i18n.t('appPageTitle.serialOverLan'), 71 }, 72 }, 73 ], 74 }, 75 { 76 path: '/', 77 meta: { 78 requiresAuth: true, 79 }, 80 component: AppLayout, 81 children: [ 82 { 83 path: '', 84 name: 'overview', 85 component: Overview, 86 meta: { 87 title: i18n.t('appPageTitle.overview'), 88 }, 89 }, 90 { 91 path: '/profile-settings', 92 name: 'profile-settings', 93 component: ProfileSettings, 94 meta: { 95 title: i18n.t('appPageTitle.profileSettings'), 96 }, 97 }, 98 { 99 path: '/logs/dumps', 100 name: 'dumps', 101 component: Dumps, 102 meta: { 103 title: i18n.t('appPageTitle.dumps'), 104 }, 105 }, 106 { 107 path: '/logs/event-logs', 108 name: 'event-logs', 109 component: EventLogs, 110 meta: { 111 title: i18n.t('appPageTitle.eventLogs'), 112 }, 113 }, 114 { 115 path: '/logs/post-code-logs', 116 name: 'post-code-logs', 117 component: PostCodeLogs, 118 meta: { 119 title: i18n.t('appPageTitle.postCodeLogs'), 120 }, 121 }, 122 { 123 path: '/hardware-status/inventory', 124 name: 'inventory', 125 component: Inventory, 126 meta: { 127 title: i18n.t('appPageTitle.inventory'), 128 }, 129 }, 130 { 131 path: '/hardware-status/sensors', 132 name: 'sensors', 133 component: Sensors, 134 meta: { 135 title: i18n.t('appPageTitle.sensors'), 136 }, 137 }, 138 { 139 path: '/security-and-access/sessions', 140 name: 'sessions', 141 component: Sessions, 142 meta: { 143 title: i18n.t('appPageTitle.sessions'), 144 }, 145 }, 146 { 147 path: '/security-and-access/ldap', 148 name: 'ldap', 149 component: Ldap, 150 meta: { 151 title: i18n.t('appPageTitle.ldap'), 152 }, 153 }, 154 { 155 path: '/security-and-access/user-management', 156 name: 'user-management', 157 component: UserManagement, 158 meta: { 159 title: i18n.t('appPageTitle.userManagement'), 160 }, 161 }, 162 { 163 path: '/security-and-access/policies', 164 name: 'policies', 165 component: Policies, 166 meta: { 167 title: i18n.t('appPageTitle.policies'), 168 }, 169 }, 170 { 171 path: '/security-and-access/certificates', 172 name: 'certificates', 173 component: Certificates, 174 meta: { 175 title: i18n.t('appPageTitle.certificates'), 176 }, 177 }, 178 { 179 path: '/settings/date-time', 180 name: 'date-time', 181 component: DateTime, 182 meta: { 183 title: i18n.t('appPageTitle.dateTime'), 184 }, 185 }, 186 { 187 path: '/operations/firmware', 188 name: 'firmware', 189 component: Firmware, 190 meta: { 191 title: i18n.t('appPageTitle.firmware'), 192 }, 193 }, 194 { 195 path: '/settings/network', 196 name: 'network', 197 component: Network, 198 meta: { 199 title: i18n.t('appPageTitle.network'), 200 }, 201 }, 202 { 203 path: '/settings/power-restore-policy', 204 name: 'power-restore-policy', 205 component: PowerRestorePolicy, 206 meta: { 207 title: i18n.t('appPageTitle.powerRestorePolicy'), 208 }, 209 }, 210 { 211 path: '/resource-management/power', 212 name: 'power', 213 component: Power, 214 meta: { 215 title: i18n.t('appPageTitle.power'), 216 }, 217 }, 218 { 219 path: '/operations/factory-reset', 220 name: 'factory-reset', 221 component: FactoryReset, 222 meta: { 223 title: i18n.t('appPageTitle.factoryReset'), 224 }, 225 }, 226 { 227 path: '/operations/key-clear', 228 name: 'key-clear', 229 component: KeyClear, 230 meta: { 231 title: i18n.t('appPageTitle.keyClear'), 232 }, 233 }, 234 { 235 path: '/operations/reboot-bmc', 236 name: 'reboot-bmc', 237 component: RebootBmc, 238 meta: { 239 title: i18n.t('appPageTitle.rebootBmc'), 240 }, 241 }, 242 { 243 path: '/operations/serial-over-lan', 244 name: 'serial-over-lan', 245 component: SerialOverLan, 246 meta: { 247 title: i18n.t('appPageTitle.serialOverLan'), 248 }, 249 }, 250 { 251 path: '/operations/server-power-operations', 252 name: 'server-power-operations', 253 component: ServerPowerOperations, 254 meta: { 255 title: i18n.t('appPageTitle.serverPowerOperations'), 256 }, 257 }, 258 { 259 path: '*', 260 name: 'page-not-found', 261 component: PageNotFound, 262 meta: { 263 title: i18n.t('appPageTitle.pageNotFound'), 264 }, 265 }, 266 ], 267 }, 268]; 269 270export default routes; 271