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 { ...@@ -193,8 +193,8 @@ export default {
); );
}, },
metricVisibilityToggleAvailable() { metricsDashboardVisibilitySwitchingAvailable() {
return gon.features?.metricsVisibilityToggle; return gon.features?.metricsDashboardVisibilitySwitchingAvailable;
}, },
}, },
...@@ -470,9 +470,9 @@ export default { ...@@ -470,9 +470,9 @@ export default {
/> />
</project-setting-row> </project-setting-row>
<project-setting-row <project-setting-row
v-if="metricVisibilityToggleAvailable" v-if="metricsDashboardVisibilitySwitchingAvailable"
ref="metrics-visibility-settings" ref="metrics-visibility-settings"
:label="s__('ProjectSettings|Metrics Dashboard')" :label="__('Metrics Dashboard')"
:help-text=" :help-text="
s__( s__(
'ProjectSettings|With Metrics Dashboard you can visualize this project performance metrics', 'ProjectSettings|With Metrics Dashboard you can visualize this project performance metrics',
...@@ -483,8 +483,7 @@ export default { ...@@ -483,8 +483,7 @@ export default {
<div class="select-wrapper"> <div class="select-wrapper">
<select <select
v-model="metricsAccessLevel" v-model="metricsAccessLevel"
:disabled="false" name="project[project_feature_attributes][metrics_dashboard_access_level]"
name="project[project_feature_attributes][metrics_access_level]"
class="form-control select-control" class="form-control select-control"
> >
<option <option
......
...@@ -37,7 +37,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -37,7 +37,7 @@ class ProjectsController < Projects::ApplicationController
layout :determine_layout layout :determine_layout
before_action do before_action do
push_frontend_feature_flag(:metrics_visibility_toggle) push_frontend_feature_flag(:metrics_dashboard_visibility_switching_available)
end end
def index def index
......
...@@ -15955,9 +15955,6 @@ msgstr "" ...@@ -15955,9 +15955,6 @@ msgstr ""
msgid "ProjectSettings|Merge suggestions" msgid "ProjectSettings|Merge suggestions"
msgstr "" msgstr ""
msgid "ProjectSettings|Metrics Dashboard"
msgstr ""
msgid "ProjectSettings|No merge commits are created" msgid "ProjectSettings|No merge commits are created"
msgstr "" msgstr ""
......
...@@ -68,7 +68,7 @@ describe('Settings Panel', () => { ...@@ -68,7 +68,7 @@ describe('Settings Panel', () => {
wrapper = mountComponent(); wrapper = mountComponent();
gon.features = gon.features || {}; gon.features = gon.features || {};
gon.features.metricsVisibilityToggle = true; gon.features.metricsDashboardVisibilitySwitchingAvailable = true;
}); });
afterEach(() => { afterEach(() => {
...@@ -484,7 +484,7 @@ describe('Settings Panel', () => { ...@@ -484,7 +484,7 @@ describe('Settings Panel', () => {
it('should set the visibility level description based upon the selected visibility level', () => { it('should set the visibility level description based upon the selected visibility level', () => {
wrapper wrapper
.find('[name="project[project_feature_attributes][metrics_access_level]"]') .find('[name="project[project_feature_attributes][metrics_dashboard_access_level]"]')
.setValue(visibilityOptions.PUBLIC); .setValue(visibilityOptions.PUBLIC);
expect(wrapper.vm.metricsAccessLevel).toBe(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