summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2019-02-14 17:12:03 +1100
committerSimon Knox <psimyn@gmail.com>2019-02-16 22:43:57 +1100
commit6b13a593d4ef65e500115a2ba803238a38703759 (patch)
treee326ba29d958d5a3932e664b54c584edd6e108d9
parent58f8bd0d91d2378acf3646319ac85165006493df (diff)
downloadgitlab-ce-56275-error-tracking-list-does-not-wrap-contents-in-table-very-well.tar.gz
Prevent error tracking table text from wrapping56275-error-tracking-list-does-not-wrap-contents-in-table-very-well
-rw-r--r--app/assets/javascripts/error_tracking/components/error_tracking_list.vue25
-rw-r--r--changelogs/unreleased/56275-error-tracking-list-does-not-wrap-contents-in-table-very-well.yml5
-rw-r--r--lib/sentry/client.rb3
3 files changed, 29 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 6981afe1ead..a78834a250d 100644
--- a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue
+++ b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue
@@ -68,6 +68,7 @@ export default {
:fields="$options.fields"
:show-empty="true"
:empty-text="__('No errors to display')"
+ class="error-tracking-table"
>
<template slot="HEAD_events" slot-scope="data">
<div class="text-right">{{ data.label }}</div>
@@ -79,12 +80,14 @@ export default {
<div class="d-flex flex-column">
<div class="d-flex">
<gl-link :href="errors.item.externalUrl" class="d-flex text-dark" target="_blank">
- <strong>{{ errors.item.title.trim() }}</strong>
+ <strong class="text-truncate">{{ errors.item.title.trim() }}</strong>
<icon name="external-link" class="ml-1" />
</gl-link>
- <span class="text-secondary ml-2">{{ errors.item.culprit }}</span>
+ <span class="text-secondary text-truncate ml-2">{{ errors.item.culprit }}</span>
+ </div>
+ <div class="text-truncate">
+ {{ errors.item.message || __('No details available') }}
</div>
- {{ errors.item.message || __('No details available') }}
</div>
</template>
@@ -116,3 +119,19 @@ export default {
</div>
</div>
</template>
+
+<style>
+.error-tracking-table th + th,
+.error-tracking-table td + td {
+ width: 80px;
+}
+
+.error-tracking-table th:last-child,
+.error-tracking-table td:last-child {
+ width: 140px;
+}
+
+.error-tracking-table {
+ table-layout: fixed;
+}
+</style>
diff --git a/changelogs/unreleased/56275-error-tracking-list-does-not-wrap-contents-in-table-very-well.yml b/changelogs/unreleased/56275-error-tracking-list-does-not-wrap-contents-in-table-very-well.yml
new file mode 100644
index 00000000000..82e2c289043
--- /dev/null
+++ b/changelogs/unreleased/56275-error-tracking-list-does-not-wrap-contents-in-table-very-well.yml
@@ -0,0 +1,5 @@
+---
+title: Fix mobile layout of error tracking table
+merge_request: 25184
+author:
+type: fixed
diff --git a/lib/sentry/client.rb b/lib/sentry/client.rb
index 4187014d49e..78397fd628e 100644
--- a/lib/sentry/client.rb
+++ b/lib/sentry/client.rb
@@ -100,6 +100,7 @@ module Sentry
frequency = issue.dig('stats', '24h')
message = issue.dig('metadata', 'value')
+ title = issue.dig('metadata', 'type') || issue.fetch('title', nil)
external_url = issue_url(id)
@@ -107,7 +108,7 @@ module Sentry
id: id,
first_seen: issue.fetch('firstSeen', nil),
last_seen: issue.fetch('lastSeen', nil),
- title: issue.fetch('title', nil),
+ title: title,
type: issue.fetch('type', nil),
user_count: issue.fetch('userCount', nil),
count: count,