Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 09:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 09:08:58 +0300
commit18b8435318887d3fc6e9f9d305967a953cdd7d3f (patch)
tree28cb71f255eb364c224ff24dd085f8cd836951b1 /app
parent4359b9650ecf0960f04f0fd38fc25bec7b478a11 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue5
-rw-r--r--app/assets/javascripts/repository/components/preview/index.vue2
-rw-r--r--app/controllers/groups/settings/ci_cd_controller.rb3
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb3
-rw-r--r--app/views/ci/variables/_index.html.haml53
5 files changed, 38 insertions, 28 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 9429e10e6ed..685fc939c9a 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -638,13 +638,8 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
:status-reason="applications.elastic_stack.statusReason"
:request-status="applications.elastic_stack.requestStatus"
:request-reason="applications.elastic_stack.requestReason"
- :version="applications.elastic_stack.version"
- :chart-repo="applications.elastic_stack.chartRepo"
- :update-available="applications.elastic_stack.updateAvailable"
:installed="applications.elastic_stack.installed"
:install-failed="applications.elastic_stack.installFailed"
- :update-successful="applications.elastic_stack.updateSuccessful"
- :update-failed="applications.elastic_stack.updateFailed"
:uninstallable="applications.elastic_stack.uninstallable"
:uninstall-successful="applications.elastic_stack.uninstallSuccessful"
:uninstall-failed="applications.elastic_stack.uninstallFailed"
diff --git a/app/assets/javascripts/repository/components/preview/index.vue b/app/assets/javascripts/repository/components/preview/index.vue
index 78ae719ba0d..99f100eaa60 100644
--- a/app/assets/javascripts/repository/components/preview/index.vue
+++ b/app/assets/javascripts/repository/components/preview/index.vue
@@ -2,6 +2,7 @@
import $ from 'jquery';
import '~/behaviors/markdown/render_gfm';
import { GlLink, GlLoadingIcon } from '@gitlab/ui';
+import { handleLocationHash } from '~/lib/utils/common_utils';
import getReadmeQuery from '../../queries/getReadme.query.graphql';
export default {
@@ -36,6 +37,7 @@ export default {
readme(newVal) {
if (newVal) {
this.$nextTick(() => {
+ handleLocationHash();
$(this.$refs.readme).renderGFM();
});
}
diff --git a/app/controllers/groups/settings/ci_cd_controller.rb b/app/controllers/groups/settings/ci_cd_controller.rb
index 0e83d057484..3555528b2ef 100644
--- a/app/controllers/groups/settings/ci_cd_controller.rb
+++ b/app/controllers/groups/settings/ci_cd_controller.rb
@@ -6,6 +6,9 @@ module Groups
skip_cross_project_access_check :show
before_action :authorize_admin_group!
before_action :authorize_update_max_artifacts_size!, only: [:update]
+ before_action do
+ push_frontend_feature_flag(:new_variables_ui, @group)
+ end
def show
define_ci_variables
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index bf0c2d885f8..37f97785778 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -5,6 +5,9 @@ module Projects
class CiCdController < Projects::ApplicationController
before_action :authorize_admin_pipeline!
before_action :define_variables
+ before_action do
+ push_frontend_feature_flag(:new_variables_ui, @project)
+ end
def show
end
diff --git a/app/views/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml
index 7ae5c48b93c..f11c730eba6 100644
--- a/app/views/ci/variables/_index.html.haml
+++ b/app/views/ci/variables/_index.html.haml
@@ -5,27 +5,34 @@
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/README', anchor: 'protected-variables') }
= s_('Environment variables are configured by your administrator to be %{link_start}protected%{link_end} by default').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
-.row
- .col-lg-12.js-ci-variable-list-section{ data: { save_endpoint: save_endpoint, maskable_regex: ci_variable_maskable_regex } }
- .hide.alert.alert-danger.js-ci-variable-error-box
+- if Feature.enabled?(:new_variables_ui, @project || @group)
+ - is_group = !@group.nil?
- %ul.ci-variable-list
- = render 'ci/variables/variable_header'
- - @variables.each.each do |variable|
- = render 'ci/variables/variable_row', form_field: 'variables', variable: variable
- = render 'ci/variables/variable_row', form_field: 'variables'
- .prepend-top-20
- %button.btn.btn-success.js-ci-variables-save-button{ type: 'button' }
- %span.hide.js-ci-variables-save-loading-icon
- = icon('spinner spin')
- = _('Save variables')
- %button.btn.btn-info.btn-inverted.prepend-left-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@variables.size == 0}" } }
- - if @variables.size == 0
- = n_('Hide value', 'Hide values', @variables.size)
- - else
- = n_('Reveal value', 'Reveal values', @variables.size)
- - if !@group && @project.group
- .settings-header.border-top.prepend-top-20
- = render 'ci/group_variables/header'
- .settings-content.pr-0
- = render 'ci/group_variables/index'
+ #js-ci-project-variables{ data: { endpoint: save_endpoint, project_id: @project&.id || '', group: is_group.to_s, maskable_regex: ci_variable_maskable_regex} }
+
+- else
+ .row
+ .col-lg-12.js-ci-variable-list-section{ data: { save_endpoint: save_endpoint, maskable_regex: ci_variable_maskable_regex } }
+ .hide.alert.alert-danger.js-ci-variable-error-box
+
+ %ul.ci-variable-list
+ = render 'ci/variables/variable_header'
+ - @variables.each.each do |variable|
+ = render 'ci/variables/variable_row', form_field: 'variables', variable: variable
+ = render 'ci/variables/variable_row', form_field: 'variables'
+ .prepend-top-20
+ %button.btn.btn-success.js-ci-variables-save-button{ type: 'button' }
+ %span.hide.js-ci-variables-save-loading-icon
+ = icon('spinner spin')
+ = _('Save variables')
+ %button.btn.btn-info.btn-inverted.prepend-left-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@variables.size == 0}" } }
+ - if @variables.size == 0
+ = n_('Hide value', 'Hide values', @variables.size)
+ - else
+ = n_('Reveal value', 'Reveal values', @variables.size)
+
+- if !@group && @project.group
+ .settings-header.border-top.prepend-top-20
+ = render 'ci/group_variables/header'
+ .settings-content.pr-0
+ = render 'ci/group_variables/index'