diff options
Diffstat (limited to 'app/views/shared/_service_settings.html.haml')
-rw-r--r-- | app/views/shared/_service_settings.html.haml | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 3da4b77b5eb..a9203459914 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,4 +1,5 @@ = form_errors(@service) +- trigger_events = Feature.enabled?(:integration_form_refactor) ? ServiceEventSerializer.new(service: @service).represent(@service.configurable_events).to_json : [] - if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) = render "projects/services/#{@service.to_param}/help", subject: @service @@ -8,9 +9,10 @@ = markdown @service.help .service-settings - .js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, disabled: disable_fields_service?(@service).to_s } } + .js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, type: @service.to_param, merge_request_events: @service.merge_requests_events.to_s, +commit_events: @service.commit_events.to_s, enable_comments: @service.comment_on_event_enabled.to_s, comment_detail: @service.comment_detail, trigger_events: trigger_events } } - - if @service.configurable_events.present? + - if @service.configurable_events.present? && !@service.is_a?(JiraService) && Feature.disabled?(:integration_form_refactor) .form-group.row %label.col-form-label.col-sm-2= _('Trigger') @@ -31,32 +33,5 @@ %p.text-muted = @service.class.event_description(event) - - if @service.configurable_event_actions.present? - .form-group.row - %label.col-form-label.col-sm-2= _('Event Actions') - - .col-sm-10 - - @service.configurable_event_actions.each do |action| - .form-group - .form-check - = form.check_box service_event_action_field_name(action), class: 'form-check-input' - = form.label service_event_action_field_name(action), class: 'form-check-label' do - %strong - = event_action_description(action) - - %p.text-muted - = event_action_description(action) - - @service.global_fields.each do |field| - - type = field[:type] - - - if type == 'fieldset' - - fields = field[:fields] - - legend = field[:legend] - - %fieldset - %legend= legend - - fields.each do |subfield| - = render 'shared/field', form: form, field: subfield - - else - = render 'shared/field', form: form, field: field + = render 'shared/field', form: form, field: field |