r4666 - trunk/cumin/model
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-25 13:53:15 +0000 (Fri, 25 Mar 2011)
New Revision: 4666
Modified:
trunk/cumin/model/condor.xml
Log:
Making Negotiator MatchRate optional to avoid database integrity errors on update
Modified: trunk/cumin/model/condor.xml
===================================================================
--- trunk/cumin/model/condor.xml 2011-03-25 13:51:14 UTC (rev 4665)
+++ trunk/cumin/model/condor.xml 2011-03-25 13:53:15 UTC (rev 4666)
@@ -608,7 +608,7 @@
<method name="Reconfig"/>
- <statistic name="MatchRate" type="double" desc="Matches per second over current cycle"/>
+ <statistic name="MatchRate" type="double" optional="y" desc="Matches per second over current cycle"/>
<statistic name="MatchRateSustained" type="double" desc="Matcher per second, since end of previous cycle"/>
<statistic name="Matches" type="uint32" desc="Number of matches generated"/>
<statistic name="Duration" type="uint32" unit="second" desc="Negotiation cycle duration"/>
13 years, 1 month
r4665 - trunk/cumin/python/cumin/messaging
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-25 13:51:14 +0000 (Fri, 25 Mar 2011)
New Revision: 4665
Modified:
trunk/cumin/python/cumin/messaging/connection.py
Log:
Search on process name for the Connections page instead of ip address
Modified: trunk/cumin/python/cumin/messaging/connection.py
===================================================================
--- trunk/cumin/python/cumin/messaging/connection.py 2011-03-24 16:03:13 UTC (rev 4664)
+++ trunk/cumin/python/cumin/messaging/connection.py 2011-03-25 13:51:14 UTC (rev 4665)
@@ -63,11 +63,11 @@
frame = "main.messaging.broker.connection"
col = ObjectLinkColumn(app, "address", cls.address, cls._id, frame)
self.add_column(col)
- self.add_search_filter(col)
col = ConnectionProcessColumn \
(app, "process", cls.remoteProcessName, cls.remotePid)
self.add_column(col)
+ self.add_search_filter(col)
self.add_attribute_column(cls.authIdentity)
self.add_attribute_column(cls.SystemConnection)
13 years, 1 month
r4664 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-24 16:03:13 +0000 (Thu, 24 Mar 2011)
New Revision: 4664
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
Log:
Sort the OS names in the breakdown
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-03-24 15:56:29 UTC (rev 4663)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-03-24 16:03:13 UTC (rev 4664)
@@ -576,7 +576,7 @@
recs_by_os[os]["used"] += count
records = list()
- for os in recs_by_os:
+ for os in sorted(recs_by_os.keys()):
records.append(("%s used" % os, recs_by_os[os]["used"]))
records.append(("%s unused" % os, recs_by_os[os]["unused"]))
records.append(("%s total" % os, recs_by_os[os]["total"]))
13 years, 1 month
r4663 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-24 15:56:29 +0000 (Thu, 24 Mar 2011)
New Revision: 4663
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/dashboard.strings
Log:
Move the slot breakdown by OS to the Slot capacity page
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-03-23 20:47:35 UTC (rev 4662)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-03-24 15:56:29 UTC (rev 4663)
@@ -49,9 +49,6 @@
neg_through = NegotiatorJobThroughput(app, "negotiator_throughput", collector)
self.add_child(neg_through)
- os_data = GridOSBreakdown(app, "os_breakdown", collector)
- self.add_child(os_data)
-
def render_title(self, session):
return "Summary"
@@ -81,6 +78,9 @@
capacity = DashboardCapacitySlotSummary(app, "slot_capacity", collector)
self.add_child(capacity)
+ os_data = GridOSBreakdown(app, "os_breakdown", collector)
+ self.add_child(os_data)
+
def render_title(self, session):
return "Slot capacity"
Modified: trunk/cumin/python/cumin/grid/dashboard.strings
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.strings 2011-03-23 20:47:35 UTC (rev 4662)
+++ trunk/cumin/python/cumin/grid/dashboard.strings 2011-03-24 15:56:29 UTC (rev 4663)
@@ -56,6 +56,7 @@
[DashboardCapacity.html]
<div id="{id}" class="{class}">
{slot_capacity}
+ {os_breakdown}
</div>
[DefinitionSet.css]
13 years, 1 month
r4662 - in trunk: cumin/bin mint/python/mint
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-03-23 20:47:35 +0000 (Wed, 23 Mar 2011)
New Revision: 4662
Modified:
trunk/cumin/bin/cumin-data
trunk/mint/python/mint/session.py
Log:
Add internal package filter for things that should not be bound
Fix, include-classes should be all classes when unspecified
Modified: trunk/cumin/bin/cumin-data
===================================================================
--- trunk/cumin/bin/cumin-data 2011-03-23 19:40:57 UTC (rev 4661)
+++ trunk/cumin/bin/cumin-data 2011-03-23 20:47:35 UTC (rev 4662)
@@ -15,7 +15,7 @@
sys.stderr = sys.__stderr__
sys.stdout = sys.__stdout__
-def process_classes(mint, values, section_name):
+def process_classes(mint, values, section_name, on_empty=None):
return_code = 0
pkgs = set()
@@ -48,7 +48,10 @@
except KeyError:
log.warning("Configuration section '%s',"\
" package '%s' not found" % (section_name, pname))
-
+ elif on_empty == "all":
+ for pkg in mint.model._packages:
+ pkgs = pkgs.union(set(pkg._classes))
+
return return_code, pkgs
def main():
@@ -134,13 +137,14 @@
return_code, includes = process_classes(mint,
values.include_classes,
- opts.section)
+ opts.section, on_empty="all")
return_code, excludes = process_classes(mint,
values.exclude_classes,
opts.section)
- mint.session.qmf_classes = includes.difference(excludes)
+ if values.include_classes or values.exclude_classes:
+ mint.session.qmf_classes = includes.difference(excludes)
if opts.init_only or return_code:
return
Modified: trunk/mint/python/mint/session.py
===================================================================
--- trunk/mint/python/mint/session.py 2011-03-23 19:40:57 UTC (rev 4661)
+++ trunk/mint/python/mint/session.py 2011-03-23 20:47:35 UTC (rev 4662)
@@ -45,18 +45,24 @@
self.qmf_session.bindAgent("*")
+ # Filter out classes we know should not be bound at this point in time
+ # This is to prevent confusion in log files.
+ package_filter = ["com.redhat.cumin", "com.redhat.cumin.grid"]
+
# Handle bind by class
if self.qmf_classes:
for cls in self.qmf_classes:
pname = cls._package._name
cname = cls._name
- self.qmf_session.bindClass(pname.lower(), cname.lower())
- log.info("Binding QMF class %s.%s" % (pname, cname))
+ if pname not in package_filter:
+ self.qmf_session.bindClass(pname.lower(), cname.lower())
+ log.info("Binding QMF class %s.%s" % (pname, cname))
else:
# Handle bind by package
for pkg in self.app.model._packages:
- self.qmf_session.bindPackage(pkg._name.lower())
- log.info("Binding QMF package %s" % pkg._name)
+ if pkg._name not in package_filter:
+ self.qmf_session.bindPackage(pkg._name.lower())
+ log.info("Binding QMF package %s" % pkg._name)
for uri in self.broker_uris:
self.add_broker(uri)
13 years, 1 month
r4661 - in trunk: cumin/bin cumin/etc cumin/python/cumin mint/python/mint
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-03-23 19:40:57 +0000 (Wed, 23 Mar 2011)
New Revision: 4661
Modified:
trunk/cumin/bin/cumin-data
trunk/cumin/etc/cumin.conf
trunk/cumin/python/cumin/config.py
trunk/mint/python/mint/session.py
Log:
Change mechanism for specifying QMF binding by class.
Change mechanism for specifying multiple cumin-* instances.
Add [master] config section, remove 'packages' config parameter,
add 'include-classes' and 'exclude-classes' config parameters.
Add extensive comments and examples in cumin.conf for alternative
configurations.
BZ690283
Modified: trunk/cumin/bin/cumin-data
===================================================================
--- trunk/cumin/bin/cumin-data 2011-03-23 19:26:32 UTC (rev 4660)
+++ trunk/cumin/bin/cumin-data 2011-03-23 19:40:57 UTC (rev 4661)
@@ -15,41 +15,42 @@
sys.stderr = sys.__stderr__
sys.stdout = sys.__stdout__
+def process_classes(mint, values, section_name):
-def process_packages(mint, values, allow_classes=False):
+ return_code = 0
+ pkgs = set()
+ if values and len(values) > 0:
- packages = list()
+ for cls_str in values.split(","):
+ pair = cls_str.strip().split(":")
+ if len(pair) == 2:
+ pname = pair[0]
+ cname = pair[1]
+ else:
+ log.error("Configuration section '%s',"\
+ " class name '%s' is badly formed"\
+ % (section_name, cls_str.strip()))
+ return_code = 1
+ break
- for name in values.split(","):
- name = name.strip()
- if allow_classes and ":" in name:
- pair = name.split(":")
- name = pair[0]
- className = pair[1]
- else:
- className = None
-
- try:
- cls = None
- pkg = mint.model._packages_by_name[name]
- if className != None:
- try:
- cls = pkg._classes_by_name[className]
- except KeyError:
- print "No class found for '%s'" % className
-
- except KeyError:
- print "No package found for '%s'" % name
- continue
+ try:
+ pkg = mint.model._packages_by_name[pname]
+ if cname == "*":
+ pkgs = pkgs.union(set(pkg._classes))
+ else:
+ try:
+ cls = pkg._classes_by_name[cname]
+ pkgs.add(cls)
+ except KeyError:
+ log.warning("Configuration section '%s',"\
+ " class '%s' is not contained in package"\
+ " '%s'" % (section_name, cname, pname))
+ except KeyError:
+ log.warning("Configuration section '%s',"\
+ " package '%s' not found" % (section_name, pname))
- if cls != None:
- pkg = ((pkg,cls))
+ return return_code, pkgs
- packages.append(pkg)
-
- return packages
-
-
def main():
# Do our own simple option check so we can redirect IO early
@@ -130,15 +131,18 @@
mint.check()
mint.init()
+
+ return_code, includes = process_classes(mint,
+ values.include_classes,
+ opts.section)
- if values.packages:
- mint.session.qmf_packages = process_packages(mint, values.packages)
+ return_code, excludes = process_classes(mint,
+ values.exclude_classes,
+ opts.section)
- if values.classes:
- mint.session.qmf_classes = process_packages(mint, values.classes,
- allow_classes=True)
+ mint.session.qmf_classes = includes.difference(excludes)
- if opts.init_only:
+ if opts.init_only or return_code:
return
mint.start()
Modified: trunk/cumin/etc/cumin.conf
===================================================================
--- trunk/cumin/etc/cumin.conf 2011-03-23 19:26:32 UTC (rev 4660)
+++ trunk/cumin/etc/cumin.conf 2011-03-23 19:40:57 UTC (rev 4661)
@@ -1,6 +1,7 @@
# Fields in comments reflect the default values.
# Explanatory comments for some options are included
# at the end of the file.
+# All sections except master inherit from [common]
[common]
# database: dbname=cumin user=cumin host=localhost
@@ -9,6 +10,33 @@
# log-max-mb: 10
# log-max-archives: 1
+# *************** Master configuration ***************
+
+# Controls the number and type of cumin-web and
+# cumin-data processes started by the cumin service
+
+[master]
+# webs: web
+
+# Default cumin-data configuration at installation.
+# Assumes 'persona' setting in web section is 'default'
+datas: data.grid, data.grid-slots, data.grid-submissions, data.sesame, data.other
+
+# If the 'persona' setting in the web section is set to 'grid' then
+# the 'data.other' section name may be omitted from 'datas' as follows
+#datas: data.grid, data.grid-slots, data.grid-submissions, data.sesame
+
+# If the 'persona' setting in the web section is set to 'messaging' then
+# the 'data.grid*' section names may be omitted from 'datas' as follows
+#datas: data.sesame, data.other
+
+# To run a single cumin-data process in a small deployment set 'datas' as follows
+# and optionally modify 'include-classes' and 'exclude-classes' in the [data]
+# section based on 'persona'. See additional comments in [data] section.
+#datas: data
+
+# ****************************************************
+
[web]
# log-file: $CUMIN_HOME/log/web.log
# host: localhost ('0.0.0.0' binds to all local interfaces)
@@ -23,27 +51,108 @@
# expire-interval: 3600
# expire-threshold: 86400
# vacuum-interval: 3600
-# packages: [all]
+# include-classes: [all]
+# exclude-classes: [none]
-# *************** Parameter Explanations by Section ***************
+# If 'persona' in the web section is set to 'default'
+# then include-classes and exclude-classes should be
+# left unspecified (the default)
+# If 'persona' in the web section is set to 'grid' then
+# set include-classes as follows and leave exclude-classes unspecified
+#include-classes: com.redhat.grid:*, com.redhat.sesame:*
+
+# If 'persona' in the web section is set to 'messaging' then
+# set exclude-classes as follows and leave include-classes unspecified
+#exclude-classes: com.redhat.grid:*
+
+[data.grid]
+# log-file: $CUMIN_HOME/log/data.grid.log
+# expire-interval: 3600
+# expire-threshold: 86400
+# vacuum-interval: 3600
+include-classes: com.redhat.grid:*
+exclude-classes: com.redhat.grid:Slot, com.redhat.grid:Submission
+
+[data.grid-slots]
+# log-file: $CUMIN_HOME/log/data.grid-slots.log
+# expire-interval: 3600
+# expire-threshold: 86400
+# vacuum-interval: 3600
+include-classes: com.redhat.grid:Slot
+# exclude-classes: [none]
+
+[data.grid-submissions]
+# log-file: $CUMIN_HOME/log/data.grid-submissions.log
+# expire-interval: 3600
+# expire-threshold: 86400
+# vacuum-interval: 3600
+include-classes: com.redhat.grid:Submission
+# exclude-classes: [none]
+
+[data.sesame]
+# log-file: $CUMIN_HOME/log/data.sesame.log
+# expire-interval: 3600
+# expire-threshold: 86400
+# vacuum-interval: 3600
+include-classes: com.redhat.sesame:*
+# exclude-classes: [none]
+
+[data.other]
+# log-file: $CUMIN_HOME/log/data.messaging.log
+# expire-interval: 3600
+# expire-threshold: 86400
+# vacuum-interval: 3600
+# include-classes: [all]
+exclude-classes: com.redhat.grid:*, com.redhat.sesame:*
+
+# *************** Some parameter explanations by section ***************
+
# [common]
+# log-max-mb: 10
# Maximum size in MB of *.log files created by cumin.
# A log file reaching maximum size will be rolled over.
# A value of 0 leaves the log file size unlimited.
-# log-max-mb: 10
+# log-max-archives: 1
# Number of rolled over log files to retain. A retained
# log file will have a "." and a number added to its name.
# A value of 0 will cause a log file to be truncated
# rather than renamed if it reaches maximum size.
-# log-max-archives: 1
# [web]
+# persona: default
# Controls content of the top level page.
# Valid values are "default", "grid", and "messaging".
# The default persona contains content for both grid and
# messaging.
-# persona: default
+
+# [data]
+
+# include-classes: [all]
+# A comma separated list of QMF classes. The default value is all
+# classes in all packages. The cumin-data instance will be bound to
+# classes which appear in 'include-classes' but do not appear in
+# 'exclude-classes'. Classes are specified as package:class for a single
+# class or package:* for all classes in a package.
+
+# exclude-classes: [empty list]
+# A comma separated list of QMF classes. The default value is
+# an empty list. The cumin-data instance will be bound to
+# classes which appear in 'include-classes' but do not appear in
+# 'exclude-classes'. Classes are specified as package:class for a single
+# class or package:* for all classes in a package.
+
+# [master]
+
+# webs: web
+# Comma separated list of sections in this file.
+# Each section specifies the configuration for a separate
+# instance of cumin-web.
+
+# datas: data
+# Comma separated list of sections in this file.
+# Each section specifies the configuration for a separate
+# instance of cumin-data.
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2011-03-23 19:26:32 UTC (rev 4660)
+++ trunk/cumin/python/cumin/config.py 2011-03-23 19:40:57 UTC (rev 4661)
@@ -56,8 +56,8 @@
data = CuminConfigSection(self, name, strict_section)
data.log_file.default = os.path.join(self.home, "log", name + ".log")
- param = ConfigParameter(data, "packages", str)
- param = ConfigParameter(data, "classes", str)
+ param = ConfigParameter(data, "include-classes", str)
+ param = ConfigParameter(data, "exclude-classes", str)
param = ConfigParameter(data, "expire-interval", int)
param.default = 60 * 60 # 1 hour
Modified: trunk/mint/python/mint/session.py
===================================================================
--- trunk/mint/python/mint/session.py 2011-03-23 19:26:32 UTC (rev 4660)
+++ trunk/mint/python/mint/session.py 2011-03-23 19:40:57 UTC (rev 4661)
@@ -12,9 +12,11 @@
self.qmf_session = None
self.qmf_brokers = list()
- self.qmf_packages = self.app.model._packages
- self.qmf_classes = list()
+ # This will become a sequence if
+ # class binding is specifed in configuration
+ self.qmf_classes = None
+
def add_broker(self, uri):
log.info("Adding QMF broker at %s", uri)
@@ -44,18 +46,17 @@
self.qmf_session.bindAgent("*")
# Handle bind by class
- already_bound_list = list()
- for pkg in self.qmf_classes:
- if type(pkg) in (tuple,list) and len(pkg) == 2:
- # If a packages shows up in the class binding list,
- # then we cannot wholesale bind that package later.
- already_bound_list.append(pkg[0])
- self.qmf_session.bindClass(pkg[0]._name.lower(), pkg[1]._name.lower())
-
- # Handle bind by package
- for pkg in self.qmf_packages:
- if not pkg in already_bound_list:
+ if self.qmf_classes:
+ for cls in self.qmf_classes:
+ pname = cls._package._name
+ cname = cls._name
+ self.qmf_session.bindClass(pname.lower(), cname.lower())
+ log.info("Binding QMF class %s.%s" % (pname, cname))
+ else:
+ # Handle bind by package
+ for pkg in self.app.model._packages:
self.qmf_session.bindPackage(pkg._name.lower())
+ log.info("Binding QMF package %s" % pkg._name)
for uri in self.broker_uris:
self.add_broker(uri)
13 years, 1 month
r4660 - trunk/cumin/python/cumin
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-23 19:26:32 +0000 (Wed, 23 Mar 2011)
New Revision: 4660
Modified:
trunk/cumin/python/cumin/stat.py
Log:
Remove unused imports
Change the yellow color in the pie charts
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2011-03-23 14:01:15 UTC (rev 4659)
+++ trunk/cumin/python/cumin/stat.py 2011-03-23 19:26:32 UTC (rev 4660)
@@ -1,20 +1,25 @@
import cStringIO
+import logging
+from datetime import datetime, timedelta
+from time import time
-from math import sqrt
-from mint import *
-from random import randint
-from wooly import *
-from wooly.widgets import *
+from wooly import Widget, Page, Parameter, Attribute
+from wooly.util import StringCatalog, escape_entity, Writer
+from wooly.widgets import ItemSet
+from wooly.pages import HtmlPage
+from wooly.parameters import IntegerParameter, ListParameter, StringParameter,\
+ BooleanParameter
-from widgets import *
-from parameters import *
-from util import *
-from formats import *
-from model import *
+from cumin.formats import fmt_bytes, fmt_duration_brief
+from cumin.model import CuminStatistic, SamplesSqlAdapter
+from cumin.widgets import StateSwitch
+from wooly.template import WidgetTemplate
+from cumin.charts import CuminPieChart, TimeSeriesChart, StackedValueChart
+from cumin.util import calc_rate, secs, nvl
+from cumin.OpenFlashChart import Element, Chart
-from OpenFlashChart import Chart, Element
-
strings = StringCatalog(__file__)
+log = logging.getLogger("cumin.stat")
class StatSet(ItemSet):
def __init__(self, app, name, object):
@@ -93,11 +98,11 @@
return zip(self.stats, self.get_values(session))
def render_item_title(self, session, item):
- stat, value = item
+ stat, _ = item
return stat.get_title(session)
def render_item_name(self, session, item):
- stat, value = item
+ stat, _ = item
return stat.name
def render_item_value(self, session, item):
@@ -270,10 +275,10 @@
"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": [(0,0,1), (.6,.6,1),
- (1,1,0), (1,1,.6),
(1,0,1), (1,.6,1),
(0,1,1), (.6,1,1),
(1,0,0), (1,.6,.6),
+ (.6,.6,0), (.3,.3,0),
(0,1,0), (.6,1,.6)],
"blank": [(1,1,1), (1,1,1), (1,1,1), (1,1,1)]}
13 years, 1 month
r4659 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-23 14:01:15 +0000 (Wed, 23 Mar 2011)
New Revision: 4659
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
Log:
Fix % calculation for slot capacity
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-03-23 13:53:28 UTC (rev 4658)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-03-23 14:01:15 UTC (rev 4659)
@@ -454,7 +454,7 @@
total_index = self.get_item_index(self.cls.Memory)
used = record[used_index]
total = record[total_index]
- return float(used/total) * 100.0
+ return float(used/(total * 1024)) * 100.0
except:
return 0
13 years, 1 month
r4658 - in trunk/cumin/python/cumin: . grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-23 13:53:28 +0000 (Wed, 23 Mar 2011)
New Revision: 4658
Modified:
trunk/cumin/python/cumin/grid/pool.strings
trunk/cumin/python/cumin/objectframe.strings
trunk/cumin/python/cumin/objectselector.strings
Log:
Move search input to the left to avoid large gap under ObjectSelectorLinks
Various white-space tweaks
Modified: trunk/cumin/python/cumin/grid/pool.strings
===================================================================
--- trunk/cumin/python/cumin/grid/pool.strings 2011-03-23 12:48:16 UTC (rev 4657)
+++ trunk/cumin/python/cumin/grid/pool.strings 2011-03-23 13:53:28 UTC (rev 4658)
@@ -1,3 +1,12 @@
+[PoolView.css]
+div.PoolView div.ObjectViewSummary {
+ display: none;
+}
+
+div.PoolView div.ObjectViewSummaryClear {
+ margin-top: 1em;
+}
+
[PoolView.error_html]
<div id="{id}" class="{class}">
{heading}
Modified: trunk/cumin/python/cumin/objectframe.strings
===================================================================
--- trunk/cumin/python/cumin/objectframe.strings 2011-03-23 12:48:16 UTC (rev 4657)
+++ trunk/cumin/python/cumin/objectframe.strings 2011-03-23 13:53:28 UTC (rev 4658)
@@ -139,7 +139,7 @@
<div class="{class} {wide}">
{tasks}
{attributes}
-</div><div style="clear:both;"></div>
+</div><div class="ObjectViewSummaryClear" style="clear:both;"></div>
[ObjectViewContext.html]
<div class="{class}">{links}</div>
Modified: trunk/cumin/python/cumin/objectselector.strings
===================================================================
--- trunk/cumin/python/cumin/objectselector.strings 2011-03-23 12:48:16 UTC (rev 4657)
+++ trunk/cumin/python/cumin/objectselector.strings 2011-03-23 13:53:28 UTC (rev 4658)
@@ -11,7 +11,7 @@
}
div.ObjectSelectorFilters {
- float: right;
+ float: left;
padding-bottom: 0.25em;
}
@@ -40,7 +40,7 @@
}
div.ObjectSelectorLinks {
- margin: 0 0 1em 0;
+ margin: 0 0 0.5em 0;
}
[ObjectSelector.html]
@@ -58,7 +58,15 @@
</form>
<script type="text/javascript">
<![CDATA[
- $(document.forms[0]).getElements('[type=text]').each(function(el){ new OverText(el); });
+ $(document.forms[0]).getElements('[type=text]').each(function(el){ new OverText(el, {
+ positionOptions: {
+ offset: {
+ x: 5,
+ y: 3
+ }
+ }
+
+ }); });
{script}
]]>
</script>
13 years, 1 month
r4657 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-03-23 12:48:16 +0000 (Wed, 23 Mar 2011)
New Revision: 4657
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/pool.py
trunk/cumin/python/cumin/grid/slot.py
trunk/cumin/python/cumin/grid/slotvis.py
Log:
Move slot visualization to the Slot tab.
Add a radiomodeset to the Slot tab to display the Slot table and the Slot vis.
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-03-22 19:09:02 UTC (rev 4656)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-03-23 12:48:16 UTC (rev 4657)
@@ -13,9 +13,7 @@
ObjectLinkColumn, CsvStatsExporter, ExportButton
from cumin.util import rgb_to_string
from negotiator import NegotiatorAttribute
-from cumin.grid.slotvis import PoolSlotMap, PoolSlotFlashVis
from wooly.template import WidgetTemplate
-from cumin.formats import fmt_bytes
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.dashboard")
@@ -35,27 +33,9 @@
capacity = DashboardCapacity(app, "c", collector)
self.add_tab(capacity)
- visualization = Visualization(app, "v", collector)
- self.add_tab(visualization)
-
def render_title(self, session):
return "Overview"
-class Visualization(Widget):
- def __init__(self, app, name, collector):
- super(Visualization, self).__init__(app, name)
-
- self.collector = collector
-
- slot_map = PoolSlotMap(app, "slot_png", self.collector)
- self.add_child(slot_map)
-
- slot_vis = PoolSlotFlashVis(app, "slot_map", self.collector)
- self.add_child(slot_vis)
-
- def render_title(self, session):
- return "Slot visualization"
-
class Dashboard(WidgetSet):
def __init__(self, app, name, collector):
super(Dashboard, self).__init__(app, name)
Modified: trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- trunk/cumin/python/cumin/grid/pool.py 2011-03-22 19:09:02 UTC (rev 4656)
+++ trunk/cumin/python/cumin/grid/pool.py 2011-03-23 12:48:16 UTC (rev 4657)
@@ -10,13 +10,14 @@
from cumin.grid.dashboard import PoolDashboard
from submission import SubmissionFrame, PoolSubmissionJoinSelector
-from slot import SlotFrame, SlotSelector
+from slot import SlotFrame
from scheduler import SchedulerFrame, SchedulerSelector
from negotiator import NegotiatorFrame, NegotiatorSelector,\
NegotiatorEditDynamicQuota, NegotiatorAttribute
from limit import LimitFrame, LimitSelector
-from cumin.grid.quota import QuotaSelector
+from cumin.grid.quota import QuotaSelector
from collector import CollectorGeneralStatSet
+from cumin.grid.slotvis import SlotOverview
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.pool")
@@ -71,16 +72,13 @@
self.limit = LimitFrame(app, "limit")
self.add_mode(self.limit)
- #overview = PoolOverview(app, "overview", self.object)
- #self.view.add_tab(overview)
-
dashboard = PoolDashboard(app, "dashboard", self.object)
self.view.add_tab(dashboard)
submissions = PoolSubmissionJoinSelector(app, "pool_submissions", self.object)
self.view.add_tab(submissions)
- slots = SlotSelector(app, "slots", self.object)
+ slots = SlotOverview(app, "slots", self.object)
self.view.add_tab(slots)
schedulers = SchedulerSelector(app, "schedulers", self.object)
Modified: trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- trunk/cumin/python/cumin/grid/slot.py 2011-03-22 19:09:02 UTC (rev 4656)
+++ trunk/cumin/python/cumin/grid/slot.py 2011-03-23 12:48:16 UTC (rev 4657)
@@ -14,36 +14,6 @@
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.slot")
-class SlotSelector(ObjectSelector):
- def __init__(self, app, name, pool):
- cls = app.model.com_redhat_grid.Slot
-
- super(SlotSelector, self).__init__(app, name, cls)
-
- self.pool = pool
-
- self.add_filter(self.pool, cls.Pool, cls.Pool)
-
- frame = "main.grid.slot"
- col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
- self.add_column(col)
- self.add_search_filter(col)
-
- self.add_attribute_column(cls.Activity)
- self.add_attribute_column(cls.State)
-
- 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):
- # avoid the checkboxes
- return ObjectTable(app, name, cls)
-
class SlotFrame(ObjectFrame):
def __init__(self, app, name):
cls = app.model.com_redhat_grid.Slot
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-03-22 19:09:02 UTC (rev 4656)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-03-23 12:48:16 UTC (rev 4657)
@@ -1,14 +1,79 @@
import logging
+
+from wooly import Session, Widget
from wooly.util import StringCatalog
+from wooly.widgets import RadioModeSet
+
from slot import SlotMap, SlotMapPage
-from wooly import Session
from cumin.parameters import RosemaryObjectParameter
from cumin.widgets import StateSwitch
from cumin.stat import FlashFullPage
+from cumin.objectselector import ObjectSelector, ObjectLinkColumn,\
+ ObjectTableColumn, ObjectTable
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.slotvis")
+class SlotOverview(RadioModeSet):
+ def __init__(self, app, name, pool):
+ super(SlotOverview, self).__init__(app, name)
+
+ self.pool = pool
+
+ self.add_tab(SlotSelector(app, "slots", pool))
+ self.add_tab(Visualization(app, "vis", pool))
+
+ def render_title(self, session):
+ return "Slots"
+
+class SlotSelector(ObjectSelector):
+ def __init__(self, app, name, pool):
+ cls = app.model.com_redhat_grid.Slot
+
+ super(SlotSelector, self).__init__(app, name, cls)
+
+ self.pool = pool
+
+ self.add_filter(self.pool, cls.Pool, cls.Pool)
+
+ frame = "main.grid.slot"
+ col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
+ self.add_column(col)
+ self.add_search_filter(col)
+
+ self.add_attribute_column(cls.Activity)
+ self.add_attribute_column(cls.State)
+
+ 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):
+ # avoid the checkboxes
+ return ObjectTable(app, name, cls)
+
+ def render_title(self, session):
+ return "Slot table"
+
+class Visualization(Widget):
+ def __init__(self, app, name, collector):
+ super(Visualization, self).__init__(app, name)
+
+ self.collector = collector
+
+ slot_map = PoolSlotMap(app, "slot_png", self.collector)
+ self.add_child(slot_map)
+
+ slot_vis = PoolSlotFlashVis(app, "slot_map", self.collector)
+ self.add_child(slot_vis)
+
+ def render_title(self, session):
+ return "Slot visualization"
+
class PoolSlotMap(SlotMap):
def __init__(self, app, name, collector):
super(PoolSlotMap, self).__init__(app, name)
@@ -144,3 +209,4 @@
def render_content(self, session):
return self.flash_chart.render(session)
+
13 years, 1 month