Skip to content
Snippets Groups Projects
Commit 4f01ac5b authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 213ce780
No related branches found
No related tags found
No related merge requests found
Showing
with 118 additions and 46 deletions
Loading
Loading
@@ -124,8 +124,10 @@ export default {
:diff-viewer-mode="diffViewerMode"
:new-path="diffFile.new_path"
:new-sha="diffFile.diff_refs.head_sha"
:new-size="diffFile.new_size"
:old-path="diffFile.old_path"
:old-sha="diffFile.diff_refs.base_sha"
:old-size="diffFile.old_size"
:file-hash="diffFileHash"
:project-path="projectPath"
:a-mode="diffFile.a_mode"
Loading
Loading
Loading
Loading
@@ -26,8 +26,11 @@ export default (resolvers = {}, config = {}) => {
createUploadLink(httpOptions),
new BatchHttpLink(httpOptions),
),
cache: new InMemoryCache({ ...config.cacheConfig, freezeResults: true }),
cache: new InMemoryCache({
...config.cacheConfig,
freezeResults: config.assumeImmutableResults,
}),
resolvers,
assumeImmutableResults: true,
assumeImmutableResults: config.assumeImmutableResults,
});
};
Loading
Loading
@@ -187,8 +187,11 @@ export default {
firstDashboard() {
return this.allDashboards[0] || {};
},
selectedDashboard() {
return this.allDashboards.find(d => d.path === this.currentDashboard) || this.firstDashboard;
},
selectedDashboardText() {
return this.currentDashboard || this.firstDashboard.display_name;
return this.selectedDashboard.display_name;
},
showRearrangePanelsBtn() {
return !this.showEmptyState && this.rearrangePanelsAvailable;
Loading
Loading
@@ -199,6 +202,14 @@ export default {
alertWidgetAvailable() {
return IS_EE && this.prometheusAlertsAvailable && this.alertsEndpoint;
},
hasHeaderButtons() {
return (
this.addingMetricsAvailable ||
this.showRearrangePanelsBtn ||
this.selectedDashboard.can_edit ||
this.externalDashboardUrl.length
);
},
},
created() {
this.setEndpoints({
Loading
Loading
@@ -390,7 +401,7 @@ export default {
</template>
 
<gl-form-group
v-if="addingMetricsAvailable || showRearrangePanelsBtn || externalDashboardUrl.length"
v-if="hasHeaderButtons"
label-for="prometheus-graphs-dropdown-buttons"
class="dropdown-buttons col-md d-md-flex col-lg d-lg-flex align-items-end"
>
Loading
Loading
@@ -437,6 +448,14 @@ export default {
</div>
</gl-modal>
 
<gl-button
v-if="selectedDashboard.can_edit"
class="mt-1 js-edit-link"
:href="selectedDashboard.project_blob_path"
>
{{ __('Edit dashboard') }}
</gl-button>
<gl-button
v-if="externalDashboardUrl.length"
class="mt-1 js-external-dashboard-link"
Loading
Loading
Loading
Loading
@@ -6,8 +6,6 @@ import initSettingsPanels from '~/settings_panels';
document.addEventListener('DOMContentLoaded', () => {
mountErrorTrackingForm();
mountOperationSettings();
if (gon.features.gfmGrafanaIntegration) {
mountGrafanaIntegration();
}
mountGrafanaIntegration();
initSettingsPanels();
});
Loading
Loading
@@ -23,6 +23,11 @@ export default {
type: String,
required: true,
},
newSize: {
type: Number,
required: false,
default: 0,
},
oldPath: {
type: String,
required: true,
Loading
Loading
@@ -31,6 +36,11 @@ export default {
type: String,
required: true,
},
oldSize: {
type: Number,
required: false,
default: 0,
},
projectPath: {
type: String,
required: false,
Loading
Loading
@@ -85,6 +95,8 @@ export default {
:diff-mode="diffMode"
:new-path="fullNewPath"
:old-path="fullOldPath"
:old-size="oldSize"
:new-size="newSize"
:project-path="projectPath"
:a-mode="aMode"
:b-mode="bMode"
Loading
Loading
Loading
Loading
@@ -14,6 +14,16 @@ export default {
type: String,
required: true,
},
newSize: {
type: Number,
required: false,
default: 0,
},
oldSize: {
type: Number,
required: false,
default: 0,
},
},
};
</script>
Loading
Loading
@@ -22,12 +32,14 @@ export default {
<div class="two-up view d-flex">
<image-viewer
:path="oldPath"
:file-size="oldSize"
:render-info="true"
inner-css-classes="frame deleted"
class="wrap w-50"
/>
<image-viewer
:path="newPath"
:file-size="newSize"
:render-info="true"
:inner-css-classes="['frame', 'added']"
class="wrap w-50"
Loading
Loading
Loading
Loading
@@ -22,6 +22,16 @@ export default {
type: String,
required: true,
},
newSize: {
type: Number,
required: false,
default: 0,
},
oldSize: {
type: Number,
required: false,
default: 0,
},
},
data() {
return {
Loading
Loading
Loading
Loading
@@ -20,11 +20,11 @@ class ApplicationController < ActionController::Base
before_action :authenticate_user!, except: [:route_not_found]
before_action :enforce_terms!, if: :should_enforce_terms?
before_action :validate_user_service_ticket!
before_action :check_password_expiration
before_action :check_password_expiration, if: :html_request?
before_action :ldap_security_check
before_action :sentry_context
before_action :default_headers
before_action :add_gon_variables, unless: [:peek_request?, :json_request?]
before_action :add_gon_variables, if: :html_request?
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :require_email, unless: :devise_controller?
before_action :active_user_check, unless: :devise_controller?
Loading
Loading
@@ -455,8 +455,8 @@ class ApplicationController < ActionController::Base
response.headers['Page-Title'] = URI.escape(page_title('GitLab'))
end
 
def peek_request?
request.path.start_with?('/-/peek')
def html_request?
request.format.html?
end
 
def json_request?
Loading
Loading
@@ -466,7 +466,7 @@ class ApplicationController < ActionController::Base
def should_enforce_terms?
return false unless Gitlab::CurrentSettings.current_application_settings.enforce_terms
 
!(peek_request? || devise_controller?)
html_request? && !devise_controller?
end
 
def set_usage_stats_consent_flag
Loading
Loading
Loading
Loading
@@ -4,15 +4,18 @@ module ConfirmEmailWarning
extend ActiveSupport::Concern
 
included do
before_action :set_confirm_warning, if: -> { Feature.enabled?(:soft_email_confirmation) }
before_action :set_confirm_warning, if: :show_confirm_warning?
end
 
protected
 
def show_confirm_warning?
html_request? && request.get? && Feature.enabled?(:soft_email_confirmation)
end
def set_confirm_warning
return unless current_user
return if current_user.confirmed?
return if peek_request? || json_request? || !request.get?
 
email = current_user.unconfirmed_email || current_user.email
 
Loading
Loading
# frozen_string_literal: true
 
module UploadsActions
extend ActiveSupport::Concern
include Gitlab::Utils::StrongMemoize
include SendFileUpload
 
UPLOAD_MOUNTS = %w(avatar attachment file logo header_logo favicon).freeze
 
included do
prepend_before_action :set_request_format_from_path_extension
end
def create
uploader = UploadService.new(model, params[:file], uploader_class).execute
 
Loading
Loading
@@ -64,6 +69,18 @@ module UploadsActions
 
private
 
# From ActionDispatch::Http::MimeNegotiation. We have an initializer that
# monkey-patches this method out (so that repository paths don't guess a
# format based on extension), but we do want this behaviour when serving
# uploads.
def set_request_format_from_path_extension
path = request.headers['action_dispatch.original_path'] || request.headers['PATH_INFO']
if match = path&.match(/\.(\w+)\z/)
request.format = match.captures.first
end
end
def uploader_class
raise NotImplementedError
end
Loading
Loading
Loading
Loading
@@ -4,8 +4,6 @@ class Projects::GrafanaApiController < Projects::ApplicationController
include RenderServiceResults
include MetricsDashboard
 
before_action :validate_feature_enabled!, only: [:metrics_dashboard]
def proxy
result = ::Grafana::ProxyService.new(
project,
Loading
Loading
@@ -26,10 +24,6 @@ class Projects::GrafanaApiController < Projects::ApplicationController
params.permit(:embedded, :grafana_url)
end
 
def validate_feature_enabled!
render_403 unless Feature.enabled?(:gfm_grafana_integration)
end
def query_params
params.permit(:query, :start, :end, :step)
end
Loading
Loading
Loading
Loading
@@ -7,25 +7,6 @@ class ExpireBuildArtifactsWorker
feature_category :continuous_integration
 
def perform
if Feature.enabled?(:ci_new_expire_job_artifacts_service, default_enabled: true)
perform_efficient_artifacts_removal
else
perform_legacy_artifacts_removal
end
end
def perform_efficient_artifacts_removal
Ci::DestroyExpiredJobArtifactsService.new.execute
end
# rubocop: disable CodeReuse/ActiveRecord
def perform_legacy_artifacts_removal
Rails.logger.info 'Scheduling removal of build artifacts' # rubocop:disable Gitlab/RailsLogger
build_ids = Ci::Build.with_expired_artifacts.pluck(:id)
build_ids = build_ids.map { |build_id| [build_id] }
ExpireBuildInstanceArtifactsWorker.bulk_perform_async(build_ids)
end
# rubocop: enable CodeReuse/ActiveRecord
end
---
title: Add edit button to metrics dashboard
merge_request: 19279
author:
type: added
---
title: Update SaaS trial header to include the tier Gold
merge_request: 19970
author:
type: changed
---
title: Re-add missing file sizes in 2-Up diff file viewer
merge_request: 19710
author:
type: fixed
---
title: Allow Grafana charts to be embedded in Gitlab Flavored Markdown
merge_request: 18486
author:
type: added
Loading
Loading
@@ -18,8 +18,6 @@ module Banzai
end
 
def embed_params(node)
return unless Feature.enabled?(:gfm_grafana_integration)
query_params = Gitlab::Metrics::Dashboard::Url.parse_query(node['href'])
return unless [:panelId, :from, :to].all? do |param|
query_params.include?(param)
Loading
Loading
Loading
Loading
@@ -42,9 +42,6 @@ module Gitlab
# Initialize gon.features with any flags that should be
# made globally available to the frontend
push_frontend_feature_flag(:suppress_ajax_navigation_errors, default_enabled: true)
# Flag controls a GFM feature used across many routes.
push_frontend_feature_flag(:gfm_grafana_integration)
end
 
# Exposes the state of a feature flag to the frontend code.
Loading
Loading
Loading
Loading
@@ -6022,6 +6022,9 @@ msgstr ""
msgid "Edit comment"
msgstr ""
 
msgid "Edit dashboard"
msgstr ""
msgid "Edit description"
msgstr ""
 
Loading
Loading
@@ -6442,6 +6445,9 @@ msgstr ""
msgid "Environments|No deployments yet"
msgstr ""
 
msgid "Environments|No pods to display"
msgstr ""
msgid "Environments|Note that this action will stop the environment, but it will %{emphasisStart}not%{emphasisEnd} have an effect on any existing deployment due to no “stop environment action” being defined in the %{ciConfigLinkStart}.gitlab-ci.yml%{ciConfigLinkEnd} file."
msgstr ""
 
Loading
Loading
@@ -16145,7 +16151,7 @@ msgstr ""
msgid "Start a %{new_merge_request} with these changes"
msgstr ""
 
msgid "Start a Free Trial"
msgid "Start a Free Gold Trial"
msgstr ""
 
msgid "Start a new discussion..."
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@
"@gitlab/ui": "7.5.0",
"@gitlab/visual-review-tools": "1.0.3",
"@sentry/browser": "^5.7.1",
"apollo-cache-inmemory": "^1.5.1",
"apollo-cache-inmemory": "^1.6.3",
"apollo-client": "^2.6.4",
"apollo-link": "^1.2.11",
"apollo-link-batch-http": "^1.2.11",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment