From e84a9ddbcea6cbf05004b315070617c1c07619a7 Mon Sep 17 00:00:00 2001 From: Kevin Conaway Date: Fri, 17 Oct 2014 16:34:37 -0400 Subject: [PATCH 1/8] Add jw14 apps example --- .../apps/demoapp/definition.json | 4 + .../apps/demoapp/public/actionView.html | 12 +++ .../apps/demoapp/public/app.xml | 97 ++++++++++++++++++ .../apps/demoapp/public/bangView.html | 53 ++++++++++ .../apps/demoapp/public/canvas.html | 20 ++++ .../apps/demoapp/public/contentView.html | 27 +++++ .../apps/demoapp/public/embeddedView.html | 29 ++++++ .../apps/demoapp/public/extStreamAppView.html | 18 ++++ .../apps/demoapp/public/images/jw-128.png | Bin 0 -> 3571 bytes .../apps/demoapp/public/images/jw-16.png | Bin 0 -> 1125 bytes .../apps/demoapp/public/images/jw-32.png | Bin 0 -> 1384 bytes .../apps/demoapp/public/images/jw-48.png | Bin 0 -> 1728 bytes .../apps/demoapp/public/javascripts/main.js | 6 ++ .../apps/demoapp/public/placeActionView.html | 24 +++++ .../demoapp/public/placeSettingsView.html | 22 ++++ .../apps/demoapp/public/placeTabView.html | 21 ++++ .../apps/demoapp/public/profileView.html | 24 +++++ .../apps/demoapp/public/stylesheets/main.css | 0 .../apps/filterdemo/definition.json | 4 + .../apps/filterdemo/public/app.xml | 46 +++++++++ .../public/filteredPlaceActionView.html | 24 +++++ .../public/filteredPlaceSettingsView.html | 47 +++++++++ .../apps/filterdemo/public/images/jw-128.png | Bin 0 -> 3571 bytes .../apps/filterdemo/public/images/jw-16.png | Bin 0 -> 1125 bytes .../apps/filterdemo/public/images/jw-32.png | Bin 0 -> 1384 bytes .../apps/filterdemo/public/images/jw-48.png | Bin 0 -> 1728 bytes .../jiveclientconfiguration.json | 8 ++ .../examples/example-jw14-apps/package.json | 21 ++++ .../backend/routes/configure/get.js | 3 + .../tiles/demo-activity/backend/services.js | 53 ++++++++++ .../tiles/demo-activity/definition.json | 12 +++ .../tiles/demo-activity/public/configure.html | 26 +++++ .../demo-activity/public/images/jw-128.png | Bin 0 -> 3571 bytes .../demo-activity/public/images/jw-16.png | Bin 0 -> 1125 bytes .../demo-activity/public/images/jw-32.png | Bin 0 -> 1384 bytes .../demo-activity/public/images/jw-48.png | Bin 0 -> 1728 bytes .../example-jw14-apps/tiles/templates.json | 10 ++ 37 files changed, 611 insertions(+) create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/definition.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/actionView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/app.xml create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/bangView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/canvas.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/contentView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/embeddedView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/extStreamAppView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-128.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-16.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-32.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-48.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/javascripts/main.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeActionView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeSettingsView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeTabView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/profileView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/stylesheets/main.css create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/definition.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/app.xml create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceActionView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceSettingsView.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-128.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-16.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-32.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-48.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/jiveclientconfiguration.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/package.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/routes/configure/get.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/services.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/definition.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/configure.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-128.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-16.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-32.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-48.png create mode 100644 jive-sdk-service/generator/examples/example-jw14-apps/tiles/templates.json diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/definition.json b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/definition.json new file mode 100644 index 0000000..e6f176e --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/definition.json @@ -0,0 +1,4 @@ +{ + "id": "f5ef5eed-f56e-5073-87bb-2fa88f5a3b49", + "name" : "JiveWorld '14 Demo" +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/actionView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/actionView.html new file mode 100644 index 0000000..ee99a47 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/actionView.html @@ -0,0 +1,12 @@ + +action view + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/app.xml b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/app.xml new file mode 100644 index 0000000..cd6afc5 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/app.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/bangView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/bangView.html new file mode 100644 index 0000000..02e2cde --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/bangView.html @@ -0,0 +1,53 @@ + + + + +

+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/canvas.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/canvas.html new file mode 100644 index 0000000..7e631fd --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/canvas.html @@ -0,0 +1,20 @@ + + + +

A regular blank canvas

+ + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/contentView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/contentView.html new file mode 100644 index 0000000..8befba6 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/contentView.html @@ -0,0 +1,27 @@ + + + +
+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/embeddedView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/embeddedView.html new file mode 100644 index 0000000..a815eb1 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/embeddedView.html @@ -0,0 +1,29 @@ + + + + +

+ Saved context for / : +

+ +
+ +
+ + + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/extStreamAppView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/extStreamAppView.html new file mode 100644 index 0000000..09fbdd1 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/extStreamAppView.html @@ -0,0 +1,18 @@ + + + + +
External Stream App View
+ + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-128.png b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-128.png new file mode 100644 index 0000000000000000000000000000000000000000..01da9d6d105b0668d5e7fb857ab935340316e0ef GIT binary patch literal 3571 zcmbVOc{r478-Ir^iRc?8k;YIGX3QAN43lH2>@?Q0j+wz=%ot-&jVwvBhsIvWDaEm8 zG}ca8j${dyI2}~Bl%3)mozwZgKfb=}`o8CS-}hOr`}e!==e~c}^FCLtEY64s9TEZn zK*ZR{5XbGAJFg%Q_iN^~lEdvJ8K)c=)>IEhFrH2V^oUe<62zE-_axy+cw(r32T2D2 zc;(494h#o#GYo-Bf#G*-U?CJ57YzV9x*;??!H2|vxRX4|epu*7b`umrCSsxX>gKBE zGy{?s*(i)ovJSJbA%yu5&_t;2Nr+AehD$&pG4PNOimzV)CIk!p#*5*Ocb4H$$Tt&) z4;K1oP!8r+5CbZm1W|{nsSs2V2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KW( z>+top^2{qPNz6-5^>ndS0-B+hnVDi`XzXZgZeZzX;%sSbXy|HUY3}A`VQ6k_X5nmV zWa?xI)9aF-T$-DjR|3;yE=!UelqAbL}~|}A zl^GZqZ+W^nhE&{2O3AA{ZU$8xTvRj=EK+T|J$tT3E@~&|6g*)jf`KoLSwQ%w&IDse1Bx6GNiON~Yj<7ry3uZdma2f_iSC zn90Ha|Nk?eOr5^p>+?eCLuZcscy>DeQqaZy|26KUrT_b^Uw1esDZ!OXMLo6e`~CkD z=lJy7{JZ*GkKwsnR*~C5ro@9s^Rt}<7;ijRnXvV-?MX3}+^Xkm&oDkWGBWzt*2d_3 zd!m1o2jhvu=L%k()GsoUQr2;7dsSfj|Btw--2$FU$7l2FPo6zle*eF(;WI{~SGhlh zw(oJDX7%NTx(dVepWN4F|F}$Ht^dEcn`M1%YzEt=hRLlTzs9?^4di=?S-`6#qPY{y)C{|7PRnJL_!! zvM$qfaF^*87kyjXrg`-Exj!2IP78i(mT|jj&k5vq+rrAg$i^VfJ#Xd)u{qm7WuK?3 KpUXO@geCw&wG0~o literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-48.png b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/images/jw-48.png new file mode 100644 index 0000000000000000000000000000000000000000..c1d941045a112696e4bf5535eb17ac8d005a72c5 GIT binary patch literal 1728 zcmaJ?c~BEq7>`nvL=deEihyo|6%@!xu9X-e7YIS*5Ufri$6_K$HYAG#1_+fNb{GU4 z7-_@;#a73wfKEq>2x4V8l};^UD+L9V0TksBIYPQYK>sM++1>ZvH{b8~-SfT;4H4Sm zHsdfDj9p*=FAQBtmd|D-`tOWYx1);_!jDG6;W#8otc5UsGFSoufhzG4C=3$Ik`tOB zUkt`-n<63_i53NeQdmV0TXYC|l?Fv)FuokUMl6ko5I_PQQK;GYk?LAJppdcgQ8W=r zq~StxML>!c3Qq}%kfy{-Su#9lH{h!WQ34f&hylGysn&sdHh!KLME4dk5f99(An|Pc zJEx*Wp#T@wLI90G^_G&zWPna5kbP)$I@t@LkjNAw34Q6_WFL@52Pq6-;lZQUw6Zub zj3-#Ig`U`WIf7_FA~7i`iI7Akz}h23GKK&v~@@r^xoh9 zB-TYFYan76q=OT+QnYY!ZWdD-kgJ8n2&|2OVdY{LL*+06>*TNo;D*xy50O}^P+J5$ z<`E(h7^v1EVzm?s zV*7Kb5S`TR-#3 zPu26<9f|Fw!dk}}?34ZF_|U%Lv2M851WC5V<`>u=8gEF-2R%}{oZYYod~uhdPW;2n z%T<$ea85PmRzz##+tIO@y{_X{%9Wlk1Eew;W|e(zUPW(OzN0$S; z#Z|XDrB_-+J+IFj*1dUjzP3{%JX8V-pPiiSW1etzBS{!FiBV7ME;0pYsPXRgMn<=} z-}qV*+0@*sA8aCy`rCA!&f&~L4Nr7y9UIE*)9b4yzS+IeI2OCp^Oruu*o&>Sph01= zna&z5!!|f+470Dd9+dSL{5(4x{rG#hAu{dN2AXSr^$_=mEgOxoXYJtbCZha!OuA|E zfH115t@*}uGvg>|vx!*O>9@h*smz!|^#yE&3{K05?Elr7^K52MmNIgE2gmFoPxru8rkXRu-^>)7 zJ8;9Va1+FyT|&O*Zx!R<#xmhhd!y)nDlbZmNRp+GsOBkwwEh&hg8Aqs-9&3==1j|CQo|dPwQi=`(MoI zz5E=!iw;LJbAHQuHZpyJ6T;}4P9XD#o1Poq7NpH!FJ@%e0VOS(j?hMKieu%lv;S8a zb`Ajt>+3&yaKG^S#GQ^a-8R<~oHo6D9@L;rH4NOgpWS&r8T(mdxl>z8V1A~c+V8_* f_+$Xcz*u2StJYjQEfkbm?vy}&2=A(Y?D2mA2|%^D literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/javascripts/main.js b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/javascripts/main.js new file mode 100644 index 0000000..bc25273 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/javascripts/main.js @@ -0,0 +1,6 @@ +gadgets.util.registerOnLoadHandler(function() { + // add code that should run on page load here + + // resize app window to fit content + // gadgets.window.adjustHeight(); +}); diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeActionView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeActionView.html new file mode 100644 index 0000000..d9fcd64 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeActionView.html @@ -0,0 +1,24 @@ + + + + +
+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeSettingsView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeSettingsView.html new file mode 100644 index 0000000..849d3c4 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeSettingsView.html @@ -0,0 +1,22 @@ + + + + +
+ + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeTabView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeTabView.html new file mode 100644 index 0000000..ee05e05 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/placeTabView.html @@ -0,0 +1,21 @@ + + + + +
+ + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/profileView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/profileView.html new file mode 100644 index 0000000..cbf7571 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/profileView.html @@ -0,0 +1,24 @@ + + + +
+ + + + + \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/stylesheets/main.css b/jive-sdk-service/generator/examples/example-jw14-apps/apps/demoapp/public/stylesheets/main.css new file mode 100644 index 0000000..e69de29 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/definition.json b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/definition.json new file mode 100644 index 0000000..0915e70 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/definition.json @@ -0,0 +1,4 @@ +{ + "id": "8d6df633-f0ba-54c4-b950-418c19cea08c", + "name" : "JiveWorld '14 Conditional Display Demo" +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/app.xml b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/app.xml new file mode 100644 index 0000000..b62f26a --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/app.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceActionView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceActionView.html new file mode 100644 index 0000000..50a02d3 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceActionView.html @@ -0,0 +1,24 @@ + + + + +
+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceSettingsView.html b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceSettingsView.html new file mode 100644 index 0000000..d94411b --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/filteredPlaceSettingsView.html @@ -0,0 +1,47 @@ + + +
+ +
+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-128.png b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-128.png new file mode 100644 index 0000000000000000000000000000000000000000..01da9d6d105b0668d5e7fb857ab935340316e0ef GIT binary patch literal 3571 zcmbVOc{r478-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zxnB)%9N>9|s|fKtw*~|QT#yZrm-llOVu%-mVKDj7#G9?Pib<(q(ib^J=?un}$gvYdhh9o5z?tRoY6ib@)F;wVib{hfkgP05avwmnYna({*N{( zJaZG%Q-e|yQz{EjrrIztFso#SM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcp$o0y!L2NKW( z>+top^2{qPNz6-5^>ndS0-B+hnVDi`XzXZgZeZzX;%sSbXy|HUY3}A`VQ6k_X5nmV zWa?xI)9aF-T$-DjR|3;yE=!UelqAbL}~|}A zl^GZqZ+W^nhE&{2O3AA{ZU$8xTvRj=EK+T|J$tT3E@~&|6g*)jf`KoLSwQ%w&IDse1Bx6GNiON~Yj<7ry3uZdma2f_iSC zn90Ha|Nk?eOr5^p>+?eCLuZcscy>DeQqaZy|26KUrT_b^Uw1esDZ!OXMLo6e`~CkD z=lJy7{JZ*GkKwsnR*~C5ro@9s^Rt}<7;ijRnXvV-?MX3}+^Xkm&oDkWGBWzt*2d_3 zd!m1o2jhvu=L%k()GsoUQr2;7dsSfj|Btw--2$FU$7l2FPo6zle*eF(;WI{~SGhlh zw(oJDX7%NTx(dVepWN4F|F}$Ht^dEcn`M1%YzEt=hRLlTzs9?^4di=?S-`6#qPY{y)C{|7PRnJL_!! zvM$qfaF^*87kyjXrg`-Exj!2IP78i(mT|jj&k5vq+rrAg$i^VfJ#Xd)u{qm7WuK?3 KpUXO@geCw&wG0~o literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-48.png b/jive-sdk-service/generator/examples/example-jw14-apps/apps/filterdemo/public/images/jw-48.png new file mode 100644 index 0000000000000000000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Qo|dPwQi=`(MoI zz5E=!iw;LJbAHQuHZpyJ6T;}4P9XD#o1Poq7NpH!FJ@%e0VOS(j?hMKieu%lv;S8a zb`Ajt>+3&yaKG^S#GQ^a-8R<~oHo6D9@L;rH4NOgpWS&r8T(mdxl>z8V1A~c+V8_* f_+$Xcz*u2StJYjQEfkbm?vy}&2=A(Y?D2mA2|%^D literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/jiveclientconfiguration.json b/jive-sdk-service/generator/examples/example-jw14-apps/jiveclientconfiguration.json new file mode 100644 index 0000000..ed31eef --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/jiveclientconfiguration.json @@ -0,0 +1,8 @@ +{ + "clientUrl": "tenancy://jive!services.jwdemo.serviceURL", + "extensionInfo" : { + "uuid" : "4ff946ab-b5f5-43be-86b9-70135e072ddd", + "name": "JiveWorld14 Demo", + "description": "JiveWorld14 Demo" + } +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/package.json b/jive-sdk-service/generator/examples/example-jw14-apps/package.json new file mode 100644 index 0000000..2953bfe --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/package.json @@ -0,0 +1,21 @@ +{ + "name": "jw14demo", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node app.js" + }, + "dependencies": { + "express": "3.1.0", + "jive-sdk":"*", + "mustache": "0.7.2", + "handlebars": "2.0.0-alpha.2", + "consolidate": "0.9.0", + "poplib" : "0.1.5", + "q": "0.9.3", + "multipart-parser" : "0.0.2", + "q-io": "1.6.x", + "request": "2.27.0", + "xml2js": "0.2.8" + } +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/routes/configure/get.js b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/routes/configure/get.js new file mode 100644 index 0000000..61d121a --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/routes/configure/get.js @@ -0,0 +1,3 @@ +exports.route = function(req, res){ + res.render('configure.html', {}); +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/services.js b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/services.js new file mode 100644 index 0000000..51988a6 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/backend/services.js @@ -0,0 +1,53 @@ +var jive = require('jive-sdk'); +var scheduler = new jive.scheduler.memory(); + + +var sendActivity = function() { + + jive.extstreams.findByDefinitionName('demo-activity').then(function(instances) { + if (instances) { + instances.forEach(function(instance) { + + var time = new Date(); + + var data = { + "activity": { + "action": { + "name": "posted", + "description": "Activity " + time + }, + "actor": { + "name": "JiveWorld14 Demo", + "email": "user2@localhost" + }, + "object": { + "type": "website", + "url": "http://www.google.com", + "image": "http://localhost:8090/demo-activity/images/jw-128.png", + "title": "Activity " + time, + "description": "Activity " + time + }, + "jive": { + "app": { + "appUUID": "f5ef5eed-f56e-5073-87bb-2fa88f5a3b49", + "view": "extStreamAppView", + "context": { + time: time + } + } + } + } + }; + + jive.extstreams.pushActivity(instance, data); + }); + } + }); + +}; + +exports.onBootstrap = function() { + var task = new jive.tasks.build(sendActivity, 60000); + + jive.tasks.schedule(task, scheduler); +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/definition.json b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/definition.json new file mode 100644 index 0000000..861e176 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/definition.json @@ -0,0 +1,12 @@ +{ + "displayName" : "JiveWorld14 Activity Stream", + "name" : "demo-activity", + "description" : "Demonstration of embedding Apps in External Activity", + "style" : "ACTIVITY", + "config": "%serviceURL%/demo-activity/configure", + "icons" : { + "16" : "%serviceURL%/demo-activity/images/jw-16.png", + "48" : "%serviceURL%/demo-activity/images/jw-48.png", + "128" : "%serviceURL%/demo-activity/images/jw-128.png" + } +} diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/configure.html b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/configure.html new file mode 100644 index 0000000..88f1783 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/configure.html @@ -0,0 +1,26 @@ + + + + +
+ + +
+ + + + + diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-128.png b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-128.png new file mode 100644 index 0000000000000000000000000000000000000000..01da9d6d105b0668d5e7fb857ab935340316e0ef GIT binary patch literal 3571 zcmbVOc{r478-Ir^iRc?8k;YIGX3QAN43lH2>@?Q0j+wz=%ot-&jVwvBhsIvWDaEm8 zG}ca8j${dyI2}~Bl%3)mozwZgKfb=}`o8CS-}hOr`}e!==e~c}^FCLtEY64s9TEZn zK*ZR{5XbGAJFg%Q_iN^~lEdvJ8K)c=)>IEhFrH2V^oUe<62zE-_axy+cw(r32T2D2 zc;(494h#o#GYo-Bf#G*-U?CJ57YzV9x*;??!H2|vxRX4|epu*7b`umrCSsxX>gKBE zGy{?s*(i)ovJSJbA%yu5&_t;2Nr+AehD$&pG4PNOimzV)CIk!p#*5*Ocb4H$$Tt&) z4;K1oP!8r+5CbZm1W|{nsSs2V2#AIT41rSD&_F0dkg5nIT$TH1s31@nbqx$s6Y^Js za=p=s9vGbA>A!q&XIQ8ggF(Z<;laVduwXS9mF@{gpwZ|Z4kS{AYoQVl>c_x`sQ3lQ zeP=Kv1rX?D8iP#rgX}Qk-Kl{LER-ARpIe~N{-*T{_$y7^guz4bG&lmLy0fM4hUVt~ z-IPN4+d6=OBmFDh|41BQ6G|h&aijohAf3Q1oQK?wD;matPQo*&bQ>zw_j?wtyr>Ln zfESepF|gKv95=@k$bLHuir*0C<``qY00!QVKr%MOLb)6;GMR`$sOhO`s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s^Rt}<7;ijRnXvV-?MX3}+^Xkm&oDkWGBWzt*2d_3 zd!m1o2jhvu=L%k()GsoUQr2;7dsSfj|Btw--2$FU$7l2FPo6zle*eF(;WI{~SGhlh zw(oJDX7%NTx(dVepWN4F|F}$Ht^dEcn`M1%YzEt=hRLlTzs9?^4di=?S-`6#qPY{y)C{|7PRnJL_!! zvM$qfaF^*87kyjXrg`-Exj!2IP78i(mT|jj&k5vq+rrAg$i^VfJ#Xd)u{qm7WuK?3 KpUXO@geCw&wG0~o literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-48.png b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/demo-activity/public/images/jw-48.png new file mode 100644 index 0000000000000000000000000000000000000000..c1d941045a112696e4bf5535eb17ac8d005a72c5 GIT binary patch literal 1728 zcmaJ?c~BEq7>`nvL=deEihyo|6%@!xu9X-e7YIS*5Ufri$6_K$HYAG#1_+fNb{GU4 z7-_@;#a73wfKEq>2x4V8l};^UD+L9V0TksBIYPQYK>sM++1>ZvH{b8~-SfT;4H4Sm zHsdfDj9p*=FAQBtmd|D-`tOWYx1);_!jDG6;W#8otc5UsGFSoufhzG4C=3$Ik`tOB zUkt`-n<63_i53NeQdmV0TXYC|l?Fv)FuokUMl6ko5I_PQQK;GYk?LAJppdcgQ8W=r zq~StxML>!c3Qq}%kfy{-Su#9lH{h!WQ34f&hylGysn&sdHh!KLME4dk5f99(An|Pc zJEx*Wp#T@wLI90G^_G&zWPna5kbP)$I@t@LkjNAw34Q6_WFL@52Pq6-;lZQUw6Zub zj3-#Ig`U`WIf7_FA~7i`iI7Akz}h23GKK&v~@@r^xoh9 zB-TYFYan76q=OT+QnYY!ZWdD-kgJ8n2&|2OVdY{LL*+06>*TNo;D*xy50O}^P+J5$ z<`E(h7^v1EVzm?s zV*7Kb5S`TR-#3 zPu26<9f|Fw!dk}}?34ZF_|U%Lv2M851WC5V<`>u=8gEF-2R%}{oZYYod~uhdPW;2n z%T<$ea85PmRzz##+tIO@y{_X{%9Wlk1Eew;W|e(zUPW(OzN0$S; z#Z|XDrB_-+J+IFj*1dUjzP3{%JX8V-pPiiSW1etzBS{!FiBV7ME;0pYsPXRgMn<=} z-}qV*+0@*sA8aCy`rCA!&f&~L4Nr7y9UIE*)9b4yzS+IeI2OCp^Oruu*o&>Sph01= zna&z5!!|f+470Dd9+dSL{5(4x{rG#hAu{dN2AXSr^$_=mEgOxoXYJtbCZha!OuA|E zfH115t@*}uGvg>|vx!*O>9@h*smz!|^#yE&3{K05?Elr7^K52MmNIgE2gmFoPxru8rkXRu-^>)7 zJ8;9Va1+FyT|&O*Zx!R<#xmhhd!y)nDlbZmNRp+GsOBkwwEh&hg8Aqs-9&3==1j|CQo|dPwQi=`(MoI zz5E=!iw;LJbAHQuHZpyJ6T;}4P9XD#o1Poq7NpH!FJ@%e0VOS(j?hMKieu%lv;S8a zb`Ajt>+3&yaKG^S#GQ^a-8R<~oHo6D9@L;rH4NOgpWS&r8T(mdxl>z8V1A~c+V8_* f_+$Xcz*u2StJYjQEfkbm?vy}&2=A(Y?D2mA2|%^D literal 0 HcmV?d00001 diff --git a/jive-sdk-service/generator/examples/example-jw14-apps/tiles/templates.json b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/templates.json new file mode 100644 index 0000000..9b67dbc --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-apps/tiles/templates.json @@ -0,0 +1,10 @@ +{ + "default": { + "name": "defaultTemplate", + "displayName": "JiveWorld '14 Demo", + "description": "JiveWorld '14 Demo", + "tiles": [ + "demo-activity" + ] + } +} \ No newline at end of file From aa83545b9ee5d1bca5501fce6f3fabd256b7ce56 Mon Sep 17 00:00:00 2001 From: Kevin Conaway Date: Fri, 17 Oct 2014 20:30:54 -0400 Subject: [PATCH 2/8] Ensure that %serviceURL% tokens don't get overwritten --- jive-sdk-service/lib/service.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/jive-sdk-service/lib/service.js b/jive-sdk-service/lib/service.js index 791aee4..3f88164 100644 --- a/jive-sdk-service/lib/service.js +++ b/jive-sdk-service/lib/service.js @@ -629,7 +629,7 @@ exports.getExpandedTileDefinitions = function(all) { processedTile['updated'] = "2013-02-28T15:12:16.768-0800"; } if ( processedTile['action'] ) { - if ( processedTile['action'].indexOf('http') != 0 ) { + if ( processedTile['action'].indexOf('http') != 0 && processedTile['action'].indexOf('%serviceURL%') === -1) { // assume its relative to host then processedTile['action'] = host + ( processedTile['action'].indexOf('/') == 0 ? "" : "/" ) + processedTile['action']; } @@ -637,7 +637,7 @@ exports.getExpandedTileDefinitions = function(all) { if ( !processedTile['config'] ) { processedTile['config'] = host + '/' + processedTile['definitionDirName'] + '/configure'; } else { - if ( processedTile['config'].indexOf('http') != 0 ) { + if ( processedTile['config'].indexOf('http') != 0 && processedTile['config'].indexOf('%serviceURL%') === -1) { // assume its relative to host then processedTile['config'] = host + ( processedTile['config'].indexOf('/') == 0 ? "" : "/" ) + processedTile['config']; } @@ -645,7 +645,7 @@ exports.getExpandedTileDefinitions = function(all) { if ( !processedTile['unregister']) { processedTile['unregister'] = host + '/unregister'; } else { - if ( processedTile['unregister'].indexOf('http') != 0 ) { + if ( processedTile['unregister'].indexOf('http') != 0 && processedTile['unregister'].indexOf('%serviceURL%') === -1 ) { // assume its relative to host then processedTile['unregister'] = host + ( processedTile['unregister'].indexOf('/') == 0 ? "" : "/" ) + processedTile['unregister']; } @@ -654,15 +654,11 @@ exports.getExpandedTileDefinitions = function(all) { if ( !processedTile['register'] ) { processedTile['register'] = host + '/registration'; } else { - if ( processedTile['register'].indexOf('http') != 0 ) { + if ( processedTile['register'].indexOf('http') != 0 && processedTile['register'].indexOf('%serviceURL%') === -1 ) { // assume its relative to host then processedTile['register'] = host + ( processedTile['register'].indexOf('/') == 0 ? "" : "/" ) + processedTile['register']; } } - if ( processedTile['unregister'] && processedTile['unregister'].indexOf('http') != 0 ) { - // assume its relative to host then - processedTile['unregister'] = host + ( processedTile['unregister'].indexOf('/') == 0 ? "" : "/" ) + processedTile['unregister']; - } if ( !processedTile['client_id'] ) { processedTile['client_id'] = conf.clientId; } From 59c381a9b96c7a2d6568f33434c2b69c1bfd9286 Mon Sep 17 00:00:00 2001 From: Aron Racho Date: Fri, 17 Oct 2014 17:42:04 -0700 Subject: [PATCH 3/8] committing kevin fixes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3dd9056..2a54951 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jive-sdk", "description": "Node.js framework for building purposeful places", - "version": "0.1.145", + "version": "0.1.146", "main": "jive-sdk-service/api.js", "author": { "name": "Jive Software", From 03e06ab01ccb03bac8981d0d2dcb8b1520c56aff Mon Sep 17 00:00:00 2001 From: rachoac Date: Fri, 17 Oct 2014 19:30:27 -0700 Subject: [PATCH 4/8] specify specific http-proxy and stream-array packages --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2a54951..411be4a 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "log4js": "0.6.3", "xmlhttprequest": "~1.5.0", "archiver" : "0.4.9", - "http-proxy" : "*", - "stream-array" : "*", + "http-proxy" : "1.5.3", + "stream-array" : "0.1.3", "traverse" : "0.6.6", "mv" : "~2.0.3" }, From 7fc4d3719032bf049a4d1f0550c972bc4ee99dbd Mon Sep 17 00:00:00 2001 From: rachoac Date: Fri, 17 Oct 2014 19:35:12 -0700 Subject: [PATCH 5/8] fix to https://github.com/jivesoftware/jive-sdk/issues/32 --- .../generator/styles/tile-activity/backend/datapusher.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jive-sdk-service/generator/styles/tile-activity/backend/datapusher.js b/jive-sdk-service/generator/styles/tile-activity/backend/datapusher.js index 3d0cc25..5c54a46 100644 --- a/jive-sdk-service/generator/styles/tile-activity/backend/datapusher.js +++ b/jive-sdk-service/generator/styles/tile-activity/backend/datapusher.js @@ -55,6 +55,7 @@ exports.task = function() { 'key':'count' }).then(function(count) { count = count.length > 0 ? count[0].count : parseInt(instance.config.startSequence, 10); + count = count || 0; store.save('exampleStore', 'count', { 'key':'count', 'count':count+1 From 020318c2b9f38358d0aaf48a966a7e4258d6755a Mon Sep 17 00:00:00 2001 From: rachoac Date: Fri, 17 Oct 2014 19:48:17 -0700 Subject: [PATCH 6/8] https://github.com/jivesoftware/jive-sdk/issues/34 --- jive-sdk-service/lib/extension/extension.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jive-sdk-service/lib/extension/extension.js b/jive-sdk-service/lib/extension/extension.js index 7182b58..c43d7e8 100644 --- a/jive-sdk-service/lib/extension/extension.js +++ b/jive-sdk-service/lib/extension/extension.js @@ -232,9 +232,9 @@ function fillExtensionMetadata(extensionInfo, definitions, packageApps, cartridg "name": name, "description": description, "minimum_version": extensionInfo['minJiveVersion'] || defaultMinimumVersion, - "icon_16": "extension-16.png", - "icon_48": "extension-48.png", - "icon_128": "extension-128.png", + "icon_16": extensionInfo['icon16'] || "extension-16.png", + "icon_48": extensionInfo['icon48'] || "extension-48.png", + "icon_128": extensionInfo['icon128'] || "extension-128.png", "released_on": extensionInfo['releasedOn'] || "2013-03-08T19:11:11.234Z", "register_url": extensionInfo['registerURL'] || "%serviceURL%/jive/oauth/register", "unregister_url": extensionInfo['unregisterURL'] || "%serviceURL%/jive/oauth/unregister", From 00ece6acf1533d7dc9f951e9594f2016bcd24b2c Mon Sep 17 00:00:00 2001 From: rachoac Date: Fri, 17 Oct 2014 19:48:52 -0700 Subject: [PATCH 7/8] prod push --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 411be4a..832dc10 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jive-sdk", "description": "Node.js framework for building purposeful places", - "version": "0.1.146", + "version": "0.1.147", "main": "jive-sdk-service/api.js", "author": { "name": "Jive Software", From 2ef5bd75152ad529544d708c397d046ca408c94f Mon Sep 17 00:00:00 2001 From: Thomas Jung Date: Sat, 18 Oct 2014 00:27:55 -0700 Subject: [PATCH 8/8] add jw14 purposeful places tile integration example --- .gitignore | 2 + .../jiveclientconfiguration.json | 10 ++ .../examples/example-jw14-tiles/package.json | 20 ++++ .../public/stylesheets/style.css | 29 ++++++ .../backend/routes/explicit_routes.js | 11 +++ .../examples/example-jw14-tiles/tiles/lib.js | 40 ++++++++ .../backend/datapusher.js | 97 +++++++++++++++++++ .../backend/routes/configure/get.js | 21 ++++ .../performance-notification/definition.json | 12 +++ .../public/configuration.html | 11 +++ .../performance-tile/backend/datapusher.js | 97 +++++++++++++++++++ .../backend/routes/action/get.js | 5 + .../backend/routes/configure/get.js | 21 ++++ .../tiles/performance-tile/definition.json | 35 +++++++ .../tiles/performance-tile/public/action.html | 20 ++++ .../public/configuration.html | 22 +++++ .../public/javascripts/action.js | 48 +++++++++ .../public/javascripts/main.js | 22 +++++ .../example-jw14-tiles/tiles/templates.json | 10 ++ 19 files changed, 533 insertions(+) create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/jiveclientconfiguration.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/package.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/public/stylesheets/style.css create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/services/performanceservice/backend/routes/explicit_routes.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/lib.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/datapusher.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/routes/configure/get.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/definition.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/public/configuration.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/datapusher.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/action/get.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/configure/get.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/definition.json create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/action.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/configuration.html create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/action.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/main.js create mode 100644 jive-sdk-service/generator/examples/example-jw14-tiles/tiles/templates.json diff --git a/.gitignore b/.gitignore index 38cf0da..6b17ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules/ .idea/ *.iml DS_Store +.DS_Store +/.project diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/jiveclientconfiguration.json b/jive-sdk-service/generator/examples/example-jw14-tiles/jiveclientconfiguration.json new file mode 100644 index 0000000..a27e2fa --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/jiveclientconfiguration.json @@ -0,0 +1,10 @@ +{ + "clientUrl": "http://localhost", + "port": "3000", + "development" : true, + "fileFlushInterval": 2000, + "uuid" : "975e3675-3d2d-4631-a2d3-2fefeeb566fb", + "name": "JiveWorld Purposeful Places Add-on", + "description": "JiveWorld14 Demo" + +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/package.json b/jive-sdk-service/generator/examples/example-jw14-tiles/package.json new file mode 100644 index 0000000..03e70d0 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/package.json @@ -0,0 +1,20 @@ +{ + "name": "jw14purposefulplaces", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node app.js" + }, + "dependencies": { + "express": "3.1.0", + "jive-sdk":"*", + "mustache": "0.7.2", + "consolidate": "0.9.0", + "poplib" : "0.1.5", + "q": "0.9.3", + "multipart-parser" : "0.0.2", + "q-io": "1.6.x", + "request": "2.27.0", + "xml2js": "0.2.8" + } +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/public/stylesheets/style.css b/jive-sdk-service/generator/examples/example-jw14-tiles/public/stylesheets/style.css new file mode 100644 index 0000000..da50c6e --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/public/stylesheets/style.css @@ -0,0 +1,29 @@ +* { + font-family: Arial, sans-serif; +} + +body { background-color: #eee; margin:20px; } +label, p { display: block; margin: 0.4em 0; } +label input, label strong { display: inline-block; width: 4em; text-align: right; } +button { font-size: 1.15em; font-weight: bold; } + +.j-card .hidden { + display: none; +} + +h2 { + margin-bottom: -2px; +} + +h3 { + margin-bottom: -8px; +} + +ul { + margin-left:0px; padding-left:20px; list-style-type:square; +} + +.j-textarea { + width: 50%; + height: 512px; +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/services/performanceservice/backend/routes/explicit_routes.js b/jive-sdk-service/generator/examples/example-jw14-tiles/services/performanceservice/backend/routes/explicit_routes.js new file mode 100644 index 0000000..0f6f627 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/services/performanceservice/backend/routes/explicit_routes.js @@ -0,0 +1,11 @@ +var jive = require('jive-sdk'); + +exports.last = { + 'verb' : 'get', + 'route': function(req, res) { + res.writeHead(200); + var random = Math.round(Math.random() * 2499) + 1; + jive.logger.info('last request duration: ' + random) + res.end('' + random); + } +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/lib.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/lib.js new file mode 100644 index 0000000..a291c2e --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/lib.js @@ -0,0 +1,40 @@ +var jive = require("jive-sdk"), + request = require("request"), + q = require("q"); + +// TODO: replace with jive.service.serviceURL() + +exports.getPerformance = function() { + var deferred = q.defer(), + url = jive.service.serviceURL() + "/performanceservice/last"; + request.get({uri: url, timeout: 2500}, function(err, response, body) { + if (err) { + deferred.reject(); + } else { + deferred.resolve(body); + } + }); + return deferred.promise; +} + +/** + * [ 1, 2000, 1500, 500 ] and a 'body' responseTime + * example: responseTime '750' would return index 2 + */ +exports.getRangeIndex = function(ranges, body) { + var responseTime = parseInt(body); + if (isNaN(responseTime) || responseTime < 1) { + return 0; + } + var result = 0, lastLimit = Number.MAX_VALUE; + ranges.forEach(function(limit, index) { + if (isNaN(limit)) { + limit = 1 + } + if (responseTime < limit && limit < lastLimit) { + result = index; + lastLimit = limit; + } + }); + return result; +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/datapusher.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/datapusher.js new file mode 100644 index 0000000..4f6a1f3 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/datapusher.js @@ -0,0 +1,97 @@ +/* + * Copyright 2013 Jive Software + * + * 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. + */ + +var jive = require("jive-sdk"), + store = jive.service.persistence(), + lib = require("../../lib"), + ABORT = new Error("not a failure"), + STORE = 'performanceNotificationCount'; + +exports.task = [ + { + 'interval' : 10000, + 'handler' : pushData + } +]; + +function pushData() { + jive.extstreams.findByDefinitionName('performance-notification') + .then(function(instances) { + if (instances) { + instances.forEach(processTileInstance); + } + }) + .fail(function(error) { + jive.logger.error(error); + }); +}; + +function processTileInstance(instance) { + var actualCount, responseTime; + lib.getPerformance() + .then(function(body) { + if (lib.getRangeIndex([0, 2000], body) !== 0) { + throw ABORT; + } + responseTime = body; + // count failures only + return store.find(STORE, { key:'count' }); + }) + .then(function(counts) { + var count = counts.length > 0 ? counts[0].count : 0; + actualCount = count + 1; + return store.save(STORE, 'failureCount', { + 'key': 'count', + 'count': actualCount + }) + }) + .then(function() { + var data = getFormattedData(actualCount, responseTime, instance); + jive.logger.info( + "pushing %s to activity stream %s, access token %s", + JSON.stringify(data), instance.id, instance.accessToken); + jive.extstreams.pushActivity(instance, data); + }) + .fail(function(error) { + if (error && error.message !== ABORT.message) { + jive.logger.error(error); + } + }); +} + +function getFormattedData(count, responseTime, instance) { + return { + "activity": { + "action": { + "name": "posted", + "description": "Total number of failures " + count + }, + "actor": { + "name": "Performance Monitoring Service", + "email": "perfserv@email.com" + }, + "object": { + "type": "website", + "url": "http://www.monitoring-service.com/failures/" + encodeURI(instance.jiveCommunity), + "image": "http://placehold.it/102x102", + "title": "Total number of failures " + count, + "description": "Response time was " + responseTime + + "ms. For detailed failure information, click on 'Go to item'" + }, + "externalID": '' + instance.id + ':' + Date.now() + } + }; +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/routes/configure/get.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/routes/configure/get.js new file mode 100644 index 0000000..a435fed --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/backend/routes/configure/get.js @@ -0,0 +1,21 @@ +/* + * Copyright 2013 Jive Software + * + * 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. + */ + +var jive = require("jive-sdk"); + +exports.route = function(req, res) { + res.render('configuration.html', { host: jive.service.serviceURL() }); +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/definition.json b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/definition.json new file mode 100644 index 0000000..61b1f77 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/definition.json @@ -0,0 +1,12 @@ +{ + "sampleData" : {}, + "displayName" : "Performance Notification", + "name" : "performance-notification", + "description" : "Lists certain performance notifications in the activity stream", + "style" : "ACTIVITY", + "icons" : { + "16" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png", + "48" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png", + "128" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png" + } +} \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/public/configuration.html b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/public/configuration.html new file mode 100644 index 0000000..0e3c113 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-notification/public/configuration.html @@ -0,0 +1,11 @@ + + + + + + + No configuration. + + diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/datapusher.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/datapusher.js new file mode 100644 index 0000000..529990a --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/datapusher.js @@ -0,0 +1,97 @@ +/* + * Copyright 2013 Jive Software + * + * 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. + */ + +var jive = require("jive-sdk"), + lib = require("../../lib"), + tileData = require("../definition.json").sampleData, + defaultRanges = [ 1, 2000, 1500, 1000 ]; + +/** + * Schedules the tile update task to automatically fire every 10 seconds + */ +exports.task = [ + { + 'interval' : 10000, + 'handler' : pushData + } +]; + +/** + * Defines event handlers for the tile life cycle events + */ +exports.eventHandlers = [ + + // process tile instance whenever a new one is registered with the service + { + 'event' : jive.constants.globalEventNames.NEW_INSTANCE, + 'handler' : processTileInstance + }, + + // process tile instance whenever an existing tile instance is updated + { + 'event' : jive.constants.globalEventNames.INSTANCE_UPDATED, + 'handler' : processTileInstance + } +]; + +function pushData() { + jive.tiles.findByDefinitionName('performance-tile') + .then( function(instances) { + if (instances) { + instances.forEach(processTileInstance); + } + }) + .fail(function(error) { + jive.logger.error(error); + }); +} + +function processTileInstance(instance) { + lib.getPerformance() + .then(function(body) { + var index = lib.getRangeIndex(instance.config.ranges || defaultRanges, body); + pushSection(index, body); + }) + .fail(function(error) { + jive.logger.error(error); + pushSection(0) + }); + + function pushSection(index, responseTime) { + var label = tileData.sections[index].label; + responseTime = responseTime ? responseTime + "ms" : "failure"; + var message = tileData.message + ": " + responseTime; + jive.logger.info("update tile %s to index %d with label '%s' and message: %s", + instance.id, index, label, message); + var dataToPush = { + data: { + "message": message, + "sections": tileData.sections, + "activeIndex": index, + "status": label, + "action": { + "text": "Discuss the current performance", + "context": { + "responseTime": responseTime, + "level": index, + "label": label + } + } + } + }; + jive.tiles.pushData(instance, dataToPush); + } +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/action/get.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/action/get.js new file mode 100644 index 0000000..4df355b --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/action/get.js @@ -0,0 +1,5 @@ +var jive = require("jive-sdk"); + +exports.route = function(req, res){ + res.render('action.html', { host: jive.service.serviceURL() }); +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/configure/get.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/configure/get.js new file mode 100644 index 0000000..5727e71 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/backend/routes/configure/get.js @@ -0,0 +1,21 @@ +/* + * Copyright 2013 Jive Software + * + * 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. + */ + +var jive = require("jive-sdk"); + +exports.route = function(req, res){ + res.render('configuration.html', { host: jive.service.serviceURL() }); +}; \ No newline at end of file diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/definition.json b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/definition.json new file mode 100644 index 0000000..d9b49c1 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/definition.json @@ -0,0 +1,35 @@ +{ + "sampleData" : { + "message": "Remote Service Performance", + "sections": [ + { + "color": "#021677", + "label": "Trouble!" + }, + { + "color": "#5a2bac", + "label": "Slow!" + }, + { + "color": "#0088e1", + "label": "Good" + }, + { + "color": "#00c4dc", + "label": "Fast" + } + ], + "activeIndex": 3, + "status": "Fast" + }, + "displayName": "Remote Performance", + "name": "performance-tile", + "description": "Shows performance indicators of a remote service", + "action": "/performance-tile/action", + "style" : "GAUGE", + "icons" : { + "16" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png", + "48" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png", + "128" : "https://community.jivesoftware.com/servlet/JiveServlet/showImage/102-99994-1-1023036/j.png" + } +} diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/action.html b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/action.html new file mode 100644 index 0000000..15e5834 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/action.html @@ -0,0 +1,20 @@ + + + + + + + + + +
+

Discuss this performance level

+

+ + + +
+ + + diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/configuration.html b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/configuration.html new file mode 100644 index 0000000..8af49c6 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/configuration.html @@ -0,0 +1,22 @@ + + + + + + + + + +
+

Configure Performance Level Ranges

+

+ Maximum response time allowable for each level: + + + +

+ +
+ + + diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/action.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/action.js new file mode 100644 index 0000000..7cd3ff7 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/action.js @@ -0,0 +1,48 @@ +/* https://community.jivesoftware.com/docs/DOC-129789 */ + +jive.tile.onOpen(function(context) { + if (typeof context === "string" ) { + context = JSON.parse(context); + } + if (typeof context === "string" ) { + context = JSON.parse(context); + } + var messageTemplate = + "Response performance was " + context.responseTime + + ", meaning it was " + context.label + "."; + $('#template_content').html(messageTemplate); + + gadgets.window.adjustHeight(); + + $('#btn_cancel').click(function() { + jive.tile.close(); + }); + + var submitButton = $('#btn_submit').click(function() { + var customMessage = $('#custom_message').val() || ""; + submitButton.parent().html("creating discussion ..."); + jive.tile.getContainer(function(container) { + var containerRef = container.resources.self.ref; + var discussion = { + "content": { + "type": "text/html", + "text": "

" + messageTemplate + "

" + customMessage + "

" + }, + "subject": "Discuss Performance '" + context.label + "', " + context.responseTime, + "visibility": "place", + "parent": containerRef + } + /* https://developers.jivesoftware.com/api/v3/cloud/js/discussions.html */ + /* http://opensocial-resources.googlecode.com/svn/spec/1.0/Core-Gadget.xml#osapi.Request */ + var request = osapi.jive.corev3.discussions.create(discussion); + /* http://json-rpc.org/wiki/specification */ + request.execute(function(response) { + if (response.error) { + alert(JSON.stringify(response.error)); + return; + } + jive.tile.close(); + }); + }); + }); +}); diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/main.js b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/main.js new file mode 100644 index 0000000..d53dd5d --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/performance-tile/public/javascripts/main.js @@ -0,0 +1,22 @@ +jive.tile.onOpen(function(config, options) { + gadgets.window.adjustHeight(); + if (typeof config === "string") { + config = JSON.parse(config); + } + var ranges = config.ranges || [ null, 2000, 1500, 1000 ]; + // fill form with current settings + ranges.forEach(function(limit, index) { + if (limit) { + $("#limit_" + index).val(limit); + } + }); + $("#btn_submit").click(function() { + ranges.forEach(function(limit, index) { + if (limit) { + ranges[index] = parseInt($("#limit_" + index).val()) || limit; + } + }); + config.ranges = ranges; + jive.tile.close(config, {} ); + }); +}); diff --git a/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/templates.json b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/templates.json new file mode 100644 index 0000000..2742ff6 --- /dev/null +++ b/jive-sdk-service/generator/examples/example-jw14-tiles/tiles/templates.json @@ -0,0 +1,10 @@ +{ + "default": { + "name": "defaultTemplate", + "displayName": "JiveWorld Purposeful Places Add-on Template", + "description": "Template for Jive Node SDK-based integrations session demo", + "tiles": [ + "performance-tile", "performance-notification" + ] + } +} \ No newline at end of file