Migrate project selectors away from select2
What does this MR do and why?
This migrate the remaining select2
-based project selector inputs to the new ProjectSelect
Vue component.
Screenshots or screen recordings
Group insights project setting
Before | After |
---|---|
Instance templates project setting
Before | After |
---|---|
Cluster management project setting
Before | After |
---|---|
Analytics Dashboards project setting
Before | After |
---|---|
How to set up and validate locally
- Group insights project setting
- Navigate to a group's Settings > General > Insights setting (
/groups/:group/-/edit
).
- Navigate to a group's Settings > General > Insights setting (
- Instance templates project setting
- Navigate to Admin > Settings > Templates > Templates setting (
/admin/application_settings/templates
).
- Navigate to Admin > Settings > Templates > Templates setting (
- Cluster management project setting
- Enable the
certificate_based_clusters
feature flag:Feature.enable(:certificate_based_clusters)
- Create a cluster in the Admin > Kubernetes page (dummy values can be used).
- Short-circuit the condition in the HAML view by applying the following patch (I'm not sure how to access the setting without this bypass):
diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml index ddc3b7d05e1b..8e0289d91191 100644 --- a/app/views/clusters/clusters/_advanced_settings.html.haml +++ b/app/views/clusters/clusters/_advanced_settings.html.haml @@ -4,7 +4,7 @@ - group_id = @cluster.project.group.id if @cluster.project.group - user_id = @cluster.project.namespace.owner_id unless group_id -- if can?(current_user, :admin_cluster, @cluster) +- if true - unless @cluster.provided_by_user? .sub-section.form-group %h4
- Navigate to Admin > Kubernetes >
:cluster
> Advanced Setting > Cluster management project settings (/admin/clusters/1?tab=settings
).
- Enable the
- Analytics Dashboards project setting
- Short-circuit the condition in the HAML view by applying the following patch (I'm not sure how to access the setting without this bypass):
diff --git a/ee/app/views/groups/_analytics_dashboards.html.haml b/ee/app/views/groups/_analytics_dashboards.html.haml index 7b823543c475..3f7331c3be2f 100644 --- a/ee/app/views/groups/_analytics_dashboards.html.haml +++ b/ee/app/views/groups/_analytics_dashboards.html.haml @@ -1,4 +1,4 @@ -- return unless can?(current_user, :read_group_analytics_dashboards, @group) +-# - return unless can?(current_user, :read_group_analytics_dashboards, @group) %section.settings.analytics-dashboards-settings.no-animate{ class: ('expanded' if expanded) } .settings-header
- Navigate to a group's Settings > General > Analytics Dashboards setting (
/groups/:group/-/edit
).
- Short-circuit the condition in the HAML view by applying the following patch (I'm not sure how to access the setting without this bypass):
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #374098 (closed)
Edited by Paul Gascou-Vaillancourt