summaryrefslogtreecommitdiff
path: root/src/router
AgeCommit message (Collapse)AuthorFilesLines
2024-05-24Fixed Scroll top issue between page navigationaravinths11-0/+3
After scrolling down a page and navigating from that page to other pages, the page still shows the bottom of the page and does not display the top of the page. Scroll behavior added in the router, So when navigating from one page to another page the top of the page will always display. Change-Id: I883e8a9f6ae3f98846996883cac0961b4c24c62b Signed-off-by: aravinths1 <aravinths@ami.com>
2024-05-02Allow to log in when using remote authenticationPaul Fertser1-1/+1
For accounts authenticated remotely (e.g. with LDAP or RADIUS) the API endpoint (handled by bmcweb) can not provide any information about RoleId currently, reporting 404 instead. This confuses the frontend and it doesn't allow to navigate at all. Fix this by lifting all frontend-side restrictions by assuming 'Administrator' role in this case. Since the backend verifies validity of each and every request anyway this doesn't affect security anyhow. Tested: logging in, out and incorrectly using local BMC and remote LDAP users, reloading the page with an active session. In all cases frontend behaved as expected, storing assumed RoleId after getting 404 not found reply and using it for unrestricted routing decisions. Change-Id: If17d06bf0b8a372acd1980f6777227e25d9c78d8 Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2024-04-25Deduplicate and simplify RoleId handlingPaul Fertser1-7/+3
To improve UX for users of accounts with restricted permissions the frontend determines the current RoleId. Knowing that it can hide menus and inhibit transitions that are not allowed by the backend in any case. This patch unifies the handling by moving processing of the API reply containing RoleId in the single place, right where `authentication/getUserInfo` store gets it. This makes the program flow easier to understand and change if needed without worrying of where another copy of the code might be and how it would need to be amended. No functional change. Tested: logging in and out, navigating the pages, getting an error message when wrong credentials are used, reloading the page with an established session. All while observing Network and Console tabs in Web Developer tools, no unexpected API requests are made and no unexpected errors reported. Confirmed in debugger that the retrieved role gets stored and used for routing restrictions. Change-Id: Ia8782f44cb6bf813954d30b8bf3a620a626ad455 Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-08-10Add SNMP alerts page and test hooksKonstantin Aladyshev1-0/+9
This page will be included in Configuration section of the primary navigation. The user will be able to delete and add alert destination. Change-Id: I396d19a54ea11724f2c5aec67e20ba9abff947d3 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
2023-03-28Fix User Management Page issues title and Policykirankumarb071-1/+1
This patchset will fix the following issues in the user management page 1. "lockoutThreshold" and "lockoutDuration" values are not shown in the account policy model when we navigate to any other page and come back to the user management page account policy model. Fix - The "lockoutThreshold" and "lockoutDuration" values are monitored and updated in the model window by using the watch. When navigated from another page, the watch is not updating the values, so the default values are displayed. Initialized the value with an empty object, so the watch will get triggered and update the fields with proper values. 2. The User Management Page title is not translated properly. The router names are used to map each page's language objects. For the user management page, the router name and the object value in the locale file are different. Due to that, the title did not get translated properly. Fix - Changed the user management page title to match the locale file's language object key value. Change-Id: I1582c9d528633465c65f5d78e31d3dc740252cb0 Signed-off-by: Kirankumar Ballapalli <kirankumarb@ami.com>
2023-03-27Added route restrictions based on user privilegeDamian Celico2-2/+39
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
2022-02-04Add Key clear page under Operations sectionSandeepa Singh1-0/+9
This page will allow privileged user to clear encrypted keys. - Only admin and CE login user will be able to see the page - The UI will be different for both, admin and CE login user(service) - This page is IBM only Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ic6fe3454de815629a6b2250daa99ab21f2b316c3
2021-08-10IA update: Add resource management sectionSandeepa Singh1-9/+9
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
2021-08-10IA update: Update access and control sectionSandeepa Singh1-25/+25
This is the fifth commit of the information architecture changes and has the following changes: - The icon for access and control has been updated - Access and control section has been updated to security and access section - Security settings page has been updated to policies page and moved to security and access section - Client sessions page has been updated to sessions page - Local user management page has been updated to user management page - SSL certificates page has been updated to certificates page Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ie93cee9002742ecf7d33615636f4f159f4395fc4
2021-08-10IA update: Update configuration to settingsSandeepa Singh1-16/+16
This is the fourth update to information architecture changes and has the following changes: - The configuration section is updated to settings - The date and time settings page is updated to date and time - The network settings page is updated to network - The power restore policy page in operations section is moved to settings section Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: I6f5ab25f5227530be430bd39a4d9629b3bf09d8b
2021-08-10IA update: Update control section to operationsSandeepa Singh1-36/+27
This is the third update to the information architecture changes and has the following changes: - The control section has been updated to operations - The server led page has been removed - The firmware page is moved to operations section Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: I2e23da447890d7bee51892e1f782d5f2db6dded4
2021-08-10IA update: Update health sectionSandeepa Singh1-12/+12
This is the second update to information architecture changes and has the following changes: - Health section is updated to hardware status section - Hardware status page is updated to inventory and LEDs page - Route for sensors page has been updated Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ia1ba3a15a243a00f59a2ec646132436eb355a999
2021-08-10IA update: Add logs and update overview iconDerick Montague1-2/+2
This is the first patchset of the information architecture changes. These changes are the result of several months of design research with users to improve the existing information architecture (IA). More information can we found in the Github story. This patchset will add a Logs section and move event logs and dumps from the Health section to the new Logs section. It will also update the icon used for the Overview page. Github story: https://github.com/openbmc/webui-vue/issues/56 Testing: 1. IBM build: - Logs contained Event logs and dumps - Both pages rendered when clicking link 2. Intel build - Logs contained Event logs only - Logs page rendered when clicking link 3. Tested default build - Logs contained Event logs only - Logs page rendered when clicking link Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I4621837202cf5ad3469d6ea460d9a5bdc79c8816
2021-07-31Resovle POST code logs missing page messageDerick Montague1-2/+2
Fixed a typo in the router that resulted in the POST code logs page request returning a 404 message. This was a typo in the router.js file only. The IBM router.js file did not have this issue and the Intel has not added this UI to their build. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Icce5d756ad1ce409c77ff67fd63a7759e5f24981
2021-07-21Add POST code logs pageSandeepa Singh1-0/+9
This page will be included in the Health section of the primary navigation. The user will be able to export and download POST code logs. Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: I26cf1e01bfdfcf298f24f2c7dd9633ab7d31f1b5
2021-03-09Add factory reset pageDerick Montague1-0/+9
This new page will be included in the Control section of the primary navigation. The user will be able to choose between two different reset actions. The user can make the following calls: - /redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios - /redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I32a10dbce27a03fb84e24d7eae7c44eef9cffea5
2021-02-02Add power restore policy pageSukanya Pandey1-0/+9
- This page will show how the system boots once power is restored after a power disturbance. - API used to fetch the JSON: /redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.json - API used to fetch the current policy and to save updated policy: /redfish/v1/Systems/system/ Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I203bd3c5d26071b882cce6b9950cdb3fb1deb212
2020-12-16Add client sessions pageSukanya Pandey1-0/+9
- This page will show the list of sessions that are currently connected to the BMC. APIs used: - To get all the sessions API used is `/redfish/v1/SessionService/Sessions` - To delete the sessions API used is `/redfish/v1/SessionService/Sessions/<session id>` Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: Ia81f62cbbea749809b9b7f7e62356cfe2db7fc18
2020-12-16Add security settings pageDixsie Wolmers1-0/+9
Adds ability to enable/disable: - SSH protocol - IPMI protocol Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I2430a46343dd8756ef75fcc3cb068df8d51dd415
2020-11-03Update linting packages to use latestDerick Montague2-57/+57
- 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-21Show error toast notification on unauthorized accessSukanya Pandey1-9/+0
-When 403 status code which is an unauthorized access occured -show error toast notification. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I55fa7052073f87f28c3584b68fd4e84247a4237e
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-25Move translation into routes fileYoshie Muranaka1-26/+25
- Added intial application load document title update with created hook Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I73d18ed4a56bd04601fa7382c2d6c2ec504b03f5
2020-09-25Create separate file for Vue Router routesYoshie Muranaka2-250/+253
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