Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
3d7409c5d5
commit
c8f81c2efd
9 changed files with 65 additions and 5 deletions
|
@ -58,21 +58,22 @@ export default {
|
|||
<section>
|
||||
<p
|
||||
v-if="relatedLinks.closing"
|
||||
:class="{ 'gl-display-line gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
:class="{ 'gl-display-inline gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
>
|
||||
{{ closesText }}
|
||||
<span v-safe-html="relatedLinks.closing"></span>
|
||||
</p>
|
||||
<p
|
||||
v-if="relatedLinks.mentioned"
|
||||
:class="{ 'gl-display-line gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
:class="{ 'gl-display-inline gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
>
|
||||
<span v-if="relatedLinks.closing && glFeatures.restructuredMrWidget">·</span>
|
||||
{{ n__('mrWidget|Mentions issue', 'mrWidget|Mentions issues', relatedLinks.mentionedCount) }}
|
||||
<span v-safe-html="relatedLinks.mentioned"></span>
|
||||
</p>
|
||||
<p
|
||||
v-if="shouldShowAssignToMeLink"
|
||||
:class="{ 'gl-display-line gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
:class="{ 'gl-display-inline gl-m-0': glFeatures.restructuredMrWidget }"
|
||||
>
|
||||
<span>
|
||||
<gl-link rel="nofollow" data-method="post" :href="relatedLinks.assignToMe">{{
|
||||
|
|
|
@ -66,7 +66,12 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
|
|||
|
||||
render html: Gitlab::Highlight.highlight('payload.json', usage_data_json, language: 'json')
|
||||
end
|
||||
format.json { render json: Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: true).to_json }
|
||||
|
||||
format.json do
|
||||
Gitlab::UsageDataCounters::ServiceUsageDataCounter.count(:download_payload_click)
|
||||
|
||||
render json: Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values, cached: true).to_json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
key_path: counts.service_usage_data_download_payload_click
|
||||
description: Count Download Payload button clicks
|
||||
data_category: optional
|
||||
name: count_promoted_issues
|
||||
product_section: growth
|
||||
product_stage: growth
|
||||
product_group: group::product intelligence
|
||||
product_category: collection
|
||||
value_type: number
|
||||
status: active
|
||||
time_frame: all
|
||||
data_source: redis
|
||||
distribution:
|
||||
- ce
|
||||
- ee
|
||||
tier:
|
||||
- free
|
||||
- premium
|
||||
- ultimate
|
||||
performance_indicator_type: []
|
||||
milestone: "14.9"
|
|
@ -58,6 +58,9 @@ source. You must [install it separately](https://www.elastic.co/guide/en/elastic
|
|||
|
||||
You can install Elasticsearch yourself, or use a cloud hosted offering such as [Elasticsearch Service](https://www.elastic.co/elasticsearch/service) (available on AWS, GCP, or Azure) or the [Amazon OpenSearch](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/gsg.html)
|
||||
service.
|
||||
|
||||
If using the Amazon OpenSearch service, ensure that you select `Elasticsearch 7.10` when configuring Deployment type. As noted in [Versions not supported](#versions-not-supported), Amazon's non-Elasticsearch versions are not yet supported.
|
||||
|
||||
You should install Elasticsearch on a separate server. Running Elasticsearch on the same server as GitLab is not recommended and can cause a degradation in GitLab instance performance.
|
||||
|
||||
For a single node Elasticsearch cluster, the functional cluster health status is always yellow due to the allocation of the primary shard. Elasticsearch cannot assign replica shards to the same node as primary shards.
|
||||
|
|
|
@ -16,7 +16,8 @@ module Gitlab
|
|||
DesignsCounter,
|
||||
KubernetesAgentCounter,
|
||||
StaticSiteEditorCounter,
|
||||
DiffsCounter
|
||||
DiffsCounter,
|
||||
ServiceUsageDataCounter
|
||||
].freeze
|
||||
|
||||
UsageDataCounterError = Class.new(StandardError)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab::UsageDataCounters
|
||||
class ServiceUsageDataCounter < BaseCounter
|
||||
KNOWN_EVENTS = %w[download_payload_click].freeze
|
||||
PREFIX = 'service_usage_data'
|
||||
end
|
||||
end
|
|
@ -81,6 +81,18 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set
|
|||
expect(body).to include('counts')
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
end
|
||||
|
||||
describe 'usage data counter' do
|
||||
let(:counter) { Gitlab::UsageDataCounters::ServiceUsageDataCounter }
|
||||
|
||||
it 'incremented when json generated' do
|
||||
expect { get :usage_data, format: :json }.to change { counter.read(:download_payload_click) }.by(1)
|
||||
end
|
||||
|
||||
it 'not incremented when html format requested' do
|
||||
expect { get :usage_data }.not_to change { counter.read(:download_payload_click) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'PUT #update' do
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::UsageDataCounters::ServiceUsageDataCounter do
|
||||
it_behaves_like 'a redis usage counter', 'Service Usage Data', :download_payload_click
|
||||
end
|
|
@ -129,6 +129,7 @@ module UsageDataHelpers
|
|||
uploads
|
||||
web_hooks
|
||||
user_preferences_user_gitpod_enabled
|
||||
service_usage_data_download_payload_click
|
||||
).push(*SMAU_KEYS)
|
||||
|
||||
USAGE_DATA_KEYS = %i(
|
||||
|
|
Loading…
Reference in a new issue