Replace dateFormat with localeDateFormat
What does this MR do and why?
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Replaces formatDate with localeDateFormat.
Also fixes mock errors so that they contain dates
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Apply this patch
diff --git a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue
index fab413403778..73957566258a 100644
--- a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue
+++ b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue
@@ -160,7 +160,6 @@ export default {
},
computed: {
...mapState('list', [
- 'errors',
'loading',
'searchQuery',
'sortField',
@@ -169,6 +168,52 @@ export default {
'statusFilter',
'cursor',
]),
+ errors() {
+ return [
+ {
+ id: '1',
+ title: 'PG::ConnectionBad: FATAL',
+ type: 'error',
+ userCount: 0,
+ count: '52',
+ firstSeen: '2019-05-30T07:21:46Z',
+ lastSeen: '2019-11-06T03:21:39Z',
+ status: 'unresolved',
+ frequency: [
+ ['2019-05-30T07:21:46Z', 1],
+ ['2019-11-06T03:21:39Z', 2],
+ ],
+ },
+ {
+ id: '2',
+ title: 'ActiveRecord::StatementInvalid',
+ type: 'error',
+ userCount: 0,
+ count: '12',
+ firstSeen: '2019-10-19T03:53:56Z',
+ lastSeen: '2019-11-05T03:51:54Z',
+ status: 'unresolved',
+ frequency: [
+ ['2019-10-19T03:53:56Z', 1],
+ ['2019-11-05T03:51:54Z', 2],
+ ],
+ },
+ {
+ id: '3',
+ title: 'Command has failed',
+ type: 'default',
+ userCount: 0,
+ count: '275',
+ firstSeen: '2019-02-12T07:22:36Z',
+ lastSeen: '2019-10-22T03:20:48Z',
+ status: 'unresolved',
+ frequency: [
+ ['2019-02-12T07:22:36Z', 1],
+ ['2019-10-22T03:20:48Z', 2],
+ ],
+ },
+ ];
+ },
paginationRequired() {
return !isEmpty(this.pagination);
},
@@ -284,7 +329,7 @@ export default {
<template>
<div class="error-list">
- <div v-if="errorTrackingEnabled">
+ <div v-if="true">
<!-- Enable ET -->
<gl-alert
v-if="showIntegratedDisabledAlert"
@@ -325,7 +370,7 @@ export default {
:text="__('Recent searches')"
class="filtered-search-history-dropdown-wrapper"
toggle-class="filtered-search-history-dropdown-toggle-button !gl-shadow-none gl-border-r-gray-200! gl-border-1! gl-rounded-0!"
- :disabled="loading"
+ :disabled="false"
>
<div v-if="!$options.hasLocalStorage" class="gl-px-5">
{{ __('This feature requires local storage to be enabled') }}
@@ -349,7 +394,7 @@ export default {
<gl-form-input
v-model="errorSearchQuery"
class="gl-pl-3! filtered-search"
- :disabled="loading"
+ :disabled="false"
:placeholder="__('Search or filter results…')"
autofocus
/>
@@ -372,7 +417,7 @@ export default {
<gl-dropdown
:text="$options.statusFilters[statusFilter]"
class="status-dropdown gl-md-ml-2 gl-md-mr-2 gl-mb-2 gl-md-mb-0"
- :disabled="loading"
+ :disabled="false"
right
>
<gl-dropdown-item
@@ -391,7 +436,7 @@ export default {
</gl-dropdown-item>
</gl-dropdown>
- <gl-dropdown :text="$options.sortFields[sortField]" right :disabled="loading">
+ <gl-dropdown :text="$options.sortFields[sortField]" right :disabled="false">
<gl-dropdown-item
v-for="(label, field) in $options.sortFields"
:key="field"
@@ -409,7 +454,7 @@ export default {
</gl-dropdown>
</div>
- <div v-if="loading" class="gl-py-5">
+ <div v-if="false" class="gl-py-5">
<gl-loading-icon size="lg" />
</div>
@@ -484,7 +529,7 @@ export default {
</template>
</gl-table>
<gl-pagination
- v-show="!loading"
+ v-show="!false"
v-if="paginationRequired"
:prev-page="previousPage"
:next-page="nextPage"
Edited by James Rushford