summaryrefslogtreecommitdiff
path: root/src/router/index.js
AgeCommit message (Collapse)AuthorFilesLines
2023-03-27Added route restrictions based on user privilegeDamian Celico1-2/+30
This commit allows us to add 'exclusiveToRoles' field to route config files, with the list of roles that can access this resource, if needed. In this case, only Administrator can access Virtual-Media page and SOL console, and it is blocked for other users. Signed-off-by: Sivaprabu Ganesan <sivaprabug@ami.com> Change-Id: Ibcee18bd92d97c34414ecaf2caf6af28070c5538
2020-11-03Update linting packages to use latestDerick Montague1-2/+2
- 99% of changes were small syntax changes that were changed by the lint command. There were a couple of small manual changes to meet the property order patterns established as part of the vue:recommended guidelines. There are rules that were set from errors to warnings and new stories are being opened to address those issues. Testing: - Successfully ran npm run serve - Successfully ran npm run lint - Verified functionality works as expected, e.g. success and failure use cases - Resolved any JavaScript errors thrown to the console Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
2020-10-20Fix imports on router indexDixsie Wolmers1-1/+1
UI failed to load when routes were imported before store in router index. Store should be imported before routes for UI to load correctly. Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I1ba02cf567babc67c7a5b1c5148d49ae19108faa
2020-10-19Add comments for imports that support dotenvYoshie Muranaka1-1/+5
We have set up exact match resolve aliases to support different dotenv build customizations. Added comments to the imports that should not be changed. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ie371b42ec35f876ccb89ef976f7126d5234a1b47
2020-09-25Create separate file for Vue Router routesYoshie Muranaka1-250/+2
Separating routes into its own JS file to allow for easier env customizations. Update store resolve path to make sure right env stores modules are imported in every file. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I5c646c81fab54085198b2e179be80c954258f51c
2020-09-03Add 404 pageDixsie Wolmers1-44/+53
- User will be redirected to 404 page when navigating to undefined routes Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I5d7bbcfdd279b6f6c993370e3adb39a516dbb1ba
2020-09-02Update router to static Virtual media component importYoshie Muranaka1-1/+2
We have moved away from dynamic imports (lazy loading routes) to static imports to improve build size and create fewer bundles. Virtual media page was done before the decision to update router imports. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I87a0aa7a17c1f4cb6186eefe38bbdbe6c00b0485
2020-08-28Add VirtualMedia pageMateusz Gapski1-0/+8
More info: https://github.com/openbmc/webui-vue/issues/7 Signed-off-by: Mateusz Gapski <mateuszx.gapski@intel.com> Change-Id: I68f2074e77301c68c425f1e661988c751224b713
2020-08-21Remove Vue Router dynamic importYoshie Muranaka1-23/+44
Current implementation uses Vue Router lazy loading routes. https://router.vuejs.org/guide/advanced/lazy-loading.html Lazy loading creates separate js chunks and adds to the total size of the built application. Switching to static imports cuts the total size down and creates fewer js bundles. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I5f53daf120cb1e3c4bb182e631ec3cbc8238c4b2
2020-08-13Add Firmware pageYoshie Muranaka1-0/+8
Adds ability to upload a fimware image by local workstation or TFTP. Also adds ability to reboot BMC from the backup image. - Add route definition, component view, and store for Firmware page - Get ActiveSoftwareImage location at /redfish/v1/Managers/bmc - Get backup by checking for an image id that is not the same as the active image /redfish/v1/UpdateService/FirmwareInventory - Switch running firmware image by making PATCH request to /redfish/v1/Managers/bmc Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I04450e5a170d374122908c4c0349ba3b6e93ed2c
2020-07-22KVM consoleMateusz Gapski1-2/+18
- The kvm console with using novnc library Signed-off-by: Mateusz Gapski <mateuszx.gapski@intel.com> Change-Id: Icfb7643595d8c17231ca3671753d6de971525bd3
2020-07-22Add check if password change required at LoginYoshie Muranaka1-1/+2
After successfully authenticating on the Login page, check /redfish/v1/AccountService/Accounts/${username} endpoint for the PasswordChangeRequired property to see whether or not the password is expired. If the password is expired, then navigate to the Change password page, if the password isn't expired navigate to the Overview page. After successfully changing an expired password, navigate to the Overview page. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I32de5f71bcfcbe4099c2953a31c05ba0ebe670bc
2020-07-21Add ChangePassword componentYoshie Muranaka1-0/+8
Add non-functional Change password page and router definition. The page has a form and some frontend validations but backend functionality and api requests are not tied in yet. Page can be viewed by manually navigating to /change-password. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: If5e6c6a5120b86fc457d8cab4c82333c33ef745f
2020-07-10Add date and time settingsDixsie Wolmers1-0/+8
Adds ablity to change date and time manually, or configure using NTP servers. - If NTP is selected, user is required to enter at least one NTP address - Date and time are ISO formatted Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I0d67c80487fdd815eacc3539ccd702b23618260e
2020-07-09Add code for Serial Over LANSukanya Pandey1-0/+27
- The output of serial connection of the hosts on the workstation terminal. - The library used is xterm which will provide the terminal to show the data. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I6000cae42f237fffe216e2079cf2a6c39db236fd
2020-07-02Create separate LoginLayout componentYoshie Muranaka1-5/+12
Create a separate layout for the login page so it can be reused for first time password reset form. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ia2da0e8d29f7d6ad77c5277193c7535f2d00a97d
2020-06-17Profile settings pageSukanya Pandey1-0/+8
-To set the profile by setting password. -This commit adds a profile page which allows the user to change their password. In the future, the profile page will also contain user settings like language and timezone. The API called to change the user's password is '/redfish/v1/AccountService/Accounts/<userName>' Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: Ie54a54beff8c85bc9ac5af21c35edc481b34cf44
2020-06-17Add Hardware status page and system tableYoshie Muranaka1-0/+8
Adds ability to see system information in table format with a row expansion details view. Modified tables styles to add table borders. Created global mixin for table data formatting: - Show '--' for undefined or empty string values - Map Redfish health status options to status-icon values Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I5b45c37997647f5a265c1e84eb53f0b51699ee20
2020-06-05Add network settings pageDixsie Wolmers1-0/+8
- Adds ability to configure newtowrk settings by selected ethernet interface - Default gateway is currently unavailable in redfish, to work around, grabbed gateway from first static ipv4 configuration and assigned to new static ipv4 configurations - Adds ability to add, modify and delete static ipv4 configs - Adds ability to add, modify and delete static dns - Adds ability to edit gateway, hostname and mac address - Form validations include regex for ip, mac address, and hostname - Language translations to be addressed in separate commit - Enabling DHCP and configuring DHCP settings to be addressed in separate commit Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I122034ae0ef3a8c08e5599ee3eca66e8d0d59f67
2020-05-21Add Event log pageYoshie Muranaka1-0/+8
Add basic event log table with the ability to sort by column (ID, Severity, Type, Date) and filter by severity. - Updated existing translation for eventLog to eventLogs Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ic233593cc8804d9dcefb2b5740dfac3d52899b02
2020-05-21Add manage power usage pageSukanya Pandey1-0/+8
-The page is used to control the power. -Maximum power can be set between 1 to 10000. -The API used to get and set the power limit:/redfish/v1/Chassis/chassis/Power Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I1cab4876e9149d92de75014d7680ac11410ca4fe
2020-05-20Add ServerLED pageSurenNeware1-0/+8
Added ability to turn on/off Indicator LED. Signed-off-by: Suren Neware <sneware9@in.ibm.com> Change-Id: Ia59eb0214530906dea840ff18ff22fc913870bb9
2020-05-16Add logout commit for 401 responseYoshie Muranaka1-3/+0
Change the authentication logout from router to api interceptor, so that if a user accidentally navigates to login page by clicking the browser back button, they aren't automatically logged out. Logouts would occur when hitting a 401 response or if the user clicks the logout button from app header. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I6290070b63e724b75b3ac2fc39b3c7e814fbfc3e
2020-05-14Clear XSRF token when navigating to LoginYoshie Muranaka1-0/+3
This will fix the WebSocket authentication error if redirected to the Login page when a session is expired. The WebSocketPlugin checks to see if the user is logged in before attempting to make a connection. The AuthenticationStore determines if a user is logged in based on whether or not the XSRF-TOKEN cookie exists. Currently the app only removes this token if the user explicitly logs out from the application header. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I9f2b7025ff1de21889267b8f56efd08930eb63d3
2020-05-01Add missing router namesYoshie Muranaka1-1/+2
Overview and Sensors routes were missing router names. Removed empty string value name, since it doesn't help identify a router by name. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Idcff2c4104427d50abfc260c90d8087efe6525e3
2020-04-25Add LDAP pageYoshie Muranaka1-0/+8
Adds ability to enable LDAP service and modify LDAP and ActiveDirectory properties. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I59d65bba7f6fe321af395227ce2f7188d9c006b7
2020-04-08Add SSL Certificates pageYoshie Muranaka1-0/+8
Adds ability to view, add, replace, and delete SSL certificates in GUI. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I5cf9fa7bbd588dfb22f2431eed0b5976ff860703
2020-03-26Add Sensors pageYoshie Muranaka1-0/+7
- Update api calls to use Redfish - Add column sort to name and status columns - Set default table sort to status column - Added lodash package Github story: https://github.com/openbmc/webui-vue/issues/4 Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ic6e76107475fbf5fb34deb01a4de4a4a9ccfeabf
2020-03-06Add power operations pageYoshie Muranaka1-0/+8
Add route, component and Control requests to enable power operations (power on, soft and hard reboot, soft and hard power off). This rewrite includes updates to use Redfish endpoints. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I54784b8cc1b6260e44e708c260ea4a531fc0a629
2020-02-26Update language json structureYoshie Muranaka1-6/+6
Restructure language file to use consistent pattern across pages following loose guidelines. - Create buckets for common global labels - Create common component objects–appHeader, appNavigation, appPageTitle - Page specific labels should be nested in an object with a key prefixed with 'page' followed by the page title - Any 'major' child components should be nested inside page specific objects - Avoid any complex linked locale messages - Alphabetize object keys, alphabetize nested properties at end of object block Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ie4222b3ce24dec7af31b55b5a77425ca2f492789
2020-02-22Add Reboot BMC pageYoshie Muranaka1-0/+8
Created a ControlStore with the intention to consolidate actions across multiple subnav pages under the 'Control' tab, instead of creating a dedicated RebootBmc store with one action. - Update PageSection component to make sectionTitle prop optional - Changed PageTitle computed property to data since the value doesn't change during the component lifecycle - Change PageSection <section> element to <div> to avoid accessibility issues Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I2877e2a7b9bfee245c48d52c70859978b74be7f3
2020-02-13Set up initial language translationDixsie Wolmers1-4/+6
- Add i18n internationalization plugin - Create json files for group 0 English and Spanish - Uses $t method to set up initial translations on login page - Meta title is translated using i18n in App.vue and PageTitle.Vue Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: Ifce9f5e54d96f8b2a13239ad6178892f99fc4537
2020-01-29Style primary navigationYoshie Muranaka1-1/+1
Adding styles and interaction patterns based on community approved design proposals. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie7f422db6fbbca2033e10d2d2ae331540a8a038a
2020-01-29Add interceptor for 403 responseDerick Montague1-0/+8
This is a simple solution that is in parity with the current BMC functionality. Once we have mapped permissions, we can create a more elegant solution. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Id3ea36ba812462be04a450f84f98d0237d6c7c3d
2020-01-28Add page level layout componentsYoshie Muranaka1-2/+2
Adding components to help standardize type, size, spacing for common elements on a page. Also removed a conflicting class name and added modifications to the main container. The main container needed a min-height and height value set, which became apparent with added background color. Adding a background color will move us closer to agreed design solution to add a subtle background color instead of adding a border to separate main content from left hand navigation. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie63c4f0c0f3fd199fa0ca790065402e06a613691
2020-01-27Add singlequote override and fix filesDerick Montague1-20/+20
Based on phosphor-webui and JavaScript common practices we are setting ESLint to required single quote for JS files and double quote for SCSS files. This commit adds the ESLint override to the prettier rules and runs the npm lint script that fixes the files that violate the rule. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I50cba77b2d0797595ce94258029608efa8665005
2020-01-27Add cookie based login authenticationYoshie Muranaka1-1/+0
- Changed POST request data structure to match backend requirements for set-cookie in response header - Added withCredentials property to default axios config - Modifying proxied response to remove 'Secure' flag so browser can create Cookie while running locally - Add logout api request - Add js-cookie package to manage browser cookies - Update the babel preset config to include useBuiltIns, which resolves MIME type errors when overlaying - Disable vue-router history mode to use routher hash mode to resolves 404 errors when refreshing certain pages. This is expected behavior with history mode enabled. Server configuration changes are required to support HTML5 history mode: https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I5d43f36ef546962474b6cc8fff89564f29048fde
2020-01-23Add page titles using route meta dataDerick Montague1-3/+12
Adding the page title using the route assures that each page has a set title. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I75cdd39a1ccdfe4ac9757886e22f016188f42360
2020-01-23Add login and logout functionalityDerick Montague1-14/+33
- Add AuthenticationStore - Add ability to login and logout - Add route navigation guard - Add login styles - Add temporary authentication for api call - Add Login directory - Add index.js In order to login a .env.development.local file that contains BASE_URL="https://<ip address> or <FQDN>" Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I88b93e287e66f4bae82a1ec2934cdef12d78264e
2020-01-23Rename overview files and update structureDerick Montague1-3/+2
- Changed Home to Overview - Changed Events to OverviewEvents - Added an index.js to make importing cleaner Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ia2b3938dadd7d896e83b29532db069b17b9b9929
2020-01-22Create LocalUserManagement view directoryYoshie Muranaka1-1/+1
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I3584932e683a66dc815a3af739f2a7be519077f1
2020-01-22Add system overview viewDixsie Wolmers1-1/+1
- Sets up system overview layout with out of the box Bootstrap - Creates overview quick links and overview events - Add Date-FNS Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Id0a3d4d3b82ef2e1a4f838b3c7e725558e602504
2020-01-21Create basic application using vueDerick Montague1-0/+36
- Create vue app - Add AppHeader and AppNavigation - Set up routes for server overview and local user management - Add themes and set to gray-10 theme - Add active class for current navigation - Add a prototype method named $http to vue prototype - The UI uses console logs in production to communicate to users - Add boostrap vue component library Change-Id: Ib6618e6357ca01bdac6de4ed031a15c8552226f3 Signed-off-by: Derick Montague <derick.montague@ibm.com>