Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-03 03:09:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-03 03:09:53 +0300
commit1502c20d04c7ff8d719175c76b0a2507ab390172 (patch)
treedc01bfe0877bd93e7047db28dd972c7d597a527b /app/helpers/services_helper.rb
parentf96f2720d1b21b76eadedc54fdea67cb70e98d94 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/services_helper.rb')
-rw-r--r--app/helpers/services_helper.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb
index 96eb14be4b4..b7e11d7cbb6 100644
--- a/app/helpers/services_helper.rb
+++ b/app/helpers/services_helper.rb
@@ -75,7 +75,15 @@ module ServicesHelper
end
end
- def integration_form_data(integration)
+ def scoped_reset_integration_path(integration, group: nil)
+ if group.present?
+ reset_group_settings_integration_path(group, integration)
+ else
+ reset_admin_application_settings_integration_path(integration)
+ end
+ end
+
+ def integration_form_data(integration, group: nil)
{
id: integration.id,
show_active: integration.show_active_box?.to_s,
@@ -94,7 +102,7 @@ module ServicesHelper
cancel_path: scoped_integrations_path,
can_test: integration.can_test?.to_s,
test_path: scoped_test_integration_path(integration),
- reset_path: ''
+ reset_path: reset_integrations?(group: group) ? scoped_reset_integration_path(integration, group: group) : ''
}
end
@@ -122,6 +130,10 @@ module ServicesHelper
!Gitlab.com?
end
+ def reset_integrations?(group: nil)
+ Feature.enabled?(:reset_integrations, group, type: :development)
+ end
+
extend self
private