diff options
| author | Simon Knox <psimyn@gmail.com> | 2018-12-18 21:49:48 +1100 |
|---|---|---|
| committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-07 18:47:34 +0100 |
| commit | 5274af9cdd326e16d5d08f82cf06d4be08b2c950 (patch) | |
| tree | 513e01e225c5a0302c2903c9667c6598ec5f26c0 | |
| parent | ff593da5c663603cd8d0b3a1aebeb1693a35a801 (diff) | |
| download | gitlab-ce-5274af9cdd326e16d5d08f82cf06d4be08b2c950.tar.gz | |
tables
| -rw-r--r-- | app/assets/javascripts/error_tracking/components/error_tracking_list.vue | 23 | ||||
| -rw-r--r-- | app/assets/javascripts/vue_shared/mixins/timeago.js | 2 |
2 files changed, 21 insertions, 4 deletions
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 4da27aa0aab..11dbb030d42 100644 --- a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue +++ b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue @@ -1,16 +1,26 @@ <script> import { mapActions, mapState } from 'vuex'; -import { GlEmptyState, GlButton, GlLoadingIcon, GlErrorList } from '@gitlab/ui'; +import { GlEmptyState, GlButton, GlLoadingIcon, GlTable } from '@gitlab/ui'; import Icon from '~/vue_shared/components/icon.vue'; +import timeagoMixin from '~/vue_shared/mixins/timeago'; export default { + fields: [ + 'error', + 'count', + 'user_count', + { key: 'last_seen', formatter: 'timeFormated' }, + ], components: { GlEmptyState, GlButton, GlLoadingIcon, - GlErrorList, + GlTable, Icon, }, + mixins: [ + timeagoMixin, + ], props: { indexPath: { type: String, @@ -60,7 +70,14 @@ export default { <icon name="external-link" /> </gl-button> </div> - <gl-error-list :errors="errors" /> + <gl-table + :items="errors" + :fields="$options.fields" + > + <template slot="error" slot-scope="errors"> + {{ errors.item.title }} {{ errors.item.culprit }} {{ errors.item.external_url }} + </template> + </gl-table> </div> </div> </div> diff --git a/app/assets/javascripts/vue_shared/mixins/timeago.js b/app/assets/javascripts/vue_shared/mixins/timeago.js index 4e3b9d7b767..eff255a4f94 100644 --- a/app/assets/javascripts/vue_shared/mixins/timeago.js +++ b/app/assets/javascripts/vue_shared/mixins/timeago.js @@ -8,7 +8,7 @@ export default { timeFormated(time) { const timeago = getTimeago(); - return timeago.format(time); + return timeago.format(new Date(time)); }, tooltipTitle(time) { |
