Skip to content

Commit 518a636

Browse files
Gary KeebleGary Keeble
authored andcommitted
Add viewer version to status bar
1 parent d96f10c commit 518a636

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

css/main.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -764,20 +764,6 @@ html:not(.has-log) #status-bar {
764764
display: none;
765765
}
766766

767-
#status-bar div {
768-
float: left;
769-
padding-right: 10px;
770-
margin-right: 10px;
771-
border-right: 1px solid #7d7d79;
772-
}
773-
774-
#status-bar .version {
775-
float: right;
776-
margin: 0;
777-
padding: 0;
778-
border: 0;
779-
}
780-
781767
#status-bar .bookmark-1,
782768
#status-bar .bookmark-2,
783769
#status-bar .bookmark-3,
@@ -789,11 +775,11 @@ html:not(.has-log) #status-bar {
789775
#status-bar .bookmark-9 {
790776
background-color: red;
791777
color : white;
792-
padding-left: 0;
793-
padding-right: 0;
794-
width: 30px;
795-
margin-right: 0px;
796-
margin-left: 0px;
778+
/* padding-left: 5px; */
779+
/* padding-right: 0; */
780+
width: 20px;
781+
/* margin-right: 0px; */
782+
/* margin-left: 0px; */
797783
text-align: center;
798784
visibility: hidden;
799785
cursor: pointer;
@@ -825,6 +811,20 @@ html:not(.has-config) #status-bar .configuration-file-name {
825811
display: none;
826812
}
827813

814+
#status-bar div:not(:last-child) {
815+
float: left;
816+
padding-right: 5px;
817+
margin-right: 5px;
818+
border-right: 1px solid #7d7d79;
819+
}
820+
821+
#status-bar div:first-child {
822+
margin-left: 10px;
823+
}
824+
825+
#status-bar div:last-child {
826+
float: right;
827+
}
828828

829829
/***
830830

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ <h2>Legend <span class="log-close-legend-dialog glyphicon glyphicon-remove" data
377377
<div>
378378
<span class="configuration-file-name">-</span>
379379
</div>
380+
<div>
381+
<span class="viewer-version">-</span>
382+
</div>
380383
</div>
381384
<!-- Dialog Boxes and Popup Windows -->
382385
<div class="modal fade graph-configuration-dialog" id="dlgGraphConfiguration">

js/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function BlackboxLogViewer() {
358358
$('#status-bar .version').text( ((sysConfig['Craft name']!=null)?(sysConfig['Craft name'] + ' : '):'') +
359359
((sysConfig['Firmware revision']!=null)?(sysConfig['Firmware revision']):''));
360360
$('#status-bar .looptime').text( stringLoopTime(sysConfig.looptime, sysConfig.pid_process_denom, sysConfig.unsynced_fast_pwm, sysConfig.motor_pwm_rate));
361-
$('#status-bar .lograte').text( ((sysConfig['frameIntervalPDenom']!=null && sysConfig['frameIntervalPNum']!=null)?( 'Logging Sample Rate : ' + sysConfig['frameIntervalPNum'] +'/' + sysConfig['frameIntervalPDenom']):''));
361+
$('#status-bar .lograte').text( ((sysConfig['frameIntervalPDenom']!=null && sysConfig['frameIntervalPNum']!=null)?( 'Sample Rate : ' + sysConfig['frameIntervalPNum'] +'/' + sysConfig['frameIntervalPDenom']):''));
362362

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

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

0 commit comments

Comments
 (0)