Skip to content

Commit

Permalink
Merge pull request #852 from darksidelemm/testing
Browse files Browse the repository at this point in the history
Fix imperial units in table on Historical page
  • Loading branch information
darksidelemm authored Jan 24, 2024
2 parents 0020333 + e20e7c1 commit 3bc46f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion auto_rx/autorx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
# PATCH - Small changes, or minor feature additions.

__version__ = "1.7.3-beta4"
__version__ = "1.7.3-beta5"


# Global Variables
Expand Down
24 changes: 18 additions & 6 deletions auto_rx/autorx/templates/historical.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,29 @@
return cell.getValue().toFixed(3);
}},
{title:"Count", field:"lines", width:72, resizable:false, headerTooltip:"Received Lines of Telemetry"}, // 75
{title:"Last H", field:"min_height", width:75, resizable:false, headerTooltip:"Last Observed Height (m)",
{title:"Last H", field:"min_height", width:75, resizable:false, headerTooltip:"Last Observed Height",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue() + " m"; //return the contents of the cell;
if (getCookie('imperial') == 'true') {
return cell.getValue()*3.28084.toFixed(0) + " ft";
} else {
return cell.getValue() + " m";
}
}},
{title:"Last R", field:"last_range", width:75, resizable:false, headerTooltip:"Last Observed Range (km)",
{title:"Last R", field:"last_range", width:75, resizable:false, headerTooltip:"Last Observed Range",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue() + " km"; //return the contents of the cell;
if (getCookie('imperial') == 'true') {
return cell.getValue()*0.621371.toFixed(0) + " mi";
} else {
return cell.getValue() + " km";
}
}},
{title:"Max R", field:"max_range", width:73, resizable:false, headerTooltip:"Maximum Observed Range (km))",
{title:"Max R", field:"max_range", width:73, resizable:false, headerTooltip:"Maximum Observed Range",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue() + " km"; //return the contents of the cell;
if (getCookie('imperial') == 'true') {
return cell.getValue()*0.621371.toFixed(0) + " mi";
} else {
return cell.getValue() + " km";
}
}},
{formatter:"rowSelection", titleFormatter:"rowSelection", align:"center", width:40, headerSort:false, titleFormatter: function(cell, formatterParams, onRendered){}}
],
Expand Down

0 comments on commit 3bc46f9

Please sign in to comment.