From 0efc953366347b2788db1ec4193002ce0dafef98 Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 10:44:45 +0530 Subject: [PATCH 1/7] added app-conf.json --- .../devicemgt/app/conf/app-conf.json | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json new file mode 100644 index 0000000000..bcd99b6c73 --- /dev/null +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/conf/app-conf.json @@ -0,0 +1,32 @@ +{ + "appName": "IoT Server", + "cachingEnabled": true, + "debuggingEnabled": false, + "permissionRoot": "/", + "loginUri": "${app.context}/login", + "adminServicesUrl": "https://${server.ip}:${server.https_port}/admin/services/", + "authModule": { + "enabled": true, + "login": { + "onSuccess": { + "script": "/app/modules/login.js", + "page": "cdmf.page.dashboard" + }, + "onFail": { + "script": "/app/modules/login.js", + "page": "cdmf.page.sign-in" + } + }, + "logout": { + "onSuccess": { + "page": "cdmf.page.sign-in" + }, + "onFail": { + "page": "cdmf.page.dashboard" + } + }, + "sso": { + "enabled": false + } + } +} \ No newline at end of file From b1fd6115272f899368bd8f866e104d2858b6a8fc Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 10:45:46 +0530 Subject: [PATCH 2/7] set 'isAnonymous' in register unit definition --- .../devicemgt/app/pages/iot.page.register/register.json | 1 + 1 file changed, 1 insertion(+) diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/pages/iot.page.register/register.json b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/pages/iot.page.register/register.json index 13a1bda7e0..58346ba14a 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/pages/iot.page.register/register.json +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/pages/iot.page.register/register.json @@ -1,5 +1,6 @@ { "version": "1.0.0", "uri": "/register", + "isAnonymous": true, "layout": "uuf.layout.sign-in" } \ No newline at end of file From a4817b6037c51bd4e20e23e661880d3cac0352a9 Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 10:46:14 +0530 Subject: [PATCH 3/7] app name from app-conf configuration --- .../devicemgt/app/units/iot.unit.ui.header.logo/logo.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.ui.header.logo/logo.hbs b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.ui.header.logo/logo.hbs index 5d18e1cfb8..b1841e1864 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.ui.header.logo/logo.hbs +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.ui.header.logo/logo.hbs @@ -1 +1 @@ -{{#zone "productName"}}IoT SERVER{{/zone}} \ No newline at end of file +{{#zone "productName"}}{{@app.conf.appName}}{{/zone}} \ No newline at end of file From e80b8db1bd7fba4f68f42cbe7d52da6c8f67bd35 Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 10:47:08 +0530 Subject: [PATCH 4/7] added register user link via unit extending --- .../units/iot.unit.user.sign-in/sign-in.hbs | 45 ++----------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/sign-in.hbs b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/sign-in.hbs index 9792da2d52..4ab4ff871b 100644 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/sign-in.hbs +++ b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/sign-in.hbs @@ -1,44 +1,5 @@ - -{{#zone "bottomLoginJs"}} - {{js "js/login.js" }} {{/zone}} From b1de1dcfcca54c29864a30a981543d0013f3eb59 Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 10:47:48 +0530 Subject: [PATCH 5/7] removed unnecessary client-side js --- .../iot.unit.user.sign-in/public/js/login.js | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/public/js/login.js diff --git a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/public/js/login.js b/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/public/js/login.js deleted file mode 100644 index 1feefb379b..0000000000 --- a/features/device-mgt-iot-feature/org.wso2.carbon.device.mgt.iot.feature/src/main/resources/jaggeryapps/devicemgt/app/units/iot.unit.user.sign-in/public/js/login.js +++ /dev/null @@ -1,50 +0,0 @@ -function post(path, method) { - method = method || "post"; // Set method to post by default if not specified. - form.submit(); -} - - -$( document ).ready(function() { - var currentHash = window.location.hash, - submitPath = $("#signInForm").attr("action"); - if(currentHash=="#auth-failed") { - $('.wr-validation-summary p').text("Sorry!, Please make sure to enter correct username and password"); - $('.wr-validation-summary').removeClass("hidden"); - }else if(currentHash=="#error"){ - $('.wr-validation-summary p').text("Sorry!, Error occured"); - $('.wr-validation-summary').removeClass("hidden"); - } - $('#signIn').click(function(){ - var username = $("input#username").val(), - password = $("input#password").val(); - - if (!username) { - $('.wr-validation-summary p').text("Sorry!, Username cannot be empty."); - $('.wr-validation-summary').removeClass("hidden"); - } else if (!password){ - $('.wr-validation-summary p').text("Sorry!, Password cannot be empty."); - $('.wr-validation-summary').removeClass("hidden"); - } else { - post(submitPath,"POST"); - } - }); -}); - - -function submitLoginForm() { - var submitPath = $("#signInForm").attr("action"); - $('form input').keypress(function() { - if(e.which == 10 || e.which == 13) { - if (!username) { - alert() - $('.wr-validation-summary p').text("Sorry!, Username cannot be empty."); - $('.wr-validation-summary').removeClass("hidden"); - } else if (!password){ - $('.wr-validation-summary p').text("Sorry!, Password cannot be empty."); - $('.wr-validation-summary').removeClass("hidden"); - } else { - post(submitPath,"POST"); - } - } - }); -} From 0f1f1a04c494a4668f1e0bcb2833b2f06ba32f64 Mon Sep 17 00:00:00 2001 From: sajithar Date: Mon, 14 Dec 2015 12:37:13 +0530 Subject: [PATCH 6/7] removed '.car' files --- .../resources/carbonapps/Accelerometer.car | Bin 4184 -> 4184 bytes .../src/main/resources/carbonapps/Battery.car | Bin 3997 -> 3997 bytes .../src/main/resources/carbonapps/GPS.car | Bin 3905 -> 3905 bytes .../src/main/resources/carbonapps/Gravity.car | Bin 4014 -> 4014 bytes .../main/resources/carbonapps/Gyroscope.car | Bin 4074 -> 4074 bytes .../src/main/resources/carbonapps/Light.car | Bin 3942 -> 3942 bytes .../main/resources/carbonapps/Magnetic.car | Bin 4027 -> 4027 bytes .../main/resources/carbonapps/Pressure.car | Bin 4034 -> 4034 bytes .../main/resources/carbonapps/Proximity.car | Bin 4081 -> 4081 bytes .../main/resources/carbonapps/Rotation.car | Bin 4027 -> 4027 bytes 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Accelerometer.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Accelerometer.car index 8de93cc85b6375c4d217d8f2c81f45ea6fc8b58c..53fee678259eed2876aa373ccd17c7a1956e4a75 100644 GIT binary patch delta 222 zcmcbia6^GNz?+$ci-CcIfq^BgZz8WPGl=rF0#jYqVCsY(h}!rwlo3Qv4rICqrj3}N zfauMVEE^yaXINi?1$MAGg9SGKWB(43`N4S+EOUm72_kTj+ZSwxB99lC&f@_(18DXh w9y>7omnR2I=kP{?=@YzRU|Nx{08CHe3kTEh_$t73CVwoLKFJR;PfWlG0C2lRumAu6 delta 222 zcmcbia6^GNz?+$ci-CcIf#G&?&qQ8ZW)S6T1*W>J!PE&o5Vi4VC?klT9LRJJOdByj z0nwW!SvEi<&al1&3+!NX1`BNd$Nn86^MmsuSmq2D6GY%5w=dWXMIJ9OoyX%1ruXpJ uf$6_IIbb@6Hxf*r;0*)QihKoNdJ11Sn107s0j4wgW5M)Eeu#Nu0!{!Vqg$i^ diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Battery.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Battery.car index 2d55b17941696b26da732d05a7806736a7c76631..a927a63578dd31c947ef049ae046cdefec9dafcc 100644 GIT binary patch delta 221 zcmbO$KUbbNz?+$ci-CcIfq^BgZz8WbGl+6G0aJCRU}~Elh}!tvoe@M&He|XCrrDWq zgXqmqndd_!+F2if1+v)8!2+9?u)l@KOyN8O){@Ni4@{?UyMyU<+%91HE4M3{w&k${ u({(%vVEQ3XFqk&y4FJcIC?f(_8q$!89Mg7nqLbcLD%0)ocTkQuz?+$ci-CcIfq^BgZz8WTGl+6F08?d#U}}{fh}wADh7m+hmSQ>!re85# z0nwWeGS7ubB(mND3)rz)g9SF%uz!Te6mXsfYq8_{4W@0loxyYyw*#0y%IyfIIeF~B tv=>hVm|n``52nBK_<(6Q-WZ5DuP>PX%9{eFWB7u>^d>$pF#Vs;2>=6SLb3n= delta 221 zcmX>ocTkQuz?+$ci-CcIf#G&?&qQ8hW)S6U0H(?e!PF`}5Vi5P4I_x2EX8ydOuu5f z0-`q`WS$F=NMyYQ7O-Qp1`BMiVgCq`Dd0Q})?&x?8%*19JA>&aZU-=Zl-m(ZbMn}M tX)m4#Fujz=A54Ge@d49ryfF}QUSBZ%l{W=U$M6M%=}mlIVER9w69B8kS*8F0 diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Gravity.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Gravity.car index 2ffae76978003cf2ca3a6005b07afc373d6b89d6..4c3ba876a2e116a778d6ae7411bf6e3b0171ca45 100644 GIT binary patch delta 222 zcmZ1{zfPVvz?+$ci-CcIfq^BgZz8V+Gl=pq0aNv+U~0P_h}!tVlMzHuHetF7rg@le zgXqn#m={1KdRZTU1q#^Azyh0BvVVZc%;7u>mdW8_h6ogKdw|W@%k2WDS$JH*v=5IR unC|6C1k)dRLcp{KZvdE{&6@(InfL<1bQoU_m_EuE4yNV#y})!1zY_rLnZtP&ER(~<3=t^e_5ho)m)iwQv+%frX&)Xt uFx|_O2&O;sgn(%e-T*K?n>PhaGw}t2=`g+=FnyFS98Amedx7a3ekTB+%vZ7i diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Gyroscope.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Gyroscope.car index 961cece6ebaf29baf64849878a5276d2ea7e36db..2764f24771c9fac64dbcdbe66150c32eef1baf5b 100644 GIT binary patch delta 222 zcmaDQ|4N=Wz?+$ci-CcIfq^BgZz8WHGl=pu15-`rU}}#Zh}!tpn-N4$wr08xrbU_W zgXqoQnU_K&=CeKl3$(G>g9SF9VE+t}*~fVfEYr`$3K5vj?FlyHF}E9-*5Ppn(`7t% uV0t@G3YeDT4TXsF27&3*ycuBHj4v2W_wW^f>HmC@U^<%L3rw%zcLD$cQA3yj delta 222 zcmaDQ|4N=Wz?+$ci-CcIf#G&?&qQ8JW)S6R2Bw;g6ZpgUSL{<-w6OZ3_$Au delta 222 zcmaDR_e_pAz?+$ci-CcIf#G&?&qQ8RW)S6S1g5Ht!PEvl5Vi546C;S8tj2T!O#fuM z0iriwVV(_LyNuOFC>=S=|9hj{(LvyzY_rMcS;To3B(u1P3&Jnu_5d4kfZG*JbMUx<=|CPk uFg=MU2~2AX5Vi4@7bA$CY|eBQO!G6} z2GN_}GB1KiOk#Zm7AR-41`BN7%Ki!>vxxI7NM>;n7ldER?EyC80Jkfc=HPJy(}6s8 uV0scy5}5wZ69T6Fcmu)oBHlDG&CM4CrW5$`!1P7F2r#X~?**nS`JDi+^;lZ~ diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Pressure.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Pressure.car index 7db5214b15e995f53cf2a6706995535f75d83c96..d7805ee3a7539096ccc3fbd9174dc46a60a52d9b 100644 GIT binary patch delta 221 zcmX>ke@LD;z?+$ci-CcIfq^BgZz8V+Gl=pq1yc=XU}~oxh}!tdlMzHuHeQ3skUKfdw{iW&a3~S;=`8B(u1Z3&OAA_5d4koZA&l^YgfY=?ES> uFg=qe2~7Xv2?5igyn$ePC2ty-7UBy6)9HM9VEP7M1eiAF_X5)m{7wKalR@SH delta 221 zcmX>ke@LD;z?+$ci-CcIf#G&?&qQ7eW)S6J3Z@#&z|>AX5Vi4@CnJcSY{qmIO!G0{ z1<{+|F)xBhOlExq7N}se0t;;3%Ki}|vy$^HNM>;*7ldEK?EyC8IJYa9=I3z((-Ay& uV0tD`5}5wS69T3~c>}@pO5QXuEyNcDrqlWI!1N8i2rzBT?**nC_?-aO@>tpc diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Proximity.car b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/carbonapps/Proximity.car index 6bf842b7e73d892294bef2f6c6d7363b130c3c91..239c62e5e9594588544b1c23356f12b9ed96da82 100644 GIT binary patch delta 222 zcmew;|52Vdz?+$ci-CcIfq^BgZz8WHGl=pu15-`rU}}#Zh}!tphY>_iwqd#frp1}> zgXqmanU_K&7P3A83v{qKfCV<6X8!__ImCG$EHj0R9U?G~+Y@ZYD{eP1ZOr2irfYfZ u!1O+z6fmvI8wwHU4Fc1bcr(DXEnhI0p3GMOrrG!-!E_S87nokp?*srF&_f;o delta 222 zcmew;|52Vdz?+$ci-CcIf#G&?&qQ8JW)S6R2Bw1&Y}$!2+AtvwwidEaE%^mMP?7gb0*!dw|V2!0igAIe6T_bRdr% un4ZLw1g5|9gn(&3-as(Dh&K&PbMpm(=>)z!Fny6P0!-`hdx7anekTAW<3VHq delta 222 zcmdljzgwO+z?+$ci-CcIf#G&?&qQ7eW)S6J3Z@#&z|>AX5Vi4@CnJcSY{qm2O!G3| z2GN^eGcSZl^s_z$3ly_if(16OXa4|^S;Tn;EK|tE2oWgd_5ho4fZG*JbMUx<=|CPk uFg=MU2~2 Date: Mon, 14 Dec 2015 12:37:19 +0530 Subject: [PATCH 7/7] removed '.car' files --- .../carbonapps/Temperature_Sensor.car | Bin 4138 -> 4138 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/carbonapps/Temperature_Sensor.car b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/carbonapps/Temperature_Sensor.car index 6ad7c091624b30cd3573dc3251a5bb60c9cb8aa9..ce38a8c545991c9a2e9c0d0204395306ec58fcc3 100644 GIT binary patch delta 222 zcmZ3buu6e9z?+$ci-CcIfq^BgZz8WXGl=rG08?$2VCs+_h}!r$kP$>rc4xW`rd63A zf#}U#EUO?A+gYE31s1Y7fdw`{WB&q?xyyMTEVG`A8zQim8)z-iEN&hTFdfF@38okE w*n#QCJQ-lxk2f4luiy;<)BkyMz;qs8D40IRR|2MO`J=(~Y<@2={es^K0F!bOsg_K z0@0hfSXMzKwzED53oK-F0t;+@#{LB&bC>fxSY|yJH$-4Bw>Q`fZXORX9meAcrWf(p vf$7IQ8DQFvHyli_;0*!O|9Nx3bRJ(Qm_Ei=0;X;GqrvoSelIZng5L=MM_O9A