Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
82f2c6a0
Commit
82f2c6a0
authored
Mar 17, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renames the ProjectDashboard to the used name
parent
da969f7d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
9 deletions
+9
-9
app/services/metrics/dashboard/clone_dashboard_service.rb
app/services/metrics/dashboard/clone_dashboard_service.rb
+2
-2
app/services/metrics/dashboard/custom_dashboard_service.rb
app/services/metrics/dashboard/custom_dashboard_service.rb
+1
-1
app/services/metrics/dashboard/update_dashboard_service.rb
app/services/metrics/dashboard/update_dashboard_service.rb
+2
-2
lib/gitlab/metrics/dashboard/finder.rb
lib/gitlab/metrics/dashboard/finder.rb
+1
-1
lib/gitlab/metrics/dashboard/service_selector.rb
lib/gitlab/metrics/dashboard/service_selector.rb
+1
-1
spec/lib/gitlab/metrics/dashboard/service_selector_spec.rb
spec/lib/gitlab/metrics/dashboard/service_selector_spec.rb
+1
-1
spec/services/metrics/dashboard/custom_dashboard_service_spec.rb
...rvices/metrics/dashboard/custom_dashboard_service_spec.rb
+1
-1
No files found.
app/services/metrics/dashboard/clone_dashboard_service.rb
View file @
82f2c6a0
...
@@ -6,7 +6,7 @@ module Metrics
...
@@ -6,7 +6,7 @@ module Metrics
module
Dashboard
module
Dashboard
class
CloneDashboardService
<
::
BaseService
class
CloneDashboardService
<
::
BaseService
ALLOWED_FILE_TYPE
=
'.yml'
ALLOWED_FILE_TYPE
=
'.yml'
USER_DASHBOARDS_DIR
=
::
Metrics
::
Dashboard
::
Project
DashboardService
::
DASHBOARD_ROOT
USER_DASHBOARDS_DIR
=
::
Metrics
::
Dashboard
::
Custom
DashboardService
::
DASHBOARD_ROOT
class
<<
self
class
<<
self
def
allowed_dashboard_templates
def
allowed_dashboard_templates
...
@@ -52,7 +52,7 @@ module Metrics
...
@@ -52,7 +52,7 @@ module Metrics
def
dashboard_details
def
dashboard_details
{
{
path:
new_dashboard_path
,
path:
new_dashboard_path
,
display_name:
::
Metrics
::
Dashboard
::
Project
DashboardService
.
name_for_path
(
new_dashboard_path
),
display_name:
::
Metrics
::
Dashboard
::
Custom
DashboardService
.
name_for_path
(
new_dashboard_path
),
default:
false
,
default:
false
,
system_dashboard:
false
system_dashboard:
false
}
}
...
...
app/services/metrics/dashboard/
project
_dashboard_service.rb
→
app/services/metrics/dashboard/
custom
_dashboard_service.rb
View file @
82f2c6a0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# Use Gitlab::Metrics::Dashboard::Finder to retrive dashboards.
# Use Gitlab::Metrics::Dashboard::Finder to retrive dashboards.
module
Metrics
module
Metrics
module
Dashboard
module
Dashboard
class
Project
DashboardService
<
::
Metrics
::
Dashboard
::
BaseService
class
Custom
DashboardService
<
::
Metrics
::
Dashboard
::
BaseService
DASHBOARD_ROOT
=
".gitlab/dashboards"
DASHBOARD_ROOT
=
".gitlab/dashboards"
class
<<
self
class
<<
self
...
...
app/services/metrics/dashboard/update_dashboard_service.rb
View file @
82f2c6a0
...
@@ -7,7 +7,7 @@ module Metrics
...
@@ -7,7 +7,7 @@ module Metrics
include
Stepable
include
Stepable
ALLOWED_FILE_TYPE
=
'.yml'
ALLOWED_FILE_TYPE
=
'.yml'
USER_DASHBOARDS_DIR
=
::
Metrics
::
Dashboard
::
Project
DashboardService
::
DASHBOARD_ROOT
USER_DASHBOARDS_DIR
=
::
Metrics
::
Dashboard
::
Custom
DashboardService
::
DASHBOARD_ROOT
steps
:check_push_authorized
,
steps
:check_push_authorized
,
:check_branch_name
,
:check_branch_name
,
...
@@ -99,7 +99,7 @@ module Metrics
...
@@ -99,7 +99,7 @@ module Metrics
def
dashboard_details
def
dashboard_details
{
{
path:
update_dashboard_path
,
path:
update_dashboard_path
,
display_name:
::
Metrics
::
Dashboard
::
Project
DashboardService
.
name_for_path
(
update_dashboard_path
),
display_name:
::
Metrics
::
Dashboard
::
Custom
DashboardService
.
name_for_path
(
update_dashboard_path
),
default:
false
,
default:
false
,
system_dashboard:
false
system_dashboard:
false
}
}
...
...
lib/gitlab/metrics/dashboard/finder.rb
View file @
82f2c6a0
...
@@ -78,7 +78,7 @@ module Gitlab
...
@@ -78,7 +78,7 @@ module Gitlab
end
end
def
project_service
def
project_service
::
Metrics
::
Dashboard
::
Project
DashboardService
::
Metrics
::
Dashboard
::
Custom
DashboardService
end
end
def
self_monitoring_service
def
self_monitoring_service
...
...
lib/gitlab/metrics/dashboard/service_selector.rb
View file @
82f2c6a0
...
@@ -20,7 +20,7 @@ module Gitlab
...
@@ -20,7 +20,7 @@ module Gitlab
::
Metrics
::
Dashboard
::
SystemDashboardService
,
::
Metrics
::
Dashboard
::
SystemDashboardService
,
::
Metrics
::
Dashboard
::
PodDashboardService
,
::
Metrics
::
Dashboard
::
PodDashboardService
,
::
Metrics
::
Dashboard
::
SelfMonitoringDashboardService
,
::
Metrics
::
Dashboard
::
SelfMonitoringDashboardService
,
::
Metrics
::
Dashboard
::
Project
DashboardService
::
Metrics
::
Dashboard
::
Custom
DashboardService
].
freeze
].
freeze
# Returns a class which inherits from the BaseService
# Returns a class which inherits from the BaseService
...
...
spec/lib/gitlab/metrics/dashboard/service_selector_spec.rb
View file @
82f2c6a0
...
@@ -15,7 +15,7 @@ describe Gitlab::Metrics::Dashboard::ServiceSelector do
...
@@ -15,7 +15,7 @@ describe Gitlab::Metrics::Dashboard::ServiceSelector do
context
'when just the dashboard path is provided'
do
context
'when just the dashboard path is provided'
do
let
(
:arguments
)
{
{
dashboard_path:
'.gitlab/dashboards/test.yml'
}
}
let
(
:arguments
)
{
{
dashboard_path:
'.gitlab/dashboards/test.yml'
}
}
it
{
is_expected
.
to
be
Metrics
::
Dashboard
::
Project
DashboardService
}
it
{
is_expected
.
to
be
Metrics
::
Dashboard
::
Custom
DashboardService
}
context
'when the path is for the system dashboard'
do
context
'when the path is for the system dashboard'
do
let
(
:arguments
)
{
{
dashboard_path:
system_dashboard_path
}
}
let
(
:arguments
)
{
{
dashboard_path:
system_dashboard_path
}
}
...
...
spec/services/metrics/dashboard/
project
_dashboard_service_spec.rb
→
spec/services/metrics/dashboard/
custom
_dashboard_service_spec.rb
View file @
82f2c6a0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
describe
Metrics
::
Dashboard
::
Project
DashboardService
,
:use_clean_rails_memory_store_caching
do
describe
Metrics
::
Dashboard
::
Custom
DashboardService
,
:use_clean_rails_memory_store_caching
do
include
MetricsDashboardHelpers
include
MetricsDashboardHelpers
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment