Added empty state handling to email debug tabs

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

- the lists and tables were completely empty when there was no error or some data was missing
This commit is contained in:
Peter Zimon 2022-12-02 13:34:30 +01:00
parent cee94217a8
commit 9b276e6aa2
2 changed files with 43 additions and 16 deletions

View File

@ -91,6 +91,13 @@
</div>
</tr>
{{/each}}
{{#unless this.permanentFailureData}}
<tr>
<td>
<div class="gh-email-debug-empty-list">No permanent failures.</div>
</td>
</tr>
{{/unless}}
{{!-- <tr>
<div class="gh-list-data gh-email-debug-col-member">
<div class="gh-email-debug-member">
@ -223,6 +230,13 @@
</div>
</tr>
{{/each}}
{{#unless this.temporaryFailureData}}
<tr>
<td>
<div class="gh-email-debug-empty-list">No temporary failures.</div>
</td>
</tr>
{{/unless}}
{{!-- <tr>
<div class="gh-list-data gh-email-debug-col-member">
<div class="gh-email-debug-member">
@ -313,6 +327,8 @@
<div class="gh-list-data gh-email-debug-batch-col-segment">
{{#if batch.segment}}
<span>{{batch.segment}}</span>
{{else}}
<div class="dib lightgrey">N/A</div>
{{/if}}
</div>
<div class="gh-list-data gh-email-debug-batch-col-recipients">
@ -320,6 +336,7 @@
</div>
<div class="gh-list-data gh-email-debug-batch-col-details">
<div class="flex flex-col items-center space-between w100">
{{#if (or batch.providerId batch.errorStatusCode batch.errorMessage)}}
<div class="detailtext">
{{#if batch.providerId}}
<div>Provider id:
@ -340,6 +357,9 @@
{{#if batch.errorMessage}}
<div class="download-icon">{{svg-jar "download" title="Download full failure message"}}</div>
{{/if}}
{{else}}
<div class="dib lightgrey">N/A</div>
{{/if}}
</div>
</div>
</tr>

View File

@ -3413,3 +3413,10 @@ p.theme-validation-details {
.gh-email-debug-settings-icon .x path {
stroke: var(--midgrey);
}
.gh-email-debug-empty-list {
margin: 120px 40px;
text-align: center;
font-size: 1.3rem;
color: var(--midgrey);
}