commit | 10af0d805ec83ac6a173922591b7c5f2845e0483 | [log] [tgz] |
---|---|---|
author | BOLLE Sebastien <sebastien.bolle@orange.com> | Mon Oct 16 15:03:02 2017 +0200 |
committer | BOLLE Sebastien <sebastien.bolle@orange.com> | Thu Nov 02 18:10:01 2017 +0100 |
tree | 8d43afa3e47a71644aa862ad905d9490dcb8fc60 | |
parent | 94a906bf4483cd4a8f1289a2194ab72b97aa6956 [diff] |
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>