Added static batch errors to error debug

refs. https://github.com/TryGhost/Team/issues/2327

- the batch errors tab content was just a placeholder, this adds static version to be able to test and wire it in
This commit is contained in:
Peter Zimon 2022-12-01 17:28:50 +01:00
parent 0182965aa3
commit a51f3a124d
3 changed files with 285 additions and 14 deletions

View File

@ -3230,16 +3230,20 @@ p.theme-validation-details {
}
.gh-email-debug .gh-list {
display: block;
border-bottom: none;
}
.gh-email-debug .gh-list thead,
.gh-email-debug .gh-list tbody {
width: 100%;
}
.gh-email-debug .gh-list tr:first-of-type .gh-list-data {
border-top: none;
}
.gh-email-debug-permanent-failures .gh-list-data {
vertical-align: top;
.gh-email-debug .gh-list tr .gh-list-data:first-of-type {
padding-left: 0;
}
.gh-email-debug-col-member {
@ -3279,5 +3283,93 @@ p.theme-validation-details {
.gh-email-debug-failure-code span {
color: var(--darkgrey);
font-weight: 600;
font-weight: 500;
}
.gh-email-debug .gh-list-data {
height: 98px;
}
.gh-email-debug-batch-col-status span {
display: inline-block;
position: relative;
padding-left: 16px;
color: var(--midlightgrey);
}
.gh-email-debug-batch-col-status span::before {
display: block;
position: absolute;
content: "";
top: 6px;
left: 0;
width: 8px;
height: 8px;
border-radius: 999px;
background: var(--midlightgrey);
}
.gh-email-debug-batch-col-status .failed {
color: var(--red);
}
.gh-email-debug-batch-col-status .failed::before {
background: var(--red);
}
.gh-email-debug-batch-col-status .submitting {
color: var(--blue);
}
.gh-email-debug-batch-col-status .submitting::before {
background: var(--blue);
}
.gh-email-debug-batch-col-status .submitted {
color: var(--green);
}
.gh-email-debug-batch-col-status .submitted::before {
background: var(--green);
}
.gh-email-debug-batch-col-created,
.gh-email-debug-batch-col-details {
color: var(--midgrey);
}
.gh-email-debug-batch-col-created span,
.gh-email-debug-batch-col-segment span {
white-space: nowrap;
}
.gh-email-debug-batch-col-details .detailtext div {
word-break: break-all;
}
.gh-email-debug-batch-col-segment span {
display: inline-block;
border-radius: 2px;
background: color-mod(var(--black) a(5%));
padding: 1px 6px;
color: var(--middarkgrey);
}
.gh-email-debug-batch-col-details span {
color: var(--darkgrey);
font-weight: 500;
}
.gh-email-debug-batch-col-details .download-icon {
width: 20px;
height: 20px;
margin-left: 20px;
}
.gh-email-debug-batch-col-details .download-icon path {
stroke: var(--midgrey);
}
.gh-email-debug-batch-col-details .detailtext {
flex-grow: 1;
}

View File

@ -79,15 +79,70 @@
</div>
<div class="gh-list-data gh-email-debug-col-failure">
<div class="gh-email-debug-failure">
{{!-- <div> --}}
{{!-- {{svg-jar "warning-stroke"}} --}}
{{!-- </div> --}}
<div class="gh-email-debug-failure-details">
<div class="gh-email-debug-failure-codes">
<span class="gh-email-debug-failure-code">Failure code: <span>402</span></span>
<span class="gh-email-debug-failure-code">Enhanced code: <span>4.2.2</span></span>
</div>
<span class="gh-email-debug-failure-description"><code>The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
<span class="gh-email-debug-failure-description"><code>4.2.2 The email account that you tried to reach is over quota. Please direct\n4.2.2 the recipient to\n4.2.2 https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-col-member">
<div class="gh-email-debug-member">
<figure class="gh-member-gravatar w9 h9 mr3 flex-shrink-0 bg-red">
<div class="gh-member-initials flex w9 h9 items-center justify-center br-100">
<span class="gh-member-avatar-label gh-member-list-avatar">PD</span>
</div>
{{#if this.avatarImage}}
<img class="gh-member-avatar-image" src="{{this.avatarImage}}" alt="{{or @member.name @member.email}}" />
{{/if}}
</figure>
<div>
<h3 class="ma0 pa0 gh-members-list-name">Permanent Dude</h3>
<p class="ma0 pa0 middarkgrey f8 gh-members-list-email">dude@whofails.com</p>
</div>
</div>
</div>
<div class="gh-list-data gh-email-debug-col-failure">
<div class="gh-email-debug-failure">
<div class="gh-email-debug-failure-details">
<div class="gh-email-debug-failure-codes">
<span class="gh-email-debug-failure-code">Failure code: <span>402</span></span>
<span class="gh-email-debug-failure-code">Enhanced code: <span>4.2.2</span></span>
</div>
<span class="gh-email-debug-failure-description"><code>4.2.2 The email account that you tried to reach is over quota. Please direct\n4.2.2 the recipient to\n - gsmtp</code></span>
</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-col-member">
<div class="gh-email-debug-member">
<figure class="gh-member-gravatar w9 h9 mr3 flex-shrink-0 bg-red">
<div class="gh-member-initials flex w9 h9 items-center justify-center br-100">
<span class="gh-member-avatar-label gh-member-list-avatar">PD</span>
</div>
{{#if this.avatarImage}}
<img class="gh-member-avatar-image" src="{{this.avatarImage}}" alt="{{or @member.name @member.email}}" />
{{/if}}
</figure>
<div>
<h3 class="ma0 pa0 gh-members-list-name">Permanent Dude</h3>
<p class="ma0 pa0 middarkgrey f8 gh-members-list-email">dude@whofails.com</p>
</div>
</div>
</div>
<div class="gh-list-data gh-email-debug-col-failure">
<div class="gh-email-debug-failure">
<div class="gh-email-debug-failure-details">
<div class="gh-email-debug-failure-codes">
<span class="gh-email-debug-failure-code">Failure code: <span>402</span></span>
<span class="gh-email-debug-failure-code">Enhanced code: <span>4.2.2</span></span>
</div>
<span class="gh-email-debug-failure-description"><code>4.2.2 The email account that you tried to reach is over quota. Please direct\n4.2.2 the recipient to\n4.2.2 https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
</div>
</div>
</div>
@ -123,15 +178,41 @@
</div>
<div class="gh-list-data gh-email-debug-col-failure">
<div class="gh-email-debug-failure">
{{!-- <div> --}}
{{!-- {{svg-jar "warning-stroke"}} --}}
{{!-- </div> --}}
<div class="gh-email-debug-failure-details">
<div class="gh-email-debug-failure-codes">
<span class="gh-email-debug-failure-code">Failure code: <span>402</span></span>
<span class="gh-email-debug-failure-code">Enhanced code: <span>4.2.2</span></span>
</div>
<span class="gh-email-debug-failure-description"><code>The email account that you tried to reach is over quota. Please direct the recipient to https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
<span class="gh-email-debug-failure-description"><code>4.2.2 The email account that you tried to reach is over quota. Please direct\n4.2.2 the recipient to\n4.2.2 https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-col-member">
<div class="gh-email-debug-member">
<figure class="gh-member-gravatar w9 h9 mr3 flex-shrink-0 bg-purple">
<div class="gh-member-initials flex w9 h9 items-center justify-center br-100">
<span class="gh-member-avatar-label gh-member-list-avatar">TD</span>
</div>
{{#if this.avatarImage}}
<img class="gh-member-avatar-image" src="{{this.avatarImage}}" alt="{{or @member.name @member.email}}" />
{{/if}}
</figure>
<div>
<h3 class="ma0 pa0 gh-members-list-name">Temporary Dude</h3>
<p class="ma0 pa0 middarkgrey f8 gh-members-list-email">dude@whofails.com</p>
</div>
</div>
</div>
<div class="gh-list-data gh-email-debug-col-failure">
<div class="gh-email-debug-failure">
<div class="gh-email-debug-failure-details">
<div class="gh-email-debug-failure-codes">
<span class="gh-email-debug-failure-code">Failure code: <span>402</span></span>
<span class="gh-email-debug-failure-code">Enhanced code: <span>4.2.2</span></span>
</div>
<span class="gh-email-debug-failure-description"><code>4.2.2 The email account that you tried to reach is over quota. Please direct\n4.2.2 the recipient to\n4.2.2 https://support.google.com/mail/?p=OverQuotaTemp bb1-20020a05622a1b0100b0039ce87e3d49si1009300qtb.292 - gsmtp</code></span>
</div>
</div>
</div>
@ -146,7 +227,106 @@
</tabs.tab>
<tabs.tabPanel>
TBD
<table class="gh-list gh-email-debug-batches">
<thead>
<tr class="gh-list-row header">
<th class="gh-list-header">Status</th>
<th class="gh-list-header">Created</th>
<th class="gh-list-header">Segment</th>
<th class="gh-list-header">Recipients</th>
<th class="gh-list-header">Details</th>
</tr>
</thead>
<tbody>
<tr>
<div class="gh-list-data gh-email-debug-batch-col-status">
<span class="failed">Failed</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-created">
<span>22 June, 2022 19:34:29</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-segment">
<span>-status:free</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-recipients">
<span>1,000</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-details">
<div class="flex flex-col items-center space-between w100">
<div class="detailtext">
<div>Provider id: <span>20220824043031.b31949925525913d@m.ghost.io</span></div>
<div>Failure status code: <span>500</span></div>
<code>Mailgun Error 500: Internal server error</code>
</div>
<div class="download-icon">{{svg-jar "download" title="Download full failure message"}}</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-batch-col-status">
<span class="pending">Pending</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-created">
<span>22 June, 2022 19:34:29</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-segment">
<span>-status:free</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-recipients">
<span>1,000</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-details">
<div class="flex flex-col items-center space-between w100">
<div class="detailtext">
<div>Provider id: <span>20220824043031.b31949925525913d@m.ghost.io</span></div>
</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-batch-col-status">
<span class="submitting">Submitting</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-created">
<span>22 June, 2022 19:34:29</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-segment">
<span>-status:free</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-recipients">
<span>1,000</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-details">
<div class="flex flex-col items-center space-between w100">
<div class="detailtext">
<div>Provider id: <span>20220824043031.b31949925525913d@m.ghost.io</span></div>
</div>
</div>
</div>
</tr>
<tr>
<div class="gh-list-data gh-email-debug-batch-col-status">
<span class="submitted">Submitted</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-created">
<span>22 June, 2022 19:34:29</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-segment">
<span>-status:free</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-recipients">
<span>1,000</span>
</div>
<div class="gh-list-data gh-email-debug-batch-col-details">
<div class="flex flex-col items-center space-between w100">
<div class="detailtext">
<div>Provider id: <span>20220824043031.b31949925525913d@m.ghost.io</span></div>
</div>
</div>
</div>
</tr>
</tbody>
</table>
</tabs.tabPanel>
<tabs.tab>

View File

@ -1,4 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>download</title>
<path d="M20 5.5l-8 8-8-8m-3.5 13h23" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 217 B