r4656 - in trunk/cumin: bin python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-03-22 19:09:02 +0000 (Tue, 22 Mar 2011)
New Revision: 4656
Modified:
trunk/cumin/bin/cumin
trunk/cumin/python/cumin/config.py
Log:
Add master section for specifying data/web instances
Modified: trunk/cumin/bin/cumin
===================================================================
--- trunk/cumin/bin/cumin 2011-03-22 18:21:20 UTC (rev 4655)
+++ trunk/cumin/bin/cumin 2011-03-22 19:09:02 UTC (rev 4656)
@@ -5,6 +5,7 @@
import os
import sys
import signal
+from cumin.config import *
home = os.environ.get("CUMIN_HOME", os.path.normpath("/usr/share/cumin"))
sys.path.append(os.path.join(home, "python"))
@@ -33,7 +34,7 @@
return True
def get_args(app, section, init_only, console, extra_options=""):
- args = [app, "--section="+section]
+ args = [app, "--section="+section.strip()]
if init_only:
args.append("--init-only")
if not console:
@@ -50,16 +51,19 @@
ARGS = 1
PROG_STRING = 2
+ config = CuminMasterConfig()
+ values = config.parse().master
+
parser = OptionParser()
parser.add_option("--init-only", dest="init_only", action="store_true", default=False,
help="Check options and initialization, then return.")
- parser.add_option("--webs", dest="webs", default="web",
+ parser.add_option("--webs", dest="webs", default=values.webs,
help="Configuration section names for cumin-web instances."\
"\nEach value implies a separate cumin-web instance.")
- parser.add_option("--datas", dest="datas", default="data",
+ parser.add_option("--datas", dest="datas", default=values.datas,
help="Configuration section names for cumin-data instances."\
"\nEach value implies a separate cumin-data instance.")
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2011-03-22 18:21:20 UTC (rev 4655)
+++ trunk/cumin/python/cumin/config.py 2011-03-22 19:09:02 UTC (rev 4656)
@@ -20,39 +20,7 @@
test = CuminConfigSection(self, "test")
test.log_file.default = os.path.join(self.home, "log", "test.log")
- def get_home(self):
- return self.home
-
- def parse(self):
- paths = list()
-
- paths.append(os.path.join(os.sep, "etc", "cumin", "cumin.conf"))
- paths.append(os.path.join(self.home, "etc", "cumin.conf"))
- paths.append(os.path.join(os.path.expanduser("~"), ".cumin.conf"))
-
- return self.parse_files(paths)
-
-class CuminCommonConfig(CuminConfig):
- '''
- Provide a simple class which just gives access
- to the values in the common section of the config
- file for apps which do not need any more
- '''
- def __init__(self):
- super(CuminCommonConfig, self).__init__()
-
- self.section = CuminConfigSection(self, "common")
-
- def set_log(self, log):
- self.section.log_file.default = log
-
-class CuminWebConfig(CuminConfig):
- def __init__(self, section_name="web", strict_section="False"):
- super(CuminWebConfig, self).__init__()
-
- self.create_section(section_name, strict_section)
-
- def create_section(self, name, strict_section):
+ def create_web_section(self, name, strict_section):
web = CuminConfigSection(self, name, strict_section)
web.log_file.default = os.path.join(self.home, "log", name + ".log")
@@ -84,13 +52,7 @@
param = ConfigParameter(web, "persona", str)
param.default = "default"
-class CuminDataConfig(CuminConfig):
- def __init__(self, section_name="data", strict_section=False):
- super(CuminDataConfig, self).__init__()
-
- self.create_section(section_name, strict_section)
-
- def create_section(self, name, strict_section):
+ def create_data_section(self, name, strict_section):
data = CuminConfigSection(self, name, strict_section)
data.log_file.default = os.path.join(self.home, "log", name + ".log")
@@ -106,6 +68,63 @@
param = ConfigParameter(data, "vacuum-interval", int)
param.default = 60 * 60 # 1 hour
+ def create_master_section(self, name, strict_section):
+ '''
+ Creates a blank master section.
+ CuminConfigSection values are not interesting to the master
+ '''
+
+ master = ConfigSection(self, name, strict_section)
+ param = ConfigParameter(master, "datas", str)
+ param.default = "data"
+
+ param = ConfigParameter(master, "webs", str)
+ param.default = "web"
+
+ def get_home(self):
+ return self.home
+
+ def parse(self):
+ paths = list()
+
+ paths.append(os.path.join(os.sep, "etc", "cumin", "cumin.conf"))
+ paths.append(os.path.join(self.home, "etc", "cumin.conf"))
+ paths.append(os.path.join(os.path.expanduser("~"), ".cumin.conf"))
+
+ return self.parse_files(paths)
+
+class CuminCommonConfig(CuminConfig):
+ '''
+ Provide a simple class which just gives access
+ to the values in the common section of the config
+ file for apps which do not need any more
+ '''
+ def __init__(self):
+ super(CuminCommonConfig, self).__init__()
+
+ self.section = CuminConfigSection(self, "common")
+
+ def set_log(self, log):
+ self.section.log_file.default = log
+
+class CuminWebConfig(CuminConfig):
+ def __init__(self, section_name="web", strict_section="False"):
+ super(CuminWebConfig, self).__init__()
+
+ self.create_web_section(section_name, strict_section)
+
+class CuminDataConfig(CuminConfig):
+ def __init__(self, section_name="data", strict_section=False):
+ super(CuminDataConfig, self).__init__()
+
+ self.create_data_section(section_name, strict_section)
+
+class CuminMasterConfig(CuminConfig):
+ def __init__(self, section_name="master", strict_section=False):
+ super(CuminMasterConfig, self).__init__()
+
+ self.create_master_section(section_name, strict_section)
+
class CuminConfigSection(ConfigSection):
def __init__(self, config, name, strict_section=False):
super(CuminConfigSection, self).__init__(config, name, strict_section)
13 years, 1 month
r4655 - in trunk/cumin: bin python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-03-22 18:21:20 +0000 (Tue, 22 Mar 2011)
New Revision: 4655
Modified:
trunk/cumin/bin/cumin-admin
trunk/cumin/bin/cumin-bench
trunk/cumin/bin/cumin-data
trunk/cumin/bin/cumin-smoke-test
trunk/cumin/bin/cumin-web
trunk/cumin/python/cumin/config.py
Log:
Better solution for chicken and egg problem with --section.
Prep for addition of [master] section.
Modified: trunk/cumin/bin/cumin-admin
===================================================================
--- trunk/cumin/bin/cumin-admin 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/bin/cumin-admin 2011-03-22 18:21:20 UTC (rev 4655)
@@ -27,14 +27,23 @@
setup_initial_logging()
- parser = CuminDataOptionParser()
+ # Read config file, just the common section
+ config = CuminCommonConfig()
+ # Set a log file default...
+ home = os.environ.get("CUMIN_HOME", os.path.normpath("/usr/share/cumin"))
+ config.set_log(os.path.join(home, "log", "admin.log"))
+
+ values = config.parse()
+
+ # Get options
+ parser = CuminOptionParser()
parser.set_usage(generate_usage())
- config, values, opts, args = get_configuration(parser, CuminDataConfig)
+ opts, args = parser.parse_args()
- # Override the log_file value so that cumin-admin does not log
- # to the same place as cumin-data
- opts.log_file = os.path.join(config.get_home(), "log", "admin.log")
+ # Use config values as defaults for unspecified options
+ apply_defaults(values.common, opts)
+
setup_operational_logging(opts)
try:
Modified: trunk/cumin/bin/cumin-bench
===================================================================
--- trunk/cumin/bin/cumin-bench 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/bin/cumin-bench 2011-03-22 18:21:20 UTC (rev 4655)
@@ -10,13 +10,38 @@
def do_main():
setup_initial_logging()
- config, values, opts, args = get_configuration(CuminWebOptionParser(), CuminWebConfig)
+ parser = CuminOptionParser()
- setup_operational_logging(opts)
+ # Add additional parameters
+ # We need --profile here to keep optparse from crashing in
+ # a profile case
+ parser.add_option("--profile", action="store_true")
+ parser.add_option("--host", type=str)
+ parser.add_option("--port", type=int)
+ parser.add_option("--section", default="web")
+ # Get options
+ opts, args = parser.parse_args()
+
+ # --section controls which section is read from the config file
+ # If a section other than "web" is specified, require it to exist
+ config = CuminWebConfig(opts.section, strict_section = opts.section != "web")
+
+ # There might be other sections returned from config.parse() but
+ # currently we don't care about them...
+ values = getattr(config.parse(), opts.section)
+
+ # Use the config values as defaults for unspecified options
+ apply_defaults(values, opts)
+
+ setup_operational_logging(opts,
+ values.log_max_mb,
+ values.log_max_archives)
+
broker_uris = [x.strip() for x in opts.brokers.split(",")]
- cumin = Cumin(config.get_home(), broker_uris, opts.database)
+ cumin = Cumin(config.get_home(), broker_uris,
+ opts.database, opts.host, opts.port)
cumin.debug = True
cumin.user = values.user
Modified: trunk/cumin/bin/cumin-data
===================================================================
--- trunk/cumin/bin/cumin-data 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/bin/cumin-data 2011-03-22 18:21:20 UTC (rev 4655)
@@ -89,10 +89,32 @@
return_code = 0
setup_initial_logging()
- config, values, opts, args = get_configuration(CuminDataOptionParser(), CuminDataConfig)
+ parser = CuminOptionParser()
- setup_operational_logging(opts)
+ # Add additional parameters for data
+ parser.add_option("--print-stats", action="store_true", default=False)
+ parser.add_option("--print-events", type="int", default=0, metavar="LEVEL")
+ parser.add_option("--section", default="data")
+ parser.add_option("--daemon", action="store_true", default=False)
+ # Get options
+ opts, args = parser.parse_args()
+
+ # --section controls which section is read from the config file
+ # If a section other than "data" is specified, require it to exist
+ config = CuminDataConfig(opts.section, strict_section = opts.section != "data")
+
+ # There might be other sections returned from config.parse() but
+ # currently we don't care about them...
+ values = getattr(config.parse(), opts.section)
+
+ # Use the config values as defaults for unspecified options
+ apply_defaults(values, opts)
+
+ setup_operational_logging(opts,
+ values.log_max_mb,
+ values.log_max_archives)
+
model_dir = os.path.join(config.home, "model")
broker_uris = [x.strip() for x in opts.brokers.split(",")]
Modified: trunk/cumin/bin/cumin-smoke-test
===================================================================
--- trunk/cumin/bin/cumin-smoke-test 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/bin/cumin-smoke-test 2011-03-22 18:21:20 UTC (rev 4655)
@@ -15,10 +15,31 @@
def main():
setup_initial_logging()
- config, values, opts, args = get_configuration(CuminWebOptionParser(), CuminWebConfig)
+ parser = CuminOptionParser()
- setup_operational_logging(opts)
+ # Add additional parameters for web
+ parser.add_option("--host")
+ parser.add_option("--port", type=int)
+ parser.add_option("--section", default="web")
+ # Get options
+ opts, args = parser.parse_args()
+
+ # --section controls which section is read from the config file
+ # If a section other than "web" is specified, require it to exist
+ config = CuminWebConfig(opts.section, strict_section = opts.section != "web")
+
+ # There might be other sections returned from config.parse() but
+ # currently we don't care about them...
+ values = getattr(config.parse(), opts.section)
+
+ # Use the config values as defaults for unspecified options
+ apply_defaults(values, opts)
+
+ setup_operational_logging(opts,
+ values.log_max_mb,
+ values.log_max_archives)
+
broker_uris = [x.strip() for x in opts.brokers.split(",")]
cumin = Cumin(config.get_home(), broker_uris, opts.database,
Modified: trunk/cumin/bin/cumin-web
===================================================================
--- trunk/cumin/bin/cumin-web 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/bin/cumin-web 2011-03-22 18:21:20 UTC (rev 4655)
@@ -54,10 +54,32 @@
setup_initial_logging()
- config, values, opts, args = get_configuration(CuminWebOptionParser(), CuminWebConfig)
+ parser = CuminOptionParser()
- setup_operational_logging(opts)
+ # Add additional parameters for web
+ parser.add_option("--host")
+ parser.add_option("--port", type=int)
+ parser.add_option("--section", default="web")
+ parser.add_option("--daemon", action="store_true", default=False)
+ # Get options
+ opts, args = parser.parse_args()
+
+ # --section controls which section is read from the config file
+ # If a section other than "web" is specified, require it to exist
+ config = CuminWebConfig(opts.section, strict_section = opts.section != "web")
+
+ # There might be other sections returned from config.parse() but
+ # currently we don't care about them...
+ values = getattr(config.parse(), opts.section)
+
+ # Use the config values as defaults for unspecified options
+ apply_defaults(values, opts)
+
+ setup_operational_logging(opts,
+ values.log_max_mb,
+ values.log_max_archives)
+
broker_uris = [x.strip() for x in opts.brokers.split(",")]
cumin = Cumin(config.get_home(), broker_uris, opts.database,
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2011-03-22 01:25:44 UTC (rev 4654)
+++ trunk/cumin/python/cumin/config.py 2011-03-22 18:21:20 UTC (rev 4655)
@@ -32,8 +32,22 @@
return self.parse_files(paths)
+class CuminCommonConfig(CuminConfig):
+ '''
+ Provide a simple class which just gives access
+ to the values in the common section of the config
+ file for apps which do not need any more
+ '''
+ def __init__(self):
+ super(CuminCommonConfig, self).__init__()
+
+ self.section = CuminConfigSection(self, "common")
+
+ def set_log(self, log):
+ self.section.log_file.default = log
+
class CuminWebConfig(CuminConfig):
- def __init__(self, section_name, strict_section):
+ def __init__(self, section_name="web", strict_section="False"):
super(CuminWebConfig, self).__init__()
self.create_section(section_name, strict_section)
@@ -71,7 +85,7 @@
param.default = "default"
class CuminDataConfig(CuminConfig):
- def __init__(self, section_name, strict_section):
+ def __init__(self, section_name="data", strict_section=False):
super(CuminDataConfig, self).__init__()
self.create_section(section_name, strict_section)
@@ -116,82 +130,25 @@
param = ConfigParameter(self, "debug", bool)
param.default = False
-class CuminMultiOptionParser(OptionParser,object):
- def __init__(self, default_section):
+class CuminOptionParser(OptionParser,object):
+ def __init__(self):
OptionParser.__init__(self)
- self.add_option("--section", default=default_section)
- self.add_option("--daemon", action="store_true", default=False)
+ self.add_option("--debug", action="store_true", default=False)
+ self.add_option("--init-only", action="store_true", default=False)
- # We don't know defaults yet...
+ # Defaults for these come later from the config
+ # section named in --section, via apply_defaults()
self.add_option("--database")
self.add_option("--brokers")
self.add_option("--log-file")
self.add_option("--log-level")
- self.add_option("--debug", action="store_true")
- self.add_option("--init-only", action="store_true")
- def _apply_default(self, section, name):
- try:
- val = getattr(section, name)
- self.set_default(name, val)
- except:
- pass
+def apply_defaults(values, opts):
+ for k, v in opts.__dict__.iteritems():
+ if v == None and k in values:
+ opts.__dict__[k] = values[k]
- def set_defaults_from_section(self, section):
- # It is possible that a section does not contain an updated
- # default value for a particular option. Skip exception.
- self._apply_default(section, "database")
- self._apply_default(section, "brokers")
- self._apply_default(section, "log_file")
- self._apply_default(section, "log_level")
- self._apply_default(section, "log_max_mb")
- self._apply_default(section, "log_max_archives")
- self._apply_default(section, "debug")
-
-class CuminWebOptionParser(CuminMultiOptionParser):
- def __init__(self, default_section="web"):
- super(CuminWebOptionParser, self).__init__(default_section)
-
- # Add additional parameters for web
- self.add_option("--host")
- self.add_option("--port", type=int)
-
- def set_defaults_from_section(self, section):
- super(CuminWebOptionParser, self).set_defaults_from_section(section)
-
- # For web, these options also have defaults in config files
- self._apply_default(section, "host")
- self._apply_default(section, "port")
-
-class CuminDataOptionParser(CuminMultiOptionParser):
- def __init__(self, default_section="data"):
- super(CuminDataOptionParser, self).__init__(default_section)
-
- # Add additional parameters for data
- self.add_option("--print-stats", action="store_true")
- self.add_option("--print-events", type="int", default=0, metavar="LEVEL")
-
-def get_configuration(parser, ConfigType):
- # First parse should return a "section" value
- opts, args = parser.parse_args()
- if hasattr(opts, "section"):
- # Create config object with the given section and parse config files
- # Allow the section named in the default value of "--section" to be missing
- # from the configuration file; specifically named sections are required.
- config = ConfigType(opts.section, strict_section = opts.section != parser.defaults["section"])
- values = config.parse()
- if hasattr(values, opts.section):
- # Reset defaults and parse again
- values = getattr(values, opts.section)
- parser.set_defaults_from_section(values)
- opts, args = parser.parse_args()
- else:
- raise Exception("Section ["+opts.section+"] not present in configuration files.")
- else:
- raise Exception("No '--section' value available as option or default")
- return config, values, opts, args
-
# These logging functions address a logging bootstrap problem. Before
# configuration is read, we can't configure logging. Nonetheless,
# we'd like to log errors or warnings encountered before that point.
@@ -215,11 +172,11 @@
for name in _logging_modules:
enable_logging(name, "warn", sys.stderr)
-def setup_operational_logging(values):
+def setup_operational_logging(values, log_max_mb=10, log_max_archives=1):
for name in _logging_modules:
disable_logging(name)
enable_logging(name, values.log_level, values.log_file,
- values.log_max_mb, values.log_max_archives)
+ log_max_mb, log_max_archives)
if values.debug:
for name in _logging_modules:
13 years, 1 month
r4654 - in trunk/cumin/python/cumin: . inventory
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-03-22 01:25:44 +0000 (Tue, 22 Mar 2011)
New Revision: 4654
Modified:
trunk/cumin/python/cumin/inventory/main.py
trunk/cumin/python/cumin/main.py
Log:
Hide grid overview tab, swap order of grid and inventory tabs
under the grid persona.
Modified: trunk/cumin/python/cumin/inventory/main.py
===================================================================
--- trunk/cumin/python/cumin/inventory/main.py 2011-03-21 17:48:48 UTC (rev 4653)
+++ trunk/cumin/python/cumin/inventory/main.py 2011-03-22 01:25:44 UTC (rev 4654)
@@ -15,10 +15,13 @@
super(Module, self).__init__(app, name)
self.frame = InventoryFrame(app, "inventory")
- app.main_page.main.inventory = self.frame
- app.main_page.main.add_tab(self.frame)
+ self.app = app
- self.app.system_slots_page = SystemSlotMapPage(app, "systemslots.png")
+ def init(self):
+ self.app.main_page.main.inventory = self.frame
+ self.app.main_page.main.add_tab(self.frame)
+
+ self.app.system_slots_page = SystemSlotMapPage(self.app, "systemslots.png")
self.app.add_page(self.app.system_slots_page)
class InventoryFrame(CuminFrame):
Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py 2011-03-21 17:48:48 UTC (rev 4653)
+++ trunk/cumin/python/cumin/main.py 2011-03-22 01:25:44 UTC (rev 4654)
@@ -239,8 +239,8 @@
def __init__(self, app, name):
super(GridMainView, self).__init__(app, name)
- self.overview = GridOverviewFrame(app, "overview")
- self.add_tab(self.overview)
+ #self.overview = GridOverviewFrame(app, "overview")
+ #self.add_tab(self.overview)
class MessagingMainPage(CuminPage, ModeSet):
def __init__(self, app, name):
13 years, 1 month
r4653 - trunk/cumin/python/cumin
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:48:48 +0000 (Mon, 21 Mar 2011)
New Revision: 4653
Modified:
trunk/cumin/python/cumin/stat.py
Log:
Change pie chart color scheme to not have red and green as the 1st 2 colors
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2011-03-21 17:42:45 UTC (rev 4652)
+++ trunk/cumin/python/cumin/stat.py 2011-03-21 17:48:48 UTC (rev 4653)
@@ -266,15 +266,15 @@
BLUES = "blues"
GROUP2 = "group2"
BLANK = "blank"
- color_schemes = {"rainbow": [(1,0,0), (0,1,0), (0,0,1), (1,1,0), (1,0,1), (0,1,1)],
+ color_schemes = {"rainbow": [(0,0,1), (1,1,0), (1,0,1), (0,1,1), (1,0,0), (0,1,0)],
"greens": [(0,1,0), (.9,1,.9), (.6,1,.6), (.3,.6,.3), (0,.5,0)],
"blues": [(0,0,1), (.9,.9,1), (.6,.6,1), (.3,.3,.6), (0,0,.5)],
- "group2": [(1,0,0), (1,.6,.6),
- (0,1,0), (.6,1,.6),
- (0,0,1), (.6,.6,1),
+ "group2": [(0,0,1), (.6,.6,1),
(1,1,0), (1,1,.6),
(1,0,1), (1,.6,1),
- (0,1,1), (.6,1,1)],
+ (0,1,1), (.6,1,1),
+ (1,0,0), (1,.6,.6),
+ (0,1,0), (.6,1,.6)],
"blank": [(1,1,1), (1,1,1), (1,1,1), (1,1,1)]}
def __init__(self, app, name):
13 years, 1 month
r4652 - trunk/cumin/python/cumin
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:42:45 +0000 (Mon, 21 Mar 2011)
New Revision: 4652
Modified:
trunk/cumin/python/cumin/objectselector.strings
Log:
Add 0.5em space under search/clear inputs
Modified: trunk/cumin/python/cumin/objectselector.strings
===================================================================
--- trunk/cumin/python/cumin/objectselector.strings 2011-03-21 17:40:07 UTC (rev 4651)
+++ trunk/cumin/python/cumin/objectselector.strings 2011-03-21 17:42:45 UTC (rev 4652)
@@ -105,7 +105,7 @@
<div id="{id}" class="{class}">
<ul>{widgets}</ul>
<input type="submit" value="Search" tabindex="100"/><input type="submit" value="Clear" onclick="return clearSearchInput('{id}')" tabindex="100"/>
-</div><div style="clear:both;"></div>
+</div><div style="margin-bottom: 0.5em; clear:both;"></div>
[ExportButton.css]
div.ExportButton {
13 years, 1 month
r4651 - trunk/wooly/python/wooly
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:40:07 +0000 (Mon, 21 Mar 2011)
New Revision: 4651
Modified:
trunk/wooly/python/wooly/datatable.py
Log:
Put initial caps on First, Next, Prev, Last for page navigation
Modified: trunk/wooly/python/wooly/datatable.py
===================================================================
--- trunk/wooly/python/wooly/datatable.py 2011-03-21 17:38:28 UTC (rev 4650)
+++ trunk/wooly/python/wooly/datatable.py 2011-03-21 17:40:07 UTC (rev 4651)
@@ -296,18 +296,18 @@
first_page = max(last_page - self.max_page_links, 0)
if first_page:
- pages.append((0, "first", "First page"))
+ pages.append((0, "First", "First page"))
prev = max(selection - limit, 0)
- pages.append((prev, "prev", "Previous page"))
+ pages.append((prev, "Prev", "Previous page"))
pages.extend(options[first_page : last_page])
if last_page < len(options):
next = options[cur_page + 1][0]
- pages.append((next, "next", "Next page"))
+ pages.append((next, "Next", "Next page"))
last = options[len(options) - 1][0]
- pages.append((last, "last", "Last page"))
+ pages.append((last, "Last", "Last page"))
return pages
13 years, 1 month
r4650 - trunk/cumin/python/cumin
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:38:28 +0000 (Mon, 21 Mar 2011)
New Revision: 4650
Modified:
trunk/cumin/python/cumin/objectselector.strings
Log:
Remove mouseover highlight effect from column headers. This avoids the need to pad the header text, thereby making it better align with the data for that column.
Modified: trunk/cumin/python/cumin/objectselector.strings
===================================================================
--- trunk/cumin/python/cumin/objectselector.strings 2011-03-21 17:36:32 UTC (rev 4649)
+++ trunk/cumin/python/cumin/objectselector.strings 2011-03-21 17:38:28 UTC (rev 4650)
@@ -209,19 +209,8 @@
</script>
[ObjectTableColumn.css]
-a.TableColumnHeader > span {
- border:1px solid transparent;
- padding: 2px 4px;
- position: relative;
- left: 5px;
-}
-a.TableColumnHeader > span:hover {
- border:1px solid #EAEAEA;
- background-color: #FFFFFF;
-}
-
/* allow room for arrow on selected column */
-th.selected a.TableColumnHeader > span > span {
+th.selected a.TableColumnHeader > span {
padding-right: 14px;
}
13 years, 1 month
r4649 - trunk/wooly/python/wooly
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:36:32 +0000 (Mon, 21 Mar 2011)
New Revision: 4649
Modified:
trunk/wooly/python/wooly/table.strings
Log:
Remove extraneous span from column headers
Modified: trunk/wooly/python/wooly/table.strings
===================================================================
--- trunk/wooly/python/wooly/table.strings 2011-03-21 17:23:35 UTC (rev 4648)
+++ trunk/wooly/python/wooly/table.strings 2011-03-21 17:36:32 UTC (rev 4649)
@@ -53,7 +53,7 @@
}
[TableColumnHeader.html]
-<th class="{class}"><a class="{link_class}" title="{title}" href="{href}"><span><span class="{sorted_dir}">{content}</span></span></a></th>
+<th class="{class}"><a class="{link_class}" title="{title}" href="{href}"><span class="{sorted_dir}">{content}</span></a></th>
[TableColumnHeader.static_html]
<th class="{class}">{content}</th>
13 years, 1 month
r4648 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:23:35 +0000 (Mon, 21 Mar 2011)
New Revision: 4648
Modified:
trunk/cumin/python/cumin/grid/slot.py
Log:
Sort SlotSelector table by Load average descending as the default
Modified: trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- trunk/cumin/python/cumin/grid/slot.py 2011-03-21 17:07:05 UTC (rev 4647)
+++ trunk/cumin/python/cumin/grid/slot.py 2011-03-21 17:23:35 UTC (rev 4648)
@@ -31,8 +31,13 @@
self.add_attribute_column(cls.Activity)
self.add_attribute_column(cls.State)
- self.add_attribute_column(cls.LoadAvg)
+ col = ObjectTableColumn(app, cls.LoadAvg.name, cls.LoadAvg)
+ self.add_column(col)
+ # sort by load average descending
+ self.table.sort.default = col.name
+ self.table.ascending.default = False
+
self.enable_csv_export(pool)
def create_table(self, app, name, cls):
13 years, 1 month
r4647 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-21 17:07:05 +0000 (Mon, 21 Mar 2011)
New Revision: 4647
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/dashboard.strings
Log:
Rename Dashboard to Summary
Rename timeseries to time-series
Add some padding between performance tables and charts
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-03-21 13:33:14 UTC (rev 4646)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-03-21 17:07:05 UTC (rev 4647)
@@ -73,7 +73,7 @@
self.add_child(os_data)
def render_title(self, session):
- return "Dashboard"
+ return "Summary"
class DashboardPerformance(Widget):
def __init__(self, app, name, collector):
Modified: trunk/cumin/python/cumin/grid/dashboard.strings
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.strings 2011-03-21 13:33:14 UTC (rev 4646)
+++ trunk/cumin/python/cumin/grid/dashboard.strings 2011-03-21 17:07:05 UTC (rev 4647)
@@ -175,10 +175,10 @@
[DefinitionSetPopup.html]
<div class="{class}">
- <span>Show a timeseries chart</span>
+ <span>Show a time-series chart</span>
<img src="resource?name=chart-20.png"
onclick="return showHistoryChart('{title}', '{chart_href}')"
- title="Click to show a timeseries chart" alt="" border="0"/>
+ title="Click to show a time-series chart" alt="" border="0"/>
</div>
[DefinitionSet.pie_html]
@@ -218,6 +218,10 @@
</thead>
[MonitorSelfCharts.css]
+div.MonitorSelfCharts {
+ margin-top: 1em;
+}
+
div.MonitorSelfCharts div.chart {
float: left;
}
13 years, 1 month