From c4fcaaf498ca131e00c0b850b57ff05c8dd820dc Mon Sep 17 00:00:00 2001 From: dunithd Date: Wed, 21 Jun 2017 04:08:51 +0530 Subject: [PATCH 1/7] Applying new UX for Android device details page --- .../device-view.hbs | 324 ++++-------------- .../public/img/android_app_icon.png | Bin 0 -> 6932 bytes .../public/js/device-detail.js | 2 + .../public/templates/applications-list.hbs | 40 +-- .../public/templates/policy-compliance.hbs | 79 ++--- 5 files changed, 100 insertions(+), 345 deletions(-) create mode 100644 components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/img/android_app_icon.png diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 774fe4fc5..50085f8de 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -4,279 +4,91 @@ {{#if deviceFound}} {{#if isAuthorized}} - {{#zone "device-details-header"}} -

- Device {{device.name}} - {{#if device.model}} - - ( {{device.vendor}} {{device.model}} ) - - {{/if}} -

+ {{#zone "device-thumbnail"}} + {{/zone}} - {{#zone "overview-section"}} -
-
Device - Overview -
- - - {{#if device.deviceIdentifier}} - - - - - {{/if}} - {{#if device.name}} - - - - - {{/if}} - {{#if device.vendor}} - {{#if device.model}} - - - - - {{/if}} - {{/if}} - {{#if device.status}} - - - - - {{/if}} - {{#if device.owner}} - - - - - {{/if}} - {{#if device.ownership}} - - - - - {{/if}} - {{#if device.imei}} - - - - - {{/if}} - {{#if device.udid}} - - - - - {{/if}} - {{#if device.osBuildDate}} - - - - - {{/if}} - {{#if device.phoneNumber}} - - - - - {{/if}} - {{#if device.lastUpdatedTime}} - - - - - {{/if}} - -
Device ID{{device.deviceIdentifier}}
Name{{device.name}}
Model{{device.vendor}} - {{device.model}}
Status - {{#equal device.status "ACTIVE"}}Active{{/equal}} - {{#equal device.status "INACTIVE"}}Inactive{{/equal}} - {{#equal device.status "BLOCKED"}}Blocked{{/equal}} - {{#equal device.status "REMOVED"}}Removed{{/equal}} - {{#equal device.status "UNREACHABLE"}}Unreachable{{/equal}} -
Owner{{device.owner}}
Ownership{{device.ownership}}
IMEI{{device.imei}}
UDID{{device.udid}}
Firmware Build - Date - {{device.osBuildDate}}
Phone Number{{device.phoneNumber}}
Last Update{{device.lastUpdatedTime}}
-
+ {{#zone "device-details-header"}} +

+ {{device.owner}}'s {{device.name}} + + + +

+ {{#if device.model}} +

{{device.vendor}} {{device.model}}

+ {{/if}} +

Ownership - {{device.ownership}}

+

Device is + + {{#equal device.status "ACTIVE"}}Active{{/equal}} + {{#equal device.status "INACTIVE"}}Inactive{{/equal}} + {{#equal device.status "BLOCKED"}}Blocked{{/equal}} + {{#equal device.status "REMOVED"}}Removed{{/equal}} + {{#equal device.status "UNREACHABLE"}}Unreachable{{/equal}} + +

{{/zone}} - {{#zone "device-opetations"}} {{#if device.isNotRemoved}} -
- Operations -
-
+
+
+

Device Operations

+
{{unit "cdmf.unit.device.type.android.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{/if}} {{/zone}} - {{#zone "device-details-tab-injected"}} - - - + {{#zone "device-details"}} + {{#if device.deviceInfoAvailable}} + {{#if device.BatteryLevel}} +

{{device.BatteryLevel.value}}%

+ {{/if}} + {{#if device.ramUsage}} +

{{device.ramUsage.value}}%

+ {{/if}} + {{#if device.internalMemory}} +

{{device.internalMemory.usage}} + GB/{{device.internalMemory.total}}GB

+ {{/if}} + {{#if device.externalMemory}} +

{{device.externalMemory.usage}} + GB/{{device.externalMemory.total}}GB

+ {{/if}} + {{else}} +

Battery, RAM and Storage related information are not + available yet.

+ {{/if}} {{/zone}} - {{#zone "device-details-tab-contents"}} -
- - -
-
-
- - {{#if device.deviceInfoAvailable}} - {{#if device.BatteryLevel}} -
-
-
-
BATTERY
-
-
-
- {{device.BatteryLevel - .value}} % -
-
-
-
-
- {{/if}} - - - - - - - - - - - - - - - - {{#if device.ramUsage}} -
-
-
-
RAM Usage
-
-
-
- {{device.ramUsage - .value}} % -
-
-
-
-
- {{/if}} - {{#if device.internalMemory}} -
-
-
-
Local Storage
-
-
-
-
- {{device.internalMemory - .usage}} % - - TOTAL OF {{device.internalMemory - .total}} GB - -
-
-
-
-
- {{/if}} - {{#if device.externalMemory}} -
-
-
-
External Storage
-
-
-
- {{device.externalMemory - .usage}} % - - TOTAL OF {{device.externalMemory - .total}} GB - -
-
-
-
-
- {{/if}} - {{else}} -
-

- - Battery, RAM and Storage related information are not - available yet. -

-
- {{/if}} -
-
-
-
+ {{#zone "device-details-tab-injected"}} +
  • Location
  • +
  • Applications
  • +
  • Policy Compliance
  • {{/zone}} {{#zone "device-view-tab-injected-conents"}} +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    "); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs index ec6029dcc..c25f353df 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/applications-list.hbs @@ -1,31 +1,9 @@ - \ No newline at end of file +{{#each applications}} +
    + +
    +

    {{name}}

    +

    v{{version}}

    +
    +
    +{{/each}} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs index 8fba741a6..61590d984 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/public/templates/policy-compliance.hbs @@ -1,63 +1,26 @@ -
    - -
    -
    - - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

    {{policy.policyName}}

    - {{deviceType}} -
    -
    -
    -
    -
    -
    - Ownership Type : {{policy.ownershipType}} -
    -
    -
    -
    - Compliance Type : {{policy.compliance}} -
    -
    -
    -
    - Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
    -
    -
    -
    -
    - - - - - - - View - - +
    + {{#equal compliance "COMPLIANT"}} + + {{/equal}} + {{#equal compliance "NON-COMPLIANT"}} + + {{/equal}} +

    + {{policy.policyName}} + {{deviceType}} +

    +

    + Compliance Type : {{policy.compliance}} + Ownership type : {{policy.ownershipType}} +

    + -
    + @@ -77,4 +40,4 @@ {{/each}}
    -
    \ No newline at end of file + From d1b0dac7233641fb655a72dbff4ebabd1f1e6ce6 Mon Sep 17 00:00:00 2001 From: savidude Date: Wed, 21 Jun 2017 15:23:18 +0530 Subject: [PATCH 2/7] Fixing error when starting agent as Daemon --- .../src/main/resources/agent/startService.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh index f85bc7a98..c4a0dced1 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh @@ -39,11 +39,16 @@ sudo apt-get update sudo apt-get install python-pip sudo pip install paho-mqtt -#installing ada +# installing ada +echo ===Installing ADA libraries sudo apt-get install build-essential python-dev unzip Adafruit_Python_DHT -sudo python Adafruit_Python_DHT/setup.py install +cd Adafruit_Python_DHT +sudo python setup.py install +cd .. +# moving files to start the agent as Daemon +echo ===Moving files to start agent as Daemon sudo cp $currentDir/deviceConfig.properties $currentDir/src sudo cp -r $currentDir/src $destination sudo chmod 755 $destination/src/RaspberryAgent.py @@ -51,4 +56,4 @@ sudo update-rc.d -f RaspberryService.sh remove sudo cp $currentDir/RaspberryService.sh /etc/init.d sudo chmod 755 /etc/init.d/RaspberryService.sh sudo update-rc.d RaspberryService.sh defaults -sudo service RaspberryService.sh start +sudo service RaspberryService.sh start \ No newline at end of file From 16812a99433496443cef8c5ac6df5f63956313b7 Mon Sep 17 00:00:00 2001 From: dunithd Date: Wed, 21 Jun 2017 19:37:42 +0530 Subject: [PATCH 3/7] Adding new UX design for Windows/virtual fire alarm device details page --- .../device-view.hbs | 37 +- .../device-view.hbs | 18 +- .../device-view.hbs | 441 +++--------------- .../img/device_icons/windows_app_icon.png | Bin 0 -> 7453 bytes .../public/js/device-detail.js | 2 + .../public/templates/applications-list.hbs | 40 +- .../public/templates/policy-compliance.hbs | 78 +--- 7 files changed, 143 insertions(+), 473 deletions(-) create mode 100644 components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/img/device_icons/windows_app_icon.png mode change 100755 => 100644 components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs mode change 100755 => 100644 components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs index c74615782..3bf9dcff9 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view/device-view.hbs @@ -24,16 +24,39 @@ {{/zone}} {{#zone "device-thumbnail"}} - + +{{/zone}} + +{{#zone "device-details-header"}} +

    + {{device.enrolmentInfo.owner}}'s {{device.name}} + + + +

    +

    Ownership - {{device.enrolmentInfo.ownership}}

    +

    Device is + + {{#equal device.enrolmentInfo.status "ACTIVE"}}Active{{/equal}} + {{#equal device.enrolmentInfo.status "INACTIVE"}}Inactive{{/equal}} + {{#equal device.enrolmentInfo.status "BLOCKED"}}Blocked{{/equal}} + {{#equal device.enrolmentInfo.status "REMOVED"}}Removed{{/equal}} + {{#equal device.enrolmentInfo.status "UNREACHABLE"}}Unreachable{{/equal}} + +

    {{/zone}} {{#zone "device-opetations"}} -
    - Operations -
    -
    - {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams - encodedFeaturePayloads=encodedFeaturePayloads}} +
    +
    +

    Device Operations

    +
    + {{unit "cdmf.unit.device.operation-bar" device=device autoCompleteParams=autoCompleteParams + encodedFeaturePayloads=encodedFeaturePayloads}}
    {{/zone}} diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 50085f8de..09121c01f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -13,7 +13,8 @@ data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}" data-ownership="{{device.ownership}}" - data-owner="{{device.owner}}"> + data-owner="{{device.owner}}" + data-status="{{device.status}}"> {{device.owner}}'s {{device.name}} - + {{#if device.location}} + {{unit "cdmf.unit.geo-dashboard" device=device noGeoFencing=false hideSearch=true}} + {{else}} +
    +

    + + Device location information is not available. +

    +
    +

    +

    +

    + {{/if}}
    diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs index 937ab7c4b..35eac6114 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs @@ -6,398 +6,87 @@ {{#if deviceFound}} {{#if isAuthorized}} - {{#zone "device-details-header"}} -

    - Device {{device.name}} - {{#if device.model}} - - ( {{device.vendor}} {{device.model}} ) - - {{/if}} -

    + {{#zone "device-thumbnail"}} + {{/zone}} - {{#zone "overview-section"}} -
    -
    Device - Overview -
    - - - {{#if device.deviceIdentifier}} - - - - - {{/if}} - {{#if device.name}} - - - - - {{/if}} - {{#if device.vendor}} - {{#if device.model}} - - - - - {{/if}} - {{/if}} - {{#if device.status}} - - - - - {{/if}} - {{#if device.owner}} - - - - - {{/if}} - {{#if device.ownership}} - - - - - {{/if}} - {{#if device.imei}} - - - - - {{/if}} - {{#if device.udid}} - - - - - {{/if}} - {{#if device.osBuildDate}} - - - - - {{/if}} - {{#if device.phoneNumber}} - - - - - {{/if}} - {{#if device.lastUpdatedTime}} - - - - - {{/if}} - -
    Device ID{{device.deviceIdentifier}}
    Name{{device.name}}
    Model{{device.vendor}} - {{device.model}}
    Status - {{#if permissions.CHANGE_DEVICE_STATUS}} - {{#equal device.status "ACTIVE"}} - - {{/equal}} - {{#equal device.status "INACTIVE"}} - - {{/equal}} - {{#equal device.status "BLOCKED"}} - - {{/equal}} - {{#equal device.status "REMOVED"}} - - {{/equal}} - {{else}} - {{#equal device.status "ACTIVE"}} Active{{/equal}} - {{#equal device.status "INACTIVE"}} Inactive{{/equal}} - {{#equal device.status "BLOCKED"}} Blocked{{/equal}} - {{#equal device.status "REMOVED"}} Removed{{/equal}} - {{/if}} -
    Owner{{device.owner}}
    Ownership{{device.ownership}}
    IMEI{{device.imei}}
    UDID{{device.udid}}
    Firmware Build - Date - {{device.osBuildDate}}
    Phone Number{{device.phoneNumber}}
    Last Update{{device.lastUpdatedTime}}
    -
    + {{#zone "device-details-header"}} +

    + {{device.owner}}'s {{device.name}} + + + +

    + {{#if device.model}} +

    {{device.vendor}} {{device.model}}

    + {{/if}} +

    Ownership - {{device.ownership}}

    +

    Device is + + {{#equal device.status "ACTIVE"}}Active{{/equal}} + {{#equal device.status "INACTIVE"}}Inactive{{/equal}} + {{#equal device.status "BLOCKED"}}Blocked{{/equal}} + {{#equal device.status "REMOVED"}}Removed{{/equal}} + {{#equal device.status "UNREACHABLE"}}Unreachable{{/equal}} + +

    {{/zone}} - {{#zone "device-opetations"}} {{#if device.isNotRemoved}} -
    - Operations -
    -
    - {{unit "cdmf.unit.device.type.windows.new.operation-bar" device=device - backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}} +
    +
    +

    Device Operations

    +
    + {{unit "cdmf.unit.device.type.windows.new.operation-bar" device=device + backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
    {{/if}} {{/zone}} - {{#zone "device-details-tab-injected"}} - - - + {{#zone "device-details"}} + {{#if device.deviceInfoAvailable}} + {{#if device.BatteryLevel}} +

    {{device.BatteryLevel.value}}%

    + {{/if}} + {{#if device.ramUsage}} +

    {{device.ramUsage.value}} MB

    + {{/if}} + {{#if device.internalMemory}} +

    {{device.internalMemory.value}} GB +

    + {{/if}} + {{else}} +

    Battery, RAM and Storage related information are not + available yet.

    + {{/if}} {{/zone}} - {{#zone "device-details-tab-contents"}} -
    - - -
    -
    -
    - - {{#if device.deviceInfoAvailable}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{#if device.ramUsage}} -
    -
    -
    -
    Available RAM
    -
    -
    -
    - {{device.ramUsage - .value}} MB -
    -
    -
    -
    -
    - {{/if}} - {{#if device.internalMemory}} -
    -
    -
    -
    Available Local Storage
    -
    -
    -
    -
    - {{device.internalMemory - .value}} GB -
    -
    -
    -
    -
    - {{/if}} - {{else}} -
    -

    - - Battery, RAM and Storage related information are not - available yet. -

    -
    - {{/if}} -
    -
    -
    -
    + {{#zone "device-details-tab-injected"}} +
  • Location
  • +
  • Applications
  • +
  • Policy Compliance
  • {{/zone}} {{#zone "device-view-tab-injected-conents"}} -
    - - -
    -
    - - - - - - -
    -
    -
    -
    +
    +
    - -
    - - -
    -
    - {{#if device.location}} -
    -
    - {{else}} -
    -

    - - Device location information is not available. -

    -
    -

    -

    -

    - {{/if}} -
    -
    +
    +
    +
    - -
    - - -
    -
    - - - - - - -
    -
    -

    - - No applications found. -

    -

    Please try refreshing in a while.

    -
    -
    -
    -
    +
    +
    +
    {{/zone}} @@ -434,4 +123,4 @@ {{js "js/load-map.js"}} {{/if}} -{{/zone}} \ No newline at end of file +{{/zone}} diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/img/device_icons/windows_app_icon.png b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/img/device_icons/windows_app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b373460318b10225a3a2e4bea58510e1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Ga2cA$w%&e4+13WeCXYbP-AEV>Q+AqR;pzurNtiFjT1 z>Nt%!-L<@hE(M(CnqZRgpePYhC=ms0SI|7ilIoqM?-j!4Y)5}Ry{#Dg|8%0v z;;UZ)r2AQWwWClv1#0F&8h7np|=*AxoYw?jh=X9@-j7g2u{f=vP@$sh3Nvq^DQ(f*rohK%e@kdfAiKcAYp z6-DtvRlyJ4aiHn>C-36Z`Gk?r?MPoweo+GF0BOQPoaI{49eahJ2kY>;&I|*;y&`+* zTO9CFXqC#P=uP@?O?(;PvsySV35K7HSLbu9n=U|SN&6rjDgvq<|Ty)uoSL;lEK1PmzfrosIf{V=XmLjSjMhD=SMcb

    No applications found.

    " + diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs old mode 100755 new mode 100644 index ec6029dcc..c25f353df --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs @@ -1,31 +1,9 @@ - \ No newline at end of file +{{#each applications}} +
    + +
    +

    {{name}}

    +

    v{{version}}

    +
    +
    +{{/each}} diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs old mode 100755 new mode 100644 index 1eb233dfe..d87b813f1 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/policy-compliance.hbs @@ -1,61 +1,27 @@ -
    - -
    -
    - - {{#equal deviceType "android"}} - - {{/equal}} - {{#equal deviceType "ios"}} - - {{/equal}} - {{#equal deviceType "windows"}} - - {{/equal}} - - -

    {{policy.policyName}}

    - {{deviceType}} -
    +
    + {{#equal compliance "COMPLIANT"}} + + {{/equal}} + {{#equal compliance "NON-COMPLIANT"}} + + {{/equal}} +

    + {{policy.policyName}} + {{deviceType}} +

    +

    + Compliance Type : {{policy.compliance}} + Ownership type : {{policy.ownershipType}} +

    +
    + -
    -
    -
    -
    - Ownership Type : {{policy.ownershipType}} -
    -
    -
    -
    - Compliance Type : {{policy.compliance}} -
    -
    -
    -
    - Compliance : - {{#equal compliance "COMPLIANT"}} - Compliant - {{/equal}} - {{#equal compliance "NON-COMPLIANT"}} - Not Compliant - {{/equal}} -
    -
    -
    -
    -
    - - - - - - - View - - +
    +

    Revoke Policy

    -
    @@ -76,4 +42,4 @@ {{/each}}
    -
    \ No newline at end of file + From 239487d30a2ea132503169d53dd45a65a9097f6d Mon Sep 17 00:00:00 2001 From: savidude Date: Wed, 21 Jun 2017 19:42:54 +0530 Subject: [PATCH 4/7] Providing a client ID to the agent --- .../iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java | 4 ++-- .../service/impl/constants/RaspberrypiConstants.java | 2 +- .../src/main/resources/agent/src/mqttConnector.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java index fdd36862a..93999db63 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java @@ -112,8 +112,8 @@ public class RaspberryPiServiceImpl implements RaspberryPiService { @QueryParam("from") long from, @QueryParam("to") long to) { String fromDate = String.valueOf(from); String toDate = String.valueOf(to); - String query = "deviceId:" + deviceId + " AND deviceType:" + - RaspberrypiConstants.DEVICE_TYPE + " AND time : [" + fromDate + " TO " + toDate + "]"; + String query = "meta_deviceId:" + deviceId + " AND meta_deviceType:" + + RaspberrypiConstants.DEVICE_TYPE + " AND meta_time : [" + fromDate + " TO " + toDate + "]"; String sensorTableName = RaspberrypiConstants.TEMPERATURE_EVENT_TABLE; try { if (!APIUtil.getDeviceAccessAuthorizationService().isUserAuthorized(new DeviceIdentifier(deviceId, diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java index 5936cfb35..c19928ab7 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java @@ -26,7 +26,7 @@ public class RaspberrypiConstants { public static final String BULB_CONTEXT = "BULB"; //sensor events summerized table name - public static final String TEMPERATURE_EVENT_TABLE = "DEVICE_TEMPERATURE_SUMMARY"; + public static final String TEMPERATURE_EVENT_TABLE = "IOT_PER_DEVICE_STREAM_RASPBERRYPI_TEMPERATURE"; //mqtt tranport related constants public static final String MQTT_ADAPTER_TOPIC_PROPERTY_NAME = "mqtt.adapter.topic"; diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py index ccfa6b067..f05d8e018 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py @@ -101,7 +101,7 @@ def main(): print ("MQTT_LISTENER: MQTT_TOPIC is " + TOPIC_TO_SUBSCRIBE) global mqttClient - mqttClient = mqtt.Client() + mqttClient = mqtt.Client(client_id="RaspberryPi Agent") mqttClient.on_connect = on_connect mqttClient.on_message = on_message mqttClient.on_publish = on_publish From 5755d5bbe35bcdf0d0ebb44eadd7eb45b842ba3d Mon Sep 17 00:00:00 2001 From: savidude Date: Wed, 21 Jun 2017 19:45:23 +0530 Subject: [PATCH 5/7] Restructuring RaspberryPi analytics --- .../carbonapps/raspberrypi/artifacts.xml | 3 + .../raspberrypi_execution.siddhiql | 4 +- .../temperature_publisher/artifact.xml | 22 +++++++ .../temperature_publisher.xml | 25 ++++++++ .../temperature_store/artifact.xml | 22 +++++++ ..._device_stream_raspberrypi_temperature.xml | 62 +++++++++++++++++++ .../temperature_stream/artifact.xml | 23 +++++++ ....stream.raspberrypi.temperature_1.0.0.json | 20 ++++++ .../analytics-view.js | 4 +- .../raspberrypi_receiver-carbon.super.xml | 2 +- ....per.device.stream.raspberrypi_1.0.0.json} | 2 +- 11 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/artifact.xml create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/temperature_publisher.xml create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/artifact.xml create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/iot_per_device_stream_raspberrypi_temperature.xml create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/artifact.xml create mode 100644 components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/iot.per.device.stream.raspberrypi.temperature_1.0.0.json rename features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/{org.wso2.iot.raspberrypi_1.0.0.json => iot.per.device.stream.raspberrypi_1.0.0.json} (87%) diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml index eb937c243..b54801592 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml @@ -20,5 +20,8 @@ + + + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql index a6808ef14..e20970b98 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql @@ -6,10 +6,10 @@ /* define streams/tables and write queries here ... */ -@Import('org.wso2.iot.raspberrypi:1.0.0') +@Import('iot.per.device.stream.raspberrypi:1.0.0') define stream raspberrypi (meta_owner string, meta_deviceId string, meta_time long, temperature float); -@Export('org.wso2.iot.devices.temperature:1.0.0') +@Export('iot.per.device.stream.raspberrypi.temperature:1.0.0') define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float); from raspberrypi diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/artifact.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/artifact.xml new file mode 100644 index 000000000..7002e5f4d --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/artifact.xml @@ -0,0 +1,22 @@ + + + + + temperature_publisher.xml + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/temperature_publisher.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/temperature_publisher.xml new file mode 100644 index 000000000..5f8afc4f1 --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_publisher/temperature_publisher.xml @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/artifact.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/artifact.xml new file mode 100644 index 000000000..b3d58b879 --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/artifact.xml @@ -0,0 +1,22 @@ + + + + + iot_per_device_stream_raspberrypi_temperature.xml + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/iot_per_device_stream_raspberrypi_temperature.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/iot_per_device_stream_raspberrypi_temperature.xml new file mode 100644 index 000000000..9d3d2621c --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_store/iot_per_device_stream_raspberrypi_temperature.xml @@ -0,0 +1,62 @@ + + + + + + iot.per.device.stream.raspberrypi.temperature:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + temperature + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/artifact.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/artifact.xml new file mode 100644 index 000000000..4526dfd73 --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/artifact.xml @@ -0,0 +1,23 @@ + + + + + iot.per.device.stream.raspberrypi.temperature_1.0.0.json + + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/iot.per.device.stream.raspberrypi.temperature_1.0.0.json b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/iot.per.device.stream.raspberrypi.temperature_1.0.0.json new file mode 100644 index 000000000..212705222 --- /dev/null +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/temperature_stream/iot.per.device.stream.raspberrypi.temperature_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "iot.per.device.stream.raspberrypi.temperature", + "version": "1.0.0", + "nickName": "Temperature Data", + "description": "Temperature data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "temperature","type": "FLOAT" + } + ] +} + + + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.realtime.analytics-view/analytics-view.js b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.realtime.analytics-view/analytics-view.js index 674dd8a59..29416c5af 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.realtime.analytics-view/analytics-view.js +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.realtime.analytics-view/analytics-view.js @@ -42,7 +42,7 @@ function onRequest(context) { if (tokenPair) { token = tokenPair.accessToken; } - websocketEndpoint = websocketEndpoint + "/secured-websocket/org.wso2.iot.devices.temperature/1.0.0?" + websocketEndpoint = websocketEndpoint + "/secured-websocket/iot.per.device.stream.raspberrypi.temperature/1.0.0?" + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type + "&websocketToken=" + token; } else { var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username + "@" + user.domain @@ -50,7 +50,7 @@ function onRequest(context) { if (tokenPair) { token = tokenPair.accessToken; } - websocketEndpoint = websocketEndpoint + "/secured-websocket/t/" + user.domain + "/org.wso2.iot.devices.temperature/1.0.0?" + websocketEndpoint = websocketEndpoint + "/secured-websocket/t/" + user.domain + "/iot.per.device.stream.raspberrypi.temperature/1.0.0?" + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type + "&websocketToken=" + token; } diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml index 11cc1d962..498f70f4b 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml @@ -21,5 +21,5 @@ carbon.super/raspberrypi/+/temperature - + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/iot.per.device.stream.raspberrypi_1.0.0.json similarity index 87% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/iot.per.device.stream.raspberrypi_1.0.0.json index 225db3d1c..c2210f50b 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/iot.per.device.stream.raspberrypi_1.0.0.json @@ -1,5 +1,5 @@ { - "name": "org.wso2.iot.raspberrypi", + "name": "iot.per.device.stream.raspberrypi", "version": "1.0.0", "nickName": "raspberrypi", "description": "Temperature data received from the raspberrypi", From e39c2a1d8d308cd9be2213098cf8f0f2e65a6fbe Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 22 Jun 2017 12:42:15 +0530 Subject: [PATCH 6/7] Fixing Notification validation issue ; --- .../operation-bar.hbs | 6 + .../public/js/operation-bar.js | 313 ++++++++++-------- .../private/config.json | 4 +- pom.xml | 2 +- 4 files changed, 177 insertions(+), 148 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs index e0b5cb412..6e2cf569a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs @@ -51,6 +51,7 @@
    +

    @@ -65,6 +66,11 @@ {{description}}

    + + +
    1.1.1 - 3.0.6 + 3.0.8-SNAPSHOT [3.0.0, 4.0.0) From e8aa3631ec2f5df6857ccc0e59b0acaddf1c242b Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 22 Jun 2017 12:48:21 +0530 Subject: [PATCH 7/7] removing the snapshot versions --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7091e90a6..3a77e5bae 100644 --- a/pom.xml +++ b/pom.xml @@ -1142,7 +1142,7 @@ 1.1.1 - 3.0.8-SNAPSHOT + 3.0.7 [3.0.0, 4.0.0)