Merge pull request #1150 from rasika/fix-1547

Fixing https://github.com/wso2/product-iots/issues/1547
4.x.x
Rasika Perera 7 years ago committed by GitHub
commit 8997b4ba53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -182,12 +182,9 @@ function setSpeedAlert() {
//TODO: get the device Id from the URL //TODO: get the device Id from the URL
var speedAlertValue = $("#speedAlertValue").val(); var speedAlertValue = $("#speedAlertValue").val();
if (speedAlertValue == null || speedAlertValue === undefined || speedAlertValue == "") { if (!speedAlertValue) {
var message = "Speed cannot be empty."; var message = "Speed cannot be empty.";
noty({text: message, type : 'error' }); noty({text: message, type : 'error' });
} else if (areaName.indexOf(" ") > -1) {
var message = "Area Name cannot contain spaces.";
noty({text: message, type : 'error' });
} else { } else {
data = { data = {
'parseData': JSON.stringify({'speedAlertValue': speedAlertValue, 'deviceId': deviceId}), // parseKey : parseValue pair , this key pair is replace with the key in the template file 'parseData': JSON.stringify({'speedAlertValue': speedAlertValue, 'deviceId': deviceId}), // parseKey : parseValue pair , this key pair is replace with the key in the template file

Loading…
Cancel
Save