/* ------------------------------------------------------------------------------

 *

 *  # Push Alarm Notification

 *

 * ---------------------------------------------------------------------------- */



$(function () {


	 clearInterval(timeAlarm);

	 var timeAlarm = setInterval(function () {

	 	$.ajax({

         	url: "alarm/pushdataalarm",

         	type:"post",

         	success: function(data) {

					dataku = JSON.parse(data);	
					
					var obj = dataku[0];
					
					var alarm_description  = obj.alarm_description;
					
					var alarm_link  = obj.alarm_link;
					
 					document.getElementById('id_alarm_content').innerHTML  = alarm_description;

					document.getElementById('id_alarm_link').innerHTML  = alarm_link;
         	}                 

   	 	});

	}, 2000);                 

});
