From e99822764a231483ef492a91bace90c0422eb090 Mon Sep 17 00:00:00 2001
From: Bhabesh <bhabesh.mukhopadhyay@nibio.no>
Date: Mon, 6 Jul 2020 11:53:14 +0200
Subject: [PATCH] Alert message on No hourly data

Alert message generate when there is no data received from weather station  for hourly data
---
 cydiapomonella/templates/cydiapomonella/index.html | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/cydiapomonella/templates/cydiapomonella/index.html b/cydiapomonella/templates/cydiapomonella/index.html
index 7437c4c0..273b99c7 100644
--- a/cydiapomonella/templates/cydiapomonella/index.html
+++ b/cydiapomonella/templates/cydiapomonella/index.html
@@ -445,9 +445,13 @@
 
                                 resultData  =   data;
                                 setConvertHourlyData(resultData);
+                                $('#divIdErrorWeatherStation').hide();
+                                $('#idTableWeather').show();
                             }
                             else{
                                 $('#idDivHeatSum').hide();
+                                $('#divIdErrorWeatherStation').show();
+                                $('#idTableWeather').hide();
                             }
                         },
                         error : function(xhr, status, error)
@@ -532,9 +536,13 @@
 <div class="col-md-12" >
     <h1>{% trans "Calculate the risk of attack by the coddling moth" %}</h1>
 </div>
-
-
-<div class="container-fluid">
+<div class="clearfix"></div>
+    <div class="container-fluid">
+    <div class="row">
+        <div class="col-sm-10">
+            <div id='divIdErrorWeatherStation' class="alert alert-danger .alert-dismissable" style="display: none;" ><span class=".glyphicon .glyphicon-minus-sign"></span> No records available from selected weather station !!</div>
+        </div>
+    </div>
     <div class="row ">
         <div class="col-sm-4">
             <select name="weatherStationName" id="weatherStationId" class="form-control">
-- 
GitLab