+ {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams
+ encodedFeaturePayloads=encodedFeaturePayloads}}
+
+{{/zone}}
+
+{{#zone "device-view-tabs"}}
+
+
Device Statistics
+ {{unit "cdmf.unit.device.type.sampledevice.realtime.analytics-view" device=device}}
+
+
+{{/zone}}
\ No newline at end of file
diff --git a/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.js b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.js
new file mode 100644
index 00000000..b8c70bc8
--- /dev/null
+++ b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.js
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 log = new Log("device-view.js");
+ var deviceType = context.uriParams.deviceType;
+ var deviceId = request.getParameter("id");
+ var autoCompleteParams = [
+ {"name" : "deviceId", "value" : deviceId}
+ ];
+
+ if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
+ var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
+ var device = deviceModule.viewDevice(deviceType, deviceId);
+ if (device && device.status != "error") {
+ return {"device": device.content, "autoCompleteParams" : autoCompleteParams, "encodedFeaturePayloads": ""};
+ } else {
+ response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
+ exit();
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.json b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.json
new file mode 100644
index 00000000..688e9398
--- /dev/null
+++ b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/device-view.json
@@ -0,0 +1,3 @@
+{
+ "version": "1.0.0"
+}
\ No newline at end of file
diff --git a/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/public/images/deviceType.png b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/public/images/deviceType.png
new file mode 100644
index 00000000..766cd2ba
Binary files /dev/null and b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.device-view/public/images/deviceType.png differ
diff --git a/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.realtime.analytics-view/analytics-view.hbs b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.realtime.analytics-view/analytics-view.hbs
new file mode 100644
index 00000000..98600ffc
--- /dev/null
+++ b/modules/distribution/src/core/samples/sampledevice/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.sampledevice.realtime.analytics-view/analytics-view.hbs
@@ -0,0 +1,45 @@
+{{!
+ Copyright (c) 2017, 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.
+}}
+
+{{unit "cdmf.unit.lib.rickshaw-graph"}}
+
+