0c1dcc96 | 19-Nov-2024 |
Huy Le Anh <hule@amperecomputing.com> |
Use the createWebHashHistory method to avoid 404 errors
When using createWebHistory method in Vue 3, we may encounter a 404 error when reloading a page or accessing a specific URL directly due to a
Use the createWebHashHistory method to avoid 404 errors
When using createWebHistory method in Vue 3, we may encounter a 404 error when reloading a page or accessing a specific URL directly due to a server configuration that does not properly support HTML5 history, references at [1] and [2]. Switching to createWebHashHistory method avoids a 404 error when reloading a page, as it doesn't require a server configuration to handle navigation. By using the # sign in the URL, the browser processes everything after the # sign without sending it to the server, which helps maintain the application state smoothly when reloading the page.
Tested: 1. Go to the Obmc web page. 2. Switch between different pages. 3. Reload the website by pressing the reload button on the web browser. 4. The Obmc web page reloads normally, without any errors 5. Go to the KVM page and press "Open In New Tab"; the new KVM screen window displays normally, without 404 error. 6. Go to the SOL page and press "Open In New Tab"; the new SOL screen window displays normally, without 404 error.
[1]: https://router.vuejs.org/guide/essentials/history-mode.html [2]: https://stackoverflow.com/questions/66514813/error-404-on-page-reload-with-vue3-routing
Change-Id: I6f4dbd2b27888c852b627d74471671352ee43a39 Signed-off-by: Huy Le Anh <hule@amperecomputing.com>
show more ...
|
ce7db82c | 05-Jul-2024 |
Paul Fertser <fercerpav@gmail.com> |
Retrieve role information the Redfish standard way
Currently webui-vue has a hardcoded list of pages and sidebar menu items restricted to a specific Redfish role (from a predefined default set). To
Retrieve role information the Redfish standard way
Currently webui-vue has a hardcoded list of pages and sidebar menu items restricted to a specific Redfish role (from a predefined default set). To disallow navigating to restricted pages and to hide disallowed menu items the application needs to know the roles assigned to the session.
bmcweb only implements a single role identity per session so the Roles array returned within a Session object always has just one element.
This patch changes the mechanism used to retrieve the current role from buggy direct query to AccountService (which can only return information about BMC local users) to extracting it from standard Redfish Session object.
In case the role is not available (e.g. when backend implementation predates #Session.v1_7_0.Session) the application assumes Administrator role which is meant as a best effort to continue working given the circumstances. This doesn't pose a security risk because all validation is always performed by the backend itself, so the worst that can happen is end user getting error messages trying to access something without enough privileges.
Tested: logging in and out of accounts with different roles without reloading the page, observing the list of queries made, the role variable assignments and presence of the menu items depending on account, navigating to different pages. Also tested reloading the page and confirmed the correct role was retrieved without going through login again. Also tested deleting and mangling localStorage variable sessionURI prior to doing page reload, in those cases redirect to login page was observed.
Change-Id: I8b6c84060a987489cc1d35c46c1b00618a88b607 Signed-off-by: Paul Fertser <fercerpav@gmail.com>
show more ...
|
883a0d59 | 23-Mar-2024 |
Ed Tanous <ed@tanous.net> |
i18n, vue-router and vuex upgrade
1. Configuration of i18n legacy as false. 2. Translation function t is called using the useI18n. 3. Used the i18n.global.t() function from i18n instead of this.$t()
i18n, vue-router and vuex upgrade
1. Configuration of i18n legacy as false. 2. Translation function t is called using the useI18n. 3. Used the i18n.global.t() function from i18n instead of this.$t() 4. Event bus error that occurred during logout. 5. Implemented vue-router 4.4.0 and vuex upgrade to 4.1.0
Change-Id: I9464d82c76dcc1445ce271983ea3ab9d7b03d265 Signed-off-by: Surya Venkatesan <suryav@ami.com>
show more ...
|
7d6b44cb | 23-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Upgrade vue3 and all dependencies
Start the process of porting everything to Vue 3. I have most things working. npm run-scripts build works, npm install works. prettier passes. Styles load, logi
Upgrade vue3 and all dependencies
Start the process of porting everything to Vue 3. I have most things working. npm run-scripts build works, npm install works. prettier passes. Styles load, login works, webui loads.
This was primarily done using the linked documents below. It makes the following design decisions: 1. Vue is put in compat 2 mode, which allows most of the components to work as-is. 2. Bootstrap v4 is used along with bootstrap-vue to keep our components working. 3. Minor changes are made to load the latest versions of vue-router, vuex, and vue-i18n.
I suspect this patchset is good enough to start with, and we can clean up the broken things one patchset at a time. The things that need to happen are:
1. Get remaining features working again. This primiarily is vue-i18n for mixins, and non vue components. This likely needs to be done by not pulling in i18n into the non vue components, then using the .Vue files to do the internationalization in the component context, NOT in the mixin context. Alternatively, we could drop MixIns alltogether. 2. Get custom styles working again. Previously, we used some path hackery in vue.config.js to optionally pre-load styles. This stops working now that we're required to @import our modules. Likely we need some rearangement of the paths such that custom styles are a complete replacement (possibly importing the original) rather than additive with overrides. That's a guess, but I don't really see anyone else doing customization the way we've defined it here. 3. Bootstrap 5 no longer requires ANY custom vue modules, as it has dropped the jquery dependency. We won't be able to pull in bootstrap 5 all at once, so pull in bootstrap 5 under an alias, like "bootstrap5" that we can optionally import 5 or 4. 4. One at a time, start porting components over to Vue3 syntax and bootstrap 5. This will be the bulk of the manual work and review.
The only thing I think left is getting unit tests passing, which I commented out the pre-commit hook to make this PR.
Tested: Code builds. Needs better testing.
[1] https://router.vuejs.org/guide/migration/ [2] https://vue-i18n.intlify.dev/guide/migration/vue3 [3] https://vuelidate-next.netlify.app/migration_guide.html#package-name-and-imports
Change-Id: I5bb3187b9efbf2e4ff63e57994bc528756e2a981 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
b325541c | 22-May-2024 |
aravinths1 <aravinths@ami.com> |
Fixed Scroll top issue between page navigation
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 t
Fixed Scroll top issue between page navigation
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>
show more ...
|
2b33526c | 11-Apr-2024 |
Paul Fertser <fercerpav@gmail.com> |
Allow to log in when using remote authentication
For accounts authenticated remotely (e.g. with LDAP or RADIUS) the API endpoint (handled by bmcweb) can not provide any information about RoleId curr
Allow to log in when using remote authentication
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>
show more ...
|
bceaffac | 10-Apr-2024 |
Paul Fertser <fercerpav@gmail.com> |
Deduplicate and simplify RoleId handling
To improve UX for users of accounts with restricted permissions the frontend determines the current RoleId. Knowing that it can hide menus and inhibit transi
Deduplicate and simplify RoleId handling
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>
show more ...
|
7c1cfe7e | 16-May-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Add SNMP alerts page and test hooks
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: I396d19a54ea
Add SNMP alerts page and test hooks
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>
show more ...
|
6ad19aac | 21-Mar-2023 |
kirankumarb07 <kirankumarb@ami.com> |
Fix User Management Page issues title and Policy
This patchset will fix the following issues in the user management page
1. "lockoutThreshold" and "lockoutDuration" values are not shown in the acco
Fix User Management Page issues title and Policy
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>
show more ...
|
aeb19816 | 23-Nov-2022 |
Damian Celico <damianx.celico@intel.com> |
Added route restrictions based on user privilege
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
Added route restrictions based on user privilege
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
show more ...
|
05887b50 | 10-Jan-2022 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
Add Key clear page under Operations section
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 b
Add Key clear page under Operations section
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
show more ...
|
6dba4be6 | 28-Jul-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
IA update: Add resource management section
This is the sixth commit for information architecture changes and has the following changes:
- Resource management section has been added - Carbon icon us
IA update: Add resource management section
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
show more ...
|
b440616c | 26-Jul-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
IA update: Update access and control section
This is the fifth commit of the information architecture changes and has the following changes:
- The icon for access and control has been updated - Acc
IA update: Update access and control section
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
show more ...
|
f67f769f | 19-Jul-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
IA update: Update configuration to settings
This is the fourth update to information architecture changes and has the following changes:
- The configuration section is updated to settings - The dat
IA update: Update configuration to settings
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
show more ...
|
68cbbe90 | 14-Jul-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
IA update: Update control section to operations
This is the third update to the information architecture changes and has the following changes:
- The control section has been updated to operations
IA update: Update control section to operations
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
show more ...
|
7affc529 | 06-Jul-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
IA update: Update health section
This is the second update to information architecture changes and has the following changes:
- Health section is updated to hardware status section - Hardware statu
IA update: Update health section
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
show more ...
|
828dda9b | 28-Jun-2021 |
Derick Montague <derick.montague@ibm.com> |
IA update: Add logs and update overview icon
This is the first patchset of the information architecture changes. These changes are the result of several months of design research with users to impro
IA update: Add logs and update overview icon
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
show more ...
|
512dfb70 | 30-Jul-2021 |
Derick Montague <derick.montague@ibm.com> |
Resovle POST code logs missing page message
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 r
Resovle POST code logs missing page message
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
show more ...
|
06d53863 | 24-May-2021 |
Sandeepa Singh <sandeepa.singh@ibm.com> |
Add POST code logs page
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 <sande
Add POST code logs page
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
show more ...
|
da9f0a6e | 14-Feb-2021 |
Derick Montague <derick.montague@ibm.com> |
Add factory reset page
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
Add factory reset page
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
show more ...
|
be6858c0 | 16-Dec-2020 |
Sukanya Pandey <sukapan1@in.ibm.com> |
Add power restore policy page
- 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/C
Add power restore policy page
- 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
show more ...
|
34efde29 | 02-Dec-2020 |
Sukanya Pandey <sukapan1@in.ibm.com> |
Add client sessions page
- 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`
Add client sessions page
- 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
show more ...
|
8f030bac | 07-Dec-2020 |
Dixsie Wolmers <dixsie@ibm.com> |
Add security settings page
Adds ability to enable/disable: - SSH protocol - IPMI protocol
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I2430a46343dd8756ef75fcc3cb068df8d51dd415 |
602e98aa | 21-Oct-2020 |
Derick Montague <derick.montague@ibm.com> |
Update linting packages to use latest
- 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 pattern
Update linting packages to use latest
- 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
show more ...
|
dd6aa0aa | 08-Oct-2020 |
Sukanya Pandey <sukapan1@in.ibm.com> |
Show error toast notification on unauthorized access
-When 403 status code which is an unauthorized access occured -show error toast notification.
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.c
Show error toast notification on unauthorized access
-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
show more ...
|