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
65ae7041
Commit
65ae7041
authored
Dec 12, 2019
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix spelling of formatted
Replaces all frontend occurences of formated with formatted
parent
1f487606
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
50 additions
and
50 deletions
+50
-50
app/assets/javascripts/boards/components/issue_due_date.vue
app/assets/javascripts/boards/components/issue_due_date.vue
+2
-2
app/assets/javascripts/deploy_keys/components/key.vue
app/assets/javascripts/deploy_keys/components/key.vue
+1
-1
app/assets/javascripts/error_tracking/components/error_details.vue
...s/javascripts/error_tracking/components/error_details.vue
+2
-2
app/assets/javascripts/ide/components/ide_status_bar.vue
app/assets/javascripts/ide/components/ide_status_bar.vue
+3
-3
app/assets/javascripts/issuable_suggestions/components/item.vue
...sets/javascripts/issuable_suggestions/components/item.vue
+1
-1
app/assets/javascripts/jobs/components/sidebar.vue
app/assets/javascripts/jobs/components/sidebar.vue
+2
-2
app/assets/javascripts/jobs/store/utils.js
app/assets/javascripts/jobs/store/utils.js
+1
-1
app/assets/javascripts/lib/utils/datetime_utility.js
app/assets/javascripts/lib/utils/datetime_utility.js
+3
-3
app/assets/javascripts/mr_popover/components/mr_popover.vue
app/assets/javascripts/mr_popover/components/mr_popover.vue
+1
-1
app/assets/javascripts/pipelines/components/time_ago.vue
app/assets/javascripts/pipelines/components/time_ago.vue
+3
-3
app/assets/javascripts/registry/list/components/table_registry.vue
...s/javascripts/registry/list/components/table_registry.vue
+1
-1
app/assets/javascripts/releases/list/components/release_block.vue
...ts/javascripts/releases/list/components/release_block.vue
+1
-1
app/assets/javascripts/releases/list/components/release_block_footer.vue
...scripts/releases/list/components/release_block_footer.vue
+1
-1
app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_info.vue
..._request_widget/components/deployment/deployment_info.vue
+1
-1
app/assets/javascripts/vue_shared/components/issue/issue_milestone.vue
...vascripts/vue_shared/components/issue/issue_milestone.vue
+2
-2
app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue
...ared/components/sidebar/collapsed_grouped_date_picker.vue
+1
-1
app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
...ts/javascripts/vue_shared/components/time_ago_tooltip.vue
+1
-1
app/assets/javascripts/vue_shared/mixins/related_issuable_mixin.js
...s/javascripts/vue_shared/mixins/related_issuable_mixin.js
+3
-3
app/assets/javascripts/vue_shared/mixins/timeago.js
app/assets/javascripts/vue_shared/mixins/timeago.js
+1
-1
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
...avascripts/design_management/components/toolbar/index.vue
+1
-1
ee/app/assets/javascripts/geo_nodes/components/geo_node_event_status.vue
...avascripts/geo_nodes/components/geo_node_event_status.vue
+1
-1
ee/app/assets/javascripts/geo_nodes/mixins/details_section_mixin.js
...ets/javascripts/geo_nodes/mixins/details_section_mixin.js
+1
-1
ee/app/assets/javascripts/packages/details/components/app.vue
...pp/assets/javascripts/packages/details/components/app.vue
+1
-1
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
...vascripts/related_items_tree/components/state_tooltip.vue
+1
-1
ee/app/assets/javascripts/vue_shared/dashboards/components/time_ago.vue
...javascripts/vue_shared/dashboards/components/time_ago.vue
+1
-1
spec/frontend/environments/environment_item_spec.js
spec/frontend/environments/environment_item_spec.js
+2
-2
spec/frontend/jobs/components/erased_block_spec.js
spec/frontend/jobs/components/erased_block_spec.js
+3
-3
spec/frontend/registry/list/components/table_registry_spec.js
.../frontend/registry/list/components/table_registry_spec.js
+1
-1
spec/frontend/releases/list/components/release_block_footer_spec.js
...end/releases/list/components/release_block_footer_spec.js
+4
-4
spec/frontend/releases/list/components/release_block_spec.js
spec/frontend/releases/list/components/release_block_spec.js
+1
-1
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
...vue_shared/components/issue/related_issuable_item_spec.js
+2
-2
No files found.
app/assets/javascripts/boards/components/issue_due_date.vue
View file @
65ae7041
...
@@ -35,10 +35,10 @@ export default {
...
@@ -35,10 +35,10 @@ export default {
title
()
{
title
()
{
const
timeago
=
getTimeago
();
const
timeago
=
getTimeago
();
const
{
timeDifference
,
standardDateFormat
}
=
this
;
const
{
timeDifference
,
standardDateFormat
}
=
this
;
const
formatedDate
=
standardDateFormat
;
const
format
t
edDate
=
standardDateFormat
;
if
(
timeDifference
>=
-
1
&&
timeDifference
<
7
)
{
if
(
timeDifference
>=
-
1
&&
timeDifference
<
7
)
{
return
`
${
timeago
.
format
(
this
.
issueDueDate
)}
(
${
formatedDate
}
)`
;
return
`
${
timeago
.
format
(
this
.
issueDueDate
)}
(
${
format
t
edDate
}
)`
;
}
}
return
timeago
.
format
(
this
.
issueDueDate
);
return
timeago
.
format
(
this
.
issueDueDate
);
...
...
app/assets/javascripts/deploy_keys/components/key.vue
View file @
65ae7041
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
<div
role=
"rowheader"
class=
"table-mobile-header"
>
{{ __('Created') }}
</div>
<div
role=
"rowheader"
class=
"table-mobile-header"
>
{{ __('Created') }}
</div>
<div
class=
"table-mobile-content text-secondary key-created-at"
>
<div
class=
"table-mobile-content text-secondary key-created-at"
>
<span
v-tooltip
:title=
"tooltipTitle(deployKey.created_at)"
>
<span
v-tooltip
:title=
"tooltipTitle(deployKey.created_at)"
>
<icon
name=
"calendar"
/>
<span>
{{ timeFormated(deployKey.created_at) }}
</span>
<icon
name=
"calendar"
/>
<span>
{{ timeFormat
t
ed(deployKey.created_at) }}
</span>
</span>
</span>
</div>
</div>
</div>
</div>
...
...
app/assets/javascripts/error_tracking/components/error_details.vue
View file @
65ae7041
...
@@ -56,7 +56,7 @@ export default {
...
@@ -56,7 +56,7 @@ export default {
__
(
'
Reported %{timeAgo} by %{reportedBy}
'
),
__
(
'
Reported %{timeAgo} by %{reportedBy}
'
),
{
{
reportedBy
:
`<strong>
${
this
.
error
.
culprit
}
</strong>`
,
reportedBy
:
`<strong>
${
this
.
error
.
culprit
}
</strong>`
,
timeAgo
:
this
.
timeFormated
(
this
.
stacktraceData
.
date_received
),
timeAgo
:
this
.
timeFormat
t
ed
(
this
.
stacktraceData
.
date_received
),
},
},
false
,
false
,
);
);
...
@@ -107,7 +107,7 @@ export default {
...
@@ -107,7 +107,7 @@ export default {
this
.
$refs
.
sentryIssueForm
.
submit
();
this
.
$refs
.
sentryIssueForm
.
submit
();
},
},
formatDate
(
date
)
{
formatDate
(
date
)
{
return
`
${
this
.
timeFormated
(
date
)}
(
${
dateFormat
(
date
,
'
UTC:yyyy-mm-dd h:MM:ssTT Z
'
)}
)`
;
return
`
${
this
.
timeFormat
t
ed
(
date
)}
(
${
dateFormat
(
date
,
'
UTC:yyyy-mm-dd h:MM:ssTT Z
'
)}
)`
;
},
},
},
},
};
};
...
...
app/assets/javascripts/ide/components/ide_status_bar.vue
View file @
65ae7041
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
mixins
:
[
timeAgoMixin
],
mixins
:
[
timeAgoMixin
],
data
()
{
data
()
{
return
{
return
{
lastCommitFormatedAge
:
null
,
lastCommitFormat
t
edAge
:
null
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
},
},
commitAgeUpdate
()
{
commitAgeUpdate
()
{
if
(
this
.
lastCommit
)
{
if
(
this
.
lastCommit
)
{
this
.
lastCommitFormat
edAge
=
this
.
timeForma
ted
(
this
.
lastCommit
.
committed_date
);
this
.
lastCommitFormat
tedAge
=
this
.
timeFormat
ted
(
this
.
lastCommit
.
committed_date
);
}
}
},
},
getCommitPath
(
shortSha
)
{
getCommitPath
(
shortSha
)
{
...
@@ -118,7 +118,7 @@ export default {
...
@@ -118,7 +118,7 @@ export default {
:title=
"tooltipTitle(lastCommit.committed_date)"
:title=
"tooltipTitle(lastCommit.committed_date)"
data-placement=
"top"
data-placement=
"top"
data-container=
"body"
data-container=
"body"
>
{{
lastCommitFormatedAge
}}
</time
>
{{
lastCommitFormat
t
edAge
}}
</time
>
>
</div>
</div>
<ide-status-list
class=
"ml-auto"
/>
<ide-status-list
class=
"ml-auto"
/>
...
...
app/assets/javascripts/issuable_suggestions/components/item.vue
View file @
65ae7041
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
/>
/>
<gl-tooltip
:target=
"() => $refs.state"
placement=
"bottom"
>
<gl-tooltip
:target=
"() => $refs.state"
placement=
"bottom"
>
<span
class=
"d-block"
>
<span
class=
"d-block"
>
<span
class=
"bold"
>
{{
stateTitle
}}
</span>
{{
timeFormated
(
closedOrCreatedDate
)
}}
<span
class=
"bold"
>
{{
stateTitle
}}
</span>
{{
timeFormat
t
ed
(
closedOrCreatedDate
)
}}
</span>
</span>
<span
class=
"text-tertiary"
>
{{
tooltipTitle
(
closedOrCreatedDate
)
}}
</span>
<span
class=
"text-tertiary"
>
{{
tooltipTitle
(
closedOrCreatedDate
)
}}
</span>
</gl-tooltip>
</gl-tooltip>
...
...
app/assets/javascripts/jobs/components/sidebar.vue
View file @
65ae7041
...
@@ -168,13 +168,13 @@ export default {
...
@@ -168,13 +168,13 @@ export default {
/>
/>
<detail-row
<detail-row
v-if=
"job.finished_at"
v-if=
"job.finished_at"
:value=
"timeFormated(job.finished_at)"
:value=
"timeFormat
t
ed(job.finished_at)"
class=
"js-job-finished"
class=
"js-job-finished"
title=
"Finished"
title=
"Finished"
/>
/>
<detail-row
<detail-row
v-if=
"job.erased_at"
v-if=
"job.erased_at"
:value=
"timeFormated(job.erased_at)"
:value=
"timeFormat
t
ed(job.erased_at)"
class=
"js-job-erased"
class=
"js-job-erased"
title=
"Erased"
title=
"Erased"
/>
/>
...
...
app/assets/javascripts/jobs/store/utils.js
View file @
65ae7041
...
@@ -114,7 +114,7 @@ export const logLinesParser = (lines = [], accumulator = []) =>
...
@@ -114,7 +114,7 @@ export const logLinesParser = (lines = [], accumulator = []) =>
acc
.
push
(
parseHeaderLine
(
line
,
lineNumber
));
acc
.
push
(
parseHeaderLine
(
line
,
lineNumber
));
}
else
if
(
isCollapsibleSection
(
acc
,
last
,
line
))
{
}
else
if
(
isCollapsibleSection
(
acc
,
last
,
line
))
{
// if the object belongs to a nested section, we append it to the new `lines` array of the
// if the object belongs to a nested section, we append it to the new `lines` array of the
// previously formated header
// previously format
t
ed header
last
.
lines
.
push
(
parseLine
(
line
,
lineNumber
));
last
.
lines
.
push
(
parseLine
(
line
,
lineNumber
));
}
else
if
(
line
.
section_duration
)
{
}
else
if
(
line
.
section_duration
)
{
// if the line has section_duration, we look for the correct header to add it
// if the line has section_duration, we look for the correct header to add it
...
...
app/assets/javascripts/lib/utils/datetime_utility.js
View file @
65ae7041
...
@@ -447,7 +447,7 @@ export const parsePikadayDate = dateString => {
...
@@ -447,7 +447,7 @@ export const parsePikadayDate = dateString => {
/**
/**
* Used `onSelect` method in pickaday
* Used `onSelect` method in pickaday
* @param {Date} date UTC format
* @param {Date} date UTC format
* @return {String} Date formated in yyyy-mm-dd
* @return {String} Date format
t
ed in yyyy-mm-dd
*/
*/
export
const
pikadayToString
=
date
=>
{
export
const
pikadayToString
=
date
=>
{
const
day
=
pad
(
date
.
getDate
());
const
day
=
pad
(
date
.
getDate
());
...
@@ -513,8 +513,8 @@ export const stringifyTime = (timeObject, fullNameFormat = false) => {
...
@@ -513,8 +513,8 @@ export const stringifyTime = (timeObject, fullNameFormat = false) => {
if
(
fullNameFormat
&&
isNonZero
)
{
if
(
fullNameFormat
&&
isNonZero
)
{
// Remove traling 's' if unit value is singular
// Remove traling 's' if unit value is singular
const
formatedUnitName
=
unitValue
>
1
?
unitName
:
unitName
.
replace
(
/s$/
,
''
);
const
format
t
edUnitName
=
unitValue
>
1
?
unitName
:
unitName
.
replace
(
/s$/
,
''
);
return
`
${
memo
}
${
unitValue
}
${
formatedUnitName
}
`
;
return
`
${
memo
}
${
unitValue
}
${
format
t
edUnitName
}
`
;
}
}
return
isNonZero
?
`
${
memo
}
${
unitValue
}${
unitName
.
charAt
(
0
)}
`
:
memo
;
return
isNonZero
?
`
${
memo
}
${
unitValue
}${
unitName
.
charAt
(
0
)}
`
:
memo
;
...
...
app/assets/javascripts/mr_popover/components/mr_popover.vue
View file @
65ae7041
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
return
this
.
mergeRequest
.
headPipeline
&&
this
.
mergeRequest
.
headPipeline
.
detailedStatus
;
return
this
.
mergeRequest
.
headPipeline
&&
this
.
mergeRequest
.
headPipeline
.
detailedStatus
;
},
},
formattedTime
()
{
formattedTime
()
{
return
this
.
timeFormated
(
this
.
mergeRequest
.
createdAt
);
return
this
.
timeFormat
t
ed
(
this
.
mergeRequest
.
createdAt
);
},
},
statusBoxClass
()
{
statusBoxClass
()
{
switch
(
this
.
mergeRequest
.
state
)
{
switch
(
this
.
mergeRequest
.
state
)
{
...
...
app/assets/javascripts/pipelines/components/time_ago.vue
View file @
65ae7041
...
@@ -31,7 +31,7 @@ export default {
...
@@ -31,7 +31,7 @@ export default {
hasFinishedTime
()
{
hasFinishedTime
()
{
return
this
.
finishedTime
!==
''
;
return
this
.
finishedTime
!==
''
;
},
},
durationFormated
()
{
durationFormat
t
ed
()
{
const
date
=
new
Date
(
this
.
duration
*
1000
);
const
date
=
new
Date
(
this
.
duration
*
1000
);
let
hh
=
date
.
getUTCHours
();
let
hh
=
date
.
getUTCHours
();
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
<div
class=
"table-mobile-header"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Duration
'
)
}}
</div>
<div
class=
"table-mobile-header"
role=
"rowheader"
>
{{
s__
(
'
Pipeline|Duration
'
)
}}
</div>
<div
class=
"table-mobile-content"
>
<div
class=
"table-mobile-content"
>
<p
v-if=
"hasDuration"
class=
"duration"
>
<p
v-if=
"hasDuration"
class=
"duration"
>
<span
v-html=
"iconTimerSvg"
>
</span>
{{
durationFormated
}}
<span
v-html=
"iconTimerSvg"
>
</span>
{{
durationFormat
t
ed
}}
</p>
</p>
<p
v-if=
"hasFinishedTime"
class=
"finished-at d-none d-sm-none d-md-block"
>
<p
v-if=
"hasFinishedTime"
class=
"finished-at d-none d-sm-none d-md-block"
>
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
data-placement=
"top"
data-placement=
"top"
data-container=
"body"
data-container=
"body"
>
>
{{
timeFormated
(
finishedTime
)
}}
{{
timeFormat
t
ed
(
finishedTime
)
}}
</time>
</time>
</p>
</p>
</div>
</div>
...
...
app/assets/javascripts/registry/list/components/table_registry.vue
View file @
65ae7041
...
@@ -247,7 +247,7 @@ export default {
...
@@ -247,7 +247,7 @@ export default {
<td>
<td>
<span
v-gl-tooltip
.
bottom
:title=
"tooltipTitle(item.createdAt)"
>
{{
<span
v-gl-tooltip
.
bottom
:title=
"tooltipTitle(item.createdAt)"
>
{{
timeFormated(item.createdAt)
timeFormat
t
ed(item.createdAt)
}}
</span>
}}
</span>
</td>
</td>
...
...
app/assets/javascripts/releases/list/components/release_block.vue
View file @
65ae7041
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
},
},
releasedTimeAgo
()
{
releasedTimeAgo
()
{
return
sprintf
(
__
(
'
released %{time}
'
),
{
return
sprintf
(
__
(
'
released %{time}
'
),
{
time
:
this
.
timeFormated
(
this
.
release
.
released_at
),
time
:
this
.
timeFormat
t
ed
(
this
.
release
.
released_at
),
});
});
},
},
userImageAltDescription
()
{
userImageAltDescription
()
{
...
...
app/assets/javascripts/releases/list/components/release_block_footer.vue
View file @
65ae7041
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
},
},
computed
:
{
computed
:
{
releasedAtTimeAgo
()
{
releasedAtTimeAgo
()
{
return
this
.
timeFormated
(
this
.
releasedAt
);
return
this
.
timeFormat
t
ed
(
this
.
releasedAt
);
},
},
userImageAltDescription
()
{
userImageAltDescription
()
{
return
this
.
author
&&
this
.
author
.
username
return
this
.
author
&&
this
.
author
.
username
...
...
app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_info.vue
View file @
65ae7041
...
@@ -41,7 +41,7 @@ export default {
...
@@ -41,7 +41,7 @@ export default {
},
},
computed
:
{
computed
:
{
deployTimeago
()
{
deployTimeago
()
{
return
this
.
timeFormated
(
this
.
deployment
.
deployed_at
);
return
this
.
timeFormat
t
ed
(
this
.
deployment
.
deployed_at
);
},
},
deployedText
()
{
deployedText
()
{
return
this
.
$options
.
deployedTextMap
[
this
.
computedDeploymentStatus
];
return
this
.
$options
.
deployedTextMap
[
this
.
computedDeploymentStatus
];
...
...
app/assets/javascripts/vue_shared/components/issue/issue_milestone.vue
View file @
65ae7041
...
@@ -54,7 +54,7 @@ export default {
...
@@ -54,7 +54,7 @@ export default {
return
timeFor
(
return
timeFor
(
this
.
milestoneDue
,
this
.
milestoneDue
,
sprintf
(
__
(
'
Expired %{expiredOn}
'
),
{
sprintf
(
__
(
'
Expired %{expiredOn}
'
),
{
expiredOn
:
this
.
timeFormated
(
this
.
milestoneDue
),
expiredOn
:
this
.
timeFormat
t
ed
(
this
.
milestoneDue
),
}),
}),
);
);
}
}
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
return
sprintf
(
return
sprintf
(
this
.
isMilestoneStarted
?
__
(
'
Started %{startsIn}
'
)
:
__
(
'
Starts %{startsIn}
'
),
this
.
isMilestoneStarted
?
__
(
'
Started %{startsIn}
'
)
:
__
(
'
Starts %{startsIn}
'
),
{
{
startsIn
:
this
.
timeFormated
(
this
.
milestoneStart
),
startsIn
:
this
.
timeFormat
t
ed
(
this
.
milestoneStart
),
},
},
);
);
}
}
...
...
app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue
View file @
65ae7041
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
tooltipText
(
dateType
=
'
min
'
)
{
tooltipText
(
dateType
=
'
min
'
)
{
const
defaultText
=
dateType
===
'
min
'
?
__
(
'
Start date
'
)
:
__
(
'
Due date
'
);
const
defaultText
=
dateType
===
'
min
'
?
__
(
'
Start date
'
)
:
__
(
'
Due date
'
);
const
date
=
this
[
`
${
dateType
}
Date`
];
const
date
=
this
[
`
${
dateType
}
Date`
];
const
timeAgo
=
dateType
===
'
min
'
?
this
.
timeFormated
(
date
)
:
timeFor
(
date
);
const
timeAgo
=
dateType
===
'
min
'
?
this
.
timeFormat
t
ed
(
date
)
:
timeFor
(
date
);
const
dateText
=
date
?
[
this
.
dateText
(
dateType
),
`(
${
timeAgo
}
)`
].
join
(
'
'
)
:
''
;
const
dateText
=
date
?
[
this
.
dateText
(
dateType
),
`(
${
timeAgo
}
)`
].
join
(
'
'
)
:
''
;
if
(
date
)
{
if
(
date
)
{
...
...
app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
View file @
65ae7041
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
v-gl-tooltip.viewport=
"
{ placement: tooltipPlacement }"
v-gl-tooltip.viewport=
"
{ placement: tooltipPlacement }"
:class="cssClass"
:class="cssClass"
:title="tooltipTitle(time)"
:title="tooltipTitle(time)"
v-text="timeFormated(time)"
v-text="timeFormat
t
ed(time)"
>
>
</time>
</time>
</
template
>
</
template
>
app/assets/javascripts/vue_shared/mixins/related_issuable_mixin.js
View file @
65ae7041
...
@@ -159,7 +159,7 @@ const mixins = {
...
@@ -159,7 +159,7 @@ const mixins = {
return
this
.
displayReference
.
split
(
this
.
pathIdSeparator
).
pop
();
return
this
.
displayReference
.
split
(
this
.
pathIdSeparator
).
pop
();
},
},
createdAtInWords
()
{
createdAtInWords
()
{
return
this
.
createdAt
?
this
.
timeFormated
(
this
.
createdAt
)
:
''
;
return
this
.
createdAt
?
this
.
timeFormat
t
ed
(
this
.
createdAt
)
:
''
;
},
},
createdAtTimestamp
()
{
createdAtTimestamp
()
{
return
this
.
createdAt
?
formatDate
(
new
Date
(
this
.
createdAt
))
:
''
;
return
this
.
createdAt
?
formatDate
(
new
Date
(
this
.
createdAt
))
:
''
;
...
@@ -168,10 +168,10 @@ const mixins = {
...
@@ -168,10 +168,10 @@ const mixins = {
return
this
.
mergedAt
?
formatDate
(
new
Date
(
this
.
mergedAt
))
:
''
;
return
this
.
mergedAt
?
formatDate
(
new
Date
(
this
.
mergedAt
))
:
''
;
},
},
mergedAtInWords
()
{
mergedAtInWords
()
{
return
this
.
mergedAt
?
this
.
timeFormated
(
this
.
mergedAt
)
:
''
;
return
this
.
mergedAt
?
this
.
timeFormat
t
ed
(
this
.
mergedAt
)
:
''
;
},
},
closedAtInWords
()
{
closedAtInWords
()
{
return
this
.
closedAt
?
this
.
timeFormated
(
this
.
closedAt
)
:
''
;
return
this
.
closedAt
?
this
.
timeFormat
t
ed
(
this
.
closedAt
)
:
''
;
},
},
closedAtTimestamp
()
{
closedAtTimestamp
()
{
return
this
.
closedAt
?
formatDate
(
new
Date
(
this
.
closedAt
))
:
''
;
return
this
.
closedAt
?
formatDate
(
new
Date
(
this
.
closedAt
))
:
''
;
...
...
app/assets/javascripts/vue_shared/mixins/timeago.js
View file @
65ae7041
...
@@ -5,7 +5,7 @@ import { formatDate, getTimeago } from '../../lib/utils/datetime_utility';
...
@@ -5,7 +5,7 @@ import { formatDate, getTimeago } from '../../lib/utils/datetime_utility';
*/
*/
export
default
{
export
default
{
methods
:
{
methods
:
{
timeFormated
(
time
)
{
timeFormat
t
ed
(
time
)
{
const
timeago
=
getTimeago
();
const
timeago
=
getTimeago
();
return
timeago
.
format
(
time
);
return
timeago
.
format
(
time
);
...
...
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
View file @
65ae7041
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
computed
:
{
computed
:
{
updatedText
()
{
updatedText
()
{
return
sprintf
(
__
(
'
Updated %{updated_at} by %{updated_by}
'
),
{
return
sprintf
(
__
(
'
Updated %{updated_at} by %{updated_by}
'
),
{
updated_at
:
this
.
timeFormated
(
this
.
updatedAt
),
updated_at
:
this
.
timeFormat
t
ed
(
this
.
updatedAt
),
updated_by
:
this
.
updatedBy
.
name
,
updated_by
:
this
.
updatedBy
.
name
,
});
});
},
},
...
...
ee/app/assets/javascripts/geo_nodes/components/geo_node_event_status.vue
View file @
65ae7041
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
class=
"event-status-timestamp"
class=
"event-status-timestamp"
data-placement=
"bottom"
data-placement=
"bottom"
>
>
(
{{
timeFormated
(
timeStamp
)
}}
)
(
{{
timeFormat
t
ed
(
timeStamp
)
}}
)
</span>
</span>
</
template
>
</
template
>
<strong
v-else
>
{{ __('Not available') }}
</strong>
<strong
v-else
>
{{ __('Not available') }}
</strong>
...
...
ee/app/assets/javascripts/geo_nodes/mixins/details_section_mixin.js
View file @
65ae7041
...
@@ -13,7 +13,7 @@ export default {
...
@@ -13,7 +13,7 @@ export default {
},
},
statusInfoStaleMessage
()
{
statusInfoStaleMessage
()
{
return
sprintf
(
s__
(
'
GeoNodes|Data is out of date from %{timeago}
'
),
{
return
sprintf
(
s__
(
'
GeoNodes|Data is out of date from %{timeago}
'
),
{
timeago
:
this
.
timeFormated
(
this
.
nodeDetails
.
statusCheckTimestamp
),
timeago
:
this
.
timeFormat
t
ed
(
this
.
nodeDetails
.
statusCheckTimestamp
),
});
});
},
},
},
},
...
...
ee/app/assets/javascripts/packages/details/components/app.vue
View file @
65ae7041
...
@@ -257,7 +257,7 @@ export default {
...
@@ -257,7 +257,7 @@ export default {
<
template
#created=
"items"
>
<
template
#created=
"items"
>
<span
v-gl-tooltip
:title=
"tooltipTitle(items.item.created)"
>
{{
<span
v-gl-tooltip
:title=
"tooltipTitle(items.item.created)"
>
{{
timeFormated
(
items
.
item
.
created
)
timeFormat
t
ed
(
items
.
item
.
created
)
}}
</span>
}}
</span>
</
template
>
</
template
>
</gl-table>
</gl-table>
...
...
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
View file @
65ae7041
...
@@ -60,7 +60,7 @@ export default {
...
@@ -60,7 +60,7 @@ export default {
return
rawTimestamp
?
formatDate
(
new
Date
(
rawTimestamp
))
:
''
;
return
rawTimestamp
?
formatDate
(
new
Date
(
rawTimestamp
))
:
''
;
},
},
getTimestampInWords
(
rawTimestamp
)
{
getTimestampInWords
(
rawTimestamp
)
{
return
rawTimestamp
?
this
.
timeFormated
(
rawTimestamp
)
:
''
;
return
rawTimestamp
?
this
.
timeFormat
t
ed
(
rawTimestamp
)
:
''
;
},
},
},
},
};
};
...
...
ee/app/assets/javascripts/vue_shared/dashboards/components/time_ago.vue
View file @
65ae7041
...
@@ -26,7 +26,7 @@ export default {
...
@@ -26,7 +26,7 @@ export default {
return
this
.
tooltipTitle
(
this
.
time
);
return
this
.
tooltipTitle
(
this
.
time
);
},
},
formattedTime
()
{
formattedTime
()
{
return
this
.
timeFormated
(
this
.
time
);
return
this
.
timeFormat
t
ed
(
this
.
time
);
},
},
},
},
};
};
...
...
spec/frontend/environments/environment_item_spec.js
View file @
65ae7041
...
@@ -45,9 +45,9 @@ describe('Environment item', () => {
...
@@ -45,9 +45,9 @@ describe('Environment item', () => {
});
});
it
(
'
should render last deployment date
'
,
()
=>
{
it
(
'
should render last deployment date
'
,
()
=>
{
const
formatedDate
=
format
(
environment
.
last_deployment
.
deployed_at
);
const
format
t
edDate
=
format
(
environment
.
last_deployment
.
deployed_at
);
expect
(
wrapper
.
find
(
'
.environment-created-date-timeago
'
).
text
()).
toContain
(
formatedDate
);
expect
(
wrapper
.
find
(
'
.environment-created-date-timeago
'
).
text
()).
toContain
(
format
t
edDate
);
});
});
describe
(
'
With user information
'
,
()
=>
{
describe
(
'
With user information
'
,
()
=>
{
...
...
spec/frontend/jobs/components/erased_block_spec.js
View file @
65ae7041
...
@@ -8,7 +8,7 @@ describe('Erased block', () => {
...
@@ -8,7 +8,7 @@ describe('Erased block', () => {
const
erasedAt
=
'
2016-11-07T11:11:16.525Z
'
;
const
erasedAt
=
'
2016-11-07T11:11:16.525Z
'
;
const
timeago
=
getTimeago
();
const
timeago
=
getTimeago
();
const
formatedDate
=
timeago
.
format
(
erasedAt
);
const
format
t
edDate
=
timeago
.
format
(
erasedAt
);
const
createComponent
=
props
=>
{
const
createComponent
=
props
=>
{
wrapper
=
mount
(
ErasedBlock
,
{
wrapper
=
mount
(
ErasedBlock
,
{
...
@@ -41,7 +41,7 @@ describe('Erased block', () => {
...
@@ -41,7 +41,7 @@ describe('Erased block', () => {
});
});
it
(
'
renders erasedAt
'
,
()
=>
{
it
(
'
renders erasedAt
'
,
()
=>
{
expect
(
wrapper
.
text
().
trim
()).
toContain
(
formatedDate
);
expect
(
wrapper
.
text
().
trim
()).
toContain
(
format
t
edDate
);
});
});
});
});
...
@@ -57,7 +57,7 @@ describe('Erased block', () => {
...
@@ -57,7 +57,7 @@ describe('Erased block', () => {
});
});
it
(
'
renders erasedAt
'
,
()
=>
{
it
(
'
renders erasedAt
'
,
()
=>
{
expect
(
wrapper
.
text
().
trim
()).
toContain
(
formatedDate
);
expect
(
wrapper
.
text
().
trim
()).
toContain
(
format
t
edDate
);
});
});
});
});
});
});
spec/frontend/registry/list/components/table_registry_spec.js
View file @
65ae7041
...
@@ -68,7 +68,7 @@ describe('table registry', () => {
...
@@ -68,7 +68,7 @@ describe('table registry', () => {
expect
(
tds
.
at
(
2
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
shortRevision
);
expect
(
tds
.
at
(
2
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
shortRevision
);
expect
(
tds
.
at
(
3
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
layers
);
expect
(
tds
.
at
(
3
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
layers
);
expect
(
tds
.
at
(
3
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
size
);
expect
(
tds
.
at
(
3
).
html
()).
toContain
(
repoPropsData
.
list
[
0
].
size
);
expect
(
tds
.
at
(
4
).
html
()).
toContain
(
wrapper
.
vm
.
timeFormated
(
repoPropsData
.
list
[
0
].
createdAt
));
expect
(
tds
.
at
(
4
).
html
()).
toContain
(
wrapper
.
vm
.
timeFormat
t
ed
(
repoPropsData
.
list
[
0
].
createdAt
));
});
});
it
(
'
should have a label called Image ID
'
,
()
=>
{
it
(
'
should have a label called Image ID
'
,
()
=>
{
...
...
spec/frontend/releases/list/components/release_block_footer_spec.js
View file @
65ae7041
...
@@ -8,8 +8,8 @@ import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
...
@@ -8,8 +8,8 @@ import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
jest
.
mock
(
'
~/vue_shared/mixins/timeago
'
,
()
=>
({
jest
.
mock
(
'
~/vue_shared/mixins/timeago
'
,
()
=>
({
methods
:
{
methods
:
{
timeFormated
()
{
timeFormat
t
ed
()
{
return
'
7 fortnight
e
s ago
'
;
return
'
7 fortnights ago
'
;
},
},
tooltipTitle
()
{
tooltipTitle
()
{
return
'
February 30, 2401
'
;
return
'
February 30, 2401
'
;
...
@@ -82,7 +82,7 @@ describe('Release block footer', () => {
...
@@ -82,7 +82,7 @@ describe('Release block footer', () => {
it
(
'
renders the author and creation time info
'
,
()
=>
{
it
(
'
renders the author and creation time info
'
,
()
=>
{
expect
(
trimText
(
authorDateInfoSection
().
text
())).
toBe
(
expect
(
trimText
(
authorDateInfoSection
().
text
())).
toBe
(
`Created 7 fortnight
e
s ago by
${
releaseClone
.
author
.
username
}
`
,
`Created 7 fortnights ago by
${
releaseClone
.
author
.
username
}
`
,
);
);
});
});
...
@@ -139,7 +139,7 @@ describe('Release block footer', () => {
...
@@ -139,7 +139,7 @@ describe('Release block footer', () => {
beforeEach
(()
=>
factory
({
author
:
undefined
}));
beforeEach
(()
=>
factory
({
author
:
undefined
}));
it
(
'
renders the release date without the author name
'
,
()
=>
{
it
(
'
renders the release date without the author name
'
,
()
=>
{
expect
(
trimText
(
authorDateInfoSection
().
text
())).
toBe
(
'
Created 7 fortnight
e
s ago
'
);
expect
(
trimText
(
authorDateInfoSection
().
text
())).
toBe
(
'
Created 7 fortnights ago
'
);
});
});
});
});
...
...
spec/frontend/releases/list/components/release_block_spec.js
View file @
65ae7041
...
@@ -68,7 +68,7 @@ describe('Release block', () => {
...
@@ -68,7 +68,7 @@ describe('Release block', () => {
});
});
it
(
'
renders release date
'
,
()
=>
{
it
(
'
renders release date
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
timeagoMixin
.
methods
.
timeFormated
(
release
.
released_at
));
expect
(
wrapper
.
text
()).
toContain
(
timeagoMixin
.
methods
.
timeFormat
t
ed
(
release
.
released_at
));
});
});
it
(
'
renders number of assets provided
'
,
()
=>
{
it
(
'
renders number of assets provided
'
,
()
=>
{
...
...
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
View file @
65ae7041
...
@@ -90,11 +90,11 @@ describe('RelatedIssuableItem', () => {
...
@@ -90,11 +90,11 @@ describe('RelatedIssuableItem', () => {
it
(
'
renders state title
'
,
()
=>
{
it
(
'
renders state title
'
,
()
=>
{
const
stateTitle
=
tokenState
.
attributes
(
'
title
'
);
const
stateTitle
=
tokenState
.
attributes
(
'
title
'
);
const
formatedCreateDate
=
formatDate
(
props
.
createdAt
);
const
format
t
edCreateDate
=
formatDate
(
props
.
createdAt
);
expect
(
stateTitle
).
toContain
(
'
<span class="bold">Opened</span>
'
);
expect
(
stateTitle
).
toContain
(
'
<span class="bold">Opened</span>
'
);
expect
(
stateTitle
).
toContain
(
`<span class="text-tertiary">
${
formatedCreateDate
}
</span>`
);
expect
(
stateTitle
).
toContain
(
`<span class="text-tertiary">
${
format
t
edCreateDate
}
</span>`
);
});
});
it
(
'
renders aria label
'
,
()
=>
{
it
(
'
renders aria label
'
,
()
=>
{
...
...
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