Author: justi9
Date: 2009-04-09 11:43:54 -0400 (Thu, 09 Apr 2009)
New Revision: 3275
Added:
mgmt/trunk/cumin/resources/pool-20.png
mgmt/trunk/cumin/resources/pool-36.png
mgmt/trunk/cumin/resources/rhlogo-32.png
Removed:
mgmt/trunk/cumin/resources/cluster-20.png
mgmt/trunk/cumin/resources/cluster-36.png
Modified:
mgmt/trunk/mint/python/mint/model.py
mgmt/trunk/misc/boneyard.py
mgmt/trunk/misc/templates.py
mgmt/trunk/wooly/python/wooly/forms.py
mgmt/trunk/wooly/python/wooly/widgets.py
mgmt/trunk/wooly/python/wooly/widgets.strings
Log:
Files missing from change 3274
Deleted: mgmt/trunk/cumin/resources/cluster-20.png
===================================================================
(Binary files differ)
Deleted: mgmt/trunk/cumin/resources/cluster-36.png
===================================================================
(Binary files differ)
Copied: mgmt/trunk/cumin/resources/pool-20.png (from rev 3267,
mgmt/trunk/cumin/resources/cluster-20.png)
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/pool-20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
Copied: mgmt/trunk/cumin/resources/pool-36.png (from rev 3267,
mgmt/trunk/cumin/resources/cluster-36.png)
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/pool-36.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
Added: mgmt/trunk/cumin/resources/rhlogo-32.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/rhlogo-32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: mgmt/trunk/mint/python/mint/model.py
===================================================================
--- mgmt/trunk/mint/python/mint/model.py 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/mint/python/mint/model.py 2009-04-09 15:43:54 UTC (rev 3275)
@@ -105,8 +105,6 @@
name = StringCol(length=1000, default=None, unique=True, notNone=True)
url = StringCol(length=1000, default=None)
broker = ForeignKey("Broker", cascade="null", default=None)
- cluster = ForeignKey("BrokerCluster", cascade="null",
default=None)
- profile = ForeignKey("BrokerProfile", cascade="null",
default=None)
url_unique = DatabaseIndex(url, unique=True)
@@ -137,21 +135,6 @@
brokerGroup = ForeignKey("BrokerGroup", notNull=True, cascade=True)
unique = DatabaseIndex(broker, brokerGroup, unique=True)
-class BrokerCluster(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- name = StringCol(length=1000, default=None)
- brokers = SQLMultipleJoin("BrokerRegistration",
joinColumn="cluster_id")
-
-class BrokerProfile(SQLObject):
- class sqlmeta:
- lazyUpdate = True
-
- name = StringCol(length=1000, default=None)
- brokers = SQLMultipleJoin("BrokerRegistration",
joinColumn="profile_id")
- properties = SQLMultipleJoin("ConfigProperty",
joinColumn="profile_id")
-
class MintBroker(object):
def __init__(self, url, qmfBroker):
self.url = url
Modified: mgmt/trunk/misc/boneyard.py
===================================================================
--- mgmt/trunk/misc/boneyard.py 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/misc/boneyard.py 2009-04-09 15:43:54 UTC (rev 3275)
@@ -187,7 +187,7 @@
def process_cancel(self, session, prop):
branch = session.branch()
- self.page.show_broker(branch, prop.get_broker()).show_view(branch)
+ self.page.show_broker(branch, prop.get_broker()).view.show(branch)
self.page.set_redirect_url(session, branch.marshal())
def process_submit(self, session, prop):
Modified: mgmt/trunk/misc/templates.py
===================================================================
--- mgmt/trunk/misc/templates.py 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/misc/templates.py 2009-04-09 15:43:54 UTC (rev 3275)
@@ -72,7 +72,7 @@
end = ocurly
else:
fragments.append("{" + text[end + 1:ccurly] + "}")
-
+
start = ccurly + 1
end = ocurly
@@ -81,7 +81,7 @@
if __name__ == "__main__":
from time import clock
from cStringIO import StringIO
-
+
texts = ["x{y}z}a{b}c",
"x{y",
"x}y",
@@ -101,10 +101,10 @@
print clock() - start
start = clock()
-
+
for i in range(10000):
buffer = StringIO()
-
+
for frag in frags:
buffer.write(frag)
Modified: mgmt/trunk/wooly/python/wooly/forms.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/forms.py 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/wooly/python/wooly/forms.py 2009-04-09 15:43:54 UTC (rev 3275)
@@ -23,9 +23,9 @@
if not origin:
try:
branch = session.branch()
- self.frame.show_view(branch)
+ self.frame.view.show(branch) # XXX big dep problem
origin = branch.marshal()
- except: # we don't have a show_view
+ except: # we don't have a show_view # XXX ah, weird
pass
return origin
Modified: mgmt/trunk/wooly/python/wooly/widgets.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/widgets.py 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/wooly/python/wooly/widgets.py 2009-04-09 15:43:54 UTC (rev 3275)
@@ -15,7 +15,7 @@
self.modes = list()
- self.mode = Parameter(app, "m")
+ self.mode = self.ModeParameter(app, "m")
self.add_parameter(self.mode)
def add_mode(self, mode):
@@ -24,33 +24,28 @@
super(ModeSet, self).add_child(mode)
if not self.mode.default:
- self.mode.default = mode.name
+ self.mode.default = mode
- def get_selected_mode(self, session):
- return self.children_by_name.get(self.mode.get(session))
-
- def set_selected_mode(self, session, mode):
- self.mode.set(session, mode.name)
-
- def show_mode(self, session, mode):
- self.set_selected_mode(session, mode)
-
- return mode
-
def show_child(self, session, child):
- return self.show_mode(session, child)
+ self.mode.set(session, child)
def do_process(self, session, *args):
- mode = self.get_selected_mode(session)
+ mode = self.mode.get(session)
+ mode.process(session)
- if mode:
- mode.process(session)
+ def render_content(self, session, *args):
+ mode = self.mode.get(session)
+ return mode.render(session)
- def render_mode(self, session, *args):
- mode = self.get_selected_mode(session)
+ class ModeParameter(Parameter):
+ def do_marshal(self, mode):
+ return mode.name
- if mode:
- return mode.render(session)
+ def do_unmarshal(self, name):
+ try:
+ return self.widget.children_by_name[name]
+ except KeyError:
+ pass
class TabbedModeSet(ModeSet):
def __init__(self, app, name):
@@ -73,12 +68,12 @@
def render_tab_href(self, session, tab):
branch = session.branch()
- self.set_selected_mode(branch, tab)
+ tab.show(branch)
return branch.marshal()
def render_tab_class(self, session, tab):
- stab = self.get_selected_mode(session)
- return stab is tab and "class=\"selected\"" or ""
+ mode = self.mode.get(session)
+ return mode is tab and "class=\"selected\"" or ""
def render_tab_content(self, session, tab):
args = tab.get_args(session)
Modified: mgmt/trunk/wooly/python/wooly/widgets.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/widgets.strings 2009-04-09 15:40:23 UTC (rev 3274)
+++ mgmt/trunk/wooly/python/wooly/widgets.strings 2009-04-09 15:43:54 UTC (rev 3275)
@@ -1,6 +1,3 @@
-[ModeSet.html]
-{mode}
-
[TabbedModeSet.css]
ul.TabbedModeSet.tabs {
padding: 0;
@@ -16,6 +13,9 @@
padding: 0.275em 0.5em;
border-top: 1px solid #ccc;
border-right: 1px solid #ccc;
+ border-left: 1px solid #e7e7e7;
+ -moz-border-radius: 0.35em 0.35em 0 0;
+ -webkit-border-radius: 0.35em 0.35em 0 0;
color: #333;
background-color: #f7f7f7;
line-height: 1.5em;
@@ -45,7 +45,7 @@
[TabbedModeSet.html]
<ul class="TabbedModeSet tabs">{tabs}</ul>
-<div class="TabbedModeSet mode">{mode}</div>
+<div class="TabbedModeSet mode">{content}</div>
[TabbedModeSet.tab_html]
<li><a href="{tab_href}"
{tab_class}>{tab_content}</a></li>