Fixes ACREP-30.
[mkws-moved-to-github.git] / src / templates / targets.handlebars
1 {{!
2 Target detail
3
4 data:
5   id - target id, an opaque identifier
6   hits - number of hits for this target, or "Error" if an error has occurred
7   diagnostic - numeric diagnostic code returned by target; 0 if OK
8   message - message corresponding to diagnostic code, if any.
9   records - number of record retrieved from target
10   state - target state (Client_Idle, Client_Working, Client_Disconnected or Client_Error)
11 }}
12 <table>
13   <thead>
14     <tr>
15       <td>{{{mkws-translate "Target ID"}}}</td>
16       <td>{{{mkws-translate "Type"}}}</td>
17       <td>{{{mkws-translate "Hits"}}}</td>
18       <td>{{{mkws-translate "Diags"}}}</td>
19       <td>{{{mkws-translate "Records"}}}</td>
20       <td>{{{mkws-translate "State"}}}</td>
21       </td>
22     </tr>
23   </thead>
24   <tbody>
25   {{#each data}}
26     <tr>
27       <td>{{{name}}}</td>
28       <td>
29         {{#compare id 'matches' '^solr-'}}
30           <b title="Harvested, and stored locally" style="color:darkgreen">H</b>
31         {{else}}
32           <span title="Searched on the remote site" style="color:darkred">S</span>
33         {{/compare}}
34       </td>
35       <td>{{hits}}</td>
36       <td>
37        {{#if message}}
38          {{diagnostic}} ({{message}})
39        {{/if}}
40       </td>
41       <td>{{records}}</td>
42       <td>{{state}}</td>
43     </tr>
44   {{/each}}
45   </tbody>
46 </table>