Author: justi9
Date: 2007-10-16 12:11:12 -0400 (Tue, 16 Oct 2007)
New Revision: 1088
Modified:
mgmt/cumin/python/cumin/demo.py
mgmt/cumin/python/cumin/model.py
mgmt/cumin/python/cumin/server.py
mgmt/cumin/python/cumin/server.strings
Log:
Adds server values to the server config property demo data and model
and renders them in the UI.
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-16 16:03:14 UTC (rev 1087)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-16 16:11:12 UTC (rev 1088)
@@ -109,16 +109,19 @@
prop = ConfigProperty(self.model)
prop.name = "max_threads"
prop.value = 1000
+ prop.server_value = 1000
obj.add_config_property(prop)
prop = ConfigProperty(self.model)
prop.name = "max_memory"
prop.value = 1000000
+ prop.server_value = 2000000
obj.add_config_property(prop)
prop = ConfigProperty(self.model)
prop.name = "ssl_enabled"
prop.value = True
+ prop.server_value = True
obj.add_config_property(prop)
def load_vhost(self, vhost):
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2007-10-16 16:03:14 UTC (rev 1087)
+++ mgmt/cumin/python/cumin/model.py 2007-10-16 16:11:12 UTC (rev 1088)
@@ -185,6 +185,7 @@
self.name = None
self.value = None
+ self.server_value = None
class ServerGroup(ModelObject):
def __init__(self, model):
Modified: mgmt/cumin/python/cumin/server.py
===================================================================
--- mgmt/cumin/python/cumin/server.py 2007-10-16 16:03:14 UTC (rev 1087)
+++ mgmt/cumin/python/cumin/server.py 2007-10-16 16:11:12 UTC (rev 1088)
@@ -165,6 +165,8 @@
self.process_cancel(session, prop)
def process_display(self, session, prop):
+ self.pvalue.set(session, get_profile_value(prop))
+ self.svalue.set(session, prop.server_value)
self.lvalue.set(session, prop.value)
def render_title(self, session, prop):
@@ -225,6 +227,9 @@
def get_items(self, session, server):
return sorted_by(server.config_property_items())
+ def render_item_server_value(self, session, prop):
+ return prop.server_value
+
def render_item_profile_value(self, session, prop):
return get_profile_value(prop)
Modified: mgmt/cumin/python/cumin/server.strings
===================================================================
--- mgmt/cumin/python/cumin/server.strings 2007-10-16 16:03:14 UTC (rev 1087)
+++ mgmt/cumin/python/cumin/server.strings 2007-10-16 16:11:12 UTC (rev 1088)
@@ -52,7 +52,7 @@
<tr>
<td>{item_name}</td>
<td>{item_value}</td>
- <td></td>
+ <td>{item_server_value}</td>
<td>{item_profile_value}</td>
<td><a class="action"
href="{item_edit_href}">Edit</a></td>
</tr>
Show replies by date