get rid of senders and results columns, use ellipsis for very long search strings

pull/34/head
Zlatin Balevsky 2019-12-15 13:29:03 +00:00
parent 696b348469
commit a864343c05
1 changed files with 7 additions and 6 deletions

View File

@ -10,14 +10,15 @@ class SearchStatus {
getMapping() {
var mapping = new Map()
var queryLink = new Link(this.query, "refresh" + refreshType, [this.uuid])
var trimmedQuery = this.query
if (this.query.length > 16)
trimmedQuery = this.query.slice(0, 16) + "..."
var queryLink = new Link(trimmedQuery, "refresh" + refreshType, [this.uuid])
var stopLink = new Link("X", "stopSearch", [this.uuid])
var queryHtml = "<table><tr><td>" + queryLink.render() + "</td><td><p align='right'>[" + stopLink.render() + "]</p></td></tr></table>"
var queryHtml = "<table><tr><td>" + queryLink.render() + " <b>("+this.results+")</b>" + "</td><td><p align='right'>[" + stopLink.render() + "]</p></td></tr></table>"
mapping.set("Query", queryHtml)
mapping.set("Senders", this.senders)
mapping.set("Results", this.results)
return mapping
}
}
@ -776,7 +777,7 @@ function refreshStatus() {
newOrder = "ascending"
else
newOrder = "descending"
var table = new Table(["Query", "Senders", "Results"], "sortStatuses", statusKey, newOrder, null)
var table = new Table(["Query"], "sortStatuses", statusKey, newOrder, null)
for (i = 0; i < statuses.length; i++) {
var status = statuses[i]
table.addRow(status.getMapping())