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