changes in operation bar and deployer.xml

revert-dabc3590
ayyoob 8 years ago
parent 722593a51f
commit 68f1fb34fe

@ -31,7 +31,8 @@
Operations Operations
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams
encodedFeaturePayloads=encodedFeaturePayloads}}
</div> </div>
{{/zone}} {{/zone}}

@ -30,8 +30,8 @@ function onRequest(context) {
if (device && device.status != "error") { if (device && device.status != "error") {
return { return {
"device": device.content, "device": device.content,
"backendApiUri": "/android_sense/", "autoCompleteParams": autoCompleteParams,
"autoCompleteParams": autoCompleteParams "encodedFeaturePayloads": ""
}; };
} else { } else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");

@ -32,7 +32,8 @@
Operations Operations
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams
encodedFeaturePayloads=encodedFeaturePayloads}}
</div> </div>
{{/zone}} {{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId); var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") { if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : "/arduino/", "autoCompleteParams" : autoCompleteParams}; return {"device": device.content, "autoCompleteParams" : autoCompleteParams, "encodedFeaturePayloads": ""};
} else { } else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit(); exit();

@ -32,7 +32,8 @@
Operations Operations
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams
encodedFeaturePayloads=encodedFeaturePayloads}}
</div> </div>
{{/zone}} {{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId); var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") { if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : "/raspberrypi/", "autoCompleteParams" : autoCompleteParams}; return {"device": device.content, "autoCompleteParams" : autoCompleteParams, "encodedFeaturePayloads": ""};
} else { } else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit(); exit();

@ -32,7 +32,8 @@
Operations Operations
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams
encodedFeaturePayloads=encodedFeaturePayloads}}
</div> </div>
{{/zone}} {{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId); var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") { if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : "/virtual_firealarm/", "autoCompleteParams" : autoCompleteParams}; return {"device": device.content, "autoCompleteParams" : autoCompleteParams, "encodedFeaturePayloads": ""};
} else { } else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit(); exit();

@ -2,6 +2,11 @@
"deviceType": { "deviceType": {
"label": "Virtual Firealarm", "label": "Virtual Firealarm",
"category": "virtual", "category": "virtual",
"downloadAgentUri": "virtual_firealarm/device/download" "downloadAgentUri": "virtual_firealarm/device/download",
"features": {
"buzz": {
"icon" : "fw-dial-up"
}
}
} }
} }

@ -22,7 +22,7 @@
<Feature code="keywords"> <Feature code="keywords">
<Name>Add Keywords</Name> <Name>Add Keywords</Name>
<Description>Send keywords to the device</Description> <Description>Send keywords to the device</Description>
<Operation context="device/{deviceId}/words" method="POST"> <Operation context="/android_sense/device/{deviceId}/words" method="POST">
<QueryParameters> <QueryParameters>
<Parameter>keywords</Parameter> <Parameter>keywords</Parameter>
</QueryParameters> </QueryParameters>
@ -31,7 +31,7 @@
<Feature code="threshold"> <Feature code="threshold">
<Name>Add Threshold</Name> <Name>Add Threshold</Name>
<Description>Send Threshold to the device</Description> <Description>Send Threshold to the device</Description>
<Operation context="device/{deviceId}/words/threshold" method="POST"> <Operation context="/android_sense/device/{deviceId}/words/threshold" method="POST">
<QueryParameters> <QueryParameters>
<Parameter>threshold</Parameter> <Parameter>threshold</Parameter>
</QueryParameters> </QueryParameters>
@ -40,7 +40,7 @@
<Feature code="remove_words"> <Feature code="remove_words">
<Name>Remove words</Name> <Name>Remove words</Name>
<Description>Remove Threshold from the device</Description> <Description>Remove Threshold from the device</Description>
<Operation context="device/{deviceId}/words" method="DELETE"> <Operation context="/android_sense/device/{deviceId}/words" method="DELETE">
<QueryParameters> <QueryParameters>
<Parameter>words</Parameter> <Parameter>words</Parameter>
</QueryParameters> </QueryParameters>

@ -22,7 +22,7 @@
<Feature code="bulb"> <Feature code="bulb">
<Name>Control Bulb</Name> <Name>Control Bulb</Name>
<Description>Control Bulb on Arduino Uno</Description> <Description>Control Bulb on Arduino Uno</Description>
<Operation context="device/{deviceId}/bulb" method="POST"> <Operation context="/arduino/device/{deviceId}/bulb" method="POST">
<QueryParameters> <QueryParameters>
<Parameter>state</Parameter> <Parameter>state</Parameter>
</QueryParameters> </QueryParameters>

@ -22,7 +22,7 @@
<Feature code="bulb"> <Feature code="bulb">
<Name>Control Bulb</Name> <Name>Control Bulb</Name>
<Description>Control Bulb on Raspberrypi</Description> <Description>Control Bulb on Raspberrypi</Description>
<Operation context="device/{deviceId}/bulb" method="POST"> <Operation context="/raspberrypi/device/{deviceId}/bulb" method="POST">
<QueryParameters> <QueryParameters>
<Parameter>state</Parameter> <Parameter>state</Parameter>
</QueryParameters> </QueryParameters>

@ -22,7 +22,7 @@
<Feature code="buzz"> <Feature code="buzz">
<Name>Control buzzer</Name> <Name>Control buzzer</Name>
<Description>Control buzzer on Virtual Firealarm</Description> <Description>Control buzzer on Virtual Firealarm</Description>
<Operation context="device/{deviceId}/buzz" method="POST"> <Operation context="/virtual_firealarm/device/{deviceId}/buzz" method="POST">
<FormParameters> <FormParameters>
<Parameter>state</Parameter> <Parameter>state</Parameter>
</FormParameters> </FormParameters>

@ -1198,7 +1198,7 @@
<javax.ws.rs.version>1.1.1</javax.ws.rs.version> <javax.ws.rs.version>1.1.1</javax.ws.rs.version>
<!-- Carbon Device Management --> <!-- Carbon Device Management -->
<carbon.devicemgt.version>2.0.0</carbon.devicemgt.version> <carbon.devicemgt.version>2.0.1-SNAPSHOT</carbon.devicemgt.version>
<carbon.devicemgt.version.range>[2.0.0, 3.0.0)</carbon.devicemgt.version.range> <carbon.devicemgt.version.range>[2.0.0, 3.0.0)</carbon.devicemgt.version.range>

Loading…
Cancel
Save