diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.js b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/configuration.js
similarity index 96%
rename from components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.js
rename to components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/configuration.js
index e1ef259f2f..74111c2448 100644
--- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view/type-view.js
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/configuration.js
@@ -16,7 +16,7 @@
* under the License.
*/
-function onRequest(context) {
+function onRequest(context){
var viewModel = {};
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
viewModel["permissions"] = userModule.getUIPermissions();
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js
index c82bba71b3..18c09d0235 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration/public/js/platform-configuration.js
@@ -113,3 +113,30 @@ var addConfiguration = function () {
}
);
};
+
+function artifactUpload() {
+ var contentType = "application/json";
+ var backendEndBasePath = "/api/device-mgt/v1.0";
+ var urix = backendEndBasePath + "/admin/devicetype/deploy/raspberrypi";
+ var defaultStatusClasses = "fw fw-stack-1x";
+ var content = $("#raspberrypi-statistic-response-template").find(".content");
+ var title = content.find("#title");
+ var statusIcon = content.find("#status-icon");
+ var data = {}
+ invokerUtil.post(urix, data, function (data) {
+ title.html("Deploying statistic artifacts. Please wait...");
+ statusIcon.attr("class", defaultStatusClasses + " fw-check");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ setTimeout(function () {
+ hidePopup();
+ location.reload(true);
+ }, 5000);
+
+ }, function (jqXHR) {
+ title.html("Failed to deploy artifacts, Please contact administrator.");
+ statusIcon.attr("class", defaultStatusClasses + " fw-error");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ }, contentType);
+}
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/js/download.js b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/js/download.js
index abd0a49f57..aced9b5323 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/js/download.js
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/js/download.js
@@ -182,31 +182,4 @@ function doAction(data) {
hidePopup();
});
}
-}
-
-function artifactUpload() {
- var contentType = "application/json";
-
- var urix = backendEndBasePath + "/admin/devicetype/deploy/raspberrypi";
- var defaultStatusClasses = "fw fw-stack-1x";
- var content = $("#raspberrypi-statistic-response-template").find(".content");
- var title = content.find("#title");
- var statusIcon = content.find("#status-icon");
- var data = {}
- invokerUtil.post(urix, data, function (data) {
- title.html("Deploying statistic artifacts. Please wait...");
- statusIcon.attr("class", defaultStatusClasses + " fw-check");
- $(modalPopupContent).html(content.html());
- showPopup();
- setTimeout(function () {
- hidePopup();
- location.reload(true);
- }, 5000);
-
- }, function (jqXHR) {
- title.html("Failed to deploy artifacts, Please contact administrator.");
- statusIcon.attr("class", defaultStatusClasses + " fw-error");
- $(modalPopupContent).html(content.html());
- showPopup();
- }, contentType);
}
\ No newline at end of file
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
index 5fce7ec853..26cf664708 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs
@@ -61,9 +61,6 @@
Download Agent
- {{#if permissions.IS_ADMIN}}
- Deploy Analytics Artifacts
- {{/if}}
Click here for latest instructions and
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
index 583e332f7a..9b9c72fcd2 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
@@ -28,43 +28,32 @@
class="alert alert-danger hidden" role="alert">
-
-
-
-
-
-
-
-
-
-
-
-
-
- Save
+
+ Deploy Analytics Artifacts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js
new file mode 100644
index 0000000000..74111c2448
--- /dev/null
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js
@@ -0,0 +1,24 @@
+/*
+ * 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 onRequest(context){
+ var viewModel = {};
+ var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+ viewModel["permissions"] = userModule.getUIPermissions();
+ return viewModel;
+}
\ No newline at end of file
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
index 19f1c9ff3e..fcb3458091 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
@@ -103,3 +103,30 @@ var addConfiguration = function () {
}
);
};
+
+function artifactUpload() {
+ var contentType = "application/json";
+ var backendEndBasePath = "/api/device-mgt/v1.0";
+ var urix = backendEndBasePath + "/admin/devicetype/deploy/virtual_firealarm";
+ var defaultStatusClasses = "fw fw-stack-1x";
+ var content = $("#virtual-firealarm-statistic-response-template").find(".content");
+ var title = content.find("#title");
+ var statusIcon = content.find("#status-icon");
+ var data = {}
+ invokerUtil.post(urix, data, function (data) {
+ title.html("Deploying statistic artifacts. Please wait...");
+ statusIcon.attr("class", defaultStatusClasses + " fw-check");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ setTimeout(function () {
+ hidePopup();
+ location.reload(true);
+ }, 5000);
+
+ }, function (jqXHR) {
+ title.html("Failed to deploy artifacts, Please contact administrator.");
+ statusIcon.attr("class", defaultStatusClasses + " fw-error");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ }, contentType);
+}
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
index a667ef4cc5..d4ceb751f1 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
@@ -134,31 +134,4 @@ function doAction(data) {
hideAgentDownloadPopup();
});
}
-}
-
-function artifactUpload() {
- var contentType = "application/json";
-
- var urix = backendEndBasePath + "/admin/devicetype/deploy/virtual_firealarm";
- var defaultStatusClasses = "fw fw-stack-1x";
- var content = $("#virtualfirealarm-statistic-response-template").find(".content");
- var title = content.find("#title");
- var statusIcon = content.find("#status-icon");
- var data = {}
- invokerUtil.post(urix, data, function (data) {
- title.html("Deploying statistic artifacts. Please wait...");
- statusIcon.attr("class", defaultStatusClasses + " fw-check");
- $(modalPopupContent).html(content.html());
- showPopup();
- setTimeout(function () {
- hidePopup();
- location.reload(true);
- }, 5000);
-
- }, function (jqXHR) {
- title.html("Failed to deploy artifacts, Please contact administrator.");
- statusIcon.attr("class", defaultStatusClasses + " fw-error");
- $(modalPopupContent).html(content.html());
- showPopup();
- }, contentType);
}
\ No newline at end of file
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
index 6be6d141bb..f34aa0d6fa 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
@@ -54,9 +54,6 @@
Download Agent
- {{#if permissions.IS_ADMIN}}
- Deploy Analytics Artifacts
- {{/if}}
Click [ here ] for latest instructions and
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js
index 5f92d11aa6..6375247c8c 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js
@@ -384,31 +384,4 @@ $(document).ready(function () {
}
);
});
-});
-
-function artifactUpload() {
- var contentType = "application/json";
-
- var urix = backendEndBasePath + "/admin/devicetype/deploy/android";
- var defaultStatusClasses = "fw fw-stack-1x";
- var content = $("#android-statistic-response-template").find(".content");
- var title = content.find("#title");
- var statusIcon = content.find("#status-icon");
- var data = {}
- invokerUtil.post(urix, data, function (data) {
- title.html("Deploying statistic artifacts. Please wait...");
- statusIcon.attr("class", defaultStatusClasses + " fw-check");
- $(modalPopupContent).html(content.html());
- showPopup();
- setTimeout(function () {
- hidePopup();
- location.reload(true);
- }, 5000);
-
- }, function (jqXHR) {
- title.html("Failed to deploy artifacts, Please contact administrator.");
- statusIcon.attr("class", defaultStatusClasses + " fw-error");
- $(modalPopupContent).html(content.html());
- showPopup();
- }, contentType);
-}
\ No newline at end of file
+});
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
index a56292b432..183b0b96b8 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
@@ -43,10 +43,6 @@
Download APK
- {{#if permissions.IS_ADMIN}}
-
- Deploy Geo Dashboard
- {{/if}}
{{/if}}
{{/if}}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.js
index 382a669820..881806f4c5 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.js
@@ -19,8 +19,6 @@
function onRequest(context) {
var viewModel = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
- var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
- viewModel["permissions"] = userModule.getUIPermissions();
var isCloud = devicemgtProps["isCloud"];
viewModel["isVirtual"] = request.getParameter("type") == 'virtual';
viewModel["isCloud"] = isCloud;
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
new file mode 100644
index 0000000000..e69de29bb2