Skip to content

Commit

Permalink
blast-results-view : display statusMessage to indicate if search is i…
Browse files Browse the repository at this point in the history
…n progress, or returned 0 hits.

... handle the case of no result : in that case need to indicate that the search has completed.
display Searching... and if result returned, show table, or else No hits found.
blast-results-view.js : dataMatrix() : if data, set statusMessage according to cells.length.
blast-results-view.hbs : display statusMessage if defined.
  • Loading branch information
Don-Isdale committed Jun 8, 2021
1 parent 603485e commit b9851a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/app/components/panel/upload/blast-results-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default Component.extend({
/** true means display the result rows as triangles - clickedFeatures. */
viewFeaturesFlag : true,

statusMessage : 'Searching ...',

/*--------------------------------------------------------------------------*/

/** style of the div which contains the table.
Expand All @@ -74,6 +76,10 @@ export default Component.extend({
.filter((row) => (row !== ''))
.map((r) => r.split('\t')) :
[];

if (data) {
this.set('statusMessage', (cells.length ? undefined : 'The search completed and returned 0 hits') );
}
return cells;
}),
viewRow : computed('dataMatrix', 'viewFeaturesFlag', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

{{!-- --------------------------------------------------------------------- --}}

{{#if statusMessage}}
<div>{{statusMessage}}</div>
{{/if}}

{{!-- --------------------------------------------------------------------- --}}

<div id={{search.tableId}} class="actual-row" style={{this.containerStyle}}></div>

{{!-- --------------------------------------------------------------------- --}}
Expand Down

0 comments on commit b9851a7

Please sign in to comment.