From 4ccc8b58c5fd6d813361e4eb3405655d75555e37 Mon Sep 17 00:00:00 2001 From: Shabir Mohamed Date: Tue, 22 Sep 2015 11:24:28 +0530 Subject: [PATCH 1/2] changes to enable default samples with the new deviceType txt --- modules/distribution/src/assembly/bin.xml | 8 +-- .../publisher/config/publisher-tenant.json | 68 +++++++++++++++++++ .../samples/arduino/artifact/deviceType.json | 11 +-- .../raspberrypi/artifact/deviceType.json | 15 ++-- 4 files changed, 86 insertions(+), 16 deletions(-) create mode 100644 modules/distribution/src/publisher/config/publisher-tenant.json diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index e1fef891..86749a41 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -460,10 +460,10 @@ - - - - + + src/publisher/config + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/publisher/config + diff --git a/modules/distribution/src/publisher/config/publisher-tenant.json b/modules/distribution/src/publisher/config/publisher-tenant.json new file mode 100644 index 00000000..e39d571f --- /dev/null +++ b/modules/distribution/src/publisher/config/publisher-tenant.json @@ -0,0 +1,68 @@ +{ + "roles": { + "Internal/publisher": { + "/permission/admin/login": ["ui.execute"] + }, + "Internal/reviewer": { + "/permission/admin/login": ["ui.execute"] + } + }, + "user": { + "username": "admin", + "password": "admin" + }, + "application": { + "landingPage": "/assets/gadget/list" + }, + "features": { + "assetTypesHotDelploy": { + "enabled": false + } + }, + "assets":["gadget","site", "deviceType"], + "disabledAssets":[], + "userRoles": ["Internal/publisher"], + "permissions": { + "login": { + "/permission/admin/login": ["ui.execute"] + } + }, + "userSpace": "/_system/governance/users", + "accessible": [{ + "context": "/_system/governance", + "collections": ["gadgets", "sites", "ebooks", "deviceTypes"], + "actions": ["http://www.wso2.org/projects/registry/actions/get", "http://www.wso2.org/projects/registry/actions/add", "http://www.wso2.org/projects/registry/actions/delete", "authorize"] + }], + "app": { + "RXT_MANAGER": "rxt_manager", + "ROUTE_MANAGER": "route_manager", + "MODEL_MANAGER": "model_manager" + }, + "paths": { + "ASSET_EXT_PATH": "/assets", + "ASSET_DEFAULT_PATH": "/assets/default", + "ASSETS_EXT_PATH": "/assets", + "ASSETS_DEFAULT_PATH": "/assets/default", + "RXT_EXTENSION_PATH": "/config/ext/" + }, + "urls": { + "ASSET": "/asset", + "ASSETS": "/assets" + }, + "defaultAssets": { + "root": "/samples/assets", + "assetData": [{ + "type": "gadgets", + "ignore": ["agricultural-land", "intro-gadget-1", "intro-gadget-2", "gadget-template-explorer", "gadget-explorer", "co2-emission", "electric-power", "energy-use", "greenhouse-gas"] + }, { + "type": "ebooks" + }, { + "type": "sites" + }, { + "type": "deviceTypes" + }] + }, + "router": { + "RENDERER": "/modules/router.caramel-renderer.js" + } +} diff --git a/modules/samples/arduino/artifact/deviceType.json b/modules/samples/arduino/artifact/deviceType.json index 92222a3b..063cfe59 100644 --- a/modules/samples/arduino/artifact/deviceType.json +++ b/modules/samples/arduino/artifact/deviceType.json @@ -3,21 +3,22 @@ "tags": "WSO2, IoT, Arduino, ArduinoUno", "rate": 3, "attributes": { - "overview_thumbnail":"/arduino/arduino_thumbnail.png", + "overview_status": "CREATED", + "overview_provider":"admin", + "overview_version":"1.0.0", "overview_name":"Arduino", + "overview_url":"http://www.google.lk", "setupGuide_guideImage":"undefined", "overview_actionName":"Download", - "overview_actionUrl":"http://www.google.lk", "ingredients_ingredients":[ "Arduino Uno", "Arduino Ethernet / WiFi Shield" ], "overview_description":"Connect your Arduino Uno device to the WSO2 IoT Server.This is a bare-board Arduino Device-Type. The board used here is Arduino Uno.", - "overview_actionUrl":"http://www.google.lk", "setupGuide_description":"sfd", "quickStartupSteps_stepDescription":["Install the Sketch program","Install the Sketch program","Install the Sketch program"], "quickStartupSteps_stepLabel":["1","2","3"], - "overview_version":"1.0.0", - "overview_provider":"admin" + "images_thumbnail":"/arduino/arduino_thumbnail.png", + "images_banner":"/arduino/arduino_banner.png" } } \ No newline at end of file diff --git a/modules/samples/raspberrypi/artifact/deviceType.json b/modules/samples/raspberrypi/artifact/deviceType.json index 4a341c77..b880f605 100644 --- a/modules/samples/raspberrypi/artifact/deviceType.json +++ b/modules/samples/raspberrypi/artifact/deviceType.json @@ -1,23 +1,24 @@ { - "name": "Raspberry Pi", + "name": "RaspberryPi", "tags": "WSO2, IoT, RaspberryPi", "rate": 3, "attributes": { - "overview_thumbnail":"/raspberrypi/raspberryPi_thumbnail.png", - "overview_name":"Raspberry Pi", + "overview_status": "CREATED", + "overview_provider":"admin", + "overview_version":"1.0.0", + "overview_name":"RaspberryPi", + "overview_url":"http://www.google.lk", "setupGuide_guideImage":"undefined", "overview_actionName":"Download", - "overview_actionUrl":"http://www.google.lk", "ingredients_ingredients":[ "Raspberry Pi", "WiFi Adapter / Ethernet" ], "overview_description":"Connect your Raspberry Pi device to the WSO2 IoT Server.This is a bare-board Raspberry Pi Device-Type. The board used here is RPi B+.", - "overview_actionUrl":"http://www.google.lk", "setupGuide_description":"sfd", "quickStartupSteps_stepDescription":["Install the Sketch program","Install the Sketch program","Install the Sketch program"], "quickStartupSteps_stepLabel":["1","2","3"], - "overview_version":"1.0.0", - "overview_provider":"admin" + "images_thumbnail":"/raspberrypi/raspberryPi_thumbnail.png", + "images_banner":"/raspberrypi/raspberryPi_banner.png" } } \ No newline at end of file From a47776405bba5677c82cf9a80ab37e4ca14b8f06 Mon Sep 17 00:00:00 2001 From: Shabir Mohamed Date: Tue, 22 Sep 2015 13:23:59 +0530 Subject: [PATCH 2/2] =?UTF-8?q?samples=E2=80=99=20names=20changed=20to=20m?= =?UTF-8?q?atch=20with=20that=20of=20CDMF-types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/samples/arduino/artifact/deviceType.json | 6 +++--- modules/samples/raspberrypi/artifact/deviceType.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/samples/arduino/artifact/deviceType.json b/modules/samples/arduino/artifact/deviceType.json index 063cfe59..4f0811de 100644 --- a/modules/samples/arduino/artifact/deviceType.json +++ b/modules/samples/arduino/artifact/deviceType.json @@ -1,12 +1,12 @@ { - "name": "Arduino", + "name": "arduino", "tags": "WSO2, IoT, Arduino, ArduinoUno", "rate": 3, "attributes": { - "overview_status": "CREATED", + "overview_status": "PUBLISHED", "overview_provider":"admin", "overview_version":"1.0.0", - "overview_name":"Arduino", + "overview_name":"arduino", "overview_url":"http://www.google.lk", "setupGuide_guideImage":"undefined", "overview_actionName":"Download", diff --git a/modules/samples/raspberrypi/artifact/deviceType.json b/modules/samples/raspberrypi/artifact/deviceType.json index b880f605..6b003096 100644 --- a/modules/samples/raspberrypi/artifact/deviceType.json +++ b/modules/samples/raspberrypi/artifact/deviceType.json @@ -1,12 +1,12 @@ { - "name": "RaspberryPi", + "name": "raspberrypi", "tags": "WSO2, IoT, RaspberryPi", "rate": 3, "attributes": { - "overview_status": "CREATED", + "overview_status": "PUBLISHED", "overview_provider":"admin", "overview_version":"1.0.0", - "overview_name":"RaspberryPi", + "overview_name":"raspberrypi", "overview_url":"http://www.google.lk", "setupGuide_guideImage":"undefined", "overview_actionName":"Download",