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
Léo-Paul Géneau
gitlab-ce
Commits
b5b33200
Commit
b5b33200
authored
Apr 27, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add timeago
parent
a922d904
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/assets/javascripts/settings/settings_repository.js
app/assets/javascripts/settings/settings_repository.js
+6
-2
No files found.
app/assets/javascripts/settings/settings_repository.js
View file @
b5b33200
...
...
@@ -28,12 +28,12 @@ export default class SettingsDeployKeys {
</div>
<div class="deploy-key-content">
<span class="key-created-at">
created {{
deployKey.created_at
}}
created {{
timeagoDate
}}
</span>
<div class="visible-xs-block visible-sm-block"></div>
<a v-if="!enabled" class="btn btn-sm prepend-left-10" rel="nofollow" data-method="put" href="enableURL">Enable
</a>
<a v-else-if="deployKey.destroyed_when_orphaned && deployKey.almost_orphaned" class="btn btn-warning btn-sm prepend-left-10" rel="nofollow" data-method="put" :href="
remov
eURL">Remove</a>
<a v-else-if="deployKey.destroyed_when_orphaned && deployKey.almost_orphaned" class="btn btn-warning btn-sm prepend-left-10" rel="nofollow" data-method="put" :href="
disabl
eURL">Remove</a>
<a v-else class="btn btn-warning btn-sm prepend-left-10" rel="nofollow" data-method="put" :href="disableURL">Disable</a>
</div>
</li>`
...
...
@@ -48,6 +48,10 @@ export default class SettingsDeployKeys {
},
computed
:
{
timeagoDate
()
{
return
gl
.
utils
.
getTimeago
().
format
(
this
.
deployKey
.
createdAt
,
'
gl_en
'
);
},
disableURL
()
{
return
self
.
disableEndpoint
.
replace
(
'
:id
'
,
this
.
deployKey
.
id
);
},
...
...
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