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
b14c6de8
Commit
b14c6de8
authored
Mar 01, 2021
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add last updated time to devops score page
This change the last updated time to devops score page.
parent
54aadc79
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
0 deletions
+22
-0
app/presenters/dev_ops_report/metric_presenter.rb
app/presenters/dev_ops_report/metric_presenter.rb
+2
-0
app/views/admin/dev_ops_report/_report.html.haml
app/views/admin/dev_ops_report/_report.html.haml
+2
-0
changelogs/unreleased/296125-show-timeline-for-devops-score.yml
...logs/unreleased/296125-show-timeline-for-devops-score.yml
+5
-0
ee/spec/views/admin/dev_ops_report/show.html.haml_spec.rb
ee/spec/views/admin/dev_ops_report/show.html.haml_spec.rb
+10
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/presenters/dev_ops_report/metric_presenter.rb
View file @
b14c6de8
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
module
DevOpsReport
module
DevOpsReport
class
MetricPresenter
<
Gitlab
::
View
::
Presenter
::
Simple
class
MetricPresenter
<
Gitlab
::
View
::
Presenter
::
Simple
delegate
:created_at
,
to: :subject
def
cards
def
cards
[
[
Card
.
new
(
Card
.
new
(
...
...
app/views/admin/dev_ops_report/_report.html.haml
View file @
b14c6de8
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
=
render
'no_data'
=
render
'no_data'
-
else
-
else
.devops
.devops
.gl-my-3.gl-text-gray-400
{
data:
{
testid:
'devops-score-note-text'
}
}
=
s_
(
'DevopsReport|DevOps score metrics are based on usage over the last 30 days. Last updated: %{timestamp}.'
).
html_safe
%
{
timestamp:
@metric
.
created_at
.
strftime
(
'%Y-%m-%d %H:%M'
)
}
.devops-header
.devops-header
%h2
.devops-header-title
{
class:
"devops-#{score_level(@metric.average_percentage_score)}-score"
}
%h2
.devops-header-title
{
class:
"devops-#{score_level(@metric.average_percentage_score)}-score"
}
=
number_to_percentage
(
@metric
.
average_percentage_score
,
precision:
1
)
=
number_to_percentage
(
@metric
.
average_percentage_score
,
precision:
1
)
...
...
changelogs/unreleased/296125-show-timeline-for-devops-score.yml
0 → 100644
View file @
b14c6de8
---
title
:
Add more explanation about the presented data and show the last updated time on the DevOps Score page
merge_request
:
55357
author
:
type
:
added
ee/spec/views/admin/dev_ops_report/show.html.haml_spec.rb
View file @
b14c6de8
...
@@ -27,6 +27,16 @@ RSpec.describe 'admin/dev_ops_report/show.html.haml' do
...
@@ -27,6 +27,16 @@ RSpec.describe 'admin/dev_ops_report/show.html.haml' do
expect
(
rendered
).
not_to
have_selector
(
'#devops-adoption'
)
expect
(
rendered
).
not_to
have_selector
(
'#devops-adoption'
)
end
end
it
'shows the timestamp of the latest record'
do
assign
(
:metric
,
create
(
:dev_ops_report_metric
,
created_at:
Time
.
utc
(
2012
,
5
,
1
,
14
,
30
)).
present
)
render
page
=
Capybara
.
string
(
rendered
)
note_node
=
page
.
find
(
"div[data-testid='devops-score-note-text']"
)
expect
(
note_node
.
text
).
to
include
(
'Last updated: 2012-05-01 14:30.'
)
end
end
end
context
'when show_adoption? returns true'
do
context
'when show_adoption? returns true'
do
...
...
locale/gitlab.pot
View file @
b14c6de8
...
@@ -10535,6 +10535,9 @@ msgstr ""
...
@@ -10535,6 +10535,9 @@ msgstr ""
msgid "DevopsReport|DevOps Score"
msgid "DevopsReport|DevOps Score"
msgstr ""
msgstr ""
msgid "DevopsReport|DevOps score metrics are based on usage over the last 30 days. Last updated: %{timestamp}."
msgstr ""
msgid "DevopsReport|Score"
msgid "DevopsReport|Score"
msgstr ""
msgstr ""
...
...
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