r4782 - in trunk: cumin/python/cumin cumin/python/cumin/grid wooly/python/wooly
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-05-24 18:01:45 +0000 (Tue, 24 May 2011)
New Revision: 4782
Modified:
trunk/cumin/python/cumin/grid/slotvis.py
trunk/cumin/python/cumin/main.py
trunk/cumin/python/cumin/objectselector.py
trunk/cumin/python/cumin/widgets.py
trunk/wooly/python/wooly/table.py
Log:
Set default sort order of columns based on data type.
Descending for numeric types, ascending for others.
BZ703860
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-05-24 17:22:27 UTC (rev 4781)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-05-24 18:01:45 UTC (rev 4782)
@@ -47,9 +47,7 @@
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.table.set_default_sort_column(col)
self.enable_csv_export(pool)
Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py 2011-05-24 17:22:27 UTC (rev 4781)
+++ trunk/cumin/python/cumin/main.py 2011-05-24 18:01:45 UTC (rev 4782)
@@ -465,9 +465,8 @@
self.add_column(col)
col = self.add_attribute_column(cls.msgDepth)
+ self.set_default_sort_column(col)
- self.sort.default = col.name
-
def init(self):
super(TopQueueTable, self).init()
@@ -515,9 +514,8 @@
self.add_column(col)
col = self.add_attribute_column(cls.loadAverage1Min)
+ self.set_default_sort_column(col)
- self.sort.default = col.name
-
def init(self):
super(TopSystemTable, self).init()
@@ -538,9 +536,8 @@
col = self.DurationColumn(app, cls._qmf_create_time.name,
cls._qmf_create_time)
self.add_column(col)
+ self.set_default_sort_column(col)
- self.sort.default = col.name
-
def init(self):
super(TopSubmissionTable, self).init()
Modified: trunk/cumin/python/cumin/objectselector.py
===================================================================
--- trunk/cumin/python/cumin/objectselector.py 2011-05-24 17:22:27 UTC (rev 4781)
+++ trunk/cumin/python/cumin/objectselector.py 2011-05-24 18:01:45 UTC (rev 4782)
@@ -31,7 +31,6 @@
self.cls = cls
self.update_enabled = True
- self.ascending.default = True
# (RosemaryAttribute this, RosemaryAttribute that, Attribute object)
self.filter_specs = list()
@@ -41,6 +40,12 @@
self.export = None
+ # If ascending.default is None, ascending.default will be
+ # chosen by column data type in init() later on.
+ # To force a default value for ascending, set it explicitly
+ # in a derived class during __init__
+ self.ascending.default = None
+
def init(self):
if not self.adapter:
self.adapter = ObjectSqlAdapter(self.app, self.cls)
@@ -56,9 +61,13 @@
if self.sort.default is None:
for col in self.columns:
if col.sortable:
- self.sort.default = col.name
+ self.set_default_sort_column(col)
break
+ # Now that all columns have been initialized, and we
+ # have a sortable column if possible, set direction
+ self.set_default_sort_direction()
+
def add_attribute_column(self, attr):
assert isinstance(attr, RosemaryAttribute), attr
@@ -696,4 +705,4 @@
pass
class ObjectQmSelectorfTable(QmfValues, ObjectSelectorTable):
- pass
\ No newline at end of file
+ pass
Modified: trunk/cumin/python/cumin/widgets.py
===================================================================
--- trunk/cumin/python/cumin/widgets.py 2011-05-24 17:22:27 UTC (rev 4781)
+++ trunk/cumin/python/cumin/widgets.py 2011-05-24 18:01:45 UTC (rev 4782)
@@ -1586,7 +1586,6 @@
self.replace_child(self.footer)
self.header.limit.default = 5
- self.ascending.default = False
def get_count(self, session):
# avoid extra sql call since we don't show the record count
Modified: trunk/wooly/python/wooly/table.py
===================================================================
--- trunk/wooly/python/wooly/table.py 2011-05-24 17:22:27 UTC (rev 4781)
+++ trunk/wooly/python/wooly/table.py 2011-05-24 18:01:45 UTC (rev 4782)
@@ -23,9 +23,36 @@
self.sort = SymbolParameter(app, "sort")
self.add_parameter(self.sort)
+ # Default for a BooleanParameter is False.
+ # ascending.default can be set to None in a
+ # derived class if set_default_sort_direction will be used.
self.ascending = BooleanParameter(app, "ascending")
self.add_parameter(self.ascending)
+ self._sort_col = None
+ def get_ascending_by_type(self, the_type):
+ # Override this method to do something special
+ # for a particular table
+ return the_type not in (int, float, long, complex)
+
+ def set_default_sort_column(self, column):
+ # Save a reference to the column so that we
+ # can determine type once it's initialized
+ self.sort.default = column.name
+ self._sort_col = column
+
+ def set_default_sort_direction(self):
+ # If the ascending default value has not been
+ # explicitly set, choose ascending based on type
+ if self.ascending.default == None:
+ if self._sort_col:
+ self.ascending.default = \
+ self.get_ascending_by_type(self._sort_col.field.type)
+ else:
+ # If it's still None, and _sort_col was not set,
+ # we have to choose something
+ self.ascending.default = False
+
def add_column(self, column):
self.add_child(column)
@@ -118,28 +145,31 @@
def render_text_align(self, session):
return "left"
-
+
def render_header_href(self, session):
+ # For the current sort column, just invert the sort order.
+ # For other columns, set initial sort order based type
sort = self.table.sort.get(session)
- ascending = self.table.ascending.get(session)
+ if sort == self.name:
+ ascending = not self.table.ascending.get(session)
+ else:
+ ascending = self.table.get_ascending_by_type(self.field.type)
branch = session.branch()
-
self.table.sort.set(branch, self.name)
-
- if sort == self.name:
- self.table.ascending.set(branch, not ascending)
-
+ self.table.ascending.set(branch, ascending)
return branch.marshal()
def render_header_title(self, session):
+ # For the current sort column, just invert the sort order.
+ # For other columns, set initial sort order based type
sort = self.table.sort.get(session)
- ascending = self.table.ascending.get(session)
-
- dir = ascending and "ascending" or "descending"
if sort == self.name:
+ ascending = self.table.ascending.get(session)
dir = ascending and "descending" or "ascending"
-
+ else:
+ ascending = self.table.get_ascending_by_type(self.field.type)
+ dir = ascending and "ascending" or "descending"
name = self.render_header_content(session)
if not name:
name = self.name
@@ -205,7 +235,6 @@
container = self.table
sel = container.sort.get(session)
asc = container.ascending.get(session)
-
if sel == self.parent.name:
if asc:
return "up"
12 years, 11 months
r4781 - trunk/cumin/python/cumin/grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-05-24 17:22:27 +0000 (Tue, 24 May 2011)
New Revision: 4781
Modified:
trunk/cumin/python/cumin/grid/submission.py
Log:
Now truncating to 80 characters in the table for submissions. This will support 1024 x 768 nicely.
Modified: trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- trunk/cumin/python/cumin/grid/submission.py 2011-05-24 16:42:01 UTC (rev 4780)
+++ trunk/cumin/python/cumin/grid/submission.py 2011-05-24 17:22:27 UTC (rev 4781)
@@ -115,8 +115,8 @@
class PoolSubmissionObjectLinkColumn(ObjectLinkColumn):
def render_cell_content(self, session, record):
retval = len(record) > 0 and record[self.field.index] or ""
- if(len(record[self.field.index]) > 100):
- retval = record[self.field.index][:100] + "..." #indicate that we truncated the name
+ if(len(record[self.field.index]) > 80):
+ retval = record[self.field.index][:80] + "..." #indicate that we truncated the name
return retval
12 years, 11 months
r4780 - trunk/cumin/python/cumin
by croberts@fedoraproject.org
Author: croberts
Date: 2011-05-24 16:42:01 +0000 (Tue, 24 May 2011)
New Revision: 4780
Modified:
trunk/cumin/python/cumin/objectselector.strings
Log:
To address BZ https://bugzilla.redhat.com/show_bug.cgi?id=703279 we now reset our offset to 0 whenever submitting a new search query as an onclick action.
Modified: trunk/cumin/python/cumin/objectselector.strings
===================================================================
--- trunk/cumin/python/cumin/objectselector.strings 2011-05-24 02:39:26 UTC (rev 4779)
+++ trunk/cumin/python/cumin/objectselector.strings 2011-05-24 16:42:01 UTC (rev 4780)
@@ -112,10 +112,28 @@
return true;
}
+function clearOffsetInput(id) {
+ if (id) {
+ var regex = new RegExp("\.offset$");
+ var inputs = id.getElements("input");
+ if(inputs) {
+ for (i = 0; i < inputs.length; i++) {
+ var input_name = inputs[i].name;
+ var match = regex.exec(input_name);
+ if(match != null) {
+ inputs[i].value = 0;
+ }
+ }
+ }
+ }
+ return true;
+}
+
+
[ObjectSelectorFilters.html]
<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"/>
+ <input type="submit" value="Search" onclick="return clearOffsetInput(this.form)" tabindex="100"/><input type="submit" value="Clear" onclick="return clearSearchInput('{id}')" tabindex="100"/>
</div><div style="margin-bottom: 0.5em; clear:both;"></div>
[ExportButton.css]
12 years, 11 months
r4779 - in trunk: cumin/model cumin/python/cumin cumin/python/cumin/grid rosemary/python/rosemary
by croberts@fedoraproject.org
Author: croberts
Date: 2011-05-24 02:39:26 +0000 (Tue, 24 May 2011)
New Revision: 4779
Modified:
trunk/cumin/model/rosemary.xml
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/negotiator.py
trunk/cumin/python/cumin/grid/scheduler.py
trunk/cumin/python/cumin/objectselector.py
trunk/rosemary/python/rosemary/util.py
Log:
Addressing BZ https://bugzilla.redhat.com/show_bug.cgi?id=700540 to make the uptime display human-readable.
Modified: trunk/cumin/model/rosemary.xml
===================================================================
--- trunk/cumin/model/rosemary.xml 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/cumin/model/rosemary.xml 2011-05-24 02:39:26 UTC (rev 4779)
@@ -308,6 +308,7 @@
<statistic name="MonitorSelfAge">
<title>Up-time</title>
+ <formatter>fmt_timestamp_ddhhmmss</formatter>
</statistic>
<statistic name="MonitorSelfImageSize">
@@ -444,6 +445,7 @@
<statistic name="MonitorSelfAge">
<title>Up-time</title>
+ <formatter>fmt_timestamp_ddhhmmss</formatter>
</statistic>
</class>
@@ -536,6 +538,7 @@
<statistic name="MonitorSelfAge">
<title>Up-time</title>
+ <formatter>fmt_timestamp_ddhhmmss</formatter>
</statistic>
</class>
</package>
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-05-24 02:39:26 UTC (rev 4779)
@@ -13,7 +13,7 @@
from cumin.sqladapter import ObjectSqlAdapter
from cumin.stat import StatSet, PieChartPage, StatFlashChart
from cumin.objectselector import ObjectSelector, MonitorSelfStatColumn, ObjectTableColumn, ObjectTable,\
- ObjectLinkColumn, CsvStatsExporter, ExportButton
+ ObjectLinkColumn, CsvStatsExporter, ExportButton, MonitorSelfAgeColumn
from cumin.util import rgb_to_string
from negotiator import NegotiatorAttribute
@@ -877,7 +877,8 @@
col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
self.add_column(col)
- self.add_attribute_column(cls.MonitorSelfAge)
+ stat = MonitorSelfAgeColumn(app, "monitorSelfAge", cls.MonitorSelfAge)
+ self.add_column(stat)
self.add_attribute_column(cls.JobSubmissionRate)
self.add_attribute_column(cls.JobStartRate)
@@ -995,10 +996,10 @@
col.static_header = static
self.add_column(col)
- stat = ObjectTableColumn(app, cls.MonitorSelfAge.name, cls.MonitorSelfAge)
+ stat = MonitorSelfAgeColumn(app, "monitorSelfAge", cls.MonitorSelfAge)
stat.static_header = static
self.add_column(stat)
-
+
stat = MonitorSelfStatColumn(app, cls.MonitorSelfRegisteredSocketCount.name, cls.MonitorSelfRegisteredSocketCount)
stat.static_header = static
self.add_column(stat)
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2011-05-24 02:39:26 UTC (rev 4779)
@@ -3,7 +3,7 @@
from cumin.objectframe import ObjectFrame, ObjectFrameTask,\
ObjectFrameTaskFeedbackForm
from cumin.objectselector import ObjectSelector, ObjectLinkColumn,\
- MonitorSelfStatColumn, ObjectTable
+ MonitorSelfStatColumn, ObjectTable, MonitorSelfAgeColumn
from wooly import Widget, Attribute, Parameter
from parsley.stringex import rpartition
from cumin.parameters import RosemaryObjectParameter
@@ -39,7 +39,7 @@
self.add_attribute_column(cls.Machine)
self.add_attribute_column(cls.System)
- stat = MonitorSelfStatColumn(app, cls.MonitorSelfAge.name, cls.MonitorSelfAge)
+ stat = MonitorSelfAgeColumn(app, cls.MonitorSelfAge.name, cls.MonitorSelfAge)
self.add_column(stat)
stat = MonitorSelfStatColumn(app, cls.MonitorSelfCPUUsage.name, cls.MonitorSelfCPUUsage)
self.add_column(stat)
Modified: trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.py 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/cumin/python/cumin/grid/scheduler.py 2011-05-24 02:39:26 UTC (rev 4779)
@@ -9,7 +9,7 @@
from submitter import SubmitterFrame, SubmitterSelector
from submission import PoolSubmissionSelector
from cumin.objectselector import ObjectSelectorTable, ObjectSelector,\
- ObjectLinkColumn, MonitorSelfStatColumn, ObjectTable
+ ObjectLinkColumn, MonitorSelfStatColumn, ObjectTable, MonitorSelfAgeColumn
from cumin.grid.submission import SubmissionFrame
strings = StringCatalog(__file__)
@@ -90,7 +90,7 @@
self.add_attribute_column(cls.TotalRunningJobs)
self.add_attribute_column(cls.TotalHeldJobs)
- stat = MonitorSelfStatColumn(app, cls.MonitorSelfAge.name, cls.MonitorSelfAge)
+ stat = MonitorSelfAgeColumn(app, cls.MonitorSelfAge.name, cls.MonitorSelfAge)
self.add_column(stat)
stat = MonitorSelfStatColumn(app, cls.MonitorSelfCPUUsage.name, cls.MonitorSelfCPUUsage)
self.add_column(stat)
Modified: trunk/cumin/python/cumin/objectselector.py
===================================================================
--- trunk/cumin/python/cumin/objectselector.py 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/cumin/python/cumin/objectselector.py 2011-05-24 02:39:26 UTC (rev 4779)
@@ -548,7 +548,14 @@
if parts[0] == "Monitor" and parts[1] == "self":
return " ".join(parts[2:])
return title
-
+
+class MonitorSelfAgeColumn(ObjectTableColumn):
+ def render_cell_content(self, session, record):
+ mins, secs = divmod(self.field.get_content(session, record), 60)
+ hours, mins = divmod(mins, 60)
+ days = hours / 24
+ return '%02d:%02d:%02d:%02d' % (days, hours, mins, secs)
+
class ExportButton(Widget):
def __init__(self, app, name, args, exporter, file_name):
super(ExportButton, self).__init__(app, name)
Modified: trunk/rosemary/python/rosemary/util.py
===================================================================
--- trunk/rosemary/python/rosemary/util.py 2011-05-23 20:24:43 UTC (rev 4778)
+++ trunk/rosemary/python/rosemary/util.py 2011-05-24 02:39:26 UTC (rev 4779)
@@ -14,4 +14,10 @@
return value and value or "Default exchange"
def fmt_kbmb(value):
- return fmt_bytes(value * 1024)
\ No newline at end of file
+ return fmt_bytes(value * 1024)
+
+def fmt_timestamp_ddhhmmss(value):
+ mins, secs = divmod(value, 60)
+ hours, mins = divmod(mins, 60)
+ days = hours / 24
+ return '%02d:%02d:%02d:%02d' % (days, hours, mins, secs)
\ No newline at end of file
12 years, 11 months
r4778 - in trunk/cumin/python/cumin: . grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-05-23 20:24:43 +0000 (Mon, 23 May 2011)
New Revision: 4778
Modified:
trunk/cumin/python/cumin/grid/submission.py
trunk/cumin/python/cumin/objectframe.py
Log:
For BZ https://bugzilla.redhat.com/show_bug.cgi?id=699732 . We are now truncating the submission name at 100 characters when displaying it in the Submission selection table, as a breadcrumb or as a heading. The truncation will result in "..." being shown at the end to indicate a truncation. This should avoid the page getting very ugly when submission names are very large.
Modified: trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- trunk/cumin/python/cumin/grid/submission.py 2011-05-23 15:45:13 UTC (rev 4777)
+++ trunk/cumin/python/cumin/grid/submission.py 2011-05-23 20:24:43 UTC (rev 4778)
@@ -88,7 +88,7 @@
cls = app.model.com_redhat_grid.JobServer
self.add_filter(self.pool, cls.Pool)
- col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
+ col = self.PoolSubmissionObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
self.insert_column(0, col)
self.add_search_filter(col)
@@ -111,6 +111,14 @@
def do_enter(self, session, obj, form_session):
pool = self.parent.pool.get(session)
self.form.pool_name.set(form_session, pool.Pool)
+
+ class PoolSubmissionObjectLinkColumn(ObjectLinkColumn):
+ def render_cell_content(self, session, record):
+ retval = len(record) > 0 and record[self.field.index] or ""
+ if(len(record[self.field.index]) > 100):
+ retval = record[self.field.index][:100] + "..." #indicate that we truncated the name
+ return retval
+
class PoolSubmissionJoinSelector(PoolSubmissionSelector):
def __init__(self, app, name, pool):
Modified: trunk/cumin/python/cumin/objectframe.py
===================================================================
--- trunk/cumin/python/cumin/objectframe.py 2011-05-23 15:45:13 UTC (rev 4777)
+++ trunk/cumin/python/cumin/objectframe.py 2011-05-23 20:24:43 UTC (rev 4778)
@@ -233,8 +233,20 @@
links.append(self.link.render(session, frame))
- return " › ".join(reversed(links))
-
+ trimmed_links = list()
+ text_matcher = re.compile('<a.*?>(.*?)</a>')
+ for onelink in links:
+ new_link = onelink
+ #get just the text that we will be displaying to truncate
+ result = text_matcher.search(onelink)
+ if(result.group(1) and len(result.group(1)) > 100):
+ origText = result.group(1)
+ newText = result.group(1)[:100] + "...'"
+ new_link = onelink.replace(origText, newText, 1)
+ trimmed_links.append(new_link)
+
+ return " › ".join(reversed(trimmed_links))
+
class ObjectViewContextLink(Link):
def __init__(self, app, name):
super(ObjectViewContextLink, self).__init__(app, name)
@@ -261,7 +273,11 @@
return self.frame.icon_href
def render_title(self, session):
- return self.parent.render_title(session)
+ retval = self.parent.render_title(session)
+ if(len(retval) > 100):
+ retval = retval[:100] + "..."
+ return retval
+
class ObjectViewSummary(ObjectViewChild):
def __init__(self, app, name, object):
12 years, 11 months
r4777 - trunk/cumin/python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-05-23 15:45:13 +0000 (Mon, 23 May 2011)
New Revision: 4777
Modified:
trunk/cumin/python/cumin/session.py
Log:
Add INFO log entry on broker connected, broker connection failed, and broker disconnected
BZ692238
Modified: trunk/cumin/python/cumin/session.py
===================================================================
--- trunk/cumin/python/cumin/session.py 2011-05-20 21:43:17 UTC (rev 4776)
+++ trunk/cumin/python/cumin/session.py 2011-05-23 15:45:13 UTC (rev 4777)
@@ -125,6 +125,15 @@
def __init__(self, session):
self.session = session
+ def brokerConnected(self, broker):
+ log.info("Broker connected %s:%s", broker.host, broker.port)
+
+ def brokerConnectionFailed(self, broker):
+ log.info("Broker connection failed %s:%s", broker.host, broker.port)
+
+ def brokerDisconnected(self, broker):
+ log.info("Broker disconnected %s:%s", broker.host, broker.port)
+
def newPackage(self, name):
log.debug("New package %s", name)
12 years, 11 months
r4776 - trunk/cumin/etc
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-05-20 21:43:17 +0000 (Fri, 20 May 2011)
New Revision: 4776
Modified:
trunk/cumin/etc/sysvinit-cumin
Log:
Perform cumin database server and environment checks only for
start commands, allow stop and status to work regardless.
BZ673273
Modified: trunk/cumin/etc/sysvinit-cumin
===================================================================
--- trunk/cumin/etc/sysvinit-cumin 2011-05-20 20:33:09 UTC (rev 4775)
+++ trunk/cumin/etc/sysvinit-cumin 2011-05-20 21:43:17 UTC (rev 4776)
@@ -8,28 +8,19 @@
#
# Sanity checks.
-test -x /usr/bin/cumin || exit 1
-test -x /usr/bin/cumin-database || exit 1
-
-SYSCONFIG="/etc/sysconfig/cumin"
-[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
-
-cumin-database check-started &> /dev/null || {
- echo "Cumin's database server is not running"
- echo "Run 'cumin-database start' as root"
+test -x /usr/bin/cumin || {
+ echo "/usr/bin/cumin has been removed"
exit 1
}
-cumin-database check &> /dev/null || {
- # Run again with output left on for user.
- echo "Cumin's database is not yet installed"
- echo "Run 'cumin-database install' as root"
-
- echo "(detailed output from cumin-database check:)"
- cumin-database check noadvice
+test -x /usr/bin/cumin-database || {
+ echo "/usr/bin/cumin-database has been removed"
exit 1
}
+SYSCONFIG="/etc/sysconfig/cumin"
+[ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
+
# Source function library.
. /etc/rc.d/init.d/functions
@@ -40,6 +31,24 @@
RETVAL=0
start() {
+
+ # Initial checks for the start case
+ cumin-database check-started &> /dev/null || {
+ echo "Cumin's database server is not running"
+ echo "Run 'cumin-database start' as root"
+ exit 1
+ }
+
+ cumin-database check &> /dev/null || {
+ # Run again with output left on for user.
+ echo "Cumin's database is not yet installed"
+ echo "Run 'cumin-database install' as root"
+
+ echo "(detailed output from cumin-database check:)"
+ cumin-database check noadvice
+ exit 1
+ }
+
echo -n $"Starting cumin: "
# If it's already running, be happy and return success
status $processname &> /dev/null
12 years, 11 months
r4775 - trunk/cumin/python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-05-20 20:33:09 +0000 (Fri, 20 May 2011)
New Revision: 4775
Modified:
trunk/cumin/python/cumin/widgets.strings
Log:
Kiosk update mode
BZ697075
Modified: trunk/cumin/python/cumin/widgets.strings
===================================================================
--- trunk/cumin/python/cumin/widgets.strings 2011-05-20 16:47:25 UTC (rev 4774)
+++ trunk/cumin/python/cumin/widgets.strings 2011-05-20 20:33:09 UTC (rev 4775)
@@ -110,7 +110,13 @@
[CuminMainView.javascript]
cumin.set_updated = function () {
- $('heartbeat').set('text', "Updated " + new Date().format("%Y-%m-%d %H:%M:%S"));
+ var updateStr;
+ var kiosk = wooly.session.branch()["kiosk"];
+ if (kiosk != null && kiosk != undefined)
+ updateStr = "**Updated "
+ else
+ updateStr = "Updated "
+ $('heartbeat').set('text', updateStr + new Date().format("%Y-%m-%d %H:%M:%S"));
$('shock').style.display = "none";
$('heartbeat').style.display = "inline";
$('heartbeat').style.color = "#000000";
@@ -129,18 +135,23 @@
cumin.expireID = null;
}
}
- cumin.expireID = setTimeout(function () {
- wooly.cancelIntervalUpdate();
- setTimeout(function () {
- $('heartbeat').style.display = "none";
- $('shock').style.display = "block"}, 1000);
- $('shock').onclick = function () {
- wooly.updateNow();
- wooly.resumeIntervalUpdate();
- cumin.expireIntervalUpdate();
- cumin.set_updated();
- }
- }, 30*60*1000);
+ // A "kiosk" NV pair in the URL prevents timeouts
+ var kiosk = wooly.session.branch()["kiosk"]
+ if (kiosk == null || kiosk == undefined)
+ {
+ cumin.expireID = setTimeout(function () {
+ wooly.cancelIntervalUpdate();
+ setTimeout(function () {
+ $('heartbeat').style.display = "none";
+ $('shock').style.display = "block"}, 1000);
+ $('shock').onclick = function () {
+ wooly.updateNow();
+ wooly.resumeIntervalUpdate();
+ cumin.expireIntervalUpdate();
+ cumin.set_updated();
+ }
+ }, 30*60*1000);
+ };
};
cumin.expireIntervalUpdate();
window.addEvent('domready', function () {
12 years, 11 months
r4774 - trunk/cumin/python/cumin/grid
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-05-20 16:47:25 +0000 (Fri, 20 May 2011)
New Revision: 4774
Modified:
trunk/cumin/python/cumin/grid/limit.py
Log:
If limit value entered is less than 0, set to 0.
BZ696697
Modified: trunk/cumin/python/cumin/grid/limit.py
===================================================================
--- trunk/cumin/python/cumin/grid/limit.py 2011-05-20 12:54:49 UTC (rev 4773)
+++ trunk/cumin/python/cumin/grid/limit.py 2011-05-20 16:47:25 UTC (rev 4774)
@@ -183,9 +183,7 @@
self.reset_button = self.ResetLimitFormButton(app, "resetbutton")
self.add_field(self.reset_button)
-
-
-
+
def process_submit(self, session):
new_max_value = self.limit_max.input.get(session)
@@ -193,8 +191,10 @@
if not self.errors.get(session):
if new_max_value.lower() in ("unlimited", "na", "n/a") or float(new_max_value) >= LIMIT_FLOAT_VALUE_FOR_UNLIMITED:
self.limit_max.set(session, LIMIT_FLOAT_VALUE_FOR_UNLIMITED)
+ elif float(new_max_value) < 0:
+ self.limit_max.set(session, 0)
else:
- self.limit_max.set(session,new_max_value)
+ self.limit_max.set(session, new_max_value)
if not self.errors.get(session):
limit_name = self.limit_name.get(session)
12 years, 11 months
r4773 - in trunk/cumin/python/cumin: . grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-05-20 12:54:49 +0000 (Fri, 20 May 2011)
New Revision: 4773
Modified:
trunk/cumin/python/cumin/grid/job.py
trunk/cumin/python/cumin/objectframe.strings
Log:
In order to address BZ https://bugzilla.redhat.com/show_bug.cgi?id=703285 I have added some CSS entries to the objectframe.strings file. Also, I set the visibility of the JobSetAttribute to False, otherwise the arrows will show up next to a blank entry.
Modified: trunk/cumin/python/cumin/grid/job.py
===================================================================
--- trunk/cumin/python/cumin/grid/job.py 2011-05-19 18:27:22 UTC (rev 4772)
+++ trunk/cumin/python/cumin/grid/job.py 2011-05-20 12:54:49 UTC (rev 4773)
@@ -972,6 +972,12 @@
self.form.return_url.set(session, nsession.marshal())
class JobSetAttribute(ObjectFrameTask):
+ def __init__(self, app, frame):
+ super(JobSetAttribute, self).__init__(app, frame)
+
+ # Since we don't actually want to see this on the job view page
+ self.visible=False
+
def get_title(self, session):
pass
Modified: trunk/cumin/python/cumin/objectframe.strings
===================================================================
--- trunk/cumin/python/cumin/objectframe.strings 2011-05-19 18:27:22 UTC (rev 4772)
+++ trunk/cumin/python/cumin/objectframe.strings 2011-05-20 12:54:49 UTC (rev 4773)
@@ -55,8 +55,19 @@
</table>
[ObjectTasksLink.html]
-<li><a href="{href}">{content}</a></li>
+<li><a class="{class}" href="{href}">{content}</a></li>
+[ObjectTasksLink.css]
+a.ObjectTaskLink {
+ font-size: 0.9em;
+}
+
+a.ObjectTasksLink:before {
+ content: "\00BB \0020";
+ font-weight: bold;
+ color: #dc9f2e;
+}
+
[SummaryTasks.css]
ul.SummaryTasks {
width: 15em;
12 years, 11 months