From 29001aca933f363fd7642cd21f0ed888a59490ca Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 7 Aug 2015 11:17:42 +0530 Subject: [PATCH] minor ui changes --- .../jaggeryapps/iotserver/api/device-api.jag | 2 +- .../iotserver/units/android/android.hbs | 2 - .../units/android_sense/android_sense.hbs | 2 - .../iotserver/units/appbar/appbar.js | 2 +- .../iotserver/units/arduino/arduino.hbs | 2 - .../iotserver/units/dashboard/dashboard.hbs | 14 +- .../iotserver/units/firealarm/firealarm.hbs | 12 +- .../units/firealarm/firealarm.hbs.save | 213 ------------------ .../units/firealarm/public/js/firealarm.js | 20 +- .../units/policy-create/policy-create.hbs | 2 +- .../iotserver/units/showcase/showcase.hbs | 35 +-- .../iotserver/units/theme/public/css/main.css | 4 + 12 files changed, 39 insertions(+), 271 deletions(-) delete mode 100644 modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/firealarm.hbs.save diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag b/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag index 65c0b5f6..9337c8ed 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/api/device-api.jag @@ -105,7 +105,7 @@ if (uriMatcher.match("/{context}/api/device/sketch/download/{downloadId}")) { sketchGenerateLinkEndPoint = deviceManagerService + "/device/" + sketchType + "/generate_link"; var fileId = get(sketchGenerateLinkEndPoint + "?owner=" + user.username, null, "text"); - result = carbonHttpsServletTransport + constants.WEB_APP_CONTEXT + "/api/device/sketch/download/" + fileId.data; + result = "curl -k " + carbonHttpsServletTransport + constants.WEB_APP_CONTEXT + "/api/device/sketch/download/" + fileId.data + " > agent.zip"; } } diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/android/android.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/android/android.hbs index aa0018ca..5f3c15e0 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/android/android.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/android/android.hbs @@ -8,8 +8,6 @@

Connect your Android to the WSO2 device cloud.

- -
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/android_sense/android_sense.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/android_sense/android_sense.hbs index c8d3e782..e9442e72 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/android_sense/android_sense.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/android_sense/android_sense.hbs @@ -8,8 +8,6 @@

Connect your Android Sense to the WSO2 device cloud.

- -
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js index 96b64f64..c7c27bec 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js @@ -39,7 +39,7 @@ function onRequest(context) { links.users.push(dashboardLink); links.policies.push(dashboardLink); links.profiles.push(dashboardLink); - links.store.push(dashboardLink); + //links.store.push(dashboardLink); links.store.push(storeLink); links['group-mgt'].push(dashboardLink); var groupId = request.getParameter("groupId"); diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/arduino/arduino.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/arduino/arduino.hbs index c76e6a56..92412e4e 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/arduino/arduino.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/arduino/arduino.hbs @@ -8,8 +8,6 @@

Connect your Arduino Uno device to the WSO2 Device Cloud.

- -
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs index 4cbb2e22..32f87c21 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/dashboard/dashboard.hbs @@ -46,13 +46,13 @@ View - - - - - - Add - + + + + + + +
diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/firealarm.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/firealarm.hbs index a3d2e33b..5f81900f 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/firealarm.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/firealarm.hbs @@ -8,8 +8,6 @@

Connect your Fire Alarm device to the WSO2 device cloud.

- -
@@ -20,25 +18,25 @@
- + Raspberry Pi (Internet Enabled)       - + DHT11 Temperature Sensor

- + LED                                                     - + Buzzer(3v)

- Download + Download -
- -
-
-

Prepare


-

Get your device ready

-
- 01 Set up your RaspberryPi device as shown in the schematic below and get the FireAlarm setup. -
-
- 02 Connect a monitor to your RaspberryPi via the HDMI cable to get a UI view of the device. -
-
- 03 Get the RaspberryPi to connect to the internet (via Ethernet or Wifi) and note its IP_ADDRESS -
-
-
-

Schematic Diagram


-

Click on the image to zoom

-
- - - -
-
- -
-
-

Connect (Quickstart)

-
-

Internet of Things Foundation Quickstart connection

-
- 01 Click on the "Create DEB" button above to get the download link for the FireAlarm setup files
-
-
-
- (The following commands can be issued by directly typing into the terminal of the device or by an "ssh" login from a remote PC) -
-
- 02 Download the FireAlarm setup files using the following command: "wget <url_link_received_from_the_above_step>"
-                 This will download a zip file named "FireAlarmAgent.zip" -
-
- 03 Run the following commands to successfuly install the package and get the service running:
- - -
- - -
- 04 Use the Sketch program to open the samples code samples/quickstart/quickstart.ino
-
-
- 05 View the lower part of the Sketch pad window to check that the COM connection is shown as active
-
-
-
- - -
-
-
-
-

Please download the file from following link.

-
-
-
- - - -    - -     Copy Link     - -    -
-
-
-
-
-
- - - -
-
-
-
-

Exception at backend. Try Later.

- -
-
-
-
- -
-
-
-
-

Action not permitted.

- -
-
-
-
- -
-
-
-
-

Device Sketch does not exist.

- -
-
-
-
- -
-
-
-
-

Unexpected error.

- -
-
-
-
- -{{/zone}} -{{#zone "topCss"}} - - -{{/zone}} -{{#zone "bottomJs"}} - -{{/zone}} diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/public/js/firealarm.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/public/js/firealarm.js index 1c88318a..42f877d2 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/public/js/firealarm.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/firealarm/public/js/firealarm.js @@ -73,12 +73,20 @@ function attachEvents() { payload, function (data, textStatus, jqxhr) { if(jqxhr.status == 200) { - $(modalPopupContent).html($('#download-device-modal-content-links').html()); - $("#download-device-url").val(data); - $("#download-device-url").focus(function () { - $(this).select(); - }); - showPopup(); + if(data == "403"){ + $(modalPopupContent).html($('#device-403-content').html()); + $("#device-403-link").click(function () { + window.location = "/iotserver/login"; + }); + showPopup(); + }else { + $(modalPopupContent).html($('#download-device-modal-content-links').html()); + $("#download-device-url").val(data); + $("#download-device-url").focus(function () { + $(this).select(); + }); + showPopup(); + } }else{ $(modalPopupContent).html($('#device-403-content').html()); $("#device-403-link").click(function () { diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/policy-create/policy-create.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/policy-create/policy-create.hbs index 2b217e3f..84e16838 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/policy-create/policy-create.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/policy-create/policy-create.hbs @@ -155,7 +155,7 @@
-
1
+
1

diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/showcase/showcase.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/showcase/showcase.hbs index 8626ace1..4f39266f 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/showcase/showcase.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/showcase/showcase.hbs @@ -2,43 +2,20 @@
- - - - - - - - - - - - - - - - - - - - - - - -
+
-
+

-
+
-
+

-
+
-
+

diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/theme/public/css/main.css b/modules/distribution/src/repository/jaggeryapps/iotserver/units/theme/public/css/main.css index b6f92077..47076c0c 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/theme/public/css/main.css +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/theme/public/css/main.css @@ -630,4 +630,8 @@ input[type=checkbox] { display: inline; padding-left: 15px; text-indent: -15px; +} + +.CodeMirror pre{ + padding-left: 45px !important; } \ No newline at end of file