added cron expression

revert-dabc3590
GPrathap 8 years ago
parent dd86f91de6
commit dca34e7fb3

@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.androidsense.analytics</artifactId>
<name>WSO2 Carbon - IoT Server Android Sense Analytics capp</name>
<name>WSO2 Carbon - IoT Server Android Sense Analytics Carbon App</name>
<packaging>pom</packaging>
<build>

@ -26,5 +26,7 @@
FROM AndroidActivityData WHERE action = 'RUNNING' OR action = 'WALKING' OR action = 'CYCLING'
GROUP BY year, month, day, meta_deviceId, action, meta_owner ORDER BY timestamp ASC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS; </Script>
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_ACTIVITY_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -15,5 +15,7 @@
FROM AndroidHeadsetData
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_HEADSET_STATS; </Script>
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_HEADSET_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -15,5 +15,7 @@
FROM AndroidCallData
GROUP BY year, month, day, meta_deviceId, meta_owner, type ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_CALL_STATS; </Script>
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_CALL_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -15,5 +15,7 @@
FROM AndroidDataData
GROUP BY year, month, day, meta_deviceId, meta_owner, type ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_DATA_STATS; </Script>
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_DATA_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -49,5 +49,7 @@
SELECT owner, deviceId, number, sum(callCount) as callCount, sum(smsCount) as smsCount, sum(total) as total, year
FROM Android_Frequent_Contacts_Per_Month
GROUP BY deviceId, owner, number, year
ORDER BY total DESC; </Script>
ORDER BY total DESC;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -39,5 +39,7 @@
INSERT INTO TABLE Android_Location_Stats_Per_Year
SELECT owner, deviceId, latitude, longitude, streetName, sum(noOfVisits) as noOfVisits, year
FROM Android_Location_Stats_Per_Month
GROUP BY deviceId, owner, year, streetName, latitude, longitude; </Script>
GROUP BY deviceId, owner, year, streetName, latitude, longitude;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -178,7 +178,6 @@ var getConfig, validate, getMode, getSchema, getData, registerCallBackforPush;
result = connector.getRecordsByRange(loggedInUser, tableName, from, to, 0, limit, null).getMessage();
}
log.info(result);
result = JSON.parse(result);
var data = [];
for (var i = 0; i < result.length; i++) {

@ -60,6 +60,10 @@ $(function() {
contentType: "application/json",
async: false,
success: function(data) {
if(typeof data[0].duration == 'undefined'){
console.log("Currently data can't be retrieved...");
console.log(JSON.stringify(data));
}else{
var duration = data[0].duration / 60000; // Convert to minutes
var newData = [{
"duration": duration,
@ -69,10 +73,7 @@ $(function() {
"owner": "NO"
}
];
// data.forEach(function(entry) {
// entry.duration = entry.duration / 60000 % 100; // Convert to minutes
// });
// providerData = data;
}
providerData = newData;
}
});
@ -81,18 +82,15 @@ $(function() {
var drawGadget = function() {
draw('#canvas', conf[CHART_CONF], schema, providerData);
setInterval(function() {
draw('#canvas', conf[CHART_CONF], schema, getProviderData());
}, pref.getInt(REFRESH_INTERVAL));
};
getGadgetLocation(function(gadget_Location) {
gadgetLocation = gadget_Location;
init();
drawGadget();
});
});

@ -15,5 +15,7 @@
FROM AndroidScreenData
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SCREEN_STATS; </Script>
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SCREEN_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -17,4 +17,5 @@
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_HEADSET_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

Loading…
Cancel
Save