Announcement

Collapse
No announcement yet.

Latest dump1090 HTML has sorting issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Latest dump1090 HTML has sorting issues

    All,

    I recently installed the RPi beta software, and just wanted to let you know that there seems to be an issue with the sorting of the table data presented on the HTML page.

    The 'track' column seems to sort the values in the 'msgs' column (at least ascending), and so forth. I think the source of the issue is in script.js:

    Code:
    	html += '<thead style="background-color: #BBBBBB; cursor: pointer;">';
    	html += '<td onclick="setASC_DESC(\'0\');sortTable(\'tableinfo\',\'0\');">ICAO</td>';
    	html += '<td onclick="setASC_DESC(\'1\');sortTable(\'tableinfo\',\'1\');">Flight</td>';
    	html += '<td onclick="setASC_DESC(\'2\');sortTable(\'tableinfo\',\'2\');" ' +
    	    'align="right">Squawk</td>';
    	html += '<td onclick="setASC_DESC(\'3\');sortTable(\'tableinfo\',\'3\');" ' +
    	    'align="right">Altitude</td>';
    	html += '<td onclick="setASC_DESC(\'4\');sortTable(\'tableinfo\',\'4\');" ' +
    	    'align="right">Speed</td>';
            // Add distance column header to table if site coordinates are provided
            if (SiteShow && (typeof SiteLat !==  'undefined' || typeof SiteLon !==  'undefined')) {
                html += '<td onclick="setASC_DESC(\'5\');sortTable(\'tableinfo\',\'5\');" ' +
                    'align="right">Distance</td>';
            }
    	html += '<td onclick="setASC_DESC(\'5\');sortTable(\'tableinfo\',\'6\');" ' +
    	    'align="right">Track</td>';
    	html += '<td onclick="setASC_DESC(\'6\');sortTable(\'tableinfo\',\'7\');" ' +
    	    'align="right">Msgs</td>';
    	html += '<td onclick="setASC_DESC(\'7\');sortTable(\'tableinfo\',\'8\');" ' +
    	    'align="right">Seen</td></thead><tbody>';
    Note that the indexes start to get off kilter starting with the column labelled 'Track'.
Working...
X