Commit 1cf8723d authored by Phil Hughes's avatar Phil Hughes

Updated triggers UI

Closes #14090
parent 6ff740ff
...@@ -153,7 +153,7 @@ $nav-link-padding: 13px $gl-padding; ...@@ -153,7 +153,7 @@ $nav-link-padding: 13px $gl-padding;
//== Code //== Code
// //
//## //##
$pre-bg: #f8fafc !default; $pre-bg: #f4f7fd !default;
$pre-color: $gl-gray !default; $pre-color: $gl-gray !default;
$pre-border-color: #e7e9ed; $pre-border-color: #e7e9ed;
......
%tr %tr
%td %td
.clearfix
%span.monospace= trigger.token %span.monospace= trigger.token
%td %td
...@@ -9,6 +8,5 @@ ...@@ -9,6 +8,5 @@
- else - else
Never Never
%td %td.text-right
.pull-right = link_to 'Revoke', namespace_project_trigger_path(@project.namespace, @project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-warning btn-sm"
= link_to 'Revoke', namespace_project_trigger_path(@project.namespace, @project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-danger btn-sm btn-grouped"
- page_title "Triggers" - page_title "Triggers"
%h3.page-title
Triggers
%p.light .row.prepend-top-default.append-bottom-default
.col-lg-3
%h4.prepend-top-0
= page_title
%p
Triggers can be used to force a rebuild of a specific branch or tag with an API call. Triggers can be used to force a rebuild of a specific branch or tag with an API call.
.col-lg-9
%hr.clearfix %h5.prepend-top-0
Your triggers
-if @triggers.any? - if @triggers.any?
.table-holder .table-responsive
%table.table %table.table
%thead %thead
%th Token %th Token
%th Last used %th Last used
%th %th
= render partial: 'trigger', collection: @triggers, as: :trigger = render partial: 'trigger', collection: @triggers, as: :trigger
- else - else
%h4 No triggers %p.profile-settings-message.text-center.append-bottom-default
There are no triggers to use, add one by the button below.
= form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create'), html: { class: 'form-horizontal' } do |f| = form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create') do |f|
.clearfix = f.submit "Add Trigger", class: 'btn btn-success'
= f.submit "Add Trigger", class: 'btn btn-success pull-right'
%hr.clearfix %h5.prepend-top-default
-if @triggers.any?
%h3
Use CURL Use CURL
%p.light %p.light
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
-F token=TOKEN \ -F token=TOKEN \
-F ref=REF_NAME \ -F ref=REF_NAME \
#{builds_trigger_url(@project.id)} #{builds_trigger_url(@project.id)}
%h3 %h5.prepend-top-default
Use .gitlab-ci.yml Use .gitlab-ci.yml
%p.light %p.light
...@@ -53,7 +52,7 @@ ...@@ -53,7 +52,7 @@
type: deploy type: deploy
script: script:
- "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}" - "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}"
%h3 %h5.prepend-top-default
Pass build variables Pass build variables
%p.light %p.light
...@@ -62,7 +61,7 @@ ...@@ -62,7 +61,7 @@
to API request. to API request.
The value of variable could then be used to distinguish triggered build from normal one. The value of variable could then be used to distinguish triggered build from normal one.
%pre %pre.append-bottom-0
:plain :plain
curl -X POST \ curl -X POST \
-F token=TOKEN \ -F token=TOKEN \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment