Add collapsable sections for Pipeline Settings

This commit is contained in:
Kamil Trzciński 2017-09-06 15:38:13 +00:00 committed by Phil Hughes
parent 58e367fda0
commit cbd173a85d
10 changed files with 94 additions and 63 deletions

View File

@ -488,6 +488,8 @@ import initChangesDropdown from './init_changes_dropdown';
initSettingsPanels(); initSettingsPanels();
break; break;
case 'projects:settings:ci_cd:show': case 'projects:settings:ci_cd:show':
// Initialize expandable settings panels
initSettingsPanels();
case 'groups:settings:ci_cd:show': case 'groups:settings:ci_cd:show':
new gl.ProjectVariables(); new gl.ProjectVariables();
break; break;

View File

@ -1,9 +1,3 @@
%h4.prepend-top-0 %p.append-bottom-default
Secret variables Variables are applied to environments via the runner. They can be protected by only exposing them to protected branches or tags.
= link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'secret-variables'), target: '_blank' You can use variables for passwords, secret keys, or whatever you want.
%p
These variables will be set to environment by the runner, and could be protected by exposing only to protected branches or tags.
%p
So you can use them for passwords, secret keys or whatever you want.
%p
The value of the variable can be visible in job log if explicitly asked to do so.

View File

@ -1,7 +1,5 @@
.row.prepend-top-default.append-bottom-default .row.prepend-top-default.append-bottom-default
.col-lg-4 .col-lg-12
= render "ci/variables/content"
.col-lg-8
%h5.prepend-top-0 %h5.prepend-top-0
Add a variable Add a variable
= render "ci/variables/form", btn_text: "Add new variable" = render "ci/variables/form", btn_text: "Add new variable"

View File

@ -4,6 +4,6 @@
.col-lg-3 .col-lg-3
= render "ci/variables/content" = render "ci/variables/content"
.col-lg-9 .col-lg-9
%h5.prepend-top-0 %h4.prepend-top-0
Update variable Update variable
= render "ci/variables/form", btn_text: "Save variable" = render "ci/variables/form", btn_text: "Save variable"

View File

@ -1,9 +1,7 @@
%div{ class: badge.title.gsub(' ', '-') } %div{ class: badge.title.gsub(' ', '-') }
.col-lg-4.profile-settings-sidebar .col-lg-12
%h4.prepend-top-0 %h4
= badge.title.capitalize = badge.title.capitalize
.col-lg-8
.prepend-top-10
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%b %b

View File

@ -1,8 +1,5 @@
.row.prepend-top-default .row.prepend-top-default
.col-lg-4.profile-settings-sidebar .col-lg-12
%h4.prepend-top-0
Pipelines
.col-lg-8
= form_for @project, url: project_pipelines_settings_path(@project) do |f| = form_for @project, url: project_pipelines_settings_path(@project) do |f|
%fieldset.builds-feature %fieldset.builds-feature
- unless @repository.gitlab_ci_yml - unless @repository.gitlab_ci_yml

View File

@ -4,7 +4,51 @@
= render "projects/settings/head" = render "projects/settings/head"
= render 'projects/runners/index' - expanded = Rails.env.test?
= render 'ci/variables/index'
= render 'projects/triggers/index' %section.settings
.settings-header
%h4
General pipelines settings
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
Update your CI/CD configuration, like job timeout.
.settings-content.no-animate{ class: ('expanded' if expanded) }
= render 'projects/pipelines_settings/show' = render 'projects/pipelines_settings/show'
%section.settings
.settings-header
%h4
Runners settings
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
Register and see your runners for this project.
.settings-content.no-animate{ class: ('expanded' if expanded) }
= render 'projects/runners/index'
%section.settings
.settings-header
%h4
Secret variables
= link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'secret-variables'), target: '_blank'
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
= render "ci/variables/content"
.settings-content.no-animate{ class: ('expanded' if expanded) }
= render 'ci/variables/index'
%section.settings
.settings-header
%h4
Pipeline triggers
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
Triggers can force a specific branch or tag to get rebuilt with an API call. These tokens will
impersonate their associated user including their access to projects and their project
permissions.
.settings-content.no-animate{ class: ('expanded' if expanded) }
= render 'projects/triggers/index'

View File

@ -1,14 +1,8 @@
%h4.prepend-top-0 %p.append-bottom-default
Triggers
%p.prepend-top-20
Triggers can force a specific branch or tag to get rebuilt with an API call. These tokens will
impersonate their associated user including their access to projects and their project
permissions.
%p.prepend-top-20
Triggers with the Triggers with the
%span.label.label-primary legacy %span.label.label-primary legacy
label do not have an associated user and only have access to the current project. label do not have an associated user and only have access to the current project.
%p.append-bottom-0 %br
= succeed '.' do = succeed '.' do
Learn more in the Learn more in the
= link_to 'triggers documentation', help_page_path('ci/triggers/README'), target: '_blank' = link_to 'triggers documentation', help_page_path('ci/triggers/README'), target: '_blank'

View File

@ -1,7 +1,6 @@
.row.prepend-top-default.append-bottom-default.triggers-container .row.prepend-top-default.append-bottom-default.triggers-container
.col-lg-4 .col-lg-12
= render "projects/triggers/content" = render "projects/triggers/content"
.col-lg-8
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%h4.panel-title %h4.panel-title

View File

@ -0,0 +1,5 @@
---
title: Add collapsable sections for Pipeline Settings
merge_request:
author:
type: added