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>2023-06-05 18:09:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-05 18:09:47 +0300
commit18e9429b63f9a095b1ba3606856537b9ca291eac (patch)
treec675e9c6ef0209b4e8ebc7593165536d277a05fc /app
parent8dbc985bec96cad1e9a3315f38be27eb2374e5dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/framework/layout.scss2
-rw-r--r--app/assets/stylesheets/framework/sidebar.scss2
-rw-r--r--app/assets/stylesheets/framework/variables.scss1
-rw-r--r--app/controllers/projects/ml/candidates_controller.rb6
-rw-r--r--app/controllers/projects/ml/experiments_controller.rb6
-rw-r--r--app/models/user_preference.rb3
-rw-r--r--app/views/projects/edit.html.haml2
7 files changed, 13 insertions, 9 deletions
diff --git a/app/assets/stylesheets/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss
index 9baca70b5f8..7dfbd5485d8 100644
--- a/app/assets/stylesheets/framework/layout.scss
+++ b/app/assets/stylesheets/framework/layout.scss
@@ -42,7 +42,7 @@ body {
.content-wrapper {
padding-top: var(--top-bar-height);
- padding-bottom: 100px;
+ padding-bottom: $content-wrapper-padding;
}
.container {
diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss
index 9fdf889f4e9..7a3db63b478 100644
--- a/app/assets/stylesheets/framework/sidebar.scss
+++ b/app/assets/stylesheets/framework/sidebar.scss
@@ -492,7 +492,7 @@
$issue-sticky-header-height: 76px;
top: calc(#{$calc-application-header-height} + #{$issue-sticky-header-height});
- height: calc(#{$calc-application-viewport-height} - #{$issue-sticky-header-height} - var(--mr-review-bar-height));
+ height: calc(#{$calc-application-viewport-height} - #{$issue-sticky-header-height} - var(--mr-review-bar-height) - $content-wrapper-padding);
position: sticky;
overflow: auto;
padding: 0 15px;
diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss
index 1ba3de68662..39672a5ed7f 100644
--- a/app/assets/stylesheets/framework/variables.scss
+++ b/app/assets/stylesheets/framework/variables.scss
@@ -460,6 +460,7 @@ $browser-scrollbar-size: 10px;
* Misc
*/
$header-height: var(--header-height, 48px);
+$content-wrapper-padding: 100px;
$header-zindex: 1000;
$zindex-dropdown-menu: 300;
$ide-statusbar-height: 25px;
diff --git a/app/controllers/projects/ml/candidates_controller.rb b/app/controllers/projects/ml/candidates_controller.rb
index e534000f494..ed7155fc5f4 100644
--- a/app/controllers/projects/ml/candidates_controller.rb
+++ b/app/controllers/projects/ml/candidates_controller.rb
@@ -3,7 +3,7 @@
module Projects
module Ml
class CandidatesController < ApplicationController
- before_action :check_feature_flag, :set_candidate
+ before_action :check_feature_enabled, :set_candidate
feature_category :mlops
@@ -26,8 +26,8 @@ module Projects
render_404 unless @candidate.present?
end
- def check_feature_flag
- render_404 unless Feature.enabled?(:ml_experiment_tracking, @project)
+ def check_feature_enabled
+ render_404 unless can?(current_user, :read_model_experiments, @project)
end
end
end
diff --git a/app/controllers/projects/ml/experiments_controller.rb b/app/controllers/projects/ml/experiments_controller.rb
index dece3f98c57..a620e9919e7 100644
--- a/app/controllers/projects/ml/experiments_controller.rb
+++ b/app/controllers/projects/ml/experiments_controller.rb
@@ -5,7 +5,7 @@ module Projects
class ExperimentsController < ::Projects::ApplicationController
include Projects::Ml::ExperimentsHelper
- before_action :check_feature_flag
+ before_action :check_feature_enabled
before_action :set_experiment, only: [:show, :destroy]
feature_category :mlops
@@ -55,8 +55,8 @@ module Projects
private
- def check_feature_flag
- render_404 unless Feature.enabled?(:ml_experiment_tracking, @project)
+ def check_feature_enabled
+ render_404 unless can?(current_user, :read_model_experiments, @project)
end
def set_experiment
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index e527542e357..4d517408154 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -2,12 +2,15 @@
class UserPreference < ApplicationRecord
include IgnorableColumns
+ include SafelyChangeColumnDefault
# We could use enums, but Rails 4 doesn't support multiple
# enum options with same name for multiple fields, also it creates
# extra methods that aren't really needed here.
NOTES_FILTERS = { all_notes: 0, only_comments: 1, only_activity: 2 }.freeze
+ columns_changing_default :tab_width, :time_display_relative, :render_whitespace_in_code
+
belongs_to :user
scope :with_user, -> { joins(:user) }
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index fd90a941c7b..a5224db1be9 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -106,7 +106,7 @@
.input-group-prepend
.input-group-text
#{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/
- = f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' }
+ = f.text_field :path, class: 'form-control', data: { qa_selector: 'project_path_field' }
= f.submit _('Change path'), class: "btn-danger", data: { qa_selector: 'change_path_button' }, pajamas_button: true
= render 'transfer', project: @project