Generic Vue Alert Component
What does this MR do?
Closes #197113 (closed)
This MR adds a generic wrapper of GlAlert so that our backend HAML files have a way to access a more flexible Flash message.
Testing outside of Unit Testing
I am not quite sure how to properly show that this component works outside adding it into a file temporarily for demonstration. Here is the extra code I added to get the screenshot below:
Add to top of /ee/app/views/admin/geo/nodes/index.html.haml
- if true
.js-vue-alert{ data: { variant: 'tip',
message: 'This GitLab instance is licensed at the Core tier. Geo is only available for users who have at least a Premium license.',
primary_button_text: 'Manage your license',
primary_button_link: admin_license_path,
dismissible: true.to_s } }
Add a new file ee/app/assets/javascripts/pages/admin/geo/index.js
import initVueAlerts from '~/vue_alerts';
initVueAlerts();
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #197113 (closed) cc: @nfriend
Edited by Zack Cuddy