sdt.homemonitoring: disable switch button in case of readOnly module.

Signed-off-by: BOLLE Sebastien <sebastien.bolle@orange.com>
Signed-off-by: BONNARDEL Gregory <gbonnardel.ext@orange.com>
diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js
index 828dd2b..21dc8cd 100644
--- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js
+++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js
@@ -289,6 +289,13 @@
 
 			module.datapoints = {};
 			module.actions = [];
+			if (root.prROy) {
+				module.isReadOnly = (root.prROy === 'true');
+			} else {
+				module.isReadOnly = false;
+			}
+			
+			
 
 			// create the attributes
 			var dpNames = $scope.datapointsNamePerModule[module.name];
diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html
index f4ca31f..ff57ea4 100644
--- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html
+++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html
@@ -93,6 +93,7 @@
 												ng-repeat="module in getModulesFromDevice(device) | filter: switchFilter">
 											<switch class="adjustSwitch" name="moduleSwitch_{{module.id}}" id="moduleSwitch_{{module.id}}"
 												 ng-model="module.state"
+												 disabled="module.isReadOnly"
 												ng-change="changeState(device,module)"></switch>
 										</td>
 									</tr>