Re-fix ACREP-30 in a way that works on production.
[mkws-moved-to-github.git] / src / templates / targets.handlebars
index 132f87f..9402c83 100644 (file)
@@ -4,7 +4,8 @@ Target detail
 data:
   id - target id, an opaque identifier
   hits - number of hits for this target, or "Error" if an error has occurred
-  diagnostic - diagnostic code returned by target, if any. May be numeric or human-readable
+  diagnostic - numeric diagnostic code returned by target; 0 if OK
+  message - message corresponding to diagnostic code, if any.
   records - number of record retrieved from target
   state - target state (Client_Idle, Client_Working, Client_Disconnected or Client_Error)
 }}
@@ -12,6 +13,7 @@ data:
   <thead>
     <tr>
       <td>{{{mkws-translate "Target ID"}}}</td>
+      <td>{{{mkws-translate "Type"}}}</td>
       <td>{{{mkws-translate "Hits"}}}</td>
       <td>{{{mkws-translate "Diags"}}}</td>
       <td>{{{mkws-translate "Records"}}}</td>
@@ -22,9 +24,20 @@ data:
   <tbody>
   {{#each data}}
     <tr>
-      <td>{{{id}}}</td>
+      <td>{{{name}}}</td>
+      <td>
+        {{#compare id 'matches' '^(solr-|lui.)'}}
+         <b title="Harvested, and stored locally" style="color:darkgreen">H</b>
+       {{else}}
+         <span title="Searched on the remote site" style="color:darkred">S</span>
+       {{/compare}}
+      </td>
       <td>{{hits}}</td>
-      <td>{{diagnostic}}</td>
+      <td>
+       {{#if message}}
+         {{diagnostic}} ({{message}})
+       {{/if}}
+      </td>
       <td>{{records}}</td>
       <td>{{state}}</td>
     </tr>