Commit 81b80cb9 authored by Philipp's avatar Philipp

fixed bug in current.json.tmpl producing incorrect json when no winddir is available

parent 32cc1ccd
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,8 +3,8 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/W:/template_rabenwetter/src/skin.conf</file>
<file>file:/W:/template_rabenwetter/src/index.html</file>
<file>file:/W:/template_rabenwetter/src/archive/current.json.tmpl</file>
<file>file:/W:/template_rabenwetter/src/archive/day-YYYY-MM-DD.json.tmpl</file>
<file>file:/W:/template_rabenwetter/src/assets/js/main.js</file>
</group>
</open-files>
......
......@@ -15,7 +15,11 @@
"heatIndexTH": $day.heatindex.max.formatted.replace(",", "."),
"windSpeed": $current.windSpeed.formatted.replace(",", "."),
"windSpeedTH": $day.windGust.max.formatted.replace(",", "."),
#if $current.windDir.has_data
"windDirection": $current.windDir.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
"windText": "$current.windDir.ordinal_compass",
"pressure": $current.barometer.formatted.replace(",", "."),
"pressureTL": $day.barometer.min.formatted.replace(",", "."),
......
......@@ -125,7 +125,7 @@ var temp = 'out';
drawRose( 'wdir', msg.windDirection, msg.windText );
}).fail(function(msg) {
console.log('error');
console.log('AJAX Error:');
console.log(msg);
});
}
......@@ -400,7 +400,8 @@ var temp = 'out';
$('#we_winddir-value .glyphicon-arrow-down').css('transform', 'rotate('+msg.windDirection+'deg)' );
$('#we_winddir-value .glyphicon-arrow-down').css('display', 'inline-block');
}).fail(function(msg) {
$('#we_winddir-value .glyphicon-arrow-down').css('display', 'none');
console.log('AJAX Error:');
console.log(msg);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment