Commit 7a1b718a authored by Jose Vargas's avatar Jose Vargas

Change feature flag name

Also reused non namespaced strings
parent d713a50c
......@@ -193,8 +193,8 @@ export default {
);
},
metricVisibilityToggleAvailable() {
return gon.features?.metricsVisibilityToggle;
metricsDashboardVisibilitySwitchingAvailable() {
return gon.features?.metricsDashboardVisibilitySwitchingAvailable;
},
},
......@@ -470,9 +470,9 @@ export default {
/>
</project-setting-row>
<project-setting-row
v-if="metricVisibilityToggleAvailable"
v-if="metricsDashboardVisibilitySwitchingAvailable"
ref="metrics-visibility-settings"
:label="s__('ProjectSettings|Metrics Dashboard')"
:label="__('Metrics Dashboard')"
:help-text="
s__(
'ProjectSettings|With Metrics Dashboard you can visualize this project performance metrics',
......@@ -483,8 +483,7 @@ export default {
<div class="select-wrapper">
<select
v-model="metricsAccessLevel"
:disabled="false"
name="project[project_feature_attributes][metrics_access_level]"
name="project[project_feature_attributes][metrics_dashboard_access_level]"
class="form-control select-control"
>
<option
......
......@@ -37,7 +37,7 @@ class ProjectsController < Projects::ApplicationController
layout :determine_layout
before_action do
push_frontend_feature_flag(:metrics_visibility_toggle)
push_frontend_feature_flag(:metrics_dashboard_visibility_switching_available)
end
def index
......
......@@ -15955,9 +15955,6 @@ msgstr ""
msgid "ProjectSettings|Merge suggestions"
msgstr ""
msgid "ProjectSettings|Metrics Dashboard"
msgstr ""
msgid "ProjectSettings|No merge commits are created"
msgstr ""
......
......@@ -68,7 +68,7 @@ describe('Settings Panel', () => {
wrapper = mountComponent();
gon.features = gon.features || {};
gon.features.metricsVisibilityToggle = true;
gon.features.metricsDashboardVisibilitySwitchingAvailable = true;
});
afterEach(() => {
......@@ -484,7 +484,7 @@ describe('Settings Panel', () => {
it('should set the visibility level description based upon the selected visibility level', () => {
wrapper
.find('[name="project[project_feature_attributes][metrics_access_level]"]')
.find('[name="project[project_feature_attributes][metrics_dashboard_access_level]"]')
.setValue(visibilityOptions.PUBLIC);
expect(wrapper.vm.metricsAccessLevel).toBe(visibilityOptions.PUBLIC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment