Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
013360a9
Commit
013360a9
authored
Jul 17, 2020
by
Olena Horal-Koretska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag on FE side
parent
14bc07ca
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
15 deletions
+2
-15
app/assets/javascripts/incidents_settings/components/incidents_settings_tabs.vue
...incidents_settings/components/incidents_settings_tabs.vue
+1
-11
app/assets/javascripts/incidents_settings/constants.js
app/assets/javascripts/incidents_settings/constants.js
+0
-1
spec/frontend/incidents_settings/components/incidents_settings_tabs_spec.js
...dents_settings/components/incidents_settings_tabs_spec.js
+1
-3
No files found.
app/assets/javascripts/incidents_settings/components/incidents_settings_tabs.vue
View file @
013360a9
...
...
@@ -2,7 +2,6 @@
import
{
GlButton
,
GlTabs
,
GlTab
}
from
'
@gitlab/ui
'
;
import
AlertsSettingsForm
from
'
./alerts_form.vue
'
;
import
PagerDutySettingsForm
from
'
./pagerduty_form.vue
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
INTEGRATION_TABS_CONFIG
,
I18N_INTEGRATION_TABS
}
from
'
../constants
'
;
export
default
{
...
...
@@ -13,17 +12,8 @@ export default {
AlertsSettingsForm
,
PagerDutySettingsForm
,
},
mixins
:
[
glFeatureFlagMixin
()],
tabs
:
INTEGRATION_TABS_CONFIG
,
i18n
:
I18N_INTEGRATION_TABS
,
methods
:
{
isFeatureFlagEnabled
(
tab
)
{
if
(
tab
.
featureFlag
)
{
return
this
.
glFeatures
[
tab
.
featureFlag
];
}
return
true
;
},
},
};
</
script
>
...
...
@@ -49,7 +39,7 @@ export default {
<gl-tabs>
<gl-tab
v-for=
"(tab, index) in $options.tabs"
v-if=
"tab.active
&& isFeatureFlagEnabled(tab)
"
v-if=
"tab.active"
:key=
"`$
{tab.title}_${index}`"
:title="tab.title"
>
...
...
app/assets/javascripts/incidents_settings/constants.js
View file @
013360a9
...
...
@@ -11,7 +11,6 @@ export const INTEGRATION_TABS_CONFIG = [
title
:
s__
(
'
IncidentSettings|PagerDuty integration
'
),
component
:
'
PagerDutySettingsForm
'
,
active
:
true
,
featureFlag
:
'
pagerdutyWebhook
'
,
},
{
title
:
s__
(
'
IncidentSettings|Grafana integration
'
),
...
...
spec/frontend/incidents_settings/components/incidents_settings_tabs_spec.js
View file @
013360a9
...
...
@@ -6,9 +6,7 @@ describe('IncidentsSettingTabs', () => {
let
wrapper
;
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
IncidentsSettingTabs
,
{
provide
:
{
glFeatures
:
{
pagerdutyWebhook
:
true
}
},
});
wrapper
=
shallowMount
(
IncidentsSettingTabs
);
});
afterEach
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment