Skip to content

Commit

Permalink
Add viewer version to status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Keeble authored and Gary Keeble committed Aug 12, 2016
1 parent d96f10c commit 518a636
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
38 changes: 19 additions & 19 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -764,20 +764,6 @@ html:not(.has-log) #status-bar {
display: none;
}

#status-bar div {
float: left;
padding-right: 10px;
margin-right: 10px;
border-right: 1px solid #7d7d79;
}

#status-bar .version {
float: right;
margin: 0;
padding: 0;
border: 0;
}

#status-bar .bookmark-1,
#status-bar .bookmark-2,
#status-bar .bookmark-3,
Expand All @@ -789,11 +775,11 @@ html:not(.has-log) #status-bar {
#status-bar .bookmark-9 {
background-color: red;
color : white;
padding-left: 0;
padding-right: 0;
width: 30px;
margin-right: 0px;
margin-left: 0px;
/* padding-left: 5px; */
/* padding-right: 0; */
width: 20px;
/* margin-right: 0px; */
/* margin-left: 0px; */
text-align: center;
visibility: hidden;
cursor: pointer;
Expand Down Expand Up @@ -825,6 +811,20 @@ html:not(.has-config) #status-bar .configuration-file-name {
display: none;
}

#status-bar div:not(:last-child) {
float: left;
padding-right: 5px;
margin-right: 5px;
border-right: 1px solid #7d7d79;
}

#status-bar div:first-child {
margin-left: 10px;
}

#status-bar div:last-child {
float: right;
}

/***
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ <h2>Legend <span class="log-close-legend-dialog glyphicon glyphicon-remove" data
<div>
<span class="configuration-file-name">-</span>
</div>
<div>
<span class="viewer-version">-</span>
</div>
</div>
<!-- Dialog Boxes and Popup Windows -->
<div class="modal fade graph-configuration-dialog" id="dlgGraphConfiguration">
Expand Down
3 changes: 2 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function BlackboxLogViewer() {
$('#status-bar .version').text( ((sysConfig['Craft name']!=null)?(sysConfig['Craft name'] + ' : '):'') +
((sysConfig['Firmware revision']!=null)?(sysConfig['Firmware revision']):''));
$('#status-bar .looptime').text( stringLoopTime(sysConfig.looptime, sysConfig.pid_process_denom, sysConfig.unsynced_fast_pwm, sysConfig.motor_pwm_rate));
$('#status-bar .lograte').text( ((sysConfig['frameIntervalPDenom']!=null && sysConfig['frameIntervalPNum']!=null)?( 'Logging Sample Rate : ' + sysConfig['frameIntervalPNum'] +'/' + sysConfig['frameIntervalPDenom']):''));
$('#status-bar .lograte').text( ((sysConfig['frameIntervalPDenom']!=null && sysConfig['frameIntervalPNum']!=null)?( 'Sample Rate : ' + sysConfig['frameIntervalPNum'] +'/' + sysConfig['frameIntervalPDenom']):''));

seekBar.setTimeRange(flightLog.getMinTime(), flightLog.getMaxTime(), currentBlackboxTime);
seekBar.setActivityRange(flightLog.getSysConfig().minthrottle, flightLog.getSysConfig().maxthrottle);
Expand Down Expand Up @@ -781,6 +781,7 @@ function BlackboxLogViewer() {

// Get Latest Version Information
$("#viewer-version").text('You are using version ' + VIEWER_VERSION);
$("#status-bar .viewer-version").text('v'+VIEWER_VERSION);
try {
$.getJSON('https://api.github.com/repos/GaryKeeble/blackbox-log-viewer/releases/latest',{},function(data){
latestVersion = data;
Expand Down

0 comments on commit 518a636

Please sign in to comment.