|
1 | | -.col-auto.text-start |
2 | | - %i{ title: status_title, class: status_icon } |
3 | | -.col.text-start |
4 | | - = link_to "#{hook_event.humanize} event", token_workflow_run_path(token_id, workflow_run) |
5 | | - - if hook_action |
6 | | - %span.ms-2.badge.text-bg-primary= hook_action.humanize |
7 | | -.col.text-start |
8 | | - - if event_source_name |
9 | | - - popover_content = render partial: 'webui/workflow_runs/event_links', locals: { hook_event: hook_event, |
10 | | - formatted_event_source_name: formatted_event_source_name, |
11 | | - event_source_name: event_source_name, |
12 | | - event_source_url: event_source_url } |
13 | | - = link_to formatted_event_source_name, 'javascript:;', { class: 'link-secondary', tabindex: '0', |
14 | | - data: { 'bs-toggle': 'popover', 'bs-html': 'true', 'bs-trigger': 'focus', |
15 | | - 'bs-content': popover_content } } |
16 | | - - else |
17 | | - Unknown source |
18 | | -.col.text-end |
19 | | - = workflow_run.created_at |
| 1 | +.list-group-item.list-group-item-action |
| 2 | + .row.flex-nowrap |
| 3 | + .col-auto |
| 4 | + %i{ title: status_title, class: status_icon } |
| 5 | + .col.col-with-icon |
| 6 | + .d-flex.justify-content-between |
| 7 | + .px-1 |
| 8 | + = link_to "#{hook_event.humanize} event:", token_workflow_run_path(token_id, workflow_run) |
| 9 | + - if hook_action |
| 10 | + %strong= hook_action.humanize |
| 11 | + %span= formatted_event_source_name || "Unknown source" |
| 12 | + %span |
| 13 | + - if event_source_name |
| 14 | + - field_to_filter_by = hook_event.in?(['pull_request', 'Merge Request Hook']) ? 'pr_mr' : 'commit_sha' |
| 15 | + = link_to event_source_url, { class: 'link-secondary mx-1', |
| 16 | + title: "Go to Event Source #{formatted_event_source_name}", |
| 17 | + target: '_blank' } do |
| 18 | + %i.fa.fa-xs.fa-link.text-secondary |
| 19 | + = link_to "?#{field_to_filter_by}=#{event_source_name}", { class: 'link-secondary mx-1', title: "Filter by this Event Source" } do |
| 20 | + %i.fa.fa-xs.fa-filter.text-secondary |
| 21 | + .px-1 |
| 22 | + %span= workflow_run.created_at |
0 commit comments