Added NaN repr field in export popup
This commit is contained in:
@ -104,6 +104,8 @@ class ExportPopup extends HTMLElement{
|
||||
return
|
||||
}
|
||||
|
||||
let nanRepresentation = this.getElementsByClassName("nan-input")[0].value;
|
||||
|
||||
let binningCheckbox = this.getElementsByClassName("binning-checkbox")[0];
|
||||
let binningValue = null;
|
||||
if(binningCheckbox.checked){
|
||||
@ -123,7 +125,7 @@ class ExportPopup extends HTMLElement{
|
||||
else
|
||||
{
|
||||
this.hide();
|
||||
this.exportCallback(selectedVariables, startDateTimeMs, endDateTimeMs, binningValue);
|
||||
this.exportCallback(selectedVariables, startDateTimeMs, endDateTimeMs, nanRepresentation, binningValue);
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,6 +173,11 @@ class ExportPopup extends HTMLElement{
|
||||
<input type=number class="export-end-hour" min="00" max="23">
|
||||
<input type=number class="export-end-minute" min="00" max="59">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>NaN value : </span>
|
||||
<input type=text class="nan-input" value="" spellcheck=false>
|
||||
</div>
|
||||
|
||||
<div class="binning-container">
|
||||
<input type=checkbox class="binning-checkbox">
|
||||
|
@ -284,12 +284,12 @@ function loadExportPopup(){
|
||||
graphsContainer.appendChild(exportPopup);
|
||||
}
|
||||
|
||||
function exportCallback(selectedVariables, startDateTimeMs, endDateTimeMs, binning=null){
|
||||
function exportCallback(selectedVariables, startDateTimeMs, endDateTimeMs, nan, binning=null){
|
||||
|
||||
let binningParam = "None";
|
||||
if (binning !== null)
|
||||
binningParam = binning
|
||||
let exportURL = "http://" + hostPort + "/export?time=" + startDateTimeMs/1000 + "," + endDateTimeMs/1000 + "&variables=" + selectedVariables + "&interval=" + binningParam + "&id=" + clientID
|
||||
let exportURL = "http://" + hostPort + "/export?time=" + startDateTimeMs/1000 + "," + endDateTimeMs/1000 + "&variables=" + selectedVariables + "&nan=" + nan + "&interval=" + binningParam + "&id=" + clientID
|
||||
let a = document.createElement('a');
|
||||
a.href = exportURL
|
||||
a.click()
|
||||
|
Reference in New Issue
Block a user