-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: [VAULT-19096] Customizable banners #23945
Conversation
* WIP auth message display * Move block to show only when authenticated * VAULT-22046 working search by name * Some code clean up * Fix merge conflict * Add tests * Fetch messages again after creation
… reached modal, small improvements (#24918) * Update kv object editor to only use a single row * continute using kv editype * Fix failing dashboard tests! * Fix failing test on sidebranch * Fix tests and update validations * Add optional tag * Address feedback * Add documentation * Clear messages when logging out * Fix tests! * Add 100 message limit modal * Add max message modal test * Do more checks! * Pair with Claire on the refactor of validator! * Only show validationerror for multiple rows * Update pageSize to 100 since when paginations are active it causes accessbility errors * Fix tests! * Add links to test * Make banners dismissable * Add cancel button * Address feedback! * Update test selectors * Update validator * Remove validations check in kvobjecteditor * Revert validationError in kvobjecteditor template * Put back if/else statements for link
* Fix edit bug and put transform back * Edit badgeColor * Add tests * Revert changes to transform * Edit badge colors * remove universal object transform
Build Results: |
* Add form inline warning * Remove title * Only show form warning for unauth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited for this feature 🎉. Thank you for your efforts on this! 👏
async fetchMessages(ns) { | ||
try { | ||
const url = this.auth.currentToken | ||
? '/v1/sys/internal/ui/authenticated-messages' | ||
: '/v1/sys/internal/ui/unauthenticated-messages'; | ||
const opts = { | ||
method: 'GET', | ||
headers: {}, | ||
}; | ||
if (this.auth.currentToken) opts.headers['X-Vault-Token'] = this.auth.currentToken; | ||
if (ns) opts.headers['X-Vault-Namespace'] = ns; | ||
const result = await fetch(url, opts); | ||
const body = await result.json(); | ||
if (body.errors) return (this.messages = []); | ||
const serializer = this.store.serializerFor('config-ui/message'); | ||
this.messages = serializer.mapPayload(body); | ||
this.bannerMessages?.forEach((bm) => (this.bannerState[bm.id] = true)); | ||
} catch (e) { | ||
return e; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might have been nice to handle the request in the message adapter instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to changing it after merging this sidebranch since it's a code improvement :)
Description
Introduces custom messages settings, allowing users to view, and operators to configure system-wide messages for enterprise users.
New settings section in sidebar:

Each tab indicates where you want the message to be displayed. Navigate to the tab you want the message to be displayed and click on the create message button:

Fill out the create message form.

Preview message before creating one.

Display message details.

Default message list view based on message location.

To delete or edit a message you can find these actions in two places:


On the list view, click on the three dots and a dropdown appears with Edit or Delete.
Navigate to the details view by clicking on the message on the list view. There are buttons indicating to Delete or Edit a message.
Tickets completed: