Commit 2a6edc33 authored by syasonik's avatar syasonik

Rename ProjectMetrics to used term

parent 5eeb2ecc
...@@ -16,7 +16,7 @@ module Metrics ...@@ -16,7 +16,7 @@ module Metrics
def sequences def sequences
@sequences ||= { @sequences ||= {
::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH => [::Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH => [::Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter,
::Gitlab::Metrics::Dashboard::Stages::ProjectMetricsInserter, ::Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter,
::Gitlab::Metrics::Dashboard::Stages::Sorter].freeze ::Gitlab::Metrics::Dashboard::Stages::Sorter].freeze
}.freeze }.freeze
end end
......
...@@ -9,7 +9,7 @@ module Metrics ...@@ -9,7 +9,7 @@ module Metrics
DASHBOARD_NAME = 'Default' DASHBOARD_NAME = 'Default'
SEQUENCE = [ SEQUENCE = [
STAGES::ProjectMetricsInserter, STAGES::CustomMetricsInserter,
STAGES::EndpointInserter, STAGES::EndpointInserter,
STAGES::Sorter STAGES::Sorter
].freeze ].freeze
......
...@@ -10,8 +10,8 @@ module Metrics ...@@ -10,8 +10,8 @@ module Metrics
SEQUENCE = [ SEQUENCE = [
STAGES::CommonMetricsInserter, STAGES::CommonMetricsInserter,
STAGES::ProjectMetricsInserter, STAGES::CustomMetricsInserter,
STAGES::ProjectMetricsDetailsInserter, STAGES::CustomMetricsDetailsInserter,
STAGES::EndpointInserter, STAGES::EndpointInserter,
STAGES::Sorter STAGES::Sorter
].freeze ].freeze
......
...@@ -13,7 +13,7 @@ describe Gitlab::Metrics::Dashboard::Processor do ...@@ -13,7 +13,7 @@ describe Gitlab::Metrics::Dashboard::Processor do
let(:sequence) do let(:sequence) do
[ [
Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter,
Gitlab::Metrics::Dashboard::Stages::ProjectMetricsInserter, Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter,
Gitlab::Metrics::Dashboard::Stages::EndpointInserter, Gitlab::Metrics::Dashboard::Stages::EndpointInserter,
Gitlab::Metrics::Dashboard::Stages::Sorter, Gitlab::Metrics::Dashboard::Stages::Sorter,
::EE::Gitlab::Metrics::Dashboard::Stages::AlertsInserter ::EE::Gitlab::Metrics::Dashboard::Stages::AlertsInserter
......
...@@ -31,7 +31,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor ...@@ -31,7 +31,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor
} }
end end
it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::ProjectMetricsInserter, STAGES::Sorter] it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::CustomMetricsInserter, STAGES::Sorter]
it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::ClusterDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::Sorter] it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::ClusterDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::Sorter]
end end
end end
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Metrics module Metrics
module Dashboard module Dashboard
module Stages module Stages
class ProjectMetricsDetailsInserter < BaseStage class CustomMetricsDetailsInserter < BaseStage
def transform! def transform!
dashboard[:panel_groups].each do |panel_group| dashboard[:panel_groups].each do |panel_group|
next unless panel_group next unless panel_group
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Metrics module Metrics
module Dashboard module Dashboard
module Stages module Stages
class ProjectMetricsInserter < BaseStage class CustomMetricsInserter < BaseStage
# Inserts project-specific metrics into the dashboard # Inserts project-specific metrics into the dashboard
# config. If there are no project-specific metrics, # config. If there are no project-specific metrics,
# this will have no effect. # this will have no effect.
......
...@@ -11,8 +11,8 @@ describe Gitlab::Metrics::Dashboard::Processor do ...@@ -11,8 +11,8 @@ describe Gitlab::Metrics::Dashboard::Processor do
let(:sequence) do let(:sequence) do
[ [
Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter,
Gitlab::Metrics::Dashboard::Stages::ProjectMetricsInserter, Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter,
Gitlab::Metrics::Dashboard::Stages::ProjectMetricsDetailsInserter, Gitlab::Metrics::Dashboard::Stages::CustomMetricsDetailsInserter,
Gitlab::Metrics::Dashboard::Stages::EndpointInserter, Gitlab::Metrics::Dashboard::Stages::EndpointInserter,
Gitlab::Metrics::Dashboard::Stages::Sorter Gitlab::Metrics::Dashboard::Stages::Sorter
] ]
......
...@@ -83,7 +83,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor ...@@ -83,7 +83,7 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor
allow(::Gitlab::Metrics::Dashboard::Processor).to receive(:new).and_return(double(process: file_content_hash)) allow(::Gitlab::Metrics::Dashboard::Processor).to receive(:new).and_return(double(process: file_content_hash))
end end
it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::ProjectMetricsInserter, STAGES::Sorter] it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, [STAGES::CommonMetricsInserter, STAGES::CustomMetricsInserter, STAGES::Sorter]
context 'selected branch already exists' do context 'selected branch already exists' do
let(:branch) { 'existing_branch' } let(:branch) { 'existing_branch' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment