10.3.x-maintenance
cTn 2014-05-22 16:42:34 +02:00
parent 18c71f69c5
commit 18a1626c17
3 changed files with 38 additions and 13 deletions

View File

@ -438,6 +438,34 @@
"message": "Write your command here"
},
"loggingNote": {
"message": "Data will be logged in this tab <span style=\"color: red\">only</span>, leaving the tab will <span style=\"color: red\">cancel</span> logging and application will return to its normal <strong>\"configurator\"</strong> state.<br /> You are free to select the global update period, data will be written into the log file every <strong>1</strong> second for performance reasons."
},
"loggingSamplesSaved": {
"message": "Samples Saved:"
},
"loggingLogSize": {
"message": "Log Size:"
},
"loggingKB": {
"message": "$1 kB"
},
"loggingButtonLogFile": {
"message": "Select Log File"
},
"loggingStart": {
"message": "Start Logging"
},
"loggingStop": {
"message": "Stop Logging"
},
"loggingErrorLogFile": {
"message": "Please select log file"
},
"loggingErrorOneProperty": {
"message": "Please select at least one property to log"
},
"firmwareFlasherPath": {
"message": "Path:"
},

View File

@ -1,8 +1,5 @@
<div class="tab-logging">
<div class="note">
Data will be logged in this tab <span style="color: red">only</span>, leaving the tab will <span style="color: red">cancel</span>
logging and application will return to its normal <strong>"configurator"</strong> state.<br />
You are free to select the global update period, data will be written into the log file every <strong>1</strong> second for performance reasons.
<div class="note" i18n="loggingNote">
</div>
<div class="properties">
<dl>
@ -29,12 +26,12 @@
</select>
<div class="info">
<dl>
<dt>Samples Saved:</dt><dd class="samples">0</dd>
<dt>Log Size:</dt><dd class="size">0 kB</dd>
<dt i18n="loggingSamplesSaved"></dt><dd class="samples">0</dd>
<dt i18n="loggingLogSize"></dt><dd class="size">0 kB</dd>
</dl>
</div>
<div class="buttons">
<a href="#" class="log_file">Select Log File</a>
<a href="#" class="logging">Start Logging</a>
<a href="#" class="log_file" i18n="loggingButtonLogFile"></a>
<a href="#" class="logging" i18n="loggingStart"></a>
</div>
</div>

View File

@ -53,7 +53,7 @@ function tab_initialize_logging() {
append_to_file(log_buffer.join('\n'));
$('.samples').text(samples += log_buffer.length);
$('.size').text((fileWriter.length / 1024).toFixed(2) + ' kB');
$('.size').text(chrome.i18n.getMessage('loggingKB', [(fileWriter.length / 1024).toFixed(2)]));
log_buffer = [];
} else {
@ -63,21 +63,21 @@ function tab_initialize_logging() {
}, 1000);
$('.speed').prop('disabled', true);
$(this).text('Stop Logging');
$(this).text(chrome.i18n.getMessage('loggingStop'));
$(this).data("clicks", !clicks);
} else {
GUI.log('Please select at least one property to log');
GUI.log(chrome.i18n.getMessage('loggingErrorOneProperty'));
}
} else {
GUI.interval_remove('log_data_pull');
GUI.interval_remove('flush_data');
$('.speed').prop('disabled', false);
$(this).text('Start Logging');
$(this).text(chrome.i18n.getMessage('loggingStart'));
$(this).data("clicks", !clicks);
}
} else {
GUI.log('Please select log file');
GUI.log(chrome.i18n.getMessage('loggingErrorLogFile'));
}
});
}