diff options
Diffstat (limited to 'app/views/projects/triggers')
-rw-r--r-- | app/views/projects/triggers/_index.html.haml | 27 | ||||
-rw-r--r-- | app/views/projects/triggers/_trigger.html.haml | 37 |
2 files changed, 1 insertions, 63 deletions
diff --git a/app/views/projects/triggers/_index.html.haml b/app/views/projects/triggers/_index.html.haml index a7f29b5cbf9..de127d15351 100644 --- a/app/views/projects/triggers/_index.html.haml +++ b/app/views/projects/triggers/_index.html.haml @@ -6,32 +6,7 @@ - c.body do = render 'projects/triggers/form', btn_text: _('Add trigger') .gl-mb-5 - - if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project) - #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } } - - else - - if @triggers.any? - .table-responsive.triggers-list - %table.table - %thead - %th - %strong - = _('Token') - %th - %strong - = _('Description') - %th - %strong - = _('Owner') - %th - %strong - = _('Last used') - %th - = render partial: 'projects/triggers/trigger', collection: @triggers, as: :trigger - - else - = render Pajamas::AlertComponent.new(variant: :warning, show_icon: false, dismissible: false, - alert_options: { data: { testid: 'no_triggers_content' }}) do |c| - = c.body do - = _('No triggers exist yet. Use the form above to create one.') + #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } } - c.footer do %p = _("These examples show how to trigger this project's pipeline for a branch or tag.") diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml deleted file mode 100644 index bce7dc8a94b..00000000000 --- a/app/views/projects/triggers/_trigger.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -%tr - %td - - if trigger.has_token_exposed? - %span= trigger.token - = clipboard_button(text: trigger.token, title: _("Copy trigger token"), testid: 'clipboard-btn') - - else - %span= trigger.short_token - - .gl-display-inline-block.gl-ml-3 - - unless trigger.can_access_project? - = gl_badge_tag s_('Trigger|invalid'), { variant: :danger }, { title: s_('Trigger|Trigger user has insufficient permissions to project'), data: { toggle: 'tooltip', container: 'body' } } - - %td - - if trigger.description? && trigger.description.length > 15 - %span.has-tooltip{ title: trigger.description }= truncate(trigger.description, length: 15) - - else - = trigger.description - - %td - - if trigger.owner - .trigger-owner.sr-only= trigger.owner.name - = user_avatar(user: trigger.owner, size: 20) - - %td - - if trigger.last_used - = time_ago_with_tooltip trigger.last_used - - else - Never - - %td.text-right.gl-white-space-nowrap - - revoke_trigger_confirmation = "By revoking a trigger you will break any processes making use of it. Are you sure?" - - if can?(current_user, :admin_trigger, trigger) - = link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "gl-button btn btn-default btn-icon" do - = sprite_icon('pencil') - - if can?(current_user, :manage_trigger, trigger) - = link_to project_trigger_path(@project, trigger), aria: { label: _('Revoke') }, data: { confirm: revoke_trigger_confirmation, testid: 'trigger_revoke_button', confirm_btn_variant: "danger" }, method: :delete, title: "Revoke", class: "gl-button btn btn-default btn-icon btn-trigger-revoke gl-ml-3" do - = sprite_icon('remove') |