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

View File

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