Update templates/index.html
Browse files- templates/index.html +17 -18
templates/index.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
@@ -210,20 +210,19 @@
|
|
210 |
<div class="mb-4">
|
211 |
<label for="language" class="form-label">Response Language</label>
|
212 |
<select class="form-control" id="language" name="language" required>
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
</select>
|
225 |
-
|
226 |
-
|
227 |
</div>
|
228 |
</div>
|
229 |
|
@@ -313,7 +312,7 @@
|
|
313 |
|
314 |
// Fetch weather data from backend (/get_weather_data)
|
315 |
function fetchWeatherData(lat, lng) {
|
316 |
-
fetch(
|
317 |
.then(response => response.json())
|
318 |
.then(data => {
|
319 |
// Update the weather card container
|
@@ -368,13 +367,13 @@
|
|
368 |
|
369 |
// Fetch soil properties from backend (/get_soil_properties)
|
370 |
function fetchSoilProperties(lat, lng) {
|
371 |
-
fetch(
|
372 |
.then(response => response.json())
|
373 |
.then(data => {
|
374 |
if(data.soil_properties) {
|
375 |
let tableHTML = "<table><thead><tr><th>Parameter</th><th>Value</th><th>Unit</th></tr></thead><tbody>";
|
376 |
data.soil_properties.forEach(function(item) {
|
377 |
-
tableHTML +=
|
378 |
});
|
379 |
tableHTML += "</tbody></table>";
|
380 |
document.getElementById("soilTableContainer").innerHTML = tableHTML;
|
@@ -386,4 +385,4 @@
|
|
386 |
}
|
387 |
</script>
|
388 |
</body>
|
389 |
-
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
<head>
|
4 |
<meta charset="UTF-8" />
|
|
|
210 |
<div class="mb-4">
|
211 |
<label for="language" class="form-label">Response Language</label>
|
212 |
<select class="form-control" id="language" name="language" required>
|
213 |
+
<option value="English">English</option>
|
214 |
+
<option value="Hindi">Hindi</option>
|
215 |
+
<option value="Bengali">Bengali</option>
|
216 |
+
<option value="Telugu">Telugu</option>
|
217 |
+
<option value="Marathi">Marathi</option>
|
218 |
+
<option value="Tamil">Tamil</option>
|
219 |
+
<option value="Gujarati">Gujarati</option>
|
220 |
+
<option value="Urdu">Urdu</option>
|
221 |
+
<option value="Kannada">Kannada</option>
|
222 |
+
<option value="Odia">Odia</option>
|
223 |
+
<option value="Malayalam">Malayalam</option>
|
224 |
</select>
|
225 |
+
</div>
|
|
|
226 |
</div>
|
227 |
</div>
|
228 |
|
|
|
312 |
|
313 |
// Fetch weather data from backend (/get_weather_data)
|
314 |
function fetchWeatherData(lat, lng) {
|
315 |
+
fetch(`/get_weather_data?lat=${lat}&lon=${lng}`)
|
316 |
.then(response => response.json())
|
317 |
.then(data => {
|
318 |
// Update the weather card container
|
|
|
367 |
|
368 |
// Fetch soil properties from backend (/get_soil_properties)
|
369 |
function fetchSoilProperties(lat, lng) {
|
370 |
+
fetch(`/get_soil_properties?lat=${lat}&lon=${lng}`)
|
371 |
.then(response => response.json())
|
372 |
.then(data => {
|
373 |
if(data.soil_properties) {
|
374 |
let tableHTML = "<table><thead><tr><th>Parameter</th><th>Value</th><th>Unit</th></tr></thead><tbody>";
|
375 |
data.soil_properties.forEach(function(item) {
|
376 |
+
tableHTML += `<tr><td>${item[0]}</td><td>${item[1]}</td><td>${item[2]}</td></tr>`;
|
377 |
});
|
378 |
tableHTML += "</tbody></table>";
|
379 |
document.getElementById("soilTableContainer").innerHTML = tableHTML;
|
|
|
385 |
}
|
386 |
</script>
|
387 |
</body>
|
388 |
+
</html>
|