diff --git a/modules/samples/connectedcup/component/controller/src/main/java/org/coffeeking/controller/service/ConnectedCupControllerService.java b/modules/samples/connectedcup/component/controller/src/main/java/org/coffeeking/controller/service/ConnectedCupControllerService.java index 161cc211..8a83c9d6 100644 --- a/modules/samples/connectedcup/component/controller/src/main/java/org/coffeeking/controller/service/ConnectedCupControllerService.java +++ b/modules/samples/connectedcup/component/controller/src/main/java/org/coffeeking/controller/service/ConnectedCupControllerService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * 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 @@ -11,7 +11,7 @@ * 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 + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @@ -81,8 +81,8 @@ public class ConnectedCupControllerService { @Path("controller/coffeelevel") @GET @Produces(MediaType.APPLICATION_JSON) - @Feature(code = "coffeelevel", name="Coffeelevel", description = "read coffeelevel from this device", type = - "monitor") + @Feature( code="coffeelevel", name="Coffee Level", type="monitor", + description="Request Coffee Level from Connected cup") public SensorRecord readCoffeeLevel(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { @@ -121,8 +121,8 @@ public class ConnectedCupControllerService { @Path("controller/temperature") @GET @Produces(MediaType.APPLICATION_JSON) - @Feature(code = "temperature", name="Temperature", description = "read temperature from this device", type = - "monitor") + @Feature( code="temperature", name="Temperature", type="monitor", + description="Request Temperature reading from Connected cup") public SensorRecord readTemperature(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @Context HttpServletResponse response) { diff --git a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/private/conf/device-type.json b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/private/conf/device-type.json deleted file mode 100644 index df273c5e..00000000 --- a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/private/conf/device-type.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "deviceType": { - "label": "Connected Cup", - "category": "iot" - } -} - diff --git a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js index cf43d758..434698e9 100644 --- a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js +++ b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/public/js/download.js @@ -1,19 +1,19 @@ /* - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * Licensed 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. + * 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. */ var modalPopup = ".wr-modalpopup"; @@ -141,13 +141,13 @@ function downloadAgent() { values[this.name] = $(this).val(); }); - var connectedCupRegisterURL = "/connectedcup_mgt/connectedcup/cup/register?" + - "name=" + payload.name + "&owner=" + payload.owner; - var payload = {}; payload.name = $inputs[0].value; payload.owner = $inputs[1].value; + var connectedCupRegisterURL = "/connectedcup_mgt/connectedcup/cup/register?" + + "name=" + payload.name + "&owner=" + payload.owner; + invokerUtil.post( connectedCupRegisterURL, payload, diff --git a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs index 385d4a61..fb33e496 100644 --- a/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs +++ b/modules/samples/connectedcup/feature/connectedcup-feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.connectedcup.type-view/type-view.hbs @@ -26,7 +26,7 @@