From 34e05c7a3371b380d62fdab32ca5c533e01fa858 Mon Sep 17 00:00:00 2001 From: lasantha Date: Wed, 21 Jun 2017 19:06:32 +0530 Subject: [PATCH] removed gyroscope, magnetic, proximity, realtime battery gadget, and related ui publisher --- .../ANDROID_GYROSCOPE_GADGET/conf.json | 16 - .../gadget-controller.jag | 42 --- .../ANDROID_GYROSCOPE_GADGET/gadget.json | 9 - .../ANDROID_GYROSCOPE_GADGET/gadget.xml | 60 ---- .../js/core/gadget-core.js | 64 ---- .../js/core/gadget-util.js | 35 --- .../js/core/line-chart-api.js | 134 -------- .../js/core/provider-client.js | 51 ---- .../js/core/realtime-provider-api.js | 154 ---------- .../js/provider-libs/ws-client.js | 286 ----------------- .../ANDROID_GYROSCOPE_GADGET/thumbnail.png | Bin 12971 -> 0 bytes .../android_gyroscope_gadget/artifact.xml | 23 -- .../artifact.xml | 24 -- ...so2.iot.android.gyroscope.ui.publisher.xml | 7 - .../ANDROID_MAGNETIC_GADGET/conf.json | 16 - .../gadget-controller.jag | 42 --- .../ANDROID_MAGNETIC_GADGET/gadget.json | 9 - .../ANDROID_MAGNETIC_GADGET/gadget.xml | 60 ---- .../js/core/gadget-core.js | 64 ---- .../js/core/gadget-util.js | 35 --- .../js/core/line-chart-api.js | 134 -------- .../js/core/provider-client.js | 51 ---- .../js/core/realtime-provider-api.js | 154 ---------- .../js/provider-libs/ws-client.js | 286 ----------------- .../ANDROID_MAGNETIC_GADGET/thumbnail.png | Bin 12971 -> 0 bytes .../android_magnetic_gadget/artifact.xml | 23 -- .../artifact.xml | 24 -- ...wso2.iot.android.magnetic.ui.publisher.xml | 7 - .../PROXIMITY/conf.json | 1 - .../PROXIMITY/css/number-chart.css | 35 --- .../PROXIMITY/gadget-controller.jag | 42 --- .../PROXIMITY/gadget.json | 9 - .../PROXIMITY/gadget.xml | 58 ---- .../PROXIMITY/js/core/batch-provider-api.js | 190 ------------ .../PROXIMITY/js/core/gadget-core.js | 85 ------ .../PROXIMITY/js/core/gadget-util.js | 35 --- .../PROXIMITY/js/core/number-chart-api.js | 111 ------- .../PROXIMITY/thumbnail.png | Bin 12971 -> 0 bytes .../android_proximity_gadget/artifact.xml | 22 -- .../artifact.xml | 24 -- ...so2.iot.android.proximity.ui.publisher.xml | 7 - .../Android_Realtime_Battery/conf.json | 14 - .../css/dataTables.bootstrap.min.css | 1 - .../gadget-controller.jag | 42 --- .../Android_Realtime_Battery/gadget.json | 9 - .../Android_Realtime_Battery/gadget.xml | 68 ----- .../js/core/gadget-core.js | 62 ---- .../js/core/gadget-util.js | 35 --- .../js/core/provider-client.js | 51 ---- .../js/core/realtime-provider-api.js | 154 ---------- .../js/core/table-chart-api.js | 152 --------- .../js/jquery.dataTables.min.js | 164 ---------- .../js/provider-libs/ws-client.js | 288 ------------------ .../Android_Realtime_Battery/thumbnail.png | Bin 12971 -> 0 bytes .../artifact.xml | 23 -- 55 files changed, 3492 deletions(-) delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/conf.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget-controller.jag delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-core.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-util.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/line-chart-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/provider-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/realtime-provider-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/provider-libs/ws-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/thumbnail.png delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/org.wso2.iot.android.gyroscope.ui.publisher.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/conf.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget-controller.jag delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-core.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-util.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/line-chart-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/provider-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/realtime-provider-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/provider-libs/ws-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/thumbnail.png delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/org.wso2.iot.android.magnetic.ui.publisher.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/conf.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/css/number-chart.css delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget-controller.jag delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/batch-provider-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-core.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-util.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/number-chart-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/thumbnail.png delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/artifact.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/org.wso2.iot.android.proximity.ui.publisher.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/conf.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/css/dataTables.bootstrap.min.css delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget-controller.jag delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.json delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-core.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-util.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/provider-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/realtime-provider-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/table-chart-api.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/jquery.dataTables.min.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/thumbnail.png delete mode 100644 components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/artifact.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/conf.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/conf.json deleted file mode 100644 index 4da39ae5c..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/conf.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "provider-conf": { - "streamName": "org.wso2.iot.android.gyroscope:1.0.0", - "provider-name": "realtime" - }, - "chart-conf": { - "x": "TIMESTAMP", - "xType": "time", - "y": "value", - "yType": "number", - "color": "axis", - "maxLength": "30", - "gadget-name": "ANDROID_GYROSCOPE_GADGET", - "chart-name": "line-chart" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget-controller.jag b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget-controller.jag deleted file mode 100644 index f84538a40..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget-controller.jag +++ /dev/null @@ -1,42 +0,0 @@ -<% -/** - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -(function () { - - response.contentType = 'application/json'; - var PROVIDER_CONF = 'provider-conf'; - var PROVIDER_NAME = 'provider-name'; - - var action = request.getParameter("action"); - var data = request.getContent(); - var providerConf = data[PROVIDER_CONF]; - var providerAPI = require('js/core/' + providerConf[PROVIDER_NAME] + '-provider-api.js'); - - if (action === 'getSchema') { - print(providerAPI.getSchema(providerConf)); - return; - } else if(action === 'getData'){ - print(providerAPI.getData(providerConf)); - return; - } - -}()); - - -%> diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.json deleted file mode 100644 index dd6ccb149..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "ANDROID_GYROSCOPE_GADGET", - "title": "ANDROID_GYROSCOPE_GADGET", - "type": "gadget", - "thumbnail": "gadget/ANDROID_GYROSCOPE_GADGET/thumbnail.png", - "data": { - "url": "gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml deleted file mode 100644 index f2dc17a74..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ]]> -
-
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-core.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-core.js deleted file mode 100644 index 8bfc5f742..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-core.js +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -$(function () { - var gadgetLocation; - var conf; - var schema; - var pref = new gadgets.Prefs(); - - var CHART_CONF = 'chart-conf'; - var PROVIDER_CONF = 'provider-conf'; - -var init = function () { - $.ajax({ - url: gadgetLocation + '/conf.json', - method: "GET", - contentType: "application/json", - async: false, - success: function (data) { - conf = JSON.parse(data); - $.ajax({ - url: gadgetLocation + '/gadget-controller.jag?action=getSchema', - method: "POST", - data: JSON.stringify(conf), - contentType: "application/json", - async: false, - success: function (data) { - schema = data; - } - }); - - } - }); -}; - - -var drawGadget = function (){ - - draw('#canvas', conf[CHART_CONF], schema, null); - registerCallBackforPush(conf[PROVIDER_CONF], schema, function(providerData) { - update(providerData); - }); - -}; - -getGadgetLocation(function (gadget_Location) { - gadgetLocation = gadget_Location; - init(); - drawGadget(); - -}); -}); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-util.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-util.js deleted file mode 100644 index 77f1a1ffe..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/gadget-util.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getGadgetLocation = function (callback) { - var gadgetLocation = "/portal/store/carbon.super/fs/gadget/ANDROID_GYROSCOPE_GADGET"; - var PATH_SEPERATOR = "/"; - if (gadgetLocation.search("store") != -1) { - wso2.gadgets.identity.getTenantDomain(function (tenantDomain) { - var gadgetPath = gadgetLocation.split(PATH_SEPERATOR); - var modifiedPath = ''; - for (var i = 1; i < gadgetPath.length; i++) { - if (i === 3) { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, tenantDomain); - } else { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, gadgetPath[i]) - } - } - callback(modifiedPath); - }); - } else { - callback(gadgetLocation); - } -} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/line-chart-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/line-chart-api.js deleted file mode 100644 index 18f363a32..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/line-chart-api.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, isProviderRequired, draw, update; - -(function() { - - var CHART_LOCATION = '/extensions/chart-templates/'; - - /** - * return the config to be populated in the chart configuration UI - * @param schema - */ - getConfig = function(schema) { - var chartConf = require(CHART_LOCATION + '/line-chart/config.json').config; - /* - dynamic logic goes here - */ - - var columns = []; - - columns.push("None"); - for(var i=0; i < schema.length; i++) { - columns.push(schema[i]["fieldName"]); - } - - for(var i=0; i < chartConf.length; i++) { - if (chartConf[i]["fieldName"] == "color") { - chartConf[i]["valueSet"] = columns; - break; - } - } - - return chartConf; - }; - - /** - * validate the user inout for the chart configuration - * @param chartConfig - */ - validate = function(chartConfig) { - return true; - }; - - /** - * TO be used when provider configuration steps need to be skipped - */ - isProviderRequired = function() { - - } - - - /** - * return the gadget content - * @param chartConfig - * @param schema - * @param data - */ - draw = function(placeholder, chartConfig, _schema, data) { - _schema = updateUserPrefXYTypes(_schema, chartConfig); - var schema = toVizGrammarSchema(_schema); - - var view = { - id: "chart-0", - schema: schema, - chartConfig: buildChartConfig(chartConfig), - data: function() { - if(data) { - var result = []; - console.log(data); - data.forEach(function(item) { - var row = []; - schema[0].metadata.names.forEach(function(name) { - row.push(item[name]); - }); - result.push(row); - }); - console.log(result); - wso2gadgets.onDataReady(result); - } - } - - }; - - try { - wso2gadgets.init(placeholder, view); - var view = wso2gadgets.load("chart-0"); - } catch (e) { - console.error(e); - } - - }; - - /** - * - * @param data - */ - update = function(data) { - wso2gadgets.onDataReady(data,"append"); - }; - - buildChartConfig = function (_chartConfig) { - var conf = {}; - conf.x = _chartConfig.x; - conf.xType = _chartConfig.xType; - conf.yType = _chartConfig.yType; - conf.maxLength = _chartConfig.maxLength; - conf.charts = []; - conf.charts[0] = { - type : "line", - y: _chartConfig.y - }; - - if (_chartConfig.color != "None") { - conf.charts[0].color = _chartConfig.color; - } - - return conf; - }; - - -}()); \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/provider-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/provider-client.js deleted file mode 100644 index 6196677f6..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/provider-client.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// var registerCallBackforPush; - -(function() { - - var callback; - - /** - * TODO Need to read hostname,port, and tenantId from providerConfig - * @param providerConfig - * @param schema - */ - registerCallBackforPush = function(providerConfig, schema, _callback) { - var streamId = providerConfig['streamName']; - var hostname = window.parent.location.hostname; - var port = window.parent.location.port; - - subscribe(streamId.split(":")[0], streamId.split(":")[1], - '10', - onData, onError, - hostname, - port, - 'WEBSOCKET' - ); - callback = _callback; - }; - - function onData(streamId, data) { - callback(data); - }; - - function onError(error) { - console.error(error); - }; - -}()); - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/realtime-provider-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/realtime-provider-api.js deleted file mode 100644 index 7cf59af77..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/core/realtime-provider-api.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, getMode, getSchema, getData, registerCallBackforPush; - -(function() { - - var PROVIDERS_LOCATION = '/extensions/providers/'; - var PROVIDER_NAME = 'realtime'; - - var log = new Log(); - var utils = require('/modules/utils.js'); - var carbon = require("carbon"); - var EventPublisherConstants = Packages.org.wso2.carbon.event.publisher.core.config.EventPublisherConstants; - var eventPublisherService = carbon.server.osgiService('org.wso2.carbon.event.publisher.core.EventPublisherService'); - var eventStreamService = carbon.server.osgiService('org.wso2.carbon.event.stream.core.EventStreamService'); - - var typeMap = { - "bool": "string", - "boolean": "string", - "string": "string", - "int": "number", - "integer": "number", - "long": "number", - "double": "number", - "float": "number", - "time": "time" - }; - - getConfig = function() { - var formConfig = require(PROVIDERS_LOCATION + '/' + PROVIDER_NAME + '/config.json'); - var datasources = []; - try { - var eventPublisherConfigurationList = eventPublisherService.getAllActiveEventPublisherConfigurations(); - for (var i = 0; i < eventPublisherConfigurationList.size(); i++) { - var eventPublisherConfiguration = eventPublisherService.getActiveEventPublisherConfiguration( - eventPublisherConfigurationList.get(i).getEventPublisherName());; - - var mappingTypeIsWso2 = eventPublisherConfiguration.getOutputMapping() - .getMappingType().equals(EventPublisherConstants.EF_WSO2EVENT_MAPPING_TYPE); - - var adapterType = null; - if (eventPublisherConfiguration.getToAdapterConfiguration() != null) { - adapterType = eventPublisherConfiguration.getToAdapterConfiguration().getType(); - } - if (mappingTypeIsWso2 && adapterType.trim() == "ui") { - var streamName = eventPublisherConfiguration.getFromStreamName(); - var streamVersion = eventPublisherConfiguration.getFromStreamVersion(); - var streamId = streamName + ":" + streamVersion; - datasources.push(streamId); - } - } - var datasourceCfg = { - "fieldLabel": "Event Stream", - "fieldName": "streamName", - "fieldType": "dropDown" - }; - datasourceCfg['valueSet'] = datasources; - } catch (e) { - log.error(e); - } - formConfig.config.push(datasourceCfg); - return formConfig; - }; - - /** - * validate the user input of provider configuration - * @param providerConfig - */ - validate = function(providerConfig) { - /* - validate the form and return - - */ - return true; - }; - - /** - * returns the data mode either push or pull - */ - getMode = function() { - return 'push'; - }; - - /** - * returns an array of column names & types - * @param providerConfig - */ - getSchema = function(providerConfig) { - var streamId = providerConfig["streamName"]; - var output = []; - - output.push({ - fieldName: "TIMESTAMP", - fieldType: "time" - }); - - if (eventStreamService != null) { - var eventStreamConfiguration = eventStreamService.getEventStreamConfiguration(streamId); - if (eventStreamConfiguration != null) { - var metaData = eventStreamConfiguration.getStreamDefinition().getMetaData(); - var correlationData = eventStreamConfiguration.getStreamDefinition().getCorrelationData(); - var payloadData = eventStreamConfiguration.getStreamDefinition().getPayloadData(); - if (metaData != null) { - for (var i = 0; i < metaData.size(); i++) { - var type = metaData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: metaData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (correlationData != null) { - for (var i = 0; i < correlationData.size(); i++) { - var type = correlationData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: correlationData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (payloadData != null) { - for (var i = 0; i < payloadData.size(); i++) { - var type = payloadData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: payloadData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - } - } - return output; - }; - - getData = function(providerConfig,limit) { - var data = []; - return data; - }; - - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/provider-libs/ws-client.js deleted file mode 100644 index 760ecf951..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_gadget/ANDROID_GYROSCOPE_GADGET/js/provider-libs/ws-client.js +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var CONSTANTS = { - urlSeperator: '/', - queryParamStreamName : '?streamname=', - queryParamStreamVersion : '&version=', - queryParamLastUpdatedTime : '&lastUpdatedTime=', - urlSecureTransportWebsocket : 'wss://', - urlSecureTransportHttp : 'https://', - colon : ':', - defaultIntervalTime : 10 * 1000, - defaultHostName : 'localhost', - defaultSecurePortNumber : '9443', - defaultMode : 'AUTO', - processModeHTTP : 'HTTP', - processModeWebSocket : 'WEBSOCKET', - processModeAuto : 'AUTO', - numThousand : 1000, - websocketTimeAppender : 400, - websocketSubscriptionEndpoint : 'portal/uipublisher/websocketSubscriptionEndpoint.jag', - httpEventRetrievalEndpoint : 'portal/uipublisher/httpEventRetrievalEndpoint.jag' -}; - -var websocket = null; -var webSocketUrl; -var httpUrl; -var cepHostName; -var cepPortNumber; -var isErrorOccured = false; -var lastUpdatedtime = -1; -var polingInterval; -var stream; -var streamVersion; -var firstPollingAttempt; -var processMode; -var onSuccessFunction; -var onErrorFunction; -var terminateWebsocketInstance = false; -var pollingContinue = true; - -function subscribe(streamName,version,intervalTime, - listeningFuncSuccessData,listeningFuncErrorData,cepHost,cepPort,mode){ - stopPollingProcesses(); - stream = streamName; - streamVersion = version; - onSuccessFunction = listeningFuncSuccessData; - onErrorFunction = listeningFuncErrorData; - - if(intervalTime == null || intervalTime == ""){ - polingInterval = CONSTANTS.defaultIntervalTime; - } else{ - polingInterval = intervalTime * CONSTANTS.numThousand; - } - - if(cepHost == null || cepHost == ""){ - cepHostName = CONSTANTS.defaultHostName; - } else{ - cepHostName = cepHost; - } - - if(cepPort == null || cepPort == ""){ - cepPortNumber = CONSTANTS.defaultSecurePortNumber; - } else{ - cepPortNumber = cepPort; - } - - if(mode == null || mode == ""){ - processMode = CONSTANTS.defaultMode; - } else{ - processMode = mode; - } - - webSocketUrl = CONSTANTS.urlSecureTransportWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.websocketSubscriptionEndpoint; - - if(processMode == CONSTANTS.processModeHTTP){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } else{ - initializeWebSocket(webSocketUrl); - } -} - -/** - * Initializing Web Socket - */ -function initializeWebSocket(webSocketUrl){ - websocket = new WebSocket(webSocketUrl); - websocket.onopen = webSocketOnOpen; - websocket.onmessage = webSocketOnMessage; - websocket.onclose = webSocketOnClose; - websocket.onerror = webSocketOnError; -} - -function getWebsocketSubscriptionMessage(streamName, streamVersion, streamProperties, streamValues) { - if (streamProperties.length === streamValues.length) { - var message = {}; - message.streamName = streamName; - message.streamVersion = streamVersion; - var i; - for (i = 0; i < streamProperties.length; i++) { - message.filterProps = []; - message.filterProps.push({ - 'name': streamProperties[i], - 'value': streamValues[i] - }); - } - return JSON.stringify(message); - } else { - console.log('stream properties and values are not in equal size'); - } -} - -/** - * Get the parameters as query parameters. - * This method parses those parameters and returns. - * */ -function getAllQueryParamsFromURL() { - var queryParamList = {}, qParam; - var urlQueryString = decodeURIComponent(window.top.location.search.substring(1)); - - if (urlQueryString) { - var queryStringPairs = urlQueryString.split('&'); - for (var i = 0; i < queryStringPairs.length; i++) { - qParam = queryStringPairs[i].split('='); - queryParamList[qParam[0]] = qParam[1]; - } - return queryParamList; - - } else { - return null; - } -} - -/** - * Web socket On Open - */ -var webSocketOnOpen = function () { - var params = getAllQueryParamsFromURL(); - var deviceId; - var owner; - if (params) { - owner = params["owner"]; - deviceId = params["deviceId"]; - } - var filterPropNames = ["meta_owner", "meta_deviceId"]; - var filterPropVals = [owner, deviceId]; - var data = getWebsocketSubscriptionMessage(stream, streamVersion, filterPropNames, filterPropVals); - websocket.send(data); -}; - -/** - * On server sends a message - */ -var webSocketOnMessage = function (evt) { - var event = evt.data; - var array = JSON.parse(event); - constructPayload(array); -}; - -/** - * On server close - */ -var webSocketOnClose =function (e) { - - if(isErrorOccured){ - if(processMode != CONSTANTS.processModeWebSocket){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } - } else{ - if(!terminateWebsocketInstance){ - waitForSocketConnection(websocket); - } else{ - terminateWebsocketInstance = false; - } - - } -}; - -/** - * On server Error - */ -var webSocketOnError = function (err) { - var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!"; - - onErrorFunction(error); - isErrorOccured = true; - -}; - -/** - * Gracefully increments the connection retry - */ -var waitTime = CONSTANTS.numThousand; -function waitForSocketConnection(socket, callback){ - setTimeout( - function () { - if (socket.readyState === 1) { - initializeWebSocket(webSocketUrl); - console.log("Connection is made"); - if(callback != null){ - callback(); - } - return; - } else { - websocket = new WebSocket(webSocketUrl); - waitTime += CONSTANTS.websocketTimeAppender; - waitForSocketConnection(websocket, callback); - } - }, waitTime); -} - -/** - * Polling to retrieve events from http request periodically - */ -function startPoll(){ - - (function poll(){ - setTimeout(function(){ - httpUrl = CONSTANTS.urlSecureTransportHttp + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.httpEventRetrievalEndpoint + CONSTANTS.queryParamStreamName + stream + - CONSTANTS.queryParamStreamVersion + streamVersion + CONSTANTS.queryParamLastUpdatedTime + lastUpdatedtime;; - $.getJSON(httpUrl, function(responseText) { - if(firstPollingAttempt){ - /*var data = $("textarea#idConsole").val(); - $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/ - firstPollingAttempt = false; - } - var eventList = $.parseJSON(responseText.events); - if(eventList.length != 0){ - lastUpdatedtime = responseText.lastEventTime; - for(var i=0;i6ENwLKbHK%kA<`(x^{)D1Reg9MG9tc_-Egx1={;5qJRZK>84v$jP&HbszdA)mFe z8YxD{C?RABvsh~jSSwJEHOvG_yz`xUd1IKpn1pYU+_i2+w33gksr`K6)H?j6FcJ1@n>syQ{bCo10f_Rexqr_C!u4OGP zm}49-uVh3xP8*r1AnPo@qz8Pqo~i+bfXrQVE0ecEL6?G}Mf zVKTcPIO(@od!3PGsZy~Tpo+zW05-)vtW69?eJU(2rzN|7rukbA(vqD&)BY1>F?Wsa zvKrB-F3st}o~>zA=jN2xG(A`~>@(J8vS(fIY!)*WtHBY3-4M88A7^cfmG2dmo?%2d zLf>pVL<@HupU0cw&?yVScT2O9Aiq%7W#M&R&GvBBPQqKs&ZUhYN z2ec7G3R@1B(7%7!OCPM?Puq{2tas`|w-!z4^1kip>Omc-XUj}0U&V;>BzyKN6hY#g zAnXQ=XD<(v+Y==hY`oSHoj4begJ?+n(bRr<)F_u71A54_Hdg5o~MQic*J0{+;~n$n$Rnc(vlKnzP3Um$~;Ao z7$=BkW6U6TP%j{$HqBVDmFBG7Mdld^L0rl&l3(n$k7zw-!qCjJfmGd|1$QuelK#Y6Lc3N3* zl>Yd|My^Ih8p#QE9-{y{=QQTMvj;s|WinO9KP0ug=oA~-YU3!|e?Cd2XR7JwsWVY? zD^Kd(h7)B-evZuUGc}^bEkWWvP}q;PS6CYuXeY!e9{YR)e+@U_O6|}rgS}?(U|qN7 zO{haoBOa3oB|H&&kfz{RDJK(xlv@v#aGNSz_;lj|-Vk4TY(gLY8UX0DhO>4HYwO}s zz~Xf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K(^%2PF=oR2|ECs8I3`Yrx>J~&D hXH@SWyZC - - - - ANDROID_GYROSCOPE_GADGET - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/artifact.xml deleted file mode 100644 index 0e0fd9182..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - org.wso2.iot.android.gyroscope.ui.publisher.xml - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/org.wso2.iot.android.gyroscope.ui.publisher.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/org.wso2.iot.android.gyroscope.ui.publisher.xml deleted file mode 100644 index 2cd783def..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_ui_event_publisher/org.wso2.iot.android.gyroscope.ui.publisher.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/conf.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/conf.json deleted file mode 100644 index 53199e326..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/conf.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "provider-conf": { - "streamName": "org.wso2.iot.android.magnetic:1.0.0", - "provider-name": "realtime" - }, - "chart-conf": { - "x": "TIMESTAMP", - "xType": "time", - "y": "value", - "yType": "number", - "color": "axis", - "maxLength": "30", - "gadget-name": "ANDROID_MAGNETIC_GADGET", - "chart-name": "line-chart" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget-controller.jag b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget-controller.jag deleted file mode 100644 index f84538a40..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget-controller.jag +++ /dev/null @@ -1,42 +0,0 @@ -<% -/** - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -(function () { - - response.contentType = 'application/json'; - var PROVIDER_CONF = 'provider-conf'; - var PROVIDER_NAME = 'provider-name'; - - var action = request.getParameter("action"); - var data = request.getContent(); - var providerConf = data[PROVIDER_CONF]; - var providerAPI = require('js/core/' + providerConf[PROVIDER_NAME] + '-provider-api.js'); - - if (action === 'getSchema') { - print(providerAPI.getSchema(providerConf)); - return; - } else if(action === 'getData'){ - print(providerAPI.getData(providerConf)); - return; - } - -}()); - - -%> diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.json deleted file mode 100644 index 93efa3813..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "ANDROID_MAGNETIC_GADGET", - "title": "ANDROID_MAGNETIC_GADGET", - "type": "gadget", - "thumbnail": "gadget/ANDROID_MAGNETIC_GADGET/thumbnail.png", - "data": { - "url": "gadget/ANDROID_MAGNETIC_GADGET/gadget.xml" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.xml deleted file mode 100644 index e3a632324..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/gadget.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ]]> -
-
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-core.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-core.js deleted file mode 100644 index 8bfc5f742..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-core.js +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -$(function () { - var gadgetLocation; - var conf; - var schema; - var pref = new gadgets.Prefs(); - - var CHART_CONF = 'chart-conf'; - var PROVIDER_CONF = 'provider-conf'; - -var init = function () { - $.ajax({ - url: gadgetLocation + '/conf.json', - method: "GET", - contentType: "application/json", - async: false, - success: function (data) { - conf = JSON.parse(data); - $.ajax({ - url: gadgetLocation + '/gadget-controller.jag?action=getSchema', - method: "POST", - data: JSON.stringify(conf), - contentType: "application/json", - async: false, - success: function (data) { - schema = data; - } - }); - - } - }); -}; - - -var drawGadget = function (){ - - draw('#canvas', conf[CHART_CONF], schema, null); - registerCallBackforPush(conf[PROVIDER_CONF], schema, function(providerData) { - update(providerData); - }); - -}; - -getGadgetLocation(function (gadget_Location) { - gadgetLocation = gadget_Location; - init(); - drawGadget(); - -}); -}); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-util.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-util.js deleted file mode 100644 index 426dae39b..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/gadget-util.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getGadgetLocation = function (callback) { - var gadgetLocation = "/portal/store/carbon.super/fs/gadget/ANDROID_MAGNETIC_GADGET"; - var PATH_SEPERATOR = "/"; - if (gadgetLocation.search("store") != -1) { - wso2.gadgets.identity.getTenantDomain(function (tenantDomain) { - var gadgetPath = gadgetLocation.split(PATH_SEPERATOR); - var modifiedPath = ''; - for (var i = 1; i < gadgetPath.length; i++) { - if (i === 3) { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, tenantDomain); - } else { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, gadgetPath[i]) - } - } - callback(modifiedPath); - }); - } else { - callback(gadgetLocation); - } -} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/line-chart-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/line-chart-api.js deleted file mode 100644 index 18f363a32..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/line-chart-api.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, isProviderRequired, draw, update; - -(function() { - - var CHART_LOCATION = '/extensions/chart-templates/'; - - /** - * return the config to be populated in the chart configuration UI - * @param schema - */ - getConfig = function(schema) { - var chartConf = require(CHART_LOCATION + '/line-chart/config.json').config; - /* - dynamic logic goes here - */ - - var columns = []; - - columns.push("None"); - for(var i=0; i < schema.length; i++) { - columns.push(schema[i]["fieldName"]); - } - - for(var i=0; i < chartConf.length; i++) { - if (chartConf[i]["fieldName"] == "color") { - chartConf[i]["valueSet"] = columns; - break; - } - } - - return chartConf; - }; - - /** - * validate the user inout for the chart configuration - * @param chartConfig - */ - validate = function(chartConfig) { - return true; - }; - - /** - * TO be used when provider configuration steps need to be skipped - */ - isProviderRequired = function() { - - } - - - /** - * return the gadget content - * @param chartConfig - * @param schema - * @param data - */ - draw = function(placeholder, chartConfig, _schema, data) { - _schema = updateUserPrefXYTypes(_schema, chartConfig); - var schema = toVizGrammarSchema(_schema); - - var view = { - id: "chart-0", - schema: schema, - chartConfig: buildChartConfig(chartConfig), - data: function() { - if(data) { - var result = []; - console.log(data); - data.forEach(function(item) { - var row = []; - schema[0].metadata.names.forEach(function(name) { - row.push(item[name]); - }); - result.push(row); - }); - console.log(result); - wso2gadgets.onDataReady(result); - } - } - - }; - - try { - wso2gadgets.init(placeholder, view); - var view = wso2gadgets.load("chart-0"); - } catch (e) { - console.error(e); - } - - }; - - /** - * - * @param data - */ - update = function(data) { - wso2gadgets.onDataReady(data,"append"); - }; - - buildChartConfig = function (_chartConfig) { - var conf = {}; - conf.x = _chartConfig.x; - conf.xType = _chartConfig.xType; - conf.yType = _chartConfig.yType; - conf.maxLength = _chartConfig.maxLength; - conf.charts = []; - conf.charts[0] = { - type : "line", - y: _chartConfig.y - }; - - if (_chartConfig.color != "None") { - conf.charts[0].color = _chartConfig.color; - } - - return conf; - }; - - -}()); \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/provider-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/provider-client.js deleted file mode 100644 index 6196677f6..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/provider-client.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// var registerCallBackforPush; - -(function() { - - var callback; - - /** - * TODO Need to read hostname,port, and tenantId from providerConfig - * @param providerConfig - * @param schema - */ - registerCallBackforPush = function(providerConfig, schema, _callback) { - var streamId = providerConfig['streamName']; - var hostname = window.parent.location.hostname; - var port = window.parent.location.port; - - subscribe(streamId.split(":")[0], streamId.split(":")[1], - '10', - onData, onError, - hostname, - port, - 'WEBSOCKET' - ); - callback = _callback; - }; - - function onData(streamId, data) { - callback(data); - }; - - function onError(error) { - console.error(error); - }; - -}()); - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/realtime-provider-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/realtime-provider-api.js deleted file mode 100644 index 7cf59af77..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/core/realtime-provider-api.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, getMode, getSchema, getData, registerCallBackforPush; - -(function() { - - var PROVIDERS_LOCATION = '/extensions/providers/'; - var PROVIDER_NAME = 'realtime'; - - var log = new Log(); - var utils = require('/modules/utils.js'); - var carbon = require("carbon"); - var EventPublisherConstants = Packages.org.wso2.carbon.event.publisher.core.config.EventPublisherConstants; - var eventPublisherService = carbon.server.osgiService('org.wso2.carbon.event.publisher.core.EventPublisherService'); - var eventStreamService = carbon.server.osgiService('org.wso2.carbon.event.stream.core.EventStreamService'); - - var typeMap = { - "bool": "string", - "boolean": "string", - "string": "string", - "int": "number", - "integer": "number", - "long": "number", - "double": "number", - "float": "number", - "time": "time" - }; - - getConfig = function() { - var formConfig = require(PROVIDERS_LOCATION + '/' + PROVIDER_NAME + '/config.json'); - var datasources = []; - try { - var eventPublisherConfigurationList = eventPublisherService.getAllActiveEventPublisherConfigurations(); - for (var i = 0; i < eventPublisherConfigurationList.size(); i++) { - var eventPublisherConfiguration = eventPublisherService.getActiveEventPublisherConfiguration( - eventPublisherConfigurationList.get(i).getEventPublisherName());; - - var mappingTypeIsWso2 = eventPublisherConfiguration.getOutputMapping() - .getMappingType().equals(EventPublisherConstants.EF_WSO2EVENT_MAPPING_TYPE); - - var adapterType = null; - if (eventPublisherConfiguration.getToAdapterConfiguration() != null) { - adapterType = eventPublisherConfiguration.getToAdapterConfiguration().getType(); - } - if (mappingTypeIsWso2 && adapterType.trim() == "ui") { - var streamName = eventPublisherConfiguration.getFromStreamName(); - var streamVersion = eventPublisherConfiguration.getFromStreamVersion(); - var streamId = streamName + ":" + streamVersion; - datasources.push(streamId); - } - } - var datasourceCfg = { - "fieldLabel": "Event Stream", - "fieldName": "streamName", - "fieldType": "dropDown" - }; - datasourceCfg['valueSet'] = datasources; - } catch (e) { - log.error(e); - } - formConfig.config.push(datasourceCfg); - return formConfig; - }; - - /** - * validate the user input of provider configuration - * @param providerConfig - */ - validate = function(providerConfig) { - /* - validate the form and return - - */ - return true; - }; - - /** - * returns the data mode either push or pull - */ - getMode = function() { - return 'push'; - }; - - /** - * returns an array of column names & types - * @param providerConfig - */ - getSchema = function(providerConfig) { - var streamId = providerConfig["streamName"]; - var output = []; - - output.push({ - fieldName: "TIMESTAMP", - fieldType: "time" - }); - - if (eventStreamService != null) { - var eventStreamConfiguration = eventStreamService.getEventStreamConfiguration(streamId); - if (eventStreamConfiguration != null) { - var metaData = eventStreamConfiguration.getStreamDefinition().getMetaData(); - var correlationData = eventStreamConfiguration.getStreamDefinition().getCorrelationData(); - var payloadData = eventStreamConfiguration.getStreamDefinition().getPayloadData(); - if (metaData != null) { - for (var i = 0; i < metaData.size(); i++) { - var type = metaData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: metaData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (correlationData != null) { - for (var i = 0; i < correlationData.size(); i++) { - var type = correlationData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: correlationData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (payloadData != null) { - for (var i = 0; i < payloadData.size(); i++) { - var type = payloadData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: payloadData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - } - } - return output; - }; - - getData = function(providerConfig,limit) { - var data = []; - return data; - }; - - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/provider-libs/ws-client.js deleted file mode 100644 index 760ecf951..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_gadget/ANDROID_MAGNETIC_GADGET/js/provider-libs/ws-client.js +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var CONSTANTS = { - urlSeperator: '/', - queryParamStreamName : '?streamname=', - queryParamStreamVersion : '&version=', - queryParamLastUpdatedTime : '&lastUpdatedTime=', - urlSecureTransportWebsocket : 'wss://', - urlSecureTransportHttp : 'https://', - colon : ':', - defaultIntervalTime : 10 * 1000, - defaultHostName : 'localhost', - defaultSecurePortNumber : '9443', - defaultMode : 'AUTO', - processModeHTTP : 'HTTP', - processModeWebSocket : 'WEBSOCKET', - processModeAuto : 'AUTO', - numThousand : 1000, - websocketTimeAppender : 400, - websocketSubscriptionEndpoint : 'portal/uipublisher/websocketSubscriptionEndpoint.jag', - httpEventRetrievalEndpoint : 'portal/uipublisher/httpEventRetrievalEndpoint.jag' -}; - -var websocket = null; -var webSocketUrl; -var httpUrl; -var cepHostName; -var cepPortNumber; -var isErrorOccured = false; -var lastUpdatedtime = -1; -var polingInterval; -var stream; -var streamVersion; -var firstPollingAttempt; -var processMode; -var onSuccessFunction; -var onErrorFunction; -var terminateWebsocketInstance = false; -var pollingContinue = true; - -function subscribe(streamName,version,intervalTime, - listeningFuncSuccessData,listeningFuncErrorData,cepHost,cepPort,mode){ - stopPollingProcesses(); - stream = streamName; - streamVersion = version; - onSuccessFunction = listeningFuncSuccessData; - onErrorFunction = listeningFuncErrorData; - - if(intervalTime == null || intervalTime == ""){ - polingInterval = CONSTANTS.defaultIntervalTime; - } else{ - polingInterval = intervalTime * CONSTANTS.numThousand; - } - - if(cepHost == null || cepHost == ""){ - cepHostName = CONSTANTS.defaultHostName; - } else{ - cepHostName = cepHost; - } - - if(cepPort == null || cepPort == ""){ - cepPortNumber = CONSTANTS.defaultSecurePortNumber; - } else{ - cepPortNumber = cepPort; - } - - if(mode == null || mode == ""){ - processMode = CONSTANTS.defaultMode; - } else{ - processMode = mode; - } - - webSocketUrl = CONSTANTS.urlSecureTransportWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.websocketSubscriptionEndpoint; - - if(processMode == CONSTANTS.processModeHTTP){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } else{ - initializeWebSocket(webSocketUrl); - } -} - -/** - * Initializing Web Socket - */ -function initializeWebSocket(webSocketUrl){ - websocket = new WebSocket(webSocketUrl); - websocket.onopen = webSocketOnOpen; - websocket.onmessage = webSocketOnMessage; - websocket.onclose = webSocketOnClose; - websocket.onerror = webSocketOnError; -} - -function getWebsocketSubscriptionMessage(streamName, streamVersion, streamProperties, streamValues) { - if (streamProperties.length === streamValues.length) { - var message = {}; - message.streamName = streamName; - message.streamVersion = streamVersion; - var i; - for (i = 0; i < streamProperties.length; i++) { - message.filterProps = []; - message.filterProps.push({ - 'name': streamProperties[i], - 'value': streamValues[i] - }); - } - return JSON.stringify(message); - } else { - console.log('stream properties and values are not in equal size'); - } -} - -/** - * Get the parameters as query parameters. - * This method parses those parameters and returns. - * */ -function getAllQueryParamsFromURL() { - var queryParamList = {}, qParam; - var urlQueryString = decodeURIComponent(window.top.location.search.substring(1)); - - if (urlQueryString) { - var queryStringPairs = urlQueryString.split('&'); - for (var i = 0; i < queryStringPairs.length; i++) { - qParam = queryStringPairs[i].split('='); - queryParamList[qParam[0]] = qParam[1]; - } - return queryParamList; - - } else { - return null; - } -} - -/** - * Web socket On Open - */ -var webSocketOnOpen = function () { - var params = getAllQueryParamsFromURL(); - var deviceId; - var owner; - if (params) { - owner = params["owner"]; - deviceId = params["deviceId"]; - } - var filterPropNames = ["meta_owner", "meta_deviceId"]; - var filterPropVals = [owner, deviceId]; - var data = getWebsocketSubscriptionMessage(stream, streamVersion, filterPropNames, filterPropVals); - websocket.send(data); -}; - -/** - * On server sends a message - */ -var webSocketOnMessage = function (evt) { - var event = evt.data; - var array = JSON.parse(event); - constructPayload(array); -}; - -/** - * On server close - */ -var webSocketOnClose =function (e) { - - if(isErrorOccured){ - if(processMode != CONSTANTS.processModeWebSocket){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } - } else{ - if(!terminateWebsocketInstance){ - waitForSocketConnection(websocket); - } else{ - terminateWebsocketInstance = false; - } - - } -}; - -/** - * On server Error - */ -var webSocketOnError = function (err) { - var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!"; - - onErrorFunction(error); - isErrorOccured = true; - -}; - -/** - * Gracefully increments the connection retry - */ -var waitTime = CONSTANTS.numThousand; -function waitForSocketConnection(socket, callback){ - setTimeout( - function () { - if (socket.readyState === 1) { - initializeWebSocket(webSocketUrl); - console.log("Connection is made"); - if(callback != null){ - callback(); - } - return; - } else { - websocket = new WebSocket(webSocketUrl); - waitTime += CONSTANTS.websocketTimeAppender; - waitForSocketConnection(websocket, callback); - } - }, waitTime); -} - -/** - * Polling to retrieve events from http request periodically - */ -function startPoll(){ - - (function poll(){ - setTimeout(function(){ - httpUrl = CONSTANTS.urlSecureTransportHttp + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.httpEventRetrievalEndpoint + CONSTANTS.queryParamStreamName + stream + - CONSTANTS.queryParamStreamVersion + streamVersion + CONSTANTS.queryParamLastUpdatedTime + lastUpdatedtime;; - $.getJSON(httpUrl, function(responseText) { - if(firstPollingAttempt){ - /*var data = $("textarea#idConsole").val(); - $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/ - firstPollingAttempt = false; - } - var eventList = $.parseJSON(responseText.events); - if(eventList.length != 0){ - lastUpdatedtime = responseText.lastEventTime; - for(var i=0;i6ENwLKbHK%kA<`(x^{)D1Reg9MG9tc_-Egx1={;5qJRZK>84v$jP&HbszdA)mFe z8YxD{C?RABvsh~jSSwJEHOvG_yz`xUd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Vw(?1^-R>CGjh>j)$1LMv zi>6X7iN^hCXatcSP2dW~8YJPK%MSHxRF@XK>PBzY@ERZx7IHfR1XzFI1Z_BQoWIs3 zULgypp0G0{I)|u?8j2upwAMzG$$@r)03pzYbnHk0y(`vjg!++}nZ`+zoR~oEveFr$ zQu#hTT4e^T69#Y6i8A-B$&Kt9;Dp%AwjD1!Lu-CIPDf9jsj~;qDlnl5r9TZy@OT4j zl4EVa!_gL!hD;C-CTK)yXGWC2E!@VvHflW*dB8IT&)(f*y2}uwKvSpY$IAIDf@sf? z+*5i@>$AdWov~mmy}ER#n%5ox$hf_EL>IbuY!6v4-V5Yjbu6ZCYSai~^uy5vyXZX4 zKAB>+FGdmg|KC`-hd$q27#4#*-T>7Qjt2xyQJG(IP7c(myO=x_#?!SnNP>7>JW7B+ zMUs{GFsjU1vzOjjwWmR*$0O!*<2fDa$^jj$#C)(E`2R6E*cgx3+@J~KbrS}#m&eIM ziAs3C-eGnM$P((9K`gsJKvy%|`{4s#7|vhqC`_J}1c z+4VCm+x>G~&nZFtW_YLOJm5LLXKNXQTMuM2Jk6eay;ufJ5k!1bkYM$wHllR1`hCP0 z7VJ38gK&sW2Rm^n5`YUC@tNVBa%pVWmNXN^c%$BB&vkA?a7-wI1b5Rgl1yc7yw(!J^;>W=Zz?p-lj@b%)N<(~ ztAikGUux~G`ldoDf<)#fqAt@2jVz<y4{K(^%2PF=oR2|ECs8I3`Yrx>J~&D hXH@SWyZC - - - - ANDROID_MAGNETIC_GADGET - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/artifact.xml deleted file mode 100644 index b34157e4b..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - org.wso2.iot.android.magnetic.ui.publisher.xml - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/org.wso2.iot.android.magnetic.ui.publisher.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/org.wso2.iot.android.magnetic.ui.publisher.xml deleted file mode 100644 index 2c8af401c..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_ui_event_publisher/org.wso2.iot.android.magnetic.ui.publisher.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/conf.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/conf.json deleted file mode 100644 index 849f327b9..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/conf.json +++ /dev/null @@ -1 +0,0 @@ -{"provider-conf" : {"tableName" : "ORG_WSO2_IOT_ANDROID_PRESSURE_STATS", "query" : "", "limit" : "", "provider-name" : "batch"}, "chart-conf" : {"x" : "pressure", "title" : "PRESSURE", "maxLength" : "30", "gadget-name" : "PROXIMITY", "chart-name" : "number-chart"}} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/css/number-chart.css b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/css/number-chart.css deleted file mode 100644 index 5dde0413a..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/css/number-chart.css +++ /dev/null @@ -1,35 +0,0 @@ -#canvas { - height: 100%; - width: 100%; -} - -p { - margin: 0; - display: block; - text-align: center; - font-weight: bold; -} - -.titlecanvasContent { - color:steelblue; - font-size:18px; - font-weight: normal; - padding: 10px 0; -} - -.valcanvasContent { - color:#438CAD; - font-size:50px; - font-weight: normal; -} - - -.diffcanvasContent { - color:#438CAD; - font-size:14px; -} - -.diffPercentagecanvasContent { - color:#ff944d; - font-size:14px; -} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget-controller.jag b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget-controller.jag deleted file mode 100644 index f84538a40..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget-controller.jag +++ /dev/null @@ -1,42 +0,0 @@ -<% -/** - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -(function () { - - response.contentType = 'application/json'; - var PROVIDER_CONF = 'provider-conf'; - var PROVIDER_NAME = 'provider-name'; - - var action = request.getParameter("action"); - var data = request.getContent(); - var providerConf = data[PROVIDER_CONF]; - var providerAPI = require('js/core/' + providerConf[PROVIDER_NAME] + '-provider-api.js'); - - if (action === 'getSchema') { - print(providerAPI.getSchema(providerConf)); - return; - } else if(action === 'getData'){ - print(providerAPI.getData(providerConf)); - return; - } - -}()); - - -%> diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.json deleted file mode 100644 index 43b51c3b6..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "PROXIMITY", - "title": "PROXIMITY", - "type": "gadget", - "thumbnail": "gadget/PROXIMITY/thumbnail.png", - "data": { - "url": "gadget/PROXIMITY/gadget.xml" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.xml deleted file mode 100644 index de27540da..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/gadget.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ]]> -
-
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/batch-provider-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/batch-provider-api.js deleted file mode 100644 index 30c96902a..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/batch-provider-api.js +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, getMode, getSchema, getData, registerCallBackforPush; - -(function() { - - var PROVIDERS_LOCATION = '/extensions/providers/'; - - var PROVIDER_NAME = 'batch'; - var TYPE = "type"; - var TABLE_NAME = "tableName"; - var HTTPS_TRANSPORT = "https"; - var CONTENT_TYPE_JSON = "application/json"; - var AUTHORIZATION_HEADER = "Authorization"; - var USER_TOKEN = "user"; - var TENANT_DOMAIN = "domain"; - var CONST_AT = "@"; - var USERNAME = "username"; - var HTTP_USER_NOT_AUTHENTICATED = 403; - var JS_MAX_VALUE = "9007199254740992"; - var JS_MIN_VALUE = "-9007199254740992"; - - var typeMap = { - "bool" : "string", - "boolean" : "string", - "string" : "string", - "int" : "number", - "integer" : "number", - "long" : "number", - "double" : "number", - "float" : "number", - "time": "time" - }; - - var log = new Log(); - var carbon = require('carbon'); - var configs = require('/configs/designer.json'); - var utils = require('/modules/utils.js'); - var JSUtils = Packages.org.wso2.carbon.analytics.jsservice.Utils; - var AnalyticsCachedJSServiceConnector = Packages.org.wso2.carbon.analytics.jsservice.AnalyticsCachedJSServiceConnector; - var AnalyticsCache = Packages.org.wso2.carbon.analytics.jsservice.AnalyticsCachedJSServiceConnector.AnalyticsCache; - var cacheTimeoutSeconds = 5; - var loggedInUser = null; - - if (configs.cacheTimeoutSeconds) { - cacheTimeoutSeconds = parseInt(configs.cacheTimeoutSeconds); - } - var cacheSizeBytes = 1024 * 1024 * 1024; // 1GB - if (configs.cacheSizeBytes) { - cacheSizeBytes = parseInt(configs.cacheSizeBytes); - } - response.contentType = CONTENT_TYPE_JSON; - - var authParam = request.getHeader(AUTHORIZATION_HEADER); - if (authParam != null) { - credentials = JSUtils.authenticate(authParam); - loggedInUser = credentials[0]; - } else { - var token = session.get(USER_TOKEN); - if (token != null) { - loggedInUser = token[USERNAME] + CONST_AT + token[TENANT_DOMAIN]; - } else { - log.error("user is not authenticated!"); - response.status = HTTP_USER_NOT_AUTHENTICATED; - print('{ "status": "Failed", "message": "User is not authenticated." }'); - return; - } - } - - var cache = application.get("AnalyticsWebServiceCache"); - if (cache == null) { - cache = new AnalyticsCache(cacheTimeoutSeconds, cacheSizeBytes); - application.put("AnalyticsWebServiceCache", cache); - } - var connector = new AnalyticsCachedJSServiceConnector(cache); - - /** - * require the existing config.json and push any dynamic fields that needs to be populated in the UI - */ - getConfig = function() { - var formConfig = require(PROVIDERS_LOCATION + '/' + PROVIDER_NAME + '/config.json'); - var tables; - try { - tables = JSON.parse(connector.getTableList(loggedInUser).getMessage()); - } catch (e) { - log.error(e); - } - var configs = formConfig.config; - configs.forEach(function(config) { - if (config.fieldName === TABLE_NAME) { - config.valueSet = tables; - } - }); - return formConfig; - } - - /** - * validate the user input of provider configuration - * @param providerConfig - */ - validate = function(providerConfig) { - /* - validate the form and return - - */ - return true; - } - - /** - * returns the data mode either push or pull - */ - getMode = function() { - return "PULL"; - } - - /** - * returns an array of column names & types - * @param providerConfig - */ - getSchema = function(providerConfig) { - var schema = []; - var tableName = providerConfig["tableName"]; - var result = connector.getTableSchema(loggedInUser, tableName).getMessage(); - result = JSON.parse(result); - - var columns = result.columns; - Object.getOwnPropertyNames(columns).forEach(function(name, idx, array) { - var type = "ordinal"; - if(columns[name]['type']) { - type = columns[name]['type']; - } - schema.push({ - fieldName: name, - fieldType: typeMap[type.toLowerCase()] - }); - }); - // log.info(schema); - return schema; - }; - - /** - * returns the actual data - * @param providerConfig - * @param limit - */ - getData = function(providerConfig, limit) { - var tableName = providerConfig.tableName; - var query = providerConfig.query; - var limit = 100; - if (providerConfig.limit) { - limit = providerConfig.limit; - } - var result; - //if there's a filter present, we should perform a Lucene search instead of reading the table - if (query) { - var filter = { - "query": query, - "start": 0, - "count": limit - }; - result = connector.search(loggedInUser, tableName, stringify(filter)).getMessage(); - } else { - var from = JS_MIN_VALUE; - var to = JS_MAX_VALUE; - result = connector.getRecordsByRange(loggedInUser, tableName, from, to, 0, limit, null).getMessage(); - - } - result = JSON.parse(result); - var data = []; - for (var i = 0; i < result.length; i++) { - var values = result[i].values; - data.push(values); - } - return data; - }; - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-core.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-core.js deleted file mode 100644 index 9dfe8683b..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-core.js +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -$(function () { - var gadgetLocation; - var conf; - var schema; - var pref = new gadgets.Prefs(); - - var refreshInterval; - var providerData; - - var CHART_CONF = 'chart-conf'; - var PROVIDER_CONF = 'provider-conf'; - - var REFRESH_INTERVAL = 'refreshInterval'; - -var init = function () { - $.ajax({ - url: gadgetLocation + '/conf.json', - method: "GET", - contentType: "application/json", - async: false, - success: function (data) { - conf = JSON.parse(data); - $.ajax({ - url: gadgetLocation + '/gadget-controller.jag?action=getSchema', - method: "POST", - data: JSON.stringify(conf), - contentType: "application/json", - async: false, - success: function (data) { - schema = data; - } - }); - - getProviderData(); - - } - }); -}; - -var getProviderData = function (){ - $.ajax({ - url: gadgetLocation + '/gadget-controller.jag?action=getData', - method: "POST", - data: JSON.stringify(conf), - contentType: "application/json", - async: false, - success: function (data) { - providerData = data; - } - }); - return providerData; -}; - - -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(); - -}); -}); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-util.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-util.js deleted file mode 100644 index 13f2120f1..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/gadget-util.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getGadgetLocation = function (callback) { - var gadgetLocation = "/portal/store/carbon.super/fs/gadget/PROXIMITY"; - var PATH_SEPERATOR = "/"; - if (gadgetLocation.search("store") != -1) { - wso2.gadgets.identity.getTenantDomain(function (tenantDomain) { - var gadgetPath = gadgetLocation.split(PATH_SEPERATOR); - var modifiedPath = ''; - for (var i = 1; i < gadgetPath.length; i++) { - if (i === 3) { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, tenantDomain); - } else { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, gadgetPath[i]) - } - } - callback(modifiedPath); - }); - } else { - callback(gadgetLocation); - } -} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/number-chart-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/number-chart-api.js deleted file mode 100644 index ef2c5da98..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/js/core/number-chart-api.js +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, isProviderRequired, draw, update; - -(function() { - - var CHART_LOCATION = '/extensions/chart-templates/'; - - /** - * return the config to be populated in the chart configuration UI - * @param schema - */ - getConfig = function(schema) { - var chartConf = require(CHART_LOCATION + '/number-chart/config.json').config; - /* - dynamic logic goes here - */ - return chartConf; - - }; - - /** - * validate the user inout for the chart configurationx - * @param chartConfig - */ - validate = function(chartConfig) { - return true; - }; - - /** - * TO be used when provider configuration steps need to be skipped - */ - isProviderRequired = function() { - - } - - - /** - * return the gadget content - * @param chartConfig - * @param schema - * @param data - */ - draw = function(placeholder, chartConfig, _schema, data) { - var schema = toVizGrammarSchema(_schema); - var view = { - id: "chart-0", - schema: schema, - chartConfig: buildChartConfig(chartConfig), - data: function() { - if(data) { - var result = []; - console.log(data); - data.forEach(function(item) { - var row = []; - schema[0].metadata.names.forEach(function(name) { - row.push(item[name]); - }); - result.push(row); - }); - console.log(result); - wso2gadgets.onDataReady(result); - } - } - - }; - - try { - wso2gadgets.init(placeholder, view); - var view = wso2gadgets.load("chart-0"); - } catch (e) { - console.error(e); - } - - }; - - /** - * - * @param data - */ - update = function(data) { - wso2gadgets.onDataReady(data,"append"); - } - - buildChartConfig = function (_chartConfig) { - var conf = {}; - conf.x = _chartConfig.x; - conf.maxLength = _chartConfig.maxLength; - conf.charts = []; - conf.charts[0] = { - type : "number", - title : _chartConfig.title - }; - return conf; - }; - - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/thumbnail.png b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_gadget/PROXIMITY/thumbnail.png deleted file mode 100644 index 8b3f4354050480f82c28608a983cd5861e67e5aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12971 zcmV;cGE~ipP)6ENwLKbHK%kA<`(x^{)D1Reg9MG9tc_-Egx1={;5qJRZK>84v$jP&HbszdA)mFe z8YxD{C?RABvsh~jSSwJEHOvG_yz`xUd1IKpn1pYU+_i2+w33gksr`K6)H?j6FcJ1@n>syQ{bCo10f_Rexqr_C!u4OGP zm}49-uVh3xP8*r1AnPo@qz8Pqo~i+bfXrQVE0ecEL6?G}Mf zVKTcPIO(@od!3PGsZy~Tpo+zW05-)vtW69?eJU(2rzN|7rukbA(vqD&)BY1>F?Wsa zvKrB-F3st}o~>zA=jN2xG(A`~>@(J8vS(fIY!)*WtHBY3-4M88A7^cfmG2dmo?%2d zLf>pVL<@HupU0cw&?yVScT2O9Aiq%7W#M&R&GvBBPQqKs&ZUhYN z2ec7G3R@1B(7%7!OCPM?Puq{2tas`|w-!z4^1kip>Omc-XUj}0U&V;>BzyKN6hY#g zAnXQ=XD<(v+Y==hY`oSHoj4begJ?+n(bRr<)F_u71A54_Hdg5o~MQic*J0{+;~n$n$Rnc(vlKnzP3Um$~;Ao z7$=BkW6U6TP%j{$HqBVDmFBG7Mdld^L0rl&l3(n$k7zw-!qCjJfmGd|1$QuelK#Y6Lc3N3* zl>Yd|My^Ih8p#QE9-{y{=QQTMvj;s|WinO9KP0ug=oA~-YU3!|e?Cd2XR7JwsWVY? zD^Kd(h7)B-evZuUGc}^bEkWWvP}q;PS6CYuXeY!e9{YR)e+@U_O6|}rgS}?(U|qN7 zO{haoBOa3oB|H&&kfz{RDJK(xlv@v#aGNSz_;lj|-Vk4TY(gLY8UX0DhO>4HYwO}s zz~XfTf#vvj)@}>5(+~TO(S37Q^N}N5Kuc{+ll5V-F`$Ew*CNxyJ2m%Fm0}fe zMtr`x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plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/artifact.xml deleted file mode 100644 index dbdeeb073..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - org.wso2.iot.android.proximity.ui.publisher.xml - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/org.wso2.iot.android.proximity.ui.publisher.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/org.wso2.iot.android.proximity.ui.publisher.xml deleted file mode 100644 index 4d689764f..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_proximity_ui_event_publisher/org.wso2.iot.android.proximity.ui.publisher.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/conf.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/conf.json deleted file mode 100644 index 254c66d67..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/conf.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "provider-conf": { - "streamName": "org.wso2.iot.android.battery:1.0.0", - "provider-name": "realtime" - }, - "chart-conf": { - "key": "timestamp", - "color": "status", - "grid": "on", - "maxLength": "15", - "gadget-name": "Android Realtime Battery", - "chart-name": "table-chart" - } -} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/css/dataTables.bootstrap.min.css b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/css/dataTables.bootstrap.min.css deleted file mode 100644 index 745f2996f..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/css/dataTables.bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable{border-collapse:separate !important}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget-controller.jag b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget-controller.jag deleted file mode 100644 index f84538a40..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget-controller.jag +++ /dev/null @@ -1,42 +0,0 @@ -<% -/** - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -(function () { - - response.contentType = 'application/json'; - var PROVIDER_CONF = 'provider-conf'; - var PROVIDER_NAME = 'provider-name'; - - var action = request.getParameter("action"); - var data = request.getContent(); - var providerConf = data[PROVIDER_CONF]; - var providerAPI = require('js/core/' + providerConf[PROVIDER_NAME] + '-provider-api.js'); - - if (action === 'getSchema') { - print(providerAPI.getSchema(providerConf)); - return; - } else if(action === 'getData'){ - print(providerAPI.getData(providerConf)); - return; - } - -}()); - - -%> diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.json deleted file mode 100644 index 19f480e19..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "Android_Realtime_Battery", - "title": "Android Realtime Battery", - "type": "gadget", - "thumbnail": "gadget/Android_Realtime_Battery/thumbnail.png", - "data": { - "url": "gadget/Android_Realtime_Battery/gadget.xml" - } -} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml deleted file mode 100644 index 334d78791..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ]]> -
-
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-core.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-core.js deleted file mode 100644 index 2b1e3f717..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-core.js +++ /dev/null @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -$(function () { - var gadgetLocation; - var conf; - var schema; - var pref = new gadgets.Prefs(); - - var CHART_CONF = 'chart-conf'; - var PROVIDER_CONF = 'provider-conf'; - -var init = function () { - $.ajax({ - url: gadgetLocation + '/conf.json', - method: "GET", - contentType: "application/json", - async: false, - success: function (data) { - conf = JSON.parse(data); - $.ajax({ - url: gadgetLocation + '/gadget-controller.jag?action=getSchema', - method: "POST", - data: JSON.stringify(conf), - contentType: "application/json", - async: false, - success: function (data) { - schema = data; - } - }); - - } - }); -}; - - -var drawGadget = function (){ - draw('#canvas', conf[CHART_CONF], schema, null); - registerCallBackforPush(conf[PROVIDER_CONF], schema, function(providerData) { - update(providerData); - }); - -}; - -getGadgetLocation(function (gadget_Location) { - gadgetLocation = gadget_Location; - init(); - drawGadget(); -}); -}); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-util.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-util.js deleted file mode 100644 index 3ef89ba43..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/gadget-util.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getGadgetLocation = function (callback) { - var gadgetLocation = "/portal/store/carbon.super/fs/gadget/Android_Realtime_Battery"; - var PATH_SEPERATOR = "/"; - if (gadgetLocation.search("store") != -1) { - wso2.gadgets.identity.getTenantDomain(function (tenantDomain) { - var gadgetPath = gadgetLocation.split(PATH_SEPERATOR); - var modifiedPath = ''; - for (var i = 1; i < gadgetPath.length; i++) { - if (i === 3) { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, tenantDomain); - } else { - modifiedPath = modifiedPath.concat(PATH_SEPERATOR, gadgetPath[i]) - } - } - callback(modifiedPath); - }); - } else { - callback(gadgetLocation); - } -}; \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/provider-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/provider-client.js deleted file mode 100644 index 6196677f6..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/provider-client.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// var registerCallBackforPush; - -(function() { - - var callback; - - /** - * TODO Need to read hostname,port, and tenantId from providerConfig - * @param providerConfig - * @param schema - */ - registerCallBackforPush = function(providerConfig, schema, _callback) { - var streamId = providerConfig['streamName']; - var hostname = window.parent.location.hostname; - var port = window.parent.location.port; - - subscribe(streamId.split(":")[0], streamId.split(":")[1], - '10', - onData, onError, - hostname, - port, - 'WEBSOCKET' - ); - callback = _callback; - }; - - function onData(streamId, data) { - callback(data); - }; - - function onError(error) { - console.error(error); - }; - -}()); - diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/realtime-provider-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/realtime-provider-api.js deleted file mode 100644 index 7cf59af77..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/realtime-provider-api.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, getMode, getSchema, getData, registerCallBackforPush; - -(function() { - - var PROVIDERS_LOCATION = '/extensions/providers/'; - var PROVIDER_NAME = 'realtime'; - - var log = new Log(); - var utils = require('/modules/utils.js'); - var carbon = require("carbon"); - var EventPublisherConstants = Packages.org.wso2.carbon.event.publisher.core.config.EventPublisherConstants; - var eventPublisherService = carbon.server.osgiService('org.wso2.carbon.event.publisher.core.EventPublisherService'); - var eventStreamService = carbon.server.osgiService('org.wso2.carbon.event.stream.core.EventStreamService'); - - var typeMap = { - "bool": "string", - "boolean": "string", - "string": "string", - "int": "number", - "integer": "number", - "long": "number", - "double": "number", - "float": "number", - "time": "time" - }; - - getConfig = function() { - var formConfig = require(PROVIDERS_LOCATION + '/' + PROVIDER_NAME + '/config.json'); - var datasources = []; - try { - var eventPublisherConfigurationList = eventPublisherService.getAllActiveEventPublisherConfigurations(); - for (var i = 0; i < eventPublisherConfigurationList.size(); i++) { - var eventPublisherConfiguration = eventPublisherService.getActiveEventPublisherConfiguration( - eventPublisherConfigurationList.get(i).getEventPublisherName());; - - var mappingTypeIsWso2 = eventPublisherConfiguration.getOutputMapping() - .getMappingType().equals(EventPublisherConstants.EF_WSO2EVENT_MAPPING_TYPE); - - var adapterType = null; - if (eventPublisherConfiguration.getToAdapterConfiguration() != null) { - adapterType = eventPublisherConfiguration.getToAdapterConfiguration().getType(); - } - if (mappingTypeIsWso2 && adapterType.trim() == "ui") { - var streamName = eventPublisherConfiguration.getFromStreamName(); - var streamVersion = eventPublisherConfiguration.getFromStreamVersion(); - var streamId = streamName + ":" + streamVersion; - datasources.push(streamId); - } - } - var datasourceCfg = { - "fieldLabel": "Event Stream", - "fieldName": "streamName", - "fieldType": "dropDown" - }; - datasourceCfg['valueSet'] = datasources; - } catch (e) { - log.error(e); - } - formConfig.config.push(datasourceCfg); - return formConfig; - }; - - /** - * validate the user input of provider configuration - * @param providerConfig - */ - validate = function(providerConfig) { - /* - validate the form and return - - */ - return true; - }; - - /** - * returns the data mode either push or pull - */ - getMode = function() { - return 'push'; - }; - - /** - * returns an array of column names & types - * @param providerConfig - */ - getSchema = function(providerConfig) { - var streamId = providerConfig["streamName"]; - var output = []; - - output.push({ - fieldName: "TIMESTAMP", - fieldType: "time" - }); - - if (eventStreamService != null) { - var eventStreamConfiguration = eventStreamService.getEventStreamConfiguration(streamId); - if (eventStreamConfiguration != null) { - var metaData = eventStreamConfiguration.getStreamDefinition().getMetaData(); - var correlationData = eventStreamConfiguration.getStreamDefinition().getCorrelationData(); - var payloadData = eventStreamConfiguration.getStreamDefinition().getPayloadData(); - if (metaData != null) { - for (var i = 0; i < metaData.size(); i++) { - var type = metaData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: metaData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (correlationData != null) { - for (var i = 0; i < correlationData.size(); i++) { - var type = correlationData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: correlationData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - if (payloadData != null) { - for (var i = 0; i < payloadData.size(); i++) { - var type = payloadData.get(i).getType().toString().toLowerCase(); - output.push({ - fieldName: payloadData.get(i).getName(), - fieldType: typeMap[type.toLowerCase()] - }); - } - } - } - } - return output; - }; - - getData = function(providerConfig,limit) { - var data = []; - return data; - }; - - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/table-chart-api.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/table-chart-api.js deleted file mode 100644 index a71cd548b..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/core/table-chart-api.js +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var getConfig, validate, isProviderRequired, draw, update; - -(function () { - - var CHART_LOCATION = '/extensions/chart-templates/'; - - var tableFieldsOrder = ['timestamp', 'level', 'status', 'state', 'temperature']; - - /** - * return the config to be populated in the chart configuration UI - * @param schema - */ - getConfig = function (schema) { - var chartConf = require(CHART_LOCATION + '/table-chart/config.json').config; - /* - dynamic logic goes here - */ - - var columns = []; - - columns.push("None"); - columns.push("All"); - for (var i = 0; i < schema.length; i++) { - columns.push(schema[i]["fieldName"]); - } - - for (var i = 0; i < chartConf.length; i++) { - if (chartConf[i]["fieldName"] == "color") { - chartConf[i]["valueSet"] = columns; - break; - } - } - - return chartConf; - }; - - /** - * validate the user inout for the chart configuration - * @param chartConfig - */ - validate = function (chartConfig) { - return true; - }; - - /** - * TO be used when provider configuration steps need to be skipped - */ - isProviderRequired = function () { - - } - - - /** - * return the gadget content - * @param chartConfig - * @param schema - * @param data - */ - draw = function (placeholder, chartConfig, _schema, data) { - var schema = toVizGrammarSchema(_schema); - var grid = chartConfig.grid; - var columns = []; - - for (var i = 0; i < _schema.length; i++) { - columns.push(_schema[i]["fieldName"]); - } - // console.log(schema); - chartConfig.columns = tableFieldsOrder; - - - var view = { - id: "chart-0", - schema: schema, - chartConfig: buildChartConfig(chartConfig), - data: function () { - if (data) { - var result = []; - data.forEach(function (item) { - var row = []; - schema[0].metadata.names.forEach(function (name) { - row.push(item[name]); - }); - result.push(row); - }); - wso2gadgets.onDataReady(result); - } - } - - }; - - try { - wso2gadgets.init(placeholder, view); - var view = wso2gadgets.load("chart-0"); - if (grid) { - $(document).ready(function () { - $('#table').DataTable(); - }); - } - } catch (e) { - console.error(e); - } - - }; - - /** - * - * @param data - */ - update = function (data) { - //Change the timestamp field in Datetime format. - data[0][3] = getDateString(data[0][3]); - wso2gadgets.onDataReady(data, "append"); - }; - - buildChartConfig = function (_chartConfig) { - var conf = {}; - conf.charts = []; - conf.charts[0] = { - type: "table", - key: _chartConfig.key, - grid: _chartConfig.grid - }; - conf.maxLength = _chartConfig.maxLength; - - if (_chartConfig.color == "All") { - conf.charts[0].color = "*"; - } else if (_chartConfig.color != "None") { - conf.charts[0].color = _chartConfig.color; - } - - conf.charts[0].columns = _chartConfig.columns; - conf.columnTitles = ['Time', 'Remaining Charge','Health', 'State', 'Temperature']; - return conf; - }; - - -}()); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/jquery.dataTables.min.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/jquery.dataTables.min.js deleted file mode 100644 index d87780456..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/jquery.dataTables.min.js +++ /dev/null @@ -1,164 +0,0 @@ -/*! - DataTables 1.10.10 - ©2008-2015 SpryMedia Ltd - datatables.net/license -*/ -(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()), -d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords"); -a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX= -a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("
").css({position:"absolute",top:1,left:1, -width:100,overflow:"scroll"}).append(h("
").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&& -(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);la(a,d,h(b).data())}function la(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f= -(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),J(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&& -(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass= -d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;cq[f])d(l.length+q[f],o);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ea(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData= -Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c").appendTo(g));b=0;for(c=l.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,o=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&& -!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:o;for(j=j?0:g;j",{"class":e?d[0]:""}).append(h("",{valign:"top",colSpan:ca(a), -"class":a.oClasses.sRowEmpty}).html(c))[0];v(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,o,i]);v(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,o,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));v(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&mb(a);d?ha(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold= -!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("
").insertBefore(c),d=a.oFeatures,e=h("
",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,o,l,q,u=0;u")[0];o=f[u+1];if("'"==o||'"'==o){l="";for(q=2;f[u+q]!=o;)l+=f[u+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(o=l.split("."), -i.id=o[0].substr(1,o[0].length-1),i.className=o[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;u+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&&d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==j&&d.bPaginate)g=tb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(o=i.length;q',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("
",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("
").addClass(b.sLength); -a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Ra(a,h(this).val());O(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},b=h("
").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+ -"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;lf&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"== -b?d+e",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");v(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role", -"grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),o=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("
",{"class":f.sScrollWrapper}).append(h("
",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:w(d):"100%"}).append(h("
",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner|| -"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("
",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:w(d)}).append(b));l&&i.append(h("
",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:w(d):"100%"}).append(h("
",{"class":f.sScrollFootInner}).append(o.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(), -k=b[0],f=b[1],u=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(u.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=u;a.aoDrawCallback.push({fn:Z,sName:"scrolling"});return i[0]}function Z(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,o=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,u=h(a.nScrollFoot).children("div"), -m=u.children("table"),n=h(a.nTHead),p=h(a.nTable),t=p[0],v=t.style,r=a.nTFoot?h(a.nTFoot):null,Eb=a.oBrowser,Ua=Eb.bScrollOversize,s,L,P,x,y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==L&&a.scrollBarVis!==k)a.scrollBarVis=L,U(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();x=n.clone().prependTo(p);n=n.find("tr");L=x.find("tr");x.find("th, td").removeAttr("tabindex"); -r&&(P=r.clone().prependTo(p),s=r.find("tr"),P=P.find("tr"));c||(q.width="100%",f[0].style.width="100%");h.each(qa(a,x),function(b,c){B=$(a,b);c.style.width=a.aoColumns[B].sWidth});r&&I(function(a){a.style.width=""},P);f=p.outerWidth();if(""===c){v.width="100%";if(Ua&&(p.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))v.width=w(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(v.width=w(d),f=p.outerWidth());I(C,L);I(function(a){A.push(a.innerHTML);y.push(w(h(a).css("width")))}, -L);I(function(a,b){a.style.width=y[b]},n);h(L).height(0);r&&(I(C,P),I(function(a){z.push(w(h(a).css("width")))},P),I(function(a,b){a.style.width=z[b]},s),h(P).height(0));I(function(a,b){a.innerHTML='
'+A[b]+"
";a.style.width=y[b]},L);r&&I(function(a,b){a.innerHTML="";a.style.width=z[b]},P);if(p.outerWidth()j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(Ua&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))v.width= -w(s-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else s="100%";q.width=w(s);g.width=w(s);r&&(a.nScrollFoot.style.width=w(s));!e&&Ua&&(q.height=w(t.offsetHeight+b));c=p.outerWidth();o[0].style.width=w(c);i.width=w(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(Eb.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";r&&(m[0].style.width=w(c),u[0].style.width=w(c),u[0].style[e]=d?b+"px":"0px");l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop= -0}}function I(a,b,c){for(var d=0,e=0,f=b.length,g,j;e").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");o=qa(a,j.find("thead")[0]);for(m=0;m").css({width:n.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()").css("width",w(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;fd&&(d=c.length,e=f);return e}function w(a){return null=== -a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var o=[];f=function(a){a.length&&!h.isArray(a[0])?o.push(a):h.merge(o,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ae?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b]; -return ce?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;jg?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0e?e+1:3));e=0;for(f=d.length;ee?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j=d.length?[0,c[1]]:c)}));e.search!==k&&h.extend(a.oPreviousSearch,Bb(e.search));b=0;for(c=e.columns.length;b=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c= -a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Aa(a,b){var c=[],c=Mb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function db(a){h.each({num:function(b){return Ba(b, -a)},"num-fmt":function(b){return Ba(b,a,Xa)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Xa)}},function(b,c){s.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(s.type.search[b+a]=s.type.search.html)})}function Nb(a){return function(){var b=[za(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m,s,t,p,r,Ya={},Ob=/[\r\n]/g,Ca=/<.*?>/g,ac=/^[\w\+\-]/,bc=/[\w\+\-]$/,Yb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)", -"g"),Xa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Pb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Qb=function(a,b){Ya[b]||(Ya[b]=RegExp(va(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Ya[b],"."):a},Za=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Qb(a,b));c&&d&&(a=a.replace(Xa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Rb=function(a,b,c){return M(a)?!0:!(M(a)||"string"=== -typeof a)?null:Za(a.replace(Ca,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e")[0],Zb=wa.textContent!==k,$b=/<.*?>/g;m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new t(za(this[s.iApiIndex])):new t(this)};this.fnAddData=function(a,b){var c=this.api(!0), -d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&Z(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0], -h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()}; -this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a); -(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return za(this[s.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck= -s.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=s.internal;for(var e in m.ext.internal)e&&(this[e]=Nb(e));this.each(function(){var e={},e=1t<"F"ip>'),n.renderer)?h.isPlainObject(n.renderer)&&!n.renderer.header&&(n.renderer.header="jqueryui"):n.renderer="jqueryui":h.extend(i,m.ext.classes,e.oClasses);q.addClass(i.sTable);n.iInitDisplayStart===k&&(n.iInitDisplayStart=e.iDisplayStart,n._iDisplayStart=e.iDisplayStart);null!==e.iDeferLoading&&(n.bDeferLoading=!0,g=h.isArray(e.iDeferLoading), -n._iRecordsDisplay=g?e.iDeferLoading[0]:e.iDeferLoading,n._iRecordsTotal=g?e.iDeferLoading[1]:e.iDeferLoading);var t=n.oLanguage;h.extend(!0,t,e.oLanguage);""!==t.sUrl&&(h.ajax({dataType:"json",url:t.sUrl,success:function(a){Fa(a);J(l.oLanguage,a);h.extend(true,t,a);ia(n)},error:function(){ia(n)}}),o=!0);null===e.asStripeClasses&&(n.asStripeClasses=[i.sStripeOdd,i.sStripeEven]);var g=n.asStripeClasses,r=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(g,function(a){return r.hasClass(a)}))&& -(h("tbody tr",this).removeClass(g.join(" ")),n.asDestroyStripes=g.slice());u=[];g=this.getElementsByTagName("thead");0!==g.length&&(fa(n.aoHeader,g[0]),u=qa(n));if(null===e.aoColumns){p=[];g=0;for(j=u.length;g").appendTo(this));n.nTHead=j[0];j=q.children("tbody");0===j.length&&(j=h("").appendTo(this));n.nTBody=j[0];j=q.children("tfoot");if(0===j.length&&0").appendTo(this); -0===j.length||0===j.children().length?q.addClass(i.sNoFooter):0a?new t(b[a],this[a]):null},filter:function(a){var b=[];if(x.filter)b=x.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=ca(d),e.push(c[0]))};f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Vb(this, -!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Vb(this,!1);return this});p(["row().child.remove()","row().child().remove()"],function(){cb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var dc=/^(.+):(name|visIdx|visible)$/,Wb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Wb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(dc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null}); -return[m[m.length+b]]}return[$(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null})}else return h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray()},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});r("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});r("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});r("columns().data()", -"column().data()",function(){return this.iterator("column-rows",Wb,1)});r("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});r("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});r("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData, -e,"anCells",b)},1)});r("columns().visible()","column().visible()",function(a,b){return this.iterator("column",function(c,d){if(a===k)return c.aoColumns[d].bVisible;var e=c.aoColumns,f=e[d],g=c.aoData,j,i,m;if(a!==k&&f.bVisible!==a){if(a){var l=h.inArray(!0,D(e,"bVisible"),d+1);j=0;for(i=g.length;jd;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]: -null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new t(c):c};m.util={throttle:ua,escapeRegex:va};m.camelToHungarian=J;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments); -a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table",function(a){na(a)})});p("settings()",function(){return new t(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c= -b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),p;b.bDestroying=!0;v(b,"aoDestroyCallback","destroy",[b]);a||(new t(b)).columns().visible(!0);k.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(E).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];xa(b); -h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p= -b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._); -return a.replace("%d",c)});m.version="1.10.10";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null, -sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1, -bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+ -a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"}, -oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({}, -m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null}; -Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[], -aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button", -iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)? -1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null}; -m.ext=s={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(s,{afnFiltering:s.search,aTypes:s.type.detect,ofnSearch:s.type.search,oSort:s.type.order,afnSortData:s.order,aoFeatures:s.feature,oApi:s.internal,oStdClasses:s.classes, -oPagination:s.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled", -sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"", -sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",G=Ea+"ui-state-default",ka=Ea+"css_right ui-icon ui-icon-",Xb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses,m.ext.classes,{sPageButton:"fg-button ui-button "+G,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:G+" sorting_asc",sSortDesc:G+" sorting_desc",sSortable:G+" sorting", -sSortableAsc:G+" sorting_asc_disabled",sSortableDesc:G+" sorting_desc_disabled",sSortableNone:G+" sorting_disabled",sSortJUIAsc:ka+"triangle-1-n",sSortJUIDesc:ka+"triangle-1-s",sSortJUI:ka+"carat-2-n-s",sSortJUIAscAllowed:ka+"carat-1-n",sSortJUIDescAllowed:ka+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+G,sScrollFoot:"dataTables_scrollFoot "+G,sHeaderTH:G,sFooterTH:G,sJUIHeader:Xb+" ui-corner-tl ui-corner-tr",sJUIFooter:Xb+ -" ui-corner-bl ui-corner-br"});var Mb=m.ext.pager;h.extend(Mb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[Aa(a,b)]},simple_numbers:function(a,b){return["previous",Aa(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Aa(a,b),"next","last"]},_numbers:Aa,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate|| -{},k,l,m=0,p=function(b,d){var n,r,t,s,v=function(b){Ta(a,b.data.action,true)};n=0;for(r=d.length;n").appendTo(b);p(t,s)}else{k=null;l="";switch(s){case "ellipsis":b.append('');break;case "first":k=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":k=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":k=j.sNext;l=s+(e",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[s],"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(k).appendTo(b);Wa(t,{action:s},v);m++}}}},r;try{r=h(b).find(H.activeElement).data("dt-idx")}catch(n){}p(h(b).empty(),d);r&&h(b).find("[data-dt-idx="+r+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c= -b.oLanguage.sDecimal;return Za(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&(!ac.test(a)||!bc.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Za(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Rb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html": -null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," ").replace(Ca,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Ob," "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Qb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(s.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase(): -a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return ab?1:0},"string-desc":function(a,b){return ab?-1:0}});db("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a, -b,c,d){h("
").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc: -h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});m.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return f;f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g,"""): -a}}}};h.extend(m.ext.internal,{_fnExternApiFunc:Nb,_fnBuildAjax:ra,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:sa,_fnAddColumn:Ga,_fnColumnOptions:la,_fnAdjustColumnSizing:U,_fnVisibleToColumnIndex:$,_fnColumnIndexToVisible:ba,_fnVisbleColumns:ca,_fnGetColumns:aa,_fnColumnTypes:Ia,_fnApplyColumnDefs:ib,_fnHungarianMap:Y,_fnCamelToHungarian:J,_fnLanguageCompat:Fa,_fnBrowserDetect:gb,_fnAddData:N,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex: -null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:La,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,_fnGetDataMaster:Ma,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ea,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:kb,_fnDrawHead:ga,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:fa,_fnGetUniqueThs:qa,_fnFeatureHtmlFilter:pb,_fnFilterComplete:ha,_fnFilterCustom:yb,_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Qa, -_fnEscapeRegex:va,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ia,_fnInitComplete:ta,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:Z,_fnApplyToChildren:I,_fnCalculateColumnWidths:Ha,_fnThrottle:ua,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:w,_fnSortFlatten:W,_fnSort:mb,_fnSortAria:Jb,_fnSortListener:Va, -_fnSortAttachListener:Oa,_fnSortingClasses:xa,_fnSortData:Ib,_fnSaveState:ya,_fnLoadState:Kb,_fnSettingsFromNode:za,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:v,_fnLengthOverflow:Sa,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable}); diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js deleted file mode 100644 index ab7263155..000000000 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var CONSTANTS = { - urlSeperator: '/', - queryParamStreamName : '?streamname=', - queryParamStreamVersion : '&version=', - queryParamLastUpdatedTime : '&lastUpdatedTime=', - urlSecureTransportWebsocket : 'wss://', - urlSecureTransportHttp : 'https://', - colon : ':', - defaultIntervalTime : 10 * 1000, - defaultHostName : 'localhost', - defaultSecurePortNumber : '9443', - defaultMode : 'AUTO', - processModeHTTP : 'HTTP', - processModeWebSocket : 'WEBSOCKET', - processModeAuto : 'AUTO', - numThousand : 1000, - websocketTimeAppender : 400, - websocketSubscriptionEndpoint : 'portal/uipublisher/websocketSubscriptionEndpoint.jag', - httpEventRetrievalEndpoint : 'portal/uipublisher/httpEventRetrievalEndpoint.jag' -}; - - -var websocket = null; -var webSocketUrl; -var httpUrl; -var cepHostName; -var cepPortNumber; -var isErrorOccured = false; -var lastUpdatedtime = -1; -var polingInterval; -var stream; -var streamVersion; -var firstPollingAttempt; -var processMode; -var onSuccessFunction; -var onErrorFunction; -var terminateWebsocketInstance = false; -var pollingContinue = true; - -function subscribe(streamName,version,intervalTime, - listeningFuncSuccessData,listeningFuncErrorData,cepHost,cepPort,mode){ - stopPollingProcesses(); - stream = streamName; - streamVersion = version; - onSuccessFunction = listeningFuncSuccessData; - onErrorFunction = listeningFuncErrorData; - - if(intervalTime == null || intervalTime == ""){ - polingInterval = CONSTANTS.defaultIntervalTime; - } else{ - polingInterval = intervalTime * CONSTANTS.numThousand; - } - - if(cepHost == null || cepHost == ""){ - cepHostName = CONSTANTS.defaultHostName; - } else{ - cepHostName = cepHost; - } - - if(cepPort == null || cepPort == ""){ - cepPortNumber = CONSTANTS.defaultSecurePortNumber; - } else{ - cepPortNumber = cepPort; - } - - if(mode == null || mode == ""){ - processMode = CONSTANTS.defaultMode; - } else{ - processMode = mode; - } - - webSocketUrl = CONSTANTS.urlSecureTransportWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.websocketSubscriptionEndpoint; - - if(processMode == CONSTANTS.processModeHTTP){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } else{ - initializeWebSocket(webSocketUrl); - } -} - - -/** - * Initializing Web Socket - */ -function initializeWebSocket(webSocketUrl){ - websocket = new WebSocket(webSocketUrl); - websocket.onopen = webSocketOnOpen; - websocket.onmessage = webSocketOnMessage; - websocket.onclose = webSocketOnClose; - websocket.onerror = webSocketOnError; -} - -function getWebsocketSubscriptionMessage(streamName, streamVersion, streamProperties, streamValues) { - if (streamProperties.length === streamValues.length) { - var message = {}; - message.streamName = streamName; - message.streamVersion = streamVersion; - var i; - for (i = 0; i < streamProperties.length; i++) { - message.filterProps = []; - message.filterProps.push({ - 'name': streamProperties[i], - 'value': streamValues[i] - }); - } - return JSON.stringify(message); - } else { - console.log('stream properties and values are not in equal size'); - } -} - -/** - * Get the parameters as query parameters. - * This method parses those parameters and returns. - * */ -function getAllQueryParamsFromURL() { - var queryParamList = {}, qParam; - var urlQueryString = decodeURIComponent(window.top.location.search.substring(1)); - - if (urlQueryString) { - var queryStringPairs = urlQueryString.split('&'); - for (var i = 0; i < queryStringPairs.length; i++) { - qParam = queryStringPairs[i].split('='); - queryParamList[qParam[0]] = qParam[1]; - } - return queryParamList; - - } else { - return null; - } -} - -/** - * Web socket On Open - */ -var webSocketOnOpen = function () { - var params = getAllQueryParamsFromURL(); - var deviceId; - var owner; - if (params) { - owner = params["owner"]; - deviceId = params["deviceId"]; - } - var filterPropNames = ["meta_owner", "meta_deviceId"]; - var filterPropVals = [owner, deviceId]; - var data = getWebsocketSubscriptionMessage(stream, streamVersion, filterPropNames, filterPropVals); - websocket.send(data); -}; - -/** - * On server sends a message - */ -var webSocketOnMessage = function (evt) { - var event = evt.data; - var array = JSON.parse(event); - constructPayload(array); -}; - -/** - * On server close - */ -var webSocketOnClose =function (e) { - - if(isErrorOccured){ - if(processMode != CONSTANTS.processModeWebSocket){ - firstPollingAttempt = true; - pollingContinue = true; - startPoll(); - } - } else{ - if(!terminateWebsocketInstance){ - waitForSocketConnection(websocket); - } else{ - terminateWebsocketInstance = false; - } - - } -}; - -/** - * On server Error - */ -var webSocketOnError = function (err) { - var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!"; - - onErrorFunction(error); - isErrorOccured = true; - -}; - -/** - * Gracefully increments the connection retry - */ -var waitTime = CONSTANTS.numThousand; -function waitForSocketConnection(socket, callback){ - setTimeout( - function () { - if (socket.readyState === 1) { - initializeWebSocket(webSocketUrl); - console.log("Connection is made"); - if(callback != null){ - callback(); - } - return; - } else { - websocket = new WebSocket(webSocketUrl); - waitTime += CONSTANTS.websocketTimeAppender; - waitForSocketConnection(websocket, callback); - } - }, waitTime); -} - -/** - * Polling to retrieve events from http request periodically - */ -function startPoll(){ - - (function poll(){ - setTimeout(function(){ - httpUrl = CONSTANTS.urlSecureTransportHttp + cepHostName + CONSTANTS.colon + cepPortNumber + - CONSTANTS.urlSeperator + CONSTANTS.httpEventRetrievalEndpoint + CONSTANTS.queryParamStreamName + stream + - CONSTANTS.queryParamStreamVersion + streamVersion + CONSTANTS.queryParamLastUpdatedTime + lastUpdatedtime;; - $.getJSON(httpUrl, function(responseText) { - if(firstPollingAttempt){ - /*var data = $("textarea#idConsole").val(); - $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/ - firstPollingAttempt = false; - } - var eventList = $.parseJSON(responseText.events); - if(eventList.length != 0){ - lastUpdatedtime = responseText.lastEventTime; - for(var i=0;i6ENwLKbHK%kA<`(x^{)D1Reg9MG9tc_-Egx1={;5qJRZK>84v$jP&HbszdA)mFe z8YxD{C?RABvsh~jSSwJEHOvG_yz`xUd1IKpn1pYU+_i2+w33gksr`K6)H?j6FcJ1@n>syQ{bCo10f_Rexqr_C!u4OGP zm}49-uVh3xP8*r1AnPo@qz8Pqo~i+bfXrQVE0ecEL6?G}Mf zVKTcPIO(@od!3PGsZy~Tpo+zW05-)vtW69?eJU(2rzN|7rukbA(vqD&)BY1>F?Wsa zvKrB-F3st}o~>zA=jN2xG(A`~>@(J8vS(fIY!)*WtHBY3-4M88A7^cfmG2dmo?%2d zLf>pVL<@HupU0cw&?yVScT2O9Aiq%7W#M&R&GvBBPQqKs&ZUhYN z2ec7G3R@1B(7%7!OCPM?Puq{2tas`|w-!z4^1kip>Omc-XUj}0U&V;>BzyKN6hY#g zAnXQ=XD<(v+Y==hY`oSHoj4begJ?+n(bRr<)F_u71A54_Hdg5o~MQic*J0{+;~n$n$Rnc(vlKnzP3Um$~;Ao z7$=BkW6U6TP%j{$HqBVDmFBG7Mdld^L0rl&l3(n$k7zw-!qCjJfmGd|1$Qu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