| Age | Commit message (Collapse) | Author | Files | Lines |
|
Use findMessageId() to detect ResourceAlreadyExists in the redfish
error response and show a specific toast instead of the generic
add destination error.
Tested: Adding a duplicate SNMP destination on AST2600 EVB shows
the specific error toast instead of the generic one.
Related:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/90890
https://gerrit.openbmc.org/c/openbmc/phosphor-snmp/+/92218
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/93102
Change-Id: I5a4fc6541c246085099aaad7d2515bb84805cb16
Signed-off-by: Vijaysankar Ravi <vijaysankarr@ami.com>
|
|
Non-admin users navigating to the Serial Over LAN page had no
clear feedback — the page either failed silently or showed a
generic error. Show the SOL button and nav item to all users
and render an Access Denied alert when the session lacks the
required privilege.
A reusable AccessDeniedAlert global component is introduced
so other restricted pages can adopt the same pattern with a
single line.
Change-Id: Ifbb93bb966c801b3a72230e8f3b752b62ef22929
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
This change allows users to view detailed certificate information
by clicking a chevron icon to expand each certificate row. This
makes it easier for administrators to inspect certificates without
leaving the page or using external tools.
Why this enhancement is needed:
System administrators need complete certificate details for security
audits, compliance verification, and troubleshooting SSL/TLS issues.
Previously, users had to export certificates or use external tools
to view comprehensive information, which was inefficient.
What's included in the expanded view:
- Certificate metadata: version, serial number, signature algorithm
- Complete issuer details: organization, common name, unit, location
- Complete subject details: who the certificate is issued to
- Full validity timestamps with timezone information
Implementation details:
- Expand button aria-label is row-specific (e.g. "Expand table row
HTTPS Certificate") so screen readers identify each row uniquely
- Two-column layout uses <b-col sm="6"> to stack on small screens,
matching the Inventory page pattern
- Section headings (Issuer Information, Subject Information) are
conditionally rendered — hidden when all fields in the section
are absent, avoiding empty bold headers
- X.509 Version stored only when present in the API response;
displayed as v1/v2/v3 (ASN.1 integer + 1) for human readability
- formatSerialNumber only reformats strings that contain at least one
A-F hex letter; pure decimal serials are returned as-is
- CertificateString removed from Vuex state mapping entirely
- Unit tests added: store mapping (issuer, subject, serialNumber,
Version conversion, absent Version)
and component tests (expandLabel per-row identity,
formatSerialNumber all input cases)
Tested with HTTPS, LDAP, and TrustStore certificate types.
Change-Id: I735ad571c189d7ba84464bf4a9f1d2280175b128
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
When getEthernetData was called after any save action (e.g.,
adding an IPv4 address), it unconditionally reset
selectedInterfaceId back to the first interface (eth0). This
caused subsequent API patches to target eth0 even when the
user had navigated to a different tab (e.g., eth1).
Only set selectedInterfaceId to firstInterfaceId on initial
load when it is empty, preserving the user's active tab
selection across data refreshes.
Testing:
1. Navigate to Settings > Network page
2. Verify eth0 is selected by default on initial load
3. Switch to eth1 tab
4. Add or modify an IPv4 address on eth1
5. Verify the change is saved to eth1 (not eth0)
6. Confirm eth1 tab remains selected after the save
7. Repeat steps 3-6 with other network interfaces if available
8. Test with different configuration changes (DHCP enable/disable,
IPv6 settings) to ensure tab selection persists
Fixes: https://github.com/openbmc/webui-vue/issues/125
Change-Id: Ic112e88173d4d3c5c1409a17bee4837673523991
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
- Implemented Basic Auth setting in Policies page.
- User able to Enable/Disable the policy setting from UI.
- Added property presence check.
- Tested: p11 BMC machine, Able to enable/disable Basic auth,
Checked with and without redfish property to ensure UI doesn't break.
Checked success and error cases.
Change-Id: I08c0ccb275dbe068894de9cb35d6a286b4dc6e4f
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
|
|
This change switches power control to the EnvironmentMetrics-based
Redfish endpoint, derives minimum and maximum power cap values
dynamically from Redfish data, and updates ControlMode and SetPoint
handling to align with the latest schema.
Key changes:
1. Power control API and Redfish types:
- Removes src/api/services/powerControlService.ts; fetching and
PATCH are handled in the composable using shared Redfish utilities
- Adds EnvironmentMetrics and PowerLimitWatts types in
src/api/types/redfish.ts with proper ControlMode enum
('Automatic' | 'Disabled' | 'Manual' | 'Override')
- Chassis gains an EnvironmentMetrics link
- Composable resolves the Chassis collection via
useRedfishCollection<Chassis>('/redfish/v1/Chassis'), picks the
first chassis with EnvironmentMetrics, and fetches that resource
with useQuery; mutation sends PATCH and invalidates queries to
refetch fresh server state (returns Promise<void>; view owns
user-facing messages)
2. Power control composable
(src/components/Composables/usePowerControl.ts):
- Replaces Vuex PowerControlStore with a Composition API-based
composable
- Uses useRedfishRoot() and useRedfishCollection for cached
ServiceRoot and Chassis; uses TanStack Query to load and cache
EnvironmentMetrics power data
- Configures staleTime (30s freshness window) and refetchInterval
(30s automatic polling when tab visible) for live power
consumption updates
- Note: Only controls the first Chassis with EnvironmentMetrics in
multi-chassis systems (intentional for current use case)
- Forwards AbortSignal to API calls for proper request cancellation
- Reuses shouldRetry function from useAllSubResources
- Derives dynamic min and max power cap values from Redfish
PowerLimitWatts.AllowableMin/Max
- Provides a mutation for submitting updated SetPoint and
ControlMode; omits SetPoint when disabling to avoid sending
invalid values
- Handles all ControlMode enum values (Automatic, Disabled, Manual,
Override); UI sets Automatic/Disabled but preserves Manual/Override
when read from server
- Type-safe parameters (number | null instead of string coercion)
3. Toast composable and global plugin:
- useToast.ts (renamed from .js) uses bootstrap-vue-next useToast()
with TypeScript types; keeps successToast/errorToast API with
i18n titles
- Type restricted to string for simplicity; includes TODO for
potential VNode support expansion if needed
- src/plugins/toast.js continues to expose global $toast for
Options API
- BVToastMixin.js updated to use modelValue and extract VNode
content for consistency with bootstrap-vue-next 0.40.8
- Both implementations use isStatus: true for consistent toast
styling with status icons
4. Views modernization:
- Refactors src/views/ResourceManagement/Power.vue to use
<script setup>, usePowerControl(), and the new toast composable;
submitForm uses try/catch and
t('pageServerPowerOperations.toast.*') for success/error toasts
- Implements value caching to preserve user's typed input when
toggling power cap checkbox on/off
- Guards form sync watcher with v$.value?.$dirty check to prevent
overwriting in-progress edits during background refetch
- Loader semantics: show on first load (isLoading) and mutations,
but render cached data instantly on subsequent visits with silent
background refetch (avoids flicker)
- Renamed validator from 'between' to 'withinPowerCapRange' to
avoid confusion with Vuelidate's built-in validator
- Handles all ControlMode values (Automatic, Disabled, Manual,
Override) in form state synchronization
- Refactors src/views/Overview/OverviewPower.vue to read from the
power control composable instead of Vuex; implements settled
computed to emit overview-power-complete only when chassis
collection is fetched AND either no EnvironmentMetrics exists or
metrics query has completed (prevents premature completion)
- Shows power cap for all active control modes (Automatic, Manual,
Override)
- Removes mapState/mapActions usage and related Vuex wiring
5. Store cleanup and typing:
- Deletes src/store/modules/ResourceManagement/PowerControlStore.js
- Removes PowerControlStore registration from src/store/index.js
- Updates src/store/api.d.ts to match actual implementation
(set_auth_token with snake_case, accepts string | null |
undefined)
- Adds src/i18n.d.ts to provide basic typing for the shared api
Tested-by: Manual testing on development server
- Power consumption and cap values load correctly from
EnvironmentMetrics with automatic 30-second polling (refetchInterval)
when tab is visible
- Min and max power cap values reflect dynamic limits from Redfish
- Updating the power cap and enable state sends correct SetPoint and
ControlMode values; SetPoint is omitted when disabling
- All ControlMode values (Automatic, Disabled, Manual, Override) are
handled correctly
- User's typed values are preserved when toggling power cap checkbox
- Form edits are not overwritten by background refetch (dirty state
guard)
- Success/error toasts show localized messages with consistent
modelValue-based timing and status icons
- Overview power card reflects updated power state; overview loader
waits for both chassis and metrics queries to settle before
completing
- Request cancellation works properly on component unmount
Change-Id: Ic61631efd8790150a5e2914822f1dd25bd77305a
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
|
|
Enable users to switch between English, Russian, and Georgian
languages directly from the application header, eliminating the
need to log out and log back in to change language preferences.
Prior to this enhancement, changing the interface language
required users to:
- Log out from their current session
- Return to the login page
- Select a different language
- Log back in with credentials
This workflow disruption made it impractical for operators to
switch languages during their work sessions. The new language
selector in the user dropdown allows users to:
- Change language instantly from any page without logout
- Switch between languages as needed during a single session
- Maintain active sessions and current page context
- Access all three supported languages (English, Russian, Georgian)
The language preference persists across sessions via the Vuex
store, so the selected language remains active after logout and login.
This improvement is particularly valuable for:
- Multilingual teams sharing the same BMC system
- Operators who need to verify terminology in different languages
- Training scenarios where instructors switch between languages
- International deployments with diverse user bases
Implementation includes:
- Language dropdown in user menu (between Profile Settings and Log Out)
- getAvailableLanguages() helper in i18n.js using Intl.DisplayNames
to automatically generate language labels in "{English} - {Native}"
format (e.g., "Russian - Русский", "US - English")
- getRoutePageTitle() helper in i18n.js to eliminate duplicated
route-to-title logic between App.vue and PageTitle.vue
- Reactive translations via Vue i18n computed properties
- Page title updates in both DOM (PageTitle component) and
browser tab (App.vue document.title)
- Component re-rendering triggered by routerKey increment
- Centralized localStorage persistence in GlobalStore.js
setLanguagePreference mutation
- Translation keys added to en-US.json, ru-RU.json, and ka-GE.json
(global.pageTitle.missing, appHeader.language)
All interface text, navigation menus, and page titles update
immediately when language is changed.
Change-Id: Ie11523c5ff23fc1600aca2d8ee5adb542c5ce4b3
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
Previously, when a user started virtual media redirection and navigated
to another page, the image name was not shown upon returning.
This update retains the image name on the Virtual Media page during
Single Page Application (SPA) navigation.
**Implementation:**
- Active file and nbd objects are preserved in Vuex store state during
SPA routing; the filename is displayed using the File.name property.
- Proxy device objects are consistently shaped with file and nbd fields
initialized to null in all construction paths.
- Virtual media store is cleared on logout via a new clearDevices
mutation, ensuring stale state is not retained across sessions.
- When the BMC reports a device as Inserted but no browser-owned NBD
connection exists (e.g. another UI session), the UI shows an
informational label and a Stop button that ejects via Redfish
EjectMedia instead of assuming a local NbdServer is present.
**Limitations:**
The image name is only retained during in-app navigation and is lost on:
- Browser refresh (F5) - WebSocket connection cannot survive page reload
- Duplicate tabs - each tab maintains independent state
**Testing:**
1. Image name displays when starting virtual media redirection
2. Image name persists when navigating between pages
3. Image name clears when stopping redirection
4. Second tab with active redirection shows informational state; Stop
ejects via Redfish and both tabs return to idle
5. Logout clears virtual media state; new session starts clean
6. Multiple proxy devices maintain independent state
Change-Id: I5568025382a18adf89b18d3e81026c3112ae1e7e
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
Exclude root user from bulk operations to prevent accidental
deletion, enabling, or disabling of the critical root account.
This addresses community security concerns where administrators
could accidentally perform bulk operations on the root user,
potentially locking themselves out of the system.
- Disable root user's checkbox in the user table and show
a reason tooltip
- Exclude root from "select all" header checkbox selection
- Add centralized root detection in userManagement store
with env fallback (VITE_ROOT_USERNAME/ROOT_USERNAME,
default: root)
- Simplify delete action enable logic to !isSelf && !isRoot
- Restore mixin-compatible onChangeHeaderCheckbox behavior
(filteredItems, pagination window, post-select
reconciliation)
- Keep header potentially indeterminate after select-all by
design when root is excluded
- Do not clear bulk selection on single-user delete
- Implement cross-browser tooltip behavior for disabled root
checkbox (wrapper-based trigger with improved placement and
readability)
Testing:
1. Navigate to Security & Access > User Management
2. Verify root checkbox is disabled (grayed out) and shows tooltip
3. Click "Select All" - only non-root users are selected
4. Verify header can remain indeterminate when root exists
5. Perform single-user delete and verify existing bulk selection
is preserved
6. Perform delete/enable/disable on test users and verify bulk
operations work normally
7. Verify tooltip visibility/readability on Chrome, Edge, and
Firefox
Change-Id: Iffc9356ee6f5771bed381255173bbde08efd85e1
Signed-off-by: Aravinth Sri Krishna Raja Raghavan <aravinths@ami.com>
|
|
Introduce reusable Redfish API infrastructure and modernize the Sensors
page to use Vue 3 Composition API with TanStack Query, eliminating the
need for Vuex store patterns for server state management.
This change provides a foundation for migrating other hardware status
pages (Memory, Processors, Drives, etc.) to a more maintainable and
performant architecture.
Key changes:
1. Generic Redfish composables (src/api/composables/):
- useRedfishRoot.ts: Caches ServiceRoot and detects OData support
- useRedfishCollection.ts: Smart collection fetcher with OData
$expand/$select support and graceful fallback
- useAllSubResources.ts: Generic pattern for fetching nested
resources from parent collections
2. Sensors page modernization:
- Migrated from Vuex store to TanStack Query (Vue Query)
- Created useSensors.ts composable for data fetching
- Removed legacy Thermal and PowerSubsystem endpoints
- Now uses only modern /Chassis/{id}/Sensors collection
- Maintains existing UI/UX with Bootstrap Vue table
3. TypeScript support:
- Added tsconfig.json and webpack ts-loader configuration
- Created required Redfish type definitions
- Preserves Redfish PascalCase property names
4. Performance optimizations:
- Auto-detects and uses OData $expand for fewer API calls
- Implements automatic caching and deduplication
- Smart retry logic with exponential backoff
- 30-second stale time with 5-minute garbage collection
Benefits for future development:
- The generic composables are designed for reuse across components:
// Fetch all Memory from all Systems
useAllSubResources<Memory>('/redfish/v1/Systems', 'Memory')
// Fetch all Drives from all Storage
useAllSubResources<Drive>('/redfish/v1/Storage', 'Drives')
- Implemented TypeScript types
- Reuses existing Bootstrap table components
- Preserves existing UI/UX
- Focuses on infrastructure reusability
This pattern eliminates boilerplate Vuex store code and provides
better developer experience with automatic loading states, error
handling, and background refetching.
Tested-by: Manual testing on development server
- Sensors page loads correctly
- OData optimization works when supported
- Graceful fallback when OData unavailable
- All table functionality preserved (sorting, filtering,
export, cancel and searching)
Change-Id: Id605319140f607b295d24085f3681f09ac0d5ebd
Signed-off-by: Nishant Tiwari <tiwari.nishant@ibm.com>
|
|
"Vue CLI is in Maintenance Mode!" https://cli.vuejs.org/
Vite is created by Vue's creator and is the recommended build tool
for Vue 3. It supports most of the configured conventions in Vue CLI.
Dev Server startup is 60X faster and HMR is noticeably faster ~50ms.
Better Tree-shaking support and modern ESM support.
This migration preserves all existing functionality while eliminating
Vue 2 legacy dependencies.
Build Output Comparison (gzipped):
Master (Webpack) Vite Delta
CSS: 39 KB 45 KB +6 KB (+15%)
JS: 505 KB 483 KB -22 KB (-4.4%)
Total dist: 556 KB 544 KB -12 KB (-2.2%)
Build time: ~29s ~7s ~4x faster
Build System Changes:
- Replace vue.config.js with vite.config.js
- Remove babel.config.js (Vite uses esbuild)
- Remove postcss.config.js (Vite handles PostCSS internally)
- Add index.html to project root with ESM module entry point
- Add custom Vite plugin for directory import resolution
- Rename .eslintrc.js to .eslintrc.cjs (ESM compatibility)
Dependency Updates:
- Remove @vue/cli-* packages and webpack-related dependencies
- Add vite, @vitejs/plugin-vue, @vitejs/plugin-basic-ssl
- Add vite-svg-loader, vite-plugin-compression
- Upgrade Bootstrap to 5.3.8
- Upgrade Sass to 1.97.2 (supports quietDeps option)
- Upgrade xterm to @xterm/xterm v6 (new package name)
- Upgrade xterm-addon-* to @xterm/addon-* packages
- Upgrade vue-i18n to v11
- Upgrade eslint to 8.57.1
- Upgrade axios-cache-interceptor to latest
Environment Variable Migration:
- Change VUE_APP_* prefix to VITE_* (Vite convention)
- Replace process.env with import.meta.env in source files
- Update .env.ibm, .env.intel example files
- Update documentation with new variable names
ESM Module Compatibility:
- Replace require('@/eventBus') with ESM imports (~23 files)
- Ensure event bus listeners are registered/unregistered with stable
handler references to prevent leaks
- Replace require.context with import.meta.glob in i18n.js
- Convert SVG inline loader to vite-svg-loader component imports
SCSS/Sass Updates:
- Remove tilde (~) prefix from node_modules imports
- Add silenceDeprecations and quietDeps for Bootstrap warnings
- Fix color() function syntax for Sass 2.0 compatibility
xterm.js v6 Migration:
- Update imports to @xterm/xterm, @xterm/addon-attach, @xterm/addon-fit
- Replace deprecated setOption() with constructor options
- Add CSS fix for helper textarea visibility
Dev Server:
- Configure HTTPS with @vitejs/plugin-basic-ssl
- Preserve proxy configuration for BMC backend
- Add WebSocket proxy auth token forwarding for /console, /kvm, /vm
- Configure HMR on separate WebSocket path (/ws_hmr)
X-Auth-Token Persistence (opt-in):
- Add VITE_STORE_SESSION env flag for non-cookie auth backends
- Persist X-Auth-Token to session cookie when enabled
- Enables direct browser navigation to Redfish endpoints
Follow-on: CI/testing updates (unit test runner + run-ci alignment)
Some Jest config changes skipped here since this follow-on commit
switches to Vitest.
follow-up change is here:
https://gerrit.openbmc.org/c/openbmc/webui-vue/+/86511
Tested: Sanity tested most navigational screens in the default UI,
including many different types of API calls.
Tested most build options.
Tested the new i18n:report and it is working correctly.
Change-Id: Ie84d1ed6121ffe7d2ddb379084d833b8d5a6fccf
Signed-off-by: Jason Westover <jwestover@nvidia.com>
|
|
Add optional chaining to avoid errors when
BootSourceOverrideTarget is missing.
Change-Id: I176119ac115d92749722ed74aabd84ebd2dae384
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
|
|
Complete the migration from Vuelidate v1 (vuelidate 0.7.7) to v2
(@vuelidate/core 2.0.3 and @vuelidate/validators 2.0.4).
Changes include:
- Replace imports from 'vuelidate/lib/validators' with
'@vuelidate/validators'
- Convert static 'validations:' objects to 'validations()' methods
which return the validation rules object
- Update helpers.regex() syntax from v1 two-arg format
helpers.regex('name', pattern) to v2 single-arg
helpers.regex(pattern)
- Create custom macAddress validator using regex since macAddress
is not included in @vuelidate/validators v2
- Remove deprecated vuelidate 0.7.7 package from dependencies
- Add unit tests for Vuelidate v2 migration verification
- Fix DateTime store to continue with DateTime update even if NTP
settings update fails
- Fix Network Table components (IPv4, IPv6, DNS) missing @ok event
handlers for Add modal dialogs
- Fix CSR country dropdown by restoring COUNTRY_LIST data and
moving useI18n() call to setup() function
- Fix disconnected modals in Network page by using eventBus to
communicate between child components and parent (hostname,
MAC address, default gateway edit buttons)
Tested:
- npm run build completes successfully
- npm run test:unit passes 66 new Vuelidate validation tests:
- VuelidateMixin.spec.js: getValidationState method tests
- TableDateFilter.spec.js: Date range validation tests
- ModalHostname.spec.js: Hostname validation tests
- ModalMacAddress.spec.js: MAC address validation tests
- ModalUser.spec.js: User form validation tests
- Manual testing performed:
- User Management: Create/edit user with password confirmation
- LDAP: Enable/disable with conditional field requirements
- Date/Time: Switch between NTP and manual modes
- Factory Reset: Confirm checkbox validation when server is on
- Network Settings: Add IPv4, IPv6, DNS addresses via modals
- Network Settings: Edit hostname, MAC address, default gateway
- Certificates: Generate CSR with country dropdown working
Change-Id: I0f6b5d89d1791b36977f1a3c16cbd10bca6a484a
Signed-off-by: Jason Westover <jwestover@nvidia.com>
|
|
In Bootstrap-Vue-Next (Vue 3), the @change event on BFormCheckbox
and BFormRadio passes an Event object instead of the boolean value.
This caused malformed API payloads like:
{"LocationIndicatorActive":
{"isTrusted": true, "_vts": 1765562875420}}
instead of:
{"LocationIndicatorActive": true}
Replace @change with @update:model-value which correctly passes the
new value in Vue 3/Bootstrap-Vue-Next.
Components fixed:
- OverviewInventory.vue: LED toggle
- InventoryServiceIndicator.vue: LED toggle
- InventoryTableSystem.vue: LED toggle
- NetworkGlobalSettings.vue: 6 network switches
- Policies.vue: 4 policy switches (SSH, IPMI, vTPM, RTAD)
- TableIpv4.vue: DHCP switch
- TableIpv6.vue: DHCPv6 switch
- Ldap.vue: LDAP auth and service type controls
Also adds safety net in api.js:
- Request interceptor to strip Vue reactivity from payloads
- Detects and warns about Event objects in API payloads
- Improved response error handling with null safety
- Conditional debug logging (development mode only)
Change-Id: I180d9143087284e28c5066a6ffc141cd7f7038c6
Signed-off-by: jason westover <jwestover@nvidia.com>
|
|
Use optional chaining on the element access
and on the property access to prevent TypeError
Fixes: https://github.com/openbmc/webui-vue/issues/135
Change-Id: Ic58d4ef086e5d0a43a44b6388b3d1d450c79d224
Signed-off-by: Hariharan Rangasamy <hariharanr@ami.com>
|
|
Add the forceUpdate option for the uploadFirmwareMultipartHttpPush call
so that ForceUpdate can be set through it.
Change-Id: I4d1f326963e87f024037001c964ab72c90ccb8e1
Signed-off-by: Jae Hyun Yoo <jae.yoo@oss.qualcomm.com>
|
|
Add the applyTime option for the uploadFirmwareMultipartHttpPush call
and set its default value to ‘Immediate’.
Change-Id: I7e9a442ef0bd4487b67b921761b51b603a77d9ed
Signed-off-by: Jae Hyun Yoo <jae.yoo@oss.qualcomm.com>
|
|
Complete migration from Bootstrap 4 (bootstrap-vue) to Bootstrap 5
(bootstrap-vue-next) and remove the @vue/compat plugin to finalize
the Vue 3 migration.
Bundle size impact:
- Before (Bootstrap 4 + bootstrap-vue): 535 KiB gzipped
- After (Bootstrap 5 + bootstrap-vue-next): 511 KiB gzipped
- Reduction: 24 KiB (4.5% smaller)
Package updates:
- Update bootstrap 4.6.2 -> 5.3.8
- Update bootstrap-vue 2.23.1 -> bootstrap-vue-next 0.40.8
- Remove @vue/compat plugin
- Update vue 3.4.29 -> 3.5.24 and related packages
- Add mitt 3.0.1 for global event bus
- Add vue-demi 0.14.10 for library compatibility
Bootstrap 5 CSS updates:
- Replace directional classes: ml/mr/pl/pr -> ms/me/ps/pe
- Replace text-left/right -> text-start/end
- Replace sr-only -> visually-hidden / visually-hidden-focusable
- Update media breakpoint xs -> sm (Bootstrap 5 removed xs)
- Update color functions: gray("700") -> $gray-700
- Add form-switch border-radius for curved toggles
- Update alert, table, toast, form, and button styles
Bootstrap-Vue-Next API changes:
- Use createBootstrap() for plugin registration
- Update modal footer slots: #modal-footer -> #footer
- Fix form select events: @change -> @update:model-value
- Add v-model bindings to modals instead of manual show()/hide()
- Update toast system with custom plugin wrapping useToast()
- Register components and directives explicitly
Vue 3 specific updates:
- Replace $root.$emit with mitt event bus (eventBus.js)
- Update render function from h(App) to createApp(App)
- Add emits option to components
- Use h() instead of $createElement in mixins
- Add Vue 3 compile-time feature flags with documentation
- Update event listeners: $on/$off to eventBus methods
- Add beforeUnmount cleanup for event listeners
New components and significant additions:
- src/plugins/toast.js - Custom toast plugin wrapping useToast() for
Options API compatibility
- src/components/Global/ConfirmModal.vue - Global confirmation dialog
shim to replace Bootstrap 4's removed bvModal.msgBoxConfirm
- src/eventBus.js - mitt-based event bus with Vue 2-compatible API
- Navigation state preservation on page refresh implemented
Critical fixes:
- Add global API interceptor to strip Vue reactivity from payloads
- Preserve binary data (File, Blob, FormData) in API requests
- Fix Generate CSR modal v-model binding for proper open/close
- Remove debug logging and fix jest configuration
- Fix responsive text visibility in AppHeader
- Update BVTableSelectableMixin for proper row selection
- Fix BVToastMixin VNode rendering for Vue 3
Vue 3 modal fixes (lazy-loaded components):
- Add v-model support to network modals (ModalIpv4, ModalIpv6, ModalDns,
ModalHostname, ModalMacAddress, ModalDefaultGateway) by adding
modelValue prop, watcher on modelValue that triggers show(), and
update:modelValue emit in resetForm
- Remove lazy loading from TableIpv4, TableIpv6, TableDns to ensure
modal component refs are available when v-model triggers
- Fix modal title accessibility by adding title prop to modals
(ModalAddDestination, ModalUser, ModalAddRoleGroup, etc.)
i18n fixes (computed properties):
- Fix computed properties using i18n translations in ModalAddRoleGroup,
ModalUser, and ModalUploadCertificate
- Move useI18n() call from data() to setup() and return i18n object
- Use i18n.t() instead of $t in computed properties and templates
- Prevents "this.$t is not a function" and "_ctx.$t is not a function"
errors in Vue 3
Toast notification fixes:
- Fix toast progress bar visibility by setting progressProps to
undefined (documented way to opt-out) instead of false
- Change modelValue prop to interval for auto-dismiss timing
- Remove temporary CSS display:none hack from _toasts.scss
Network settings fixes:
- Fix checkbox @change event sending Vue reactive proxy object instead
of boolean by casting with !! operator in changeDomainNameState and
related methods in NetworkGlobalSettings.vue
- Ensures API receives plain boolean values in PATCH requests
Navigation fixes:
- Fix nav-link styling for navigation items without children by
replacing b-nav-item with router-link in AppNavigation.vue
- Prevents blue font color from .nav-link CSS class
Configuration updates:
- Remove vue-compat webpack configuration
- Add Vue 3 feature flags (__VUE_OPTIONS_API__, etc.)
- Add .cursor to .gitignore
Accessibility improvements:
- Add autocomplete attributes to password and credential inputs
- Add modal title props for screen reader support
Build completes successfully and UI behavior matches pre-migration.
Extracted features (to be submitted in follow-up PRs):
The following features were removed from this migration PR to keep it
focused on the Bootstrap 5 upgrade. They will be submitted separately:
1. UnresponsiveModal - Server connectivity watchdog with auto-retry
2. Auth token persistence - sessionStorage support for X-Auth-Token
3. Hardware store error handling - try/catch, dynamic discovery
4. Login page connecting indicator - Backend polling with spinner
5. Test updates - Jest setup and snapshot updates for
Bootstrap-Vue-Next
6. Documentation updates - Vue 3 and Vue I18n v9+ API documentation
7. Enhanced ConfirmModal - Feature-rich confirmation dialog with
custom actions
Change-Id: Ib76a58f324b3c926cf536e6e4626e4271639de38
Signed-off-by: Jason Westover <jwestover@nvidia.com>
|
|
Disables power operation buttons for users with
"Read-only" privileges. This change ensures that only "Operator" and
administrative users can perform power operations, preventing
unauthorized actions and enhancing system security.
Change-Id: I515ede092cef3c82a110d9534d9f8d3d6afc3135
Signed-off-by: Aravinth S <aravinths@ami.com>
|
|
- The Sensors page takes too long to load, It is because we are
trying to call the redfish endpoint: /Sensors' Members one by one
and setting in the GUI. The change made is that we are using the
query parameters' expand option to call only once and get all
the required responses.
- We are using query parameters only for those which have MaxLevels>0,
else calling the APIs one by one.
- Tested: Checked on a p10 system. For 306 records, it used to take
1 minute 20 seconds, now takes 7 seconds to load.
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
Change-Id: Ife3447e48d4f5617dcf4563ceac486e4502b2de1
|
|
Problem:
- Host firmware naming was inconsistent with actual functionality
Changes:
- Rename hostFirmware to biosFirmware in store
- Update component names and references
- Modify i18n translation keys
Tested:
- Verified store mutations/actions
- Confirmed component rendering
- Checked i18n translations
- npx eslint without error related to 'host'
Change-Id: Ib97e4682f649d4a52f65e69df50422d84f23e916
Signed-off-by: Shane Lin <hslin@nvidia.com>
|
|
SerialConsole was deprecated in Manager v1_10_0 and has been
removed in bmcweb [1].
Because the SerialConsole values were not available anymore, the
Managers were not displayed because "setBmcInfo" couldn't find the
"SerialConsole" properties. THe following error will be logged:
```
TypeError: Cannot read properties of undefined (reading 'ConnectTypesSupported')
at Wa.setBmcInfo (app.25e72670.js:58:745295)
at app.25e72670.js:50:2774
at app.25e72670.js:50:10113
at Array.forEach (<anonymous>)
at app.25e72670.js:50:10092
at Wa._withCommit (app.25e72670.js:50:11953)
at Wa.commit (app.25e72670.js:50:10066)
at Wa.commit (app.25e72670.js:50:9518)
at o.commit (app.25e72670.js:50:2216)
at app.25e72670.js:58:745747
```
[1]: https://github.com/openbmc/bmcweb/commit/fa800c8a141aa4b209269e0fb50cae34aa24f75d
Tested: BMC manager being listed in the inventory and serial console
variables being displayed for the system.
Change-Id: I1a24178717805ca50eef2c89042c0bd9ede1d5bc
Signed-off-by: Tan Siewert <tan@siewert.io>
|
|
Update to api function for MessageIDs - PaswordChangeRequired
This patch is just a small tweak while still assuming the current
X.Y.Z version format.
When searching for a standard Registry string from @Message.ExtendedInfo
-which is an array of Message objects-,
we should stick to the default namespace.
For example,
if someone added OpenBMC.0.5.0.PaswordChangeRequired it could be
erroneous to assume that it has the same meaning, since
semantically it is a different message.
For our use, trying to do something useful with version portion
seems problematic, so I am fine with ignoring them as already done
with code being updated here.
The search function has been made generic to allow reuse,
and some IntelliSense sugar was added.
Tested, as Paul documented:
Tested: logging in, navigating, logging out with non-expired password.
Logging in, navigating, then running `passwd -e <accountname>` via ssh
leads to functional password change page on the next request and then
navigating proceeds normally, and logging out too. If password is
expired before logging in the user gets redirected to the password
change page automatically after logging in.
Change-Id: I306ace2024efea13f25e24528a048d0955b2f95b
Signed-off-by: j-westover <jwestover@nvidia.com>
|
|
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>
|
|
Fix i18n issue in the Power restore policy, Inventory LEDs, and User
management page.
After merge the vue3 code to master the i18n Power restore policy,
Inventory LEDs, and User management page got conflicts and old code
retrieved in master. So unable to render the Power restore policy,
Inventory LEDs and unable to disable the user in user management page
change the i18n.t method to i18n.global.t for the vue3 support.
Change-Id: I46f3f56632308ceaee321dd896e16e922d964b60
Signed-off-by: Surya Venkatesan <suryav@ami.com>
|
|
In LDAP loading declare outside the form, form validation condition
change, server power operation page validation added and i18n method
changed in the event log store.
Change-Id: I903b4dec7da1a5a2cc8441c65693c57201405d70
Signed-off-by: Surya Venkatesan <suryav@ami.com>
|
|
In network page invalid if condition changed, added validations and i18n
function changed based on the vue 3 support.
Change-Id: If5b9c00f6da722984f1c568cfbcb6b34537c3df1
Signed-off-by: Surya Venkatesan <suryav@ami.com>
|
|
While navigating to the pages i18n, vuelidate, and filters errors
occurred. i18n, and vuelidate code changes in each page adapted to
vue3. Filter global function for date and time format implemented
in the main.js file and those files which as called the filter
functions.
Change-Id: If1a2ee22d47750faef1c35ef2c263299067d9a20
Signed-off-by: Surya Venkatesan <suryav@ami.com>
|
|
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>
|
|
- Previously, we used to get the values for power restore policy page
from“JsonSchemas/ComputerSystem/ComputerSystem.json”. Now we have
removed the hardcoded API call and are fetching the values from
the JsonSchemas/ComputerSystem’s URI because we would have versioned
ComputerSystem.json in the redfish response.
Change-Id: I1a25cbbb3dfc536485a6f71a359ae32c6eadf5f7
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
|
|
Event entry should be downloaded with specific http header of "Accept:
application/octet-stream" or "*/*", but the default http header is set
to "Accept: application/json", so need to specify the header for event
downloading.
Refer: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40136
Tested:
Event entry data can be downloaded with the fix.
Change-Id: Ia45123340da79a54fc4229470e6822206b8df808
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
|
|
When no targets are provided, webui will now default to the BMC:
i.e. "/redfish/v1/Managers/bmc"
The current version of bmcweb requires the Targets parameter.
bmcweb will be updated for multipart to match the behavior of
simpleupdate:
if Targets is empty or missing, default to the BMC.
Also, the fwupdate page will be updated soon to allow the
selection of Targets from the FirmwareInventory list.
This should be a temp webui fix until we are comfortable with
the upcoming changes to bmcweb.
Change-Id: I630dcb40068b98aad8e1d276d17fe9af4793e788
Signed-off-by: jason westover <jwestover@nvidia.com>
|
|
According to the Redfish Firmware Update Whitepaper [1]
due to the vendor-specific details of this operation,
HttpPushUri has been deprecated in favor of multipartHTTP push
updates.
Availability of update methods is determined from the UpdateService
response.
If MultipartHttpPushUri is found it will be preferred over HttpPushUri
Tested:
-Firmware update by performed via MultipartHttpPushUri
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP2062_1.0.1.pdf
Change-Id: I184a889514d5f9f9598f35b2281404335bc0bc82
Signed-off-by: Leo Xu <yongquanx@nvidia.com>
|
|
Redfish backends other than OpenBMC bmcweb expect clients to
authenticate using X-Auth-Token HTTP header as that's the only standard
authentication method for Redfish sessions.
This code falls back to using the token in case Session creation didn't
result in obtaining an XSRF cookie (as should normally happen with
bmcweb).
Limitations: all WebSocket-based functionality can not work (JS-based
NBD Virtual Media, IP KVM, SOL), page reload drops the session and
requires to log in again.
Tested: logging in, observing Overview and successfully logging out of
an AMI MegaRAC BMC. Logging in and navigating around a bmcweb-running
system which doesn't have the code to provide cookies for Session POST
request (everything works as usual sans WS-based features).
Change-Id: I81dc881193440d8d252dcd283b99915bd08c0c5e
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
A password can expire at any moment during session lifetime and bmcweb
starts returning 403 Forbidden errors to the requests made after that.
The response contains clear indication of the condition in the standard
`@Message.ExtendedInfo` attribute which is an array of Message objects.
Previously the code was trying to detect this condition by querying
AccountService after logging in but this approach doesn't work when
password expires mid-session. Also it was limited to BMC-managed
accounts and used hardcoded account URIs in violation of Redfish spec.
This patch adds to the interceptor of 403 error so that the user is
automatically redirected to the password change page as soon as the
condition is detected.
The same message is also present in the session creation POST response
201 if the password expired before the log in attempt, in this case the
session is created as usual but the user is automatically redirected to
password change page before any further requests are made.
Tested: logging in, navigating, logging out with non-expired password.
Logging in, navigating, then running `passwd -e <accountname>` via ssh
leads to functional password change page on the next request and then
navigating proceeds normally, and logging out too. If password is
expired before logging in the user gets redirected to the password
change page automatically after logging in.
Fixes: https://github.com/openbmc/webui-vue/issues/118
Change-Id: I03f5ee2526a4bb1d35d3bbea1142fea077d6bfed
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
For event entry download, the href not work since the event entry
download only work with header of "Accept: application/octet-stream" or
the default "*/*", change to click function to make it work.
Refer: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40136
Change-Id: I11051e913bfd71ef081bed93ffcbeeb1edd8c730
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
|
|
To be able to talk to a Redfish-compliant implementation webui should
switch from old non-standard login and logout endpoints to creating a
Session via an appropriate POST request and to DELETE it on logout. This
also gives us standard Session object with all the relevant parameters
which allows the frontend to know what session it's using, what
permissions it has etc.
This works against bmcweb which checks for the presence of
webui-vue-specific "X-Requested-With" header in the request and provides
cookies in addition to the Redfish authentication token in the header.
Tested: logging in, logging out, navigating the pages, reloading the
page doesn't require logging in (if the session isn't expired),
WebSocket connections work.
Change-Id: I9d6159850b109a658b8f980637653e7e4576058b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
|
|
- Removed TFTP server firmware update ability in the UI.
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
Change-Id: Icbeddc7a3faa262f12e85268206ae70850f37905
|
|
Remove getLastBmcRebootTime after post BMC reboot action since BMC
connection will be lost after reboot. The last BMC reboot time will be
got after reboot BMC page loading, and after BMC reboot, user need
reload the WEB UI, so there is also no need to send Redfish request to
get the last BMC reboot time just after the post the BMC reboot action.
Change-Id: Ic5d0cbca23a61610cc387a4046b85e9c20c255ea
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
|
|
Add IPv6 setting in network setting page.
- Add IPv6 domain name, DNS servers, NTP servers enable/disable
- Add DHCPv6 enable/disable
- Add IPv6 default gateway
- Add IPv6 addresses
- Add IPv6 static addresses
- Add IPv6 static addresses adding and deleting
Tested:
- IPv6 domain name, DNS servers, NTP servers enable/disable function
- DHCPv6 enable/disable function
- Verified the IPv6 default gateway
- IPv6 addresses adding and deleting
- Verified the IPv6 addresses in IPv6 table
Change-Id: I9eebf6ef5f7de748f79779d8168b8dcfcdda2495
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
|
|
Currently, the Redfish request used fixed URIs, modify the code to use
the BMC and System paths got from response of API calls.
For CertificateStore, since it was using the URL for constant variable
assignment, changed the constant CERTIFICATE_TYPES to method call.
Change-Id: I330b7272083e3e6993aae5705aae170b8e9a4659
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
|
|
BMCWeb is dropping the support for patch for ApplyOptions, hence remove
the setApplyTimeImmediate and its corresponding usage from webui. The
related patch from bmcweb is as under -
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72150
Change-Id: I4ef64485103db843e1280bc5b8bd8be63813c368
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
|
|
- Added success toast notification messages for identify
LEDs present at Inventory and LEDs page and Overview.
- Import of Toast was not present in Overview's Inventory
card and DIMM slot table, fixed it.
Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
Change-Id: If9ad84e66f6f15616cb8af51b1e84d8d06b1afd0
|
|
- Unable to generate Certificate Signing Request (CSR) when filling
optional field-Challenge password values on Certificate page.
- Hence, removed the Challenge password option from the Generate
CSR panel.
Change-Id: I862f024de84f34738be5e5cd22701b63c2309152
Signed-off-by: Vedangi Mittal <vedangimittal3004@gmail.com>
|
|
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>
|
|
Bmcweb supports the If-None-Match and etag headers on responses. While
for static files, we can do a direct set, for responses, there's no way
to cache values.
Add caching support by adding what seems to be a well supported axios
package. Note the intent is that the cache expires immediately, such
that the bmc will always be polled for results, and return 304 when not
modified. Additionally, we currently cache these values in the session
context, such that they can be reused on refresh.
Tested: webui loads properly. Upon navigating to a logs page, and back,
the network console shows the bmc returning nearly all redfish responses
with 304, not modified.
Change-Id: I2e8067a88a0352226db9f987d1508ab5bf266b92
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
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>
|
|
Having this code is causing crashes for implementations that don't have
dbus-rest enabled in bmcweb, which is deprecated. This commit is
intended to start a discussion around this issue, and propose simply
removing it.
33a8c5369e0253a93dba2e70647bda1c7697b73b (checked in July 2020) points
this crash out, and adds a way to disable the feature. While we could
just make VUE_APP_SUBSCRIBE_SOCKET_DISABLED the default, this seems ill
advised, given the dbus-rest options deprecated status.
Change-Id: I6244f5e2ce895199d5d47cfca9eef36584e8f524
Signed-off-by: Ed Tanous <ed@tanous.net>
|
|
Switch Power Supply information to use information from the new
PowerSubsystem since bmcweb enabled this by default, any other modern
Redfish implementation should have this schema enabled.
Tested: On Ampere MtJade platform
1. Login to WebUI; Hardware Status; Inventory
2. Inventory information for power supplies is displayed.
Change-Id: Iad59d0145b47bcd5eb3cb4ff852e50da976a6005
Signed-off-by: HuyLe <hule@amperecomputing.com>
|
|
According to the Redfish Data Model specification the correct parameter
name for the '/Actions/Manager.ResetToDefaults' action is not
'ResetToDefaults' but 'ResetType'.
Change parameter name to match with the specification.
Tested:
Reset operation still works as expected.
Change-Id: I111001800bb812ccb32f51f78f2e02c5f4d10e7c
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
|