From 0ee21c5d9657a1259a731722f53666ad135279bb Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 26 Feb 2011 20:59:26 +0000 Subject: Some improvements to the edit module. Add a few sample apps and test cases, show current user and links to app data. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1074923 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/edit/apps.py | 14 + .../modules/edit/apps/myprofile/app.composite | 86 ++--- sca-cpp/trunk/modules/edit/apps/myprofile/app.html | 48 +-- .../modules/edit/apps/myprofile2/app.composite | 194 +++++----- .../trunk/modules/edit/apps/myprofile2/app.html | 48 +-- .../trunk/modules/edit/apps/nearme/app.composite | 202 +++++----- sca-cpp/trunk/modules/edit/apps/nearme/app.html | 20 + .../trunk/modules/edit/apps/nearme2/app.composite | 204 +++++----- sca-cpp/trunk/modules/edit/apps/nearme2/app.html | 20 + .../trunk/modules/edit/apps/store/app.composite | 90 ++--- sca-cpp/trunk/modules/edit/apps/store/app.html | 75 ++-- .../trunk/modules/edit/apps/store2/app.composite | 90 ++--- sca-cpp/trunk/modules/edit/apps/store2/app.html | 75 ++-- .../trunk/modules/edit/apps/store3/app.composite | 90 ++--- sca-cpp/trunk/modules/edit/apps/store3/app.html | 75 ++-- sca-cpp/trunk/modules/edit/apps/test/app.composite | 20 + sca-cpp/trunk/modules/edit/apps/test/app.html | 20 + .../modules/edit/apps/testlogic/app.composite | 55 +++ sca-cpp/trunk/modules/edit/apps/testlogic/app.html | 20 + .../modules/edit/apps/testsocial/app.composite | 100 +++++ .../trunk/modules/edit/apps/testsocial/app.html | 20 + .../trunk/modules/edit/apps/testtext/app.composite | 134 +++++++ sca-cpp/trunk/modules/edit/apps/testtext/app.html | 20 + .../trunk/modules/edit/apps/testurl/app.composite | 57 +++ sca-cpp/trunk/modules/edit/apps/testurl/app.html | 20 + .../modules/edit/apps/testvalues/app.composite | 281 ++++++++++++++ .../trunk/modules/edit/apps/testvalues/app.html | 20 + .../trunk/modules/edit/apps/travel/app.composite | 421 +++++++++------------ sca-cpp/trunk/modules/edit/apps/travel/app.html | 47 +-- .../trunk/modules/edit/dashboards/joe@localhost | 2 +- sca-cpp/trunk/modules/edit/edit.composite | 7 +- .../trunk/modules/edit/htdocs/dash/dashboard.html | 2 +- sca-cpp/trunk/modules/edit/htdocs/dash/index.html | 4 +- sca-cpp/trunk/modules/edit/htdocs/graph/graph.html | 21 +- sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | 39 +- sca-cpp/trunk/modules/edit/htdocs/menu.html | 18 +- .../modules/edit/palettes/events/palette.composite | 20 +- .../modules/edit/palettes/lists/palette.composite | 35 +- .../modules/edit/palettes/logic/palette.composite | 14 +- .../modules/edit/palettes/math/palette.composite | 8 +- .../modules/edit/palettes/social/palette.composite | 31 +- .../modules/edit/palettes/text/palette.composite | 12 +- .../modules/edit/palettes/url/palette.composite | 14 +- .../modules/edit/palettes/values/palette.composite | 21 +- sca-cpp/trunk/modules/edit/ssl-start | 57 ++- sca-cpp/trunk/modules/edit/start | 47 ++- sca-cpp/trunk/modules/edit/user.py | 5 +- 47 files changed, 1922 insertions(+), 1001 deletions(-) create mode 100644 sca-cpp/trunk/modules/edit/apps/nearme/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/nearme2/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/test/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/test/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/testlogic/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/testlogic/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/testsocial/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/testsocial/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/testtext/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/testtext/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/testurl/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/testurl/app.html create mode 100644 sca-cpp/trunk/modules/edit/apps/testvalues/app.composite create mode 100644 sca-cpp/trunk/modules/edit/apps/testvalues/app.html (limited to 'sca-cpp') diff --git a/sca-cpp/trunk/modules/edit/apps.py b/sca-cpp/trunk/modules/edit/apps.py index fa3307bfca..d0a54ac7ed 100644 --- a/sca-cpp/trunk/modules/edit/apps.py +++ b/sca-cpp/trunk/modules/edit/apps.py @@ -18,23 +18,37 @@ # Apps collection implementation import uuid import sys +import os from util import * # Convert an id to an app id def appid(id): return ("'" + car(id), "'app.composite") +# Link implementation resources into an app +def mkapplink(id): + try: + os.symlink('../../../../../nuvem/nuvem-parallel/nuvem', 'apps/' + car(id) + '/nuvem') + os.mkdir('apps/' + car(id) + '/htdocs') + os.symlink('../../../htdocs/login', 'apps/' + car(id) + '/htdocs/login'); + os.symlink('../../../htdocs/logout', 'apps/' + car(id) + '/htdocs/logout'); + except: + pass + return True + # Post a new app to the apps db def post(collection, app, cache): id = appid((str(uuid.uuid1()),)) comp = caddr(app) cache.put((id,), comp) + mkapplink((id,)) return id # Put an app into the apps db def put(id, app, cache): comp = caddr(app) cache.put(appid(id), comp) + mkapplink(id) return True # Get an app from the apps db diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite b/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite index 414176f316..c75b7c7179 100644 --- a/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/myprofile/app.composite @@ -18,47 +18,47 @@ * under the License. --> - - - - 12345678 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - profiles - - - - - joe - + + + + 12345678 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + profiles + + + + + joe + diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile/app.html b/sca-cpp/trunk/modules/edit/apps/myprofile/app.html index f422574655..b09564dc5c 100644 --- a/sca-cpp/trunk/modules/edit/apps/myprofile/app.html +++ b/sca-cpp/trunk/modules/edit/apps/myprofile/app.html @@ -18,28 +18,28 @@ * under the License. -->
- -

My social profiles

-
- - - - -

Facebook profile

-
- - text - - -

Twitter profile

-
- - text - - - - - - - + +

My social profiles

+
+ + + + +

Facebook profile

+
+ + text + + +

Twitter profile

+
+ + text + + + + + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite index ef2383b1d3..86a6ce6cd1 100644 --- a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.composite @@ -18,101 +18,101 @@ * under the License. --> - - - - - - - - - - - - - - - getProfiles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fbid - - - - - - - - - - - twid - - - - - fbprofile - - - - - - - - - - - - - - - twprofile - - - - - fbid=1234567&twid=joe - - - - - fbid=1234567&twid=joe - + + + + + + + + + + + + + + + getProfiles + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fbid + + + + + + + + + + + twid + + + + + fbprofile + + + + + + + + + + + + + + + twprofile + + + + + fbid=1234567&twid=joe + + + + + fbid=1234567&twid=joe + diff --git a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html index f422574655..b09564dc5c 100644 --- a/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html +++ b/sca-cpp/trunk/modules/edit/apps/myprofile2/app.html @@ -18,28 +18,28 @@ * under the License. -->
- -

My social profiles

-
- - - - -

Facebook profile

-
- - text - - -

Twitter profile

-
- - text - - - - - - - + +

My social profiles

+
+ + + + +

Facebook profile

+
+ + text + + +

Twitter profile

+
+ + text + + + + + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/nearme/app.composite b/sca-cpp/trunk/modules/edit/apps/nearme/app.composite index 61942294ba..d3a4dffebf 100644 --- a/sca-cpp/trunk/modules/edit/apps/nearme/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/nearme/app.composite @@ -18,105 +18,105 @@ * under the License. --> - - - - - - - - - - - - - - - - - - - - fbid - - - - - fbid=1234567 - - - - - 1 - - - - - id - - - - - - - - - - - jane - - - - - - - - - - - - - - - - joe - - - - - - - - - - - - - - - - - jane - - - - - near - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + fbid + + + + + fbid=1234567 + + + + + 1 + + + + + id + + + + + + + + + + + jane + + + + + + + + + + + + + + + + joe + + + + + + + + + + + + + + + + + jane + + + + + near + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/apps/nearme/app.html b/sca-cpp/trunk/modules/edit/apps/nearme/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/nearme/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite b/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite index d5ed657a10..11c967111a 100644 --- a/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/nearme2/app.composite @@ -18,106 +18,106 @@ * under the License. --> - - - - - 60 - - - - - - - - - - - - - - - - - - Hey I'm here! - - - - - - - - - - - - - - - - - - - - - - - - - - - - fbid - - - - - fbid=1234567 - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id - + + + + + 60 + + + + + + + + + + + + + + + + + + Hey I'm here! + + + + + + + + + + + + + + + + + + + + + + + + + + + + fbid + + + + + fbid=1234567 + + + + + + + + + + + 1 + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + diff --git a/sca-cpp/trunk/modules/edit/apps/nearme2/app.html b/sca-cpp/trunk/modules/edit/apps/nearme2/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/nearme2/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/store/app.composite b/sca-cpp/trunk/modules/edit/apps/store/app.composite index 6f4bb9f43c..0c676c19b9 100644 --- a/sca-cpp/trunk/modules/edit/apps/store/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/store/app.composite @@ -17,54 +17,44 @@ * specific language governing permissions and limitations * under the License. --> - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost:11211 - - + + + + + + + + + + + + + + + USD + + + + + + + + + + + + + + + + + + + + + + + + localhost:11211 + diff --git a/sca-cpp/trunk/modules/edit/apps/store/app.html b/sca-cpp/trunk/modules/edit/apps/store/app.html index 3a57127751..593d0a6648 100644 --- a/sca-cpp/trunk/modules/edit/apps/store/app.html +++ b/sca-cpp/trunk/modules/edit/apps/store/app.html @@ -1,32 +1,47 @@ + -
- -

Store

-

Catalog

- - -

Your Shopping Cart

-total - - - -(feed) - -
+
+ +

Store

+
+ +

Catalog

+
+ + + + +

Your Shopping Cart

+
+ + total + + + + + + + + + + (feed) + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/store2/app.composite b/sca-cpp/trunk/modules/edit/apps/store2/app.composite index 4a549b37c1..b75877c67f 100644 --- a/sca-cpp/trunk/modules/edit/apps/store2/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/store2/app.composite @@ -17,54 +17,44 @@ * specific language governing permissions and limitations * under the License. --> - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost:11211 - - + + + + + + + + + + + + + + + USD + + + + + + + + + + + + + + + + + + + + + + + + localhost:11211 + diff --git a/sca-cpp/trunk/modules/edit/apps/store2/app.html b/sca-cpp/trunk/modules/edit/apps/store2/app.html index 3a57127751..593d0a6648 100644 --- a/sca-cpp/trunk/modules/edit/apps/store2/app.html +++ b/sca-cpp/trunk/modules/edit/apps/store2/app.html @@ -1,32 +1,47 @@ + -
- -

Store

-

Catalog

- - -

Your Shopping Cart

-total - - - -(feed) - -
+
+ +

Store

+
+ +

Catalog

+
+ + + + +

Your Shopping Cart

+
+ + total + + + + + + + + + + (feed) + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/store3/app.composite b/sca-cpp/trunk/modules/edit/apps/store3/app.composite index 9ec440435e..735052fe03 100644 --- a/sca-cpp/trunk/modules/edit/apps/store3/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/store3/app.composite @@ -17,54 +17,44 @@ * specific language governing permissions and limitations * under the License. --> - - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost:11211 - - + + + + + + + + + + + + + + + USD + + + + + + + + + + + + + + + + + + + + + + + + localhost:11211 + diff --git a/sca-cpp/trunk/modules/edit/apps/store3/app.html b/sca-cpp/trunk/modules/edit/apps/store3/app.html index 3a57127751..593d0a6648 100644 --- a/sca-cpp/trunk/modules/edit/apps/store3/app.html +++ b/sca-cpp/trunk/modules/edit/apps/store3/app.html @@ -1,32 +1,47 @@ + -
- -

Store

-

Catalog

- - -

Your Shopping Cart

-total - - - -(feed) - -
+
+ +

Store

+
+ +

Catalog

+
+ + + + +

Your Shopping Cart

+
+ + total + + + + + + + + + + (feed) + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/test/app.composite b/sca-cpp/trunk/modules/edit/apps/test/app.composite new file mode 100644 index 0000000000..337694ceb9 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/test/app.composite @@ -0,0 +1,20 @@ + + + diff --git a/sca-cpp/trunk/modules/edit/apps/test/app.html b/sca-cpp/trunk/modules/edit/apps/test/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/test/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite b/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite new file mode 100644 index 0000000000..242a49c013 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testlogic/app.composite @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + item + + + + + + + + + + + 5 + + + + + greater than 5 + + + + + not greater than 5 + + diff --git a/sca-cpp/trunk/modules/edit/apps/testlogic/app.html b/sca-cpp/trunk/modules/edit/apps/testlogic/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testlogic/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/testsocial/app.composite b/sca-cpp/trunk/modules/edit/apps/testsocial/app.composite new file mode 100644 index 0000000000..17188aae1e --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testsocial/app.composite @@ -0,0 +1,100 @@ + + + + + + + 100001053301307 + + + + + + + + + + + + + + + + + + + + + + + + + facebook + + + + + + + + + + + me360 + + + + + + + + + + + + + + + + + + + + + + + + + twitter + + + + + jsdelfino + + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/apps/testsocial/app.html b/sca-cpp/trunk/modules/edit/apps/testsocial/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testsocial/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/testtext/app.composite b/sca-cpp/trunk/modules/edit/apps/testtext/app.composite new file mode 100644 index 0000000000..8309ca0018 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testtext/app.composite @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + abc + + + + + ABC + + + + + abcxdefxghi + + + + + x + + + + + y + + + + + + + + + + + + + + + + + abc + + + + + def + + + + + abcdef + + + + + cd + + + + + x + + + + + x + + + + + abcxdefxghi + + diff --git a/sca-cpp/trunk/modules/edit/apps/testtext/app.html b/sca-cpp/trunk/modules/edit/apps/testtext/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testtext/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/testurl/app.composite b/sca-cpp/trunk/modules/edit/apps/testurl/app.composite new file mode 100644 index 0000000000..e1998e1f46 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testurl/app.composite @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/apps/testurl/app.html b/sca-cpp/trunk/modules/edit/apps/testurl/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testurl/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/testvalues/app.composite b/sca-cpp/trunk/modules/edit/apps/testvalues/app.composite new file mode 100644 index 0000000000..2ee6ee8312 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testvalues/app.composite @@ -0,0 +1,281 @@ + + + + + + + + xyz + + + + + + abc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 123 + + + + + 456 + + + + + + + + + + + + d + + + + + + + + + + + + + + + + + a + + + + + abc + + + + + + + + + + + + + + + + + d + + + + + def + + + + + + + + + + + 0 + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + 34 + + + + + + + + + + + + + + + + + 3 + + + + + * + + + + + + + + + + + + + nb + + + + + + + + + + + + + + sum + + + + + i + + + + + + + + + + + + + + + + + + + + 0 + + + + + 10 + + + + + 2 + + + + + nb + + + + + sum + + + + + i + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/apps/testvalues/app.html b/sca-cpp/trunk/modules/edit/apps/testvalues/app.html new file mode 100644 index 0000000000..5c7c7219bb --- /dev/null +++ b/sca-cpp/trunk/modules/edit/apps/testvalues/app.html @@ -0,0 +1,20 @@ + + +
diff --git a/sca-cpp/trunk/modules/edit/apps/travel/app.composite b/sca-cpp/trunk/modules/edit/apps/travel/app.composite index b4cef31135..40a260e0a9 100644 --- a/sca-cpp/trunk/modules/edit/apps/travel/app.composite +++ b/sca-cpp/trunk/modules/edit/apps/travel/app.composite @@ -1,240 +1,181 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GBP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.23 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GBP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.23 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/apps/travel/app.html b/sca-cpp/trunk/modules/edit/apps/travel/app.html index f016acfe51..ff320ac5b0 100644 --- a/sca-cpp/trunk/modules/edit/apps/travel/app.html +++ b/sca-cpp/trunk/modules/edit/apps/travel/app.html @@ -1,24 +1,27 @@ + -
- -

Welcome to SCATours Online Travel

- - -
+
+ +

Welcome to SCATours Online Travel

+
+ + + +
diff --git a/sca-cpp/trunk/modules/edit/dashboards/joe@localhost b/sca-cpp/trunk/modules/edit/dashboards/joe@localhost index 2ca0d505d3..0d5faf04f6 100644 --- a/sca-cpp/trunk/modules/edit/dashboards/joe@localhost +++ b/sca-cpp/trunk/modules/edit/dashboards/joe@localhost @@ -1 +1 @@ -(("An App that shows my Aggregated Social Profile" "myprofile" ()) ("An advanced version of the Aggregated Social Profile App" "myprofile2" ()) ("An App that shows Friends Near Me" "nearme" ()) ("An advanced version of the Friends Near Me App" "nearme2" ()) ("Sample Online Store App" "store" ()) ("Layout Variation of the Online Store App" "store2" ()) ("Another Variation of the Online Store App" "store3" ()) ("Travel Tutorial App" "travel" ()) ("An Empty Test App" "test" ())) \ No newline at end of file +(("An App that shows my Aggregated Social Profile" "myprofile" ()) ("An advanced version of the Aggregated Social Profile App" "myprofile2" ()) ("An App that shows Friends Near Me" "nearme" ()) ("An advanced version of the Friends Near Me App" "nearme2" ()) ("Sample Online Store App" "store" ()) ("Layout Variation of the Online Store App" "store2" ()) ("Another Variation of the Online Store App" "store3" ()) ("Travel Tutorial App" "travel" ()) ("An Empty Test App" "test" ()) ("Test Values and Lists" "testvalues" ()) ("Test Social Components" "testsocial" ()) ("Test URL Components" "testurl" ()) ("Test Logic Components" "testlogic" ()) ("Test Text Processing Components" "testtext" ())) \ No newline at end of file diff --git a/sca-cpp/trunk/modules/edit/edit.composite b/sca-cpp/trunk/modules/edit/edit.composite index c5996e2db1..3a8c67f9bc 100644 --- a/sca-cpp/trunk/modules/edit/edit.composite +++ b/sca-cpp/trunk/modules/edit/edit.composite @@ -25,7 +25,7 @@ ? - joe@localhost + ? ? ? ? @@ -36,6 +36,11 @@ + + + + + diff --git a/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html b/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html index 9d63253830..3307d193ca 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html +++ b/sca-cpp/trunk/modules/edit/htdocs/dash/dashboard.html @@ -146,7 +146,7 @@ $('createAppOKButton').onclick = function() { var entry = atom.writeATOMEntry(app); dashboard.put(name, car(entry)); getapps(); - div.style.visibility = 'hidden'; + $('newApp').style.visibility = 'hidden'; return false; }; diff --git a/sca-cpp/trunk/modules/edit/htdocs/dash/index.html b/sca-cpp/trunk/modules/edit/htdocs/dash/index.html index 834bca6201..308afdb13a 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/dash/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/dash/index.html @@ -43,7 +43,9 @@ ui.loadwidget('menu', '/menu.html'); diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html index 6de3617651..e03cc6038d 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html @@ -39,6 +39,7 @@ + @@ -99,7 +100,7 @@ function getapp(name, g) { ''; composite = readXML(mklist(x)); } - graph.edit(composite, graph.composite(composite, graph.mkpath().move(palcx,0)), g); + graph.edit(name, composite, graph.composite(composite, graph.mkpath().move(palcx,0)), g); }); } @@ -147,7 +148,7 @@ $('saveButton').onclick = function(e) { }; // Create editor graph area -var g = graph.mkgraph(graph.mkpath().move(0,40), $('compName'), $('propValue')); +var g = graph.mkgraph(graph.mkpath().move(0,40), $('compName'), $('propValue'), $('compValue')); var bg = graph.mkgroup(graph.mkpath()); // Install the palettes @@ -155,14 +156,14 @@ var gpalettes = new Array(); var spalette = 'events'; var pos = graph.mkpath(); installpalette('events', pos.rmove(0,0), g, bg, spalette, gpalettes); -installpalette('values', pos.rmove(0,50), g, bg, spalette, gpalettes); -installpalette('url', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('lists', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('text', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('logic', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('math', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('social', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('sensors', pos.rmove(0, 50), g, bg, spalette, gpalettes); +installpalette('values', pos.rmove(0,40), g, bg, spalette, gpalettes); +installpalette('url', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('lists', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('text', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('logic', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('math', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('social', pos.rmove(0, 40), g, bg, spalette, gpalettes); +installpalette('sensors', pos.rmove(0, 40), g, bg, spalette, gpalettes); // Get and display the current app getapp(appname, g); diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js index fa202d6b86..7273dae1bf 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js @@ -56,7 +56,7 @@ var trashcx = 230; var proxcx = 20; var proxcy = 20; var buttoncx = 70; -var buttoncy = 40; +var buttoncy = 30; var curvsz = 6; var tabsz = 3; @@ -114,7 +114,7 @@ if (ui.isIE()) { /** * Make a VML graph. */ - graph.mkgraph = function(pos, cname, pvalue) { + graph.mkgraph = function(pos, cname, pvalue, cvalue) { // Create div element to host the graph var div = document.createElement('div'); @@ -160,6 +160,7 @@ if (ui.isIE()) { // Reset current selection cname.value = ''; pvalue.value = ''; + cvalue.innerHTML = ''; return false; } @@ -185,6 +186,7 @@ if (ui.isIE()) { // Update the component name and property value fields cname.value = graph.selected.id; pvalue.value = graph.property(graph.selected.comp); + cvalue.innerHTML = graph.compvaluelink(vmlg.appname, graph.selected.id); return false; }; @@ -232,6 +234,7 @@ if (ui.isIE()) { graph.selected = null; cname.value = ''; pvalue.value = ''; + cvalue.innerHTML = ''; } } @@ -281,6 +284,7 @@ if (ui.isIE()) { var compos = scdl.composite(svg.compos); cname.value = graph.ucid(cname.value, compos); graph.selected.id = cname.value; + cvalue.innerHTML = graph.compvaluelink(svg.appname, graph.selected.id); setElement(compos, graph.renamecomp(graph.selected.comp, compos, cname.value)); // Refresh the composite @@ -575,7 +579,7 @@ if (ui.isIE()) { /** * Make an SVG graph. */ - graph.mkgraph = function(pos, cname, pvalue) { + graph.mkgraph = function(pos, cname, pvalue, cvalue) { // Create a div element to host the graph var div = document.createElement('div'); @@ -624,6 +628,7 @@ if (ui.isIE()) { // Reset current selection cname.value = ''; pvalue.value = ''; + cvalue.innerHTML =''; return false; } @@ -649,6 +654,7 @@ if (ui.isIE()) { // Update the component name and property value fields cname.value = graph.selected.id; pvalue.value = graph.property(graph.selected.comp); + cvalue.innerHTML = graph.compvaluelink(svg.appname, graph.selected.id); return false; }; @@ -699,6 +705,7 @@ if (ui.isIE()) { graph.selected = null; cname.value = ''; pvalue.value = ''; + cvalue.innerHTML = ''; } } @@ -766,6 +773,7 @@ if (ui.isIE()) { var compos = scdl.composite(svg.compos); cname.value = graph.ucid(cname.value, compos); graph.selected.id = cname.value; + cvalue.innerHTML = graph.compvaluelink(svg.appname, graph.selected.id); setElement(compos, graph.renamecomp(graph.selected.comp, compos, cname.value)); // Refresh the composite @@ -1121,7 +1129,7 @@ graph.lsvcs = function(comp) { */ graph.brefs = function(comp) { return memo(comp, 'brefs', function() { - return filter(function(r) { return scdl.align(r) == 'bottom'; }, scdl.references(comp)); + return filter(function(r) { return scdl.align(r) == 'bottom' && scdl.visible(r) != 'false'; }, scdl.references(comp)); }); }; @@ -1130,7 +1138,11 @@ graph.brefs = function(comp) { */ graph.rrefs = function(comp) { return memo(comp, 'rrefs', function() { - return filter(function(r) { var a = scdl.align(r); return a == null || a == 'right'; }, scdl.references(comp)); + return filter(function(r) { + var a = scdl.align(r); + var v = scdl.visible(r); + return (a == null || a == 'right') && v != 'false'; + }, scdl.references(comp)); }); }; @@ -1791,12 +1803,25 @@ graph.refresh = function(g) { * Display and enable editing of a composite and the graphical * nodes that represent it. */ -graph.edit = function(compos, nodes, g, cname, pvalue) { +graph.edit = function(appname, compos, nodes, g) { - // Store the composite in the graphical canvas + // Store the appname and composite in the graphical canvas + g.appname = appname; g.compos = compos; // Display the composite nodes return graph.display(nodes, g); }; +/** + * Return the link to a component value. + */ +graph.compvaluelink = function(appname, cname) { + var scheme = 'http'; + var domain = "sca-store.com"; + var port = '8090'; + var link = scheme + '://' + appname + '.' + domain + ':' + port + '/components/' + cname; + return '' + link + ''; + +}; + diff --git a/sca-cpp/trunk/modules/edit/htdocs/menu.html b/sca-cpp/trunk/modules/edit/htdocs/menu.html index d46fd8a882..d60d80b1cb 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/menu.html +++ b/sca-cpp/trunk/modules/edit/htdocs/menu.html @@ -21,6 +21,7 @@ + @@ -28,6 +29,21 @@ diff --git a/sca-cpp/trunk/modules/edit/palettes/events/palette.composite b/sca-cpp/trunk/modules/edit/palettes/events/palette.composite index 375576b863..7629315f60 100644 --- a/sca-cpp/trunk/modules/edit/palettes/events/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/events/palette.composite @@ -22,25 +22,27 @@ targetNamespace="http://events" name="palette"> - - + + - - - + + + + + - - - + + + button - + 60 diff --git a/sca-cpp/trunk/modules/edit/palettes/lists/palette.composite b/sca-cpp/trunk/modules/edit/palettes/lists/palette.composite index 42cc4ea249..89b5e6234a 100644 --- a/sca-cpp/trunk/modules/edit/palettes/lists/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/lists/palette.composite @@ -29,7 +29,6 @@ - @@ -37,59 +36,53 @@ - + - + - + - + - + - + - + - - - - - - - + @@ -97,30 +90,30 @@ - + - - + + - + - + - + diff --git a/sca-cpp/trunk/modules/edit/palettes/logic/palette.composite b/sca-cpp/trunk/modules/edit/palettes/logic/palette.composite index 97de7f2ee2..e24d93a987 100644 --- a/sca-cpp/trunk/modules/edit/palettes/logic/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/logic/palette.composite @@ -31,7 +31,7 @@ - + @@ -39,41 +39,41 @@ - + - + - + - + - + - + diff --git a/sca-cpp/trunk/modules/edit/palettes/math/palette.composite b/sca-cpp/trunk/modules/edit/palettes/math/palette.composite index baac096c37..61638b50a2 100644 --- a/sca-cpp/trunk/modules/edit/palettes/math/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/math/palette.composite @@ -28,7 +28,7 @@ - + * @@ -37,7 +37,7 @@ - + / @@ -46,7 +46,7 @@ - + + @@ -55,7 +55,7 @@ - + - diff --git a/sca-cpp/trunk/modules/edit/palettes/social/palette.composite b/sca-cpp/trunk/modules/edit/palettes/social/palette.composite index bb1342b1a4..c0d24c2550 100644 --- a/sca-cpp/trunk/modules/edit/palettes/social/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/social/palette.composite @@ -35,55 +35,64 @@ - + + + + - + - + - + - + + + + - + - + - + + + + - + @@ -91,13 +100,13 @@ - + - + diff --git a/sca-cpp/trunk/modules/edit/palettes/text/palette.composite b/sca-cpp/trunk/modules/edit/palettes/text/palette.composite index 8fe220d2db..3550a6507c 100644 --- a/sca-cpp/trunk/modules/edit/palettes/text/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/text/palette.composite @@ -30,28 +30,28 @@ - + - + - + - + @@ -59,13 +59,13 @@ - + - + diff --git a/sca-cpp/trunk/modules/edit/palettes/url/palette.composite b/sca-cpp/trunk/modules/edit/palettes/url/palette.composite index 2c62fcef57..3a85322e51 100644 --- a/sca-cpp/trunk/modules/edit/palettes/url/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/url/palette.composite @@ -30,37 +30,37 @@ - + - + - + - + - + - + - + diff --git a/sca-cpp/trunk/modules/edit/palettes/values/palette.composite b/sca-cpp/trunk/modules/edit/palettes/values/palette.composite index 36fce09269..ab881b45f9 100644 --- a/sca-cpp/trunk/modules/edit/palettes/values/palette.composite +++ b/sca-cpp/trunk/modules/edit/palettes/values/palette.composite @@ -25,48 +25,55 @@ + - + abc - + 0 - + name + + + + name + + - + - + - + - + diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/modules/edit/ssl-start index b8e73438e7..5e0429755a 100755 --- a/sca-cpp/trunk/modules/edit/ssl-start +++ b/sca-cpp/trunk/modules/edit/ssl-start @@ -17,21 +17,62 @@ # specific language governing permissions and limitations # under the License. -../../modules/http/ssl-ca-conf tmp localhost -../../modules/http/ssl-cert-conf tmp localhost -../http/httpd-conf tmp localhost 8090 htdocs +# For this module to work, add the app domains to your /etc/hosts as follows: +# 127.0.0.1 sca-store.com joe.sca-store.com jane.sca-store.com myprofile.sca-store.com myprofile2.sca-store.com nearme.sca-store.com nearme2.sca-store.com testvalues.sca-store.com testurl.sca-store.com testsocial.sca-store.com testlogic.sca-store.com testtext.sca-store.com + +here=`readlink -f $0`; here=`dirname $here` +jsprefix=`readlink -f $here/../js` + +# Create SSL certificates +../../modules/http/ssl-ca-conf tmp sca-store.com +../../modules/http/ssl-cert-conf tmp sca-store.com server +../../modules/http/ssl-cert-conf tmp *.sca-store.com vhost + +# Configure server with virtual hosting +../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs +../../modules/http/vhost-conf tmp apps htdocs ../../modules/http/httpd-ssl-conf tmp 8453 +../../modules/http/vhost-ssl-conf tmp + +# Configure authentication ../../modules/http/open-auth-conf tmp -../../modules/http/passwd-auth-conf tmp foo foo -../server/server-conf tmp -../python/python-conf tmp +../../modules/http/passwd-auth-conf tmp joe joe +../../modules/http/passwd-auth-conf tmp jane jane + +# Configure Python component support +../../modules/server/server-conf tmp +../../modules/python/python-conf tmp + +# Configure app home pages +cat >>tmp/conf/dvhost.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/dvhost.conf < +AuthType None +Require all granted + EOF + +# Configure Python component support ../server/server-conf tmp ../python/python-conf tmp + +# Configure app home pages +cat >>tmp/conf/dvhost.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <