summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-03-16 12:56:51 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-03-16 12:56:51 +0000
commit132675802590fec52346b77188b35a7c0b34853a (patch)
treef0caa17fb6b506b013ce7d5c22f5e141848ad9ad
parentfd4bb1e3142bb1e9309f7b0c93cd8e8002ef8192 (diff)
parent3185b87c7454e4e4b7d81f72bb5b35fd2a0000da (diff)
downloadgitlab-ce-132675802590fec52346b77188b35a7c0b34853a.tar.gz
Merge branch '43522-technical-debt-service-disabled_title' into 'master'
Resolve "Technical debt: `Service#disabled_title` no longer used and is left dangling in `services/_form.html.haml`" Closes #43522 See merge request gitlab-org/gitlab-ce!17305
-rw-r--r--app/models/project_services/jira_service.rb5
-rw-r--r--app/models/project_services/pipelines_email_service.rb4
-rw-r--r--app/models/service.rb5
-rw-r--r--app/views/projects/services/_form.html.haml5
4 files changed, 0 insertions, 19 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index e5035c81df0..601a6a077f5 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -161,11 +161,6 @@ class JiraService < IssueTrackerService
add_comment(data, jira_issue)
end
- # reason why service cannot be tested
- def disabled_title
- "Please fill in Password and Username."
- end
-
def test(_)
result = test_settings
success = result.present?
diff --git a/app/models/project_services/pipelines_email_service.rb b/app/models/project_services/pipelines_email_service.rb
index 9c7b58dead5..4cf149ac044 100644
--- a/app/models/project_services/pipelines_email_service.rb
+++ b/app/models/project_services/pipelines_email_service.rb
@@ -39,10 +39,6 @@ class PipelinesEmailService < Service
project.pipelines.any?
end
- def disabled_title
- 'Please setup a pipeline on your repository.'
- end
-
def test_data(project, user)
data = Gitlab::DataBuilder::Pipeline.build(project.pipelines.last)
data[:user] = user.hook_attrs
diff --git a/app/models/service.rb b/app/models/service.rb
index 99bf757ae44..2556db68146 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -162,11 +162,6 @@ class Service < ActiveRecord::Base
true
end
- # reason why service cannot be tested
- def disabled_title
- "Please setup a project repository."
- end
-
# Provide convenient accessor methods
# for each serialized property.
# Also keep track of updated properties in a similar way as ActiveModel::Dirty
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index 053ea24b848..684b082efbb 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -15,11 +15,6 @@
.footer-block.row-content-block
= service_save_button(@service)
&nbsp;
- - if @service.valid? && @service.activated?
- - unless @service.can_test?
- - disabled_class = 'disabled'
- - disabled_title = @service.disabled_title
-
= link_to 'Cancel', project_settings_integrations_path(@project), class: 'btn btn-cancel'
- if lookup_context.template_exists?('show', "projects/services/#{@service.to_param}", true)