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
7f52b877
Commit
7f52b877
authored
Jul 30, 2020
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs and spec examples
Also update the template to fix a validation error
parent
933f4800
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
doc/operations/metrics/dashboards/develop.md
doc/operations/metrics/dashboards/develop.md
+4
-3
doc/user/admin_area/settings/instance_template_repository.md
doc/user/admin_area/settings/instance_template_repository.md
+1
-1
lib/gitlab/metrics/templates/Default.metrics-dashboard.yml
lib/gitlab/metrics/templates/Default.metrics-dashboard.yml
+3
-3
spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
+1
-1
spec/lib/gitlab/template/metrics_dashboard_template_spec.rb
spec/lib/gitlab/template/metrics_dashboard_template_spec.rb
+1
-1
No files found.
doc/operations/metrics/dashboards/develop.md
View file @
7f52b877
...
...
@@ -14,13 +14,15 @@ commented-out examples you can use.
Navigate to the browser-based editor of your choice:
### *Repository view*
### *Repository view*
1.
Navigate to
**{doc-text}**
**Repository > Files**
.
1.
Click
**{plus}**
**Add to tree**
and select
**New file**
,
then click
**Select a template type**
to see a list of available templates:
!
[
Metrics dashboard template selection
](
img/metrics_dashboard_template_selection_v13_3.png
)
### *[Web IDE](../../../user/project/web_ide/index.md)*
1.
Click
**Web IDE**
when viewing your repository.
1.
Click
**{doc-new}**
**New file**
, then click
**Choose a template**
to see a list of available templates:
!
[
Metrics dashboard template selection WebIDE
](
img/metrics_dashboard_template_selection_web_ide_v13_3.png
)
...
...
@@ -29,4 +31,3 @@ Navigate to the browser-based editor of your choice:
To enable and use a custom dashboard templates on your GitLab instance please follow
[
general guide
](
../../../user/admin_area/settings/instance_template_repository.md
)
on custom file templates
doc/user/admin_area/settings/instance_template_repository.md
View file @
7f52b877
...
...
@@ -58,7 +58,7 @@ extension and not be empty. So, the hierarchy should look like this:
|-- LICENSE
|-- custom_license.txt
|-- another_license.txt
|--
LICENSE
|--
metrics-dashboards
|-- custom_metrics-dashboard.yml
|-- another_metrics-dashboard.yml
```
...
...
lib/gitlab/metrics/templates/Default.metrics-dashboard.yml
View file @
7f52b877
...
...
@@ -19,6 +19,6 @@ panel_groups:
metrics
:
# Queries that make use of variables need to have double curly brackets {}
# set to the variables, per the example below
query
:
'
max(go_memstats_alloc_bytes{job="{{job}}"})
/
1024
/1024'
unit
:
'
%'
label
:
"
Max"
-
query
:
'
max(go_memstats_alloc_bytes{job="{{job}}"})
/
1024
/1024'
unit
:
'
%'
label
:
"
Max"
spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
View file @
7f52b877
...
...
@@ -24,5 +24,5 @@ RSpec.describe Gitlab::Template::GitlabCiYmlTemplate do
end
end
i
nclude_examples
'
template shared examples'
,
'Ruby'
,
'.gitlab-ci.yml'
i
t_behaves_like
'file
template shared examples'
,
'Ruby'
,
'.gitlab-ci.yml'
end
spec/lib/gitlab/template/metrics_dashboard_template_spec.rb
View file @
7f52b877
...
...
@@ -22,5 +22,5 @@ RSpec.describe Gitlab::Template::MetricsDashboardTemplate do
end
end
i
nclude_examples
'
template shared examples'
,
'Default'
,
'.metrics-dashboard.yml'
i
t_behaves_like
'file
template shared examples'
,
'Default'
,
'.metrics-dashboard.yml'
end
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