Skip to content

Add Table To Display AI Feature Settings

Julie Huang requested to merge 476660-add-table-for-displaying-features into master

What does this MR do and why?

This MR adds the table for displaying feature settings in the AI feature settings page in the admin menu. It currently uses stubbed data to render the table rows. This will be swapped out when the necessary back-end work is complete. @jpcyiza and I have agreed upon the format of the data here and this is what the stubbed data works off. Out of scope for this MR is the model selection dropdowns which will be handled in a follow-up MR.

Endpoint: admin/ai/feature_settings

Figma design: https://www.figma.com/design/xgC4SOG8aFxK2VfSvwjtgW/Self-hosted-models?node-id=828-86426&m=dev

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.

Before After
Screenshot_2024-08-26_at_12.11.28_PM Screenshot_2024-08-28_at_5.20.46_PM

How to set up and validate locally

Prequisites

You will need an active GitLab ultimate license.

  1. Start GDK instance in self-managed mode:

GITLAB_SIMULATE_SAAS=0 && gdk start

  1. In the rails console, enable Code Suggestions and the custom models experiment:
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
add_on_purchase = GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, expires_on: 1.month.from_now, quantity: 5, purchase_xid: 'A-S0001')
Feature.enable(:ai_custom_model)
ApplicationSetting.first.update(duo_features_enabled: true)
  1. Enable the admin ai-powered feature settings FF
Feature.enable(:custom_models_feature_settings_vue_app)

Test it!

  1. Log in as an admin
  2. Visit the index page Admin Area > AI-Powered Features > Features
    Screenshot_2024-08-26_at_12.33.35_PM
  3. You should see a screen similar to the "After" screenshot above

Related to #476660 (closed)

Edited by Julie Huang

Merge request reports