[Ban UI] Add Ai vue settings for Group and Admin
What does this MR do and why?
Add Ai vue settings for Group and Admin
This adds the scaffholding for groups and admin section of AI settings behind a two disabled ff: ai_settings_vue_admin
and ai_settings_vue_group
which render vue apps. This commit adds the base JS and rails helper to render the new settings. This MR will:
- Add 2 Feature flags
ai_settings_vue_group
andai_settings_vue_admin
- Add the index.js file to initiate ai settings applications
- Add the common structure for our Vue components
- Add the ruby helpers structure to allow a centralize way to initiate data from the serve and pass it to the client side
- Have the conditional rendering in the haml to only show the Vue apps if the feature flag is enabled.
- Have the toggle for the settings by using
settings_section
component
This issue will not:
- Have a working settings page
- Implement API actions
NOTE: The diff is a around 500 +-, but really most of this is boilerplate code and require little to no logic which is why I think it's fine as is. The group part could have been a separate MR, but given how small of an addition it is, I decided to keep it in context of this MR.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Admin:
Before | After |
---|---|
Group:
Before | After |
---|---|
Nothing! |
How to set up and validate locally
- Make sure you have AI features enabled to test this change https://docs.gitlab.com/ee/development/ai_features/index.html
- Go to your rails console and run
Feature.enable(:ai_settings_vue_admin)
- Navigate to the admin area
- Go in
Settings => General
- Note that you will not see the AI settings if you are on SAAS. You can comment out
ee/app/views/admin/application_settings/_ai_powered.html.haml:1
- Notice the header
AI-powered features
- There are no settings yet
- Go to your rails console and run
Feature.enable(:ai_settings_vue_group)
- Navigate to a group where you are the admin and have AI features enabled
- Navigate to
Settings -> General
- Notice the group header for AI-powered features
Note: if you do not see the settings, try to turn off the FF. If you still do not see it, then it can mean either of these criteria is not met:
- Is the group you are looking at has enabled AI features on your GDK? https://docs.gitlab.com/ee/development/ai_features/index.html#recommended-run-gdk-in-saas-mode-and-enable-ai-features-for-a-test-group
- Do you have an ultimate license for your instance?