OX6:Adding a pre defined UWA widget for a User: Difference between revisions
From Open-Xchange
(New page: Here is an example bash script which can be used to add a new UWA widget for a user. This should only be used bevore the first login, else it will reset the GUI settings to the defaults. ...) |
m (Choeger moved page Adding a pre defined UWA widget for a User to OX6:Adding a pre defined UWA widget for a User) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
Here is an example bash script which can be used to add a new UWA widget for a user | == Example Script to add a predefined UWA widged == | ||
Here is an example bash script which can be used to add a new [[Hyperion_UWA|UWA]] widget for a user. | |||
#!/bin/bash | #!/bin/bash | ||
Line 12: | Line 14: | ||
|sed 's/^.*session\":\"\([0-9A-Fa-f]*\)\".*$/\1/'` | |sed 's/^.*session\":\"\([0-9A-Fa-f]*\)\".*$/\1/'` | ||
EXTERNAL=' | EXTERNAL='[{"action":"new","module":"uwaWidgets","data":{"title":"welt.de","autorefresh":true,"url":"http://www.netvibes.com/api/uwa/examples/rssreader.html","standalone":false,"parameters":{"feedUrl":"http://www.welt.de/?service=Rss"},"visible":true,"adj":{"x":1,"y":1}}}]' | ||
$CURL -X PUT -H "Content-Type: text/javascript" -d "$EXTERNAL" "$SERVER/ajax/ | $CURL -X PUT -H "Content-Type: text/javascript" -d "$EXTERNAL" "$SERVER/ajax/multiple?session=$SESSION" | ||
[[Category: OX6]] |
Latest revision as of 11:36, 27 November 2015
Example Script to add a predefined UWA widged
Here is an example bash script which can be used to add a new UWA widget for a user.
#!/bin/bash SERVER=http://localhost USER=user@context PASSWORD=password CURL='curl -b cookies -c cookies -H Expect: -s' SESSION=`$CURL "$SERVER/ajax/login?action=login&name=$USER&password=$PASSWORD" \ |sed 's/^.*session\":\"\([0-9A-Fa-f]*\)\".*$/\1/'` EXTERNAL='[{"action":"new","module":"uwaWidgets","data":{"title":"welt.de","autorefresh":true,"url":"http://www.netvibes.com/api/uwa/examples/rssreader.html","standalone":false,"parameters":{"feedUrl":"http://www.welt.de/?service=Rss"},"visible":true,"adj":{"x":1,"y":1}}}]' $CURL -X PUT -H "Content-Type: text/javascript" -d "$EXTERNAL" "$SERVER/ajax/multiple?session=$SESSION"