Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Improves troubleshooting messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Sep 3, 2020
1 parent 8c0695f commit c27cbed
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/app.js": "/app.js?id=fbc4701521cbabffd708",
"/app.css": "/app.css?id=0cb44721a8285bf23fc2"
"/app.js": "/app.js?id=d16d069303c609f663ee",
"/app.css": "/app.css?id=b86433565210152cce12"
}
12 changes: 9 additions & 3 deletions resources/js/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@
</div>
</div>

<div class="mt-3 max-w-2xl text-sm text-gray-700">
It looks like there was an error. Please check your application logs.
<div class="mt-3 text-sm text-gray-700">
<slot name="troubleshooting"> </slot>
</div>
</div>
</template>

<div class="align-middle min-w-full overflow-x-auto shadow overflow-hidden sm:rounded-lg">
<div
v-if="!troubleshooting"
class="align-middle min-w-full overflow-x-auto shadow overflow-hidden sm:rounded-lg"
>
<div class="bg-white min-w-full" v-if="entries.length > 0">
<div
class="px-6 py-3 border-b border-gray-200 bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"
Expand Down Expand Up @@ -161,6 +164,7 @@ export default {
return {
entries: [],
errors: [],
troubleshooting: false,
minutesAgo: null,
searching: true,
cursor: null,
Expand Down Expand Up @@ -271,6 +275,8 @@ export default {
.catch(({ response }) => {
this.searching = false;
this.troubleshooting = true;
throw 'Server error.';
})
.then((data) => {
this.troubleshooting = false;
Expand Down
8 changes: 8 additions & 0 deletions resources/js/screens/jobs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<search>
<template slot="filters" slot-scope="{ filters, loadEntries }"></template>

<template slot="troubleshooting">
<p>It looks like there was an error. Please check your application logs.</p>
<p class="mt-2">
This error is most likely happening because you haven't properly configured "failed jobs" in your
application.
</p>
</template>

<template slot="row" slot-scope="{ entry }">
<td class="max-w-0 w-full px-6 py-4 whitespace-no-wrap text-sm leading-5 text-cool-gray-900">
<div class="ml-4">
Expand Down
8 changes: 8 additions & 0 deletions resources/js/screens/logs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
</div>
</template>

<template slot="troubleshooting">
<p>It looks like there was an error. Please check your application logs.</p>
<p class="mt-2">
Consider searching using a more recent "Starting from" date. The CloudWatch API can have long response
times while searching long in the past. Those requests may timeout, or lead to unexpected errors.
</p>
</template>

<template slot="row" slot-scope="{ entry }">
<td class="max-w-0 w-full px-6 py-4 whitespace-no-wrap text-sm leading-5 text-cool-gray-900">
<div class="ml-4">
Expand Down

0 comments on commit c27cbed

Please sign in to comment.