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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
ebcd5711
Commit
ebcd5711
authored
Apr 26, 2018
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace time_ago_in_words with JS-based one
parent
c5f6c811
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
19 additions
and
18 deletions
+19
-18
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+1
-1
app/views/admin/runners/_runner.html.haml
app/views/admin/runners/_runner.html.haml
+1
-1
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+1
-1
app/views/admin/services/index.html.haml
app/views/admin/services/index.html.haml
+1
-2
app/views/devise/mailer/unlock_instructions.html.haml
app/views/devise/mailer/unlock_instructions.html.haml
+1
-1
app/views/devise/mailer/unlock_instructions.text.erb
app/views/devise/mailer/unlock_instructions.text.erb
+1
-1
app/views/projects/jobs/_sidebar.html.haml
app/views/projects/jobs/_sidebar.html.haml
+1
-1
app/views/projects/registry/repositories/_tag.html.haml
app/views/projects/registry/repositories/_tag.html.haml
+1
-1
app/views/projects/runners/show.html.haml
app/views/projects/runners/show.html.haml
+1
-1
app/views/projects/services/_index.html.haml
app/views/projects/services/_index.html.haml
+1
-2
app/views/projects/triggers/_trigger.html.haml
app/views/projects/triggers/_trigger.html.haml
+1
-1
app/views/sherlock/transactions/_general.html.haml
app/views/sherlock/transactions/_general.html.haml
+1
-2
app/views/sherlock/transactions/index.html.haml
app/views/sherlock/transactions/index.html.haml
+1
-2
changelogs/unreleased/45761-replace-actionview-time_ago_in_words.yml
...unreleased/45761-replace-actionview-time_ago_in_words.yml
+5
-0
spec/features/admin/admin_uses_repository_checks_spec.rb
spec/features/admin/admin_uses_repository_checks_spec.rb
+1
-1
No files found.
app/views/admin/projects/show.html.haml
View file @
ebcd5711
...
...
@@ -13,7 +13,7 @@
.panel
.panel-heading.alert.alert-danger
Last repository check
=
"(
#{
time_ago_
in_words
(
@project
.
last_repository_check_at
)
}
ago
)"
=
"(
#{
time_ago_
with_tooltip
(
@project
.
last_repository_check_at
)
}
)"
failed. See
=
link_to
'repocheck.log'
,
admin_logs_path
for error messages.
...
...
app/views/admin/runners/_runner.html.haml
View file @
ebcd5711
...
...
@@ -31,7 +31,7 @@
=
tag
%td
-
if
runner
.
contacted_at
#{
time_ago_in_words
(
runner
.
contacted_at
)
}
ago
=
time_ago_with_tooltip
runner
.
contacted_at
-
else
Never
%td
.admin-runner-btn-group-cell
...
...
app/views/admin/runners/show.html.haml
View file @
ebcd5711
...
...
@@ -108,4 +108,4 @@
%td
.timestamp
-
if
build
.
finished_at
%span
#{
time_ago_in_words
build
.
finished_at
}
ago
%span
=
time_ago_with_tooltip
build
.
finished_at
app/views/admin/services/index.html.haml
View file @
ebcd5711
...
...
@@ -20,5 +20,4 @@
%td
=
service
.
description
%td
.light
=
time_ago_in_words
service
.
updated_at
ago
=
time_ago_with_tooltip
service
.
updated_at
app/views/devise/mailer/unlock_instructions.html.haml
View file @
ebcd5711
...
...
@@ -2,7 +2,7 @@
=
email_default_heading
(
"Hello,
#{
@resource
.
name
}
!"
)
%p
Your GitLab account has been locked due to an excessive amount of unsuccessful
sign in attempts. Your account will automatically unlock in
#{
time_ago_in_words
(
Devise
.
unlock_in
.
from_now
)
}
sign in attempts. Your account will automatically unlock in
#{
distance_of_time_in_words
(
Devise
.
unlock_in
)
}
or you may click the link below to unlock now.
#cta
=
link_to
(
'Unlock account'
,
unlock_url
(
@resource
,
unlock_token:
@token
))
app/views/devise/mailer/unlock_instructions.text.erb
View file @
ebcd5711
Hello,
<%=
@resource
.
name
%>
!
Your GitLab account has been locked due to an excessive amount of unsuccessful
sign in attempts. Your account will automatically unlock in
<%=
time_ago_in_words
(
Devise
.
unlock_in
.
from_now
)
%>
sign in attempts. Your account will automatically unlock in
<%=
distance_of_time_in_words
(
Devise
.
unlock_in
)
%>
or you may click the link below to unlock now.
<%=
unlock_url
(
@resource
,
unlock_token:
@token
)
%>
app/views/projects/jobs/_sidebar.html.haml
View file @
ebcd5711
...
...
@@ -15,7 +15,7 @@
-
elsif
@build
.
has_expiring_artifacts?
%p
.build-detail-row
The artifacts will be removed in
%span
=
time_ago_
in_words
@build
.
artifacts_expire_at
%span
=
time_ago_
with_tooltip
@build
.
artifacts_expire_at
-
if
@build
.
artifacts?
.btn-group.btn-group-justified
{
role: :group
}
...
...
app/views/projects/registry/repositories/_tag.html.haml
View file @
ebcd5711
...
...
@@ -18,7 +18,7 @@
\-
%td
-
if
tag
.
created_at
=
time_ago_
in_words
(
tag
.
created_at
)
=
time_ago_
with_tooltip
tag
.
created_at
-
else
.light
\-
...
...
app/views/projects/runners/show.html.haml
View file @
ebcd5711
...
...
@@ -62,6 +62,6 @@
%td
Last contact
%td
-
if
@runner
.
contacted_at
#{
time_ago_in_words
(
@runner
.
contacted_at
)
}
ago
=
time_ago_with_tooltip
@runner
.
contacted_at
-
else
Never
app/views/projects/services/_index.html.haml
View file @
ebcd5711
...
...
@@ -27,5 +27,4 @@
=
service
.
description
%td
.light
-
if
service
.
updated_at
.
present?
=
time_ago_in_words
service
.
updated_at
ago
=
time_ago_with_tooltip
service
.
updated_at
app/views/projects/triggers/_trigger.html.haml
View file @
ebcd5711
...
...
@@ -25,7 +25,7 @@
%td
-
if
trigger
.
last_used
#{
time_ago_in_words
(
trigger
.
last_used
)
}
ago
=
time_ago_with_tooltip
trigger
.
last_used
-
else
Never
...
...
app/views/sherlock/transactions/_general.html.haml
View file @
ebcd5711
...
...
@@ -35,5 +35,4 @@
%span
.light
#{
t
(
'sherlock.finished_at'
)
}
:
%strong
=
time_ago_in_words
(
@transaction
.
finished_at
)
=
t
(
'sherlock.ago'
)
=
time_ago_with_tooltip
@transaction
.
finished_at
app/views/sherlock/transactions/index.html.haml
View file @
ebcd5711
...
...
@@ -35,8 +35,7 @@
=
t
(
'sherlock.seconds'
)
%td
=
trans
.
queries
.
length
%td
=
time_ago_in_words
(
trans
.
finished_at
)
=
t
(
'sherlock.ago'
)
=
time_ago_with_tooltip
trans
.
finished_at
%td
=
link_to
(
sherlock_transaction_path
(
trans
),
class:
'btn btn-xs'
)
do
=
t
(
'sherlock.view'
)
changelogs/unreleased/45761-replace-actionview-time_ago_in_words.yml
0 → 100644
View file @
ebcd5711
---
title
:
Replace time_ago_in_words with JS-based one
merge_request
:
18607
author
:
Takuya Noguchi
type
:
performance
spec/features/admin/admin_uses_repository_checks_spec.rb
View file @
ebcd5711
...
...
@@ -19,7 +19,7 @@ feature 'Admin uses repository checks' do
expect
(
page
).
to
have_content
(
'Repository check was triggered'
)
end
scenario
'to see a single failed repository check'
do
scenario
'to see a single failed repository check'
,
:js
do
project
=
create
(
:project
)
project
.
update_columns
(
last_repository_check_failed:
true
,
...
...
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