docs/main/Deployment.rst | 5 ++++ moksha/middleware/middleware.py | 2 - moksha/streams/feed/feedstream.py | 8 ++++++- moksha/widgets/all.py | 36 ++++++++++++++++++++++++++++++++++ moksha/widgets/container/container.py | 1 setup.cfg | 10 +++++++++ setup.py | 4 +++ 7 files changed, 62 insertions(+), 4 deletions(-)
New commits: commit cf17100330f4d21b8645f1141b70067c8edb9392 Merge: f820149... 50c19ec... Author: Luke Macken lmacken@redhat.com Date: Thu Feb 5 00:39:49 2009 -0500
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/moksha
commit f820149d3361761742d9c3a444dd00ea8e43bf12 Author: Luke Macken lmacken@redhat.com Date: Thu Feb 5 00:39:09 2009 -0500
Add a `moksha.widgets.all` module that imports all moksha widgets, and put them on the `toscawidgets.widgets` entry point. This is so we can use the archive_tw_resources command and pull in all of our static files.
diff --git a/moksha/widgets/all.py b/moksha/widgets/all.py new file mode 100644 index 0000000..3842215 --- /dev/null +++ b/moksha/widgets/all.py @@ -0,0 +1,36 @@ +# This file is part of Moksha. +# +# Moksha is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Moksha is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Moksha. If not, see http://www.gnu.org/licenses/. +# +# Copyright 2008, Red Hat, Inc. + +""" +A module that imports all known widgets. + +This is currently used by the `archive_tw_resources` setuptools command, +which archives all of the resources used by all ToscaWidgets. +""" + +import pkg_resources +from inspect import isclass + +__all__ = [] + +for widget_entry in pkg_resources.iter_entry_points('moksha.widget'): + widget_class = widget_entry.load() + if isclass(widget_class): + widget = widget_class(widget_entry.name) + else: + widget = widget_class + __all__.append(widget) diff --git a/setup.py b/setup.py index ca71d93..c1340c3 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,9 @@ setup( [paste.app_install] main = pylons.util:PylonsInstaller
+ [toscawidgets.widgets] + widgets = moksha.widgets.all + [moksha.stream] demo = moksha.streams.demo:MokshaDemoDataStream #livegraph = moksha.examples.livegraph:LiveGraphDataStream
commit b6d4ba5f43fc24a5eddc6acd4c92753c493c722f Author: Luke Macken lmacken@redhat.com Date: Thu Feb 5 00:35:52 2009 -0500
Add a `python setup.py archive_tw_resources` command for production deployments.
diff --git a/setup.cfg b/setup.cfg index 6cc77bf..ddbcd3e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,3 +29,13 @@ domain = moksha input_file = moksha/i18n/moksha.pot output_dir = moksha/i18n previous = true + +[archive_tw_resources] +output = tw_static +distributions = moksha +#compresslevel = 2 +onepass = true +#yuicompressor = /home/someuser/bin/yuicompressor.jar + +#[aliases] +#deploy = archive_tw_resources --force install
commit 8773292479b417a025bfe78a9405dd062db18a5a Author: Luke Macken lmacken@redhat.com Date: Thu Feb 5 00:35:32 2009 -0500
Some minor tweaks
diff --git a/moksha/middleware/middleware.py b/moksha/middleware/middleware.py index aee95e0..4e0ef8c 100644 --- a/moksha/middleware/middleware.py +++ b/moksha/middleware/middleware.py @@ -99,8 +99,6 @@ class MokshaMiddleware(object): 'onmessageframe': defaultdict(list) # {topic: [js_callback,]} })
- - def load_paths(self): """ Load the names and paths of all moksha applications and widgets.
diff --git a/moksha/streams/feed/feedstream.py b/moksha/streams/feed/feedstream.py index da7c0ec..b7b2e5e 100644 --- a/moksha/streams/feed/feedstream.py +++ b/moksha/streams/feed/feedstream.py @@ -18,8 +18,14 @@ class FeedStream(PollingDataStream): def poll(self): """ Poll all known feeds.
+ - Iterate over all feeds in our global moksha feed cache.. + Problem:: the MokshaHub will not use this unless both it and the + Moksha WSGI app are using the same `feed_cache` database. + - Keep feed caches fresh. - - Send AMQP messages for new entries + - Send messages to topics for new entries + `feed.$NAME` topic ? + `tag.category """ log.debug('FeedStream.poll()') # gather all feed urls... from all moksha.widget Feed objects, and diff --git a/moksha/widgets/container/container.py b/moksha/widgets/container/container.py index 6fcfd4d..721d585 100644 --- a/moksha/widgets/container/container.py +++ b/moksha/widgets/container/container.py @@ -57,5 +57,4 @@ class MokshaContainer(Widget): d.buttons += '%s,' % button[:1] d.buttons = d.buttons[:-1]
- print "d.id = ", d.id self.add_call(jQuery('#%s' % d.id).buildContainers()) diff --git a/setup.py b/setup.py index c36a621..ca71d93 100644 --- a/setup.py +++ b/setup.py @@ -90,7 +90,7 @@ setup( ## Blueprint plugins #blueprint_fancytype_css = moksha.widgets.blueprint:blueprint_plugin_fancytype_css
- # ↑ ↑ ↓ ↓ ← → ← → b a + # up up down down left right left right b a konami_js = moksha.widgets.misc.ptd:konami
[moksha.menu]
commit 31472036050448a536fad7cfe7e3c6f642a6e451 Author: Luke Macken lmacken@redhat.com Date: Thu Feb 5 00:34:41 2009 -0500
Document how to deploy ToscaWidgets resources in production
diff --git a/docs/main/Deployment.rst b/docs/main/Deployment.rst index 6970370..d8b6b4c 100644 --- a/docs/main/Deployment.rst +++ b/docs/main/Deployment.rst @@ -14,6 +14,11 @@ Setting up mod_wsgi
TODO
+Serving ToscaWidgets static resources +------------------------------------- + +`Deploying projects which use ToscaWidgets http://toscawidgets.org/documentation/ToscaWidgets/deploy.html`_ + Setting up orbited ------------------
commit d04ae8f3b2e0ed8ac0dc3124796e4c8a632d9c24 Author: Luke Macken lmacken@redhat.com Date: Wed Feb 4 17:29:39 2009 -0500
↑ ↑ ↓ ↓ ← → ← → b a
diff --git a/setup.py b/setup.py index 6ae206c..c36a621 100644 --- a/setup.py +++ b/setup.py @@ -90,6 +90,7 @@ setup( ## Blueprint plugins #blueprint_fancytype_css = moksha.widgets.blueprint:blueprint_plugin_fancytype_css
+ # ↑ ↑ ↓ ↓ ← → ← → b a konami_js = moksha.widgets.misc.ptd:konami
[moksha.menu]