rhmessaging commits: r3353 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-30 11:41:55 -0400 (Thu, 30 Apr 2009)
New Revision: 3353
Added:
mgmt/trunk/cumin/resources/ielte7.css
Log:
ie7 and below specific styles
Added: mgmt/trunk/cumin/resources/ielte7.css
===================================================================
--- mgmt/trunk/cumin/resources/ielte7.css (rev 0)
+++ mgmt/trunk/cumin/resources/ielte7.css 2009-04-30 15:41:55 UTC (rev 3353)
@@ -0,0 +1,10 @@
+ul.radiotabs li a {
+ background-image: url(resource?name=radio-button.png);
+ background-repeat: no-repeat;
+ background-position: 0 1px;
+ padding-left: 1.4em;
+}
+
+ul.radiotabs li a.selected {
+ background-image: url(resource?name=radio-button-checked.png);
+}
15 years, 7 months
rhmessaging commits: r3352 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-30 11:41:17 -0400 (Thu, 30 Apr 2009)
New Revision: 3352
Added:
mgmt/trunk/cumin/resources/loading.gif
Log:
loading animated gif
Added: mgmt/trunk/cumin/resources/loading.gif
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/loading.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 7 months
rhmessaging commits: r3351 - in mgmt/trunk: cumin/resources and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-30 11:40:42 -0400 (Thu, 30 Apr 2009)
New Revision: 3351
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/python/cumin/visualizations.strings
mgmt/trunk/cumin/resources/ie.css
mgmt/trunk/wooly/python/wooly/pages.strings
Log:
Separated styles that are now supported in IE8 into a new style sheet.
Added "Loading" animation when switiching durations on charts (if it takes longer than 1 second).
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-30 15:10:19 UTC (rev 3350)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-30 15:40:42 UTC (rev 3351)
@@ -57,6 +57,7 @@
div.StatValueChart {
font-size: 0.9em;
margin: 0 0 1.5em 0;
+ position: relative;
width: 30em;
}
@@ -76,7 +77,42 @@
cursor: wait;
}
+div.loading {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+ -moz-border-radius: 0.2em;
+
+ top: 40%;
+ left: 25%;
+
+ cursor: wait;
+ font-weight: bold;
+ text-align: center;
+ padding: 0.75em;
+
+ opacity: 0.75;
+ position: absolute;
+ visibility: hidden;
+ z-index: 10;
+}
+
+div.loading span {
+ background-position: 0% 40%;
+ background-repeat: no-repeat;
+ background-image: url("resource?name=loading.gif");
+ padding-left: 26px;
+ padding-right: 1em;
+ vertical-align: bottom;
+}
+
[JSDurationSwitch.javascript]
+function showLoading(id) {
+ var loading = $(id).getElement(".loading");
+ if (loading.loading) {
+ loading.setStyle('display', 'block');
+ }
+}
+
function changeDuration(state, a, id) {
li = a.parentNode;
ul = li.parentNode;
@@ -100,6 +136,10 @@
hash[id] = state;
wooly.session.setHash(hash);
}
+ var loading = $(id).getElement(".loading");
+ loading.loading = true;
+ setTimeout("showLoading('"+id+"')", 1000);
+
return false;
}
@@ -130,15 +170,25 @@
<div class="duration">{duration}</div>
<img id="{id}" src="{href}" height="{height}" width="{width}" alt="stats" />
+ <div class="loading" style="display:none;"><span>Loading...</span></div>
</div>
<script type="text/javascript">
//<![CDATA[
+(function() {
wooly.addPageUpdateListener(
function () {
if (document.images["{id}"].className == "Loading")
return;
cumin.updateChart("{id}");
});
+ var oImg = document.images['{id}'];
+ $(oImg).addEvent('load', function () {
+ var loading = $("{id}").getElement(".loading");
+ loading.setStyle('display', 'none');
+ loading.setStyle('visibility', 'visible');
+ loading.loading = false
+ });
+}())
//]]>
</script>
@@ -174,6 +224,7 @@
<div class="duration">{duration}</div>
<img id="{id}" src="{href}" alt="Stacked Value Chart" />
+ <div class="loading" style="display:none;"><span>Loading...</span></div>
</div>
<script type="text/javascript">
//<![CDATA[
@@ -194,6 +245,15 @@
this.removeAttribute("height");
this.className = "";
});
+ $(oImg).addEvent('mousedown', function(event){
+ event.stop();
+ });
+ $(oImg).addEvent('load', function () {
+ var loading = $("{id}").getElement(".loading");
+ loading.setStyle('display', 'none');
+ loading.setStyle('visibility', 'visible');
+ loading.loading = false
+ });
}())
//]]>
</script>
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-30 15:10:19 UTC (rev 3350)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-30 15:40:42 UTC (rev 3351)
@@ -401,10 +401,8 @@
oControls.style.display = "none";
}
}
- var oVis = document.getElementById("slot_visualization");
- if (oVis) {
- oVis.style.visibility = "visible";
- }
+ $("slot_visualization").style.visibility = "visible";
+ cumin.makeFullPageable($("slot_visualization"));
slot_zoom_initialized = true;
function set_text(odiv, text, className) {
Modified: mgmt/trunk/cumin/resources/ie.css
===================================================================
--- mgmt/trunk/cumin/resources/ie.css 2009-04-30 15:10:19 UTC (rev 3350)
+++ mgmt/trunk/cumin/resources/ie.css 2009-04-30 15:40:42 UTC (rev 3351)
@@ -9,19 +9,12 @@
border-left: 0;
}
-ul.radiotabs li a {
- background-image: url(resource?name=radio-button.png);
- background-repeat: no-repeat;
- background-position: 0 1px;
- padding-left: 1.4em;
-}
-
-ul.radiotabs li a.selected {
- background-image: url(resource?name=radio-button-checked.png);
-}
-
/* force ie to honor mouse events on empty div */
div#slot_glass {
background-color: white;
filter:alpha(opacity=0);
}
+
+div.loading {
+ filter:alpha(opacity=75);
+}
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-04-30 15:10:19 UTC (rev 3350)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-04-30 15:40:42 UTC (rev 3351)
@@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="resource?name=app.css"/>
<link rel="stylesheet" type="text/css" href="{base_name}.css"/>
<!--[if IE]><link rel="stylesheet" type="text/css" href="resource?name=ie.css"/><![endif]-->
+ <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="resource?name=ielte7.css"/><![endif]-->
<script type="text/javascript" src="resource?name=mootools.js"> </script>
<script type="text/javascript" src="resource?name=wooly.js"> </script>
15 years, 7 months
rhmessaging commits: r3350 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-30 11:10:19 -0400 (Thu, 30 Apr 2009)
New Revision: 3350
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Move fullpageable script to cumin.
Don't make hidden widgets fullpagable.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-04-30 13:53:19 UTC (rev 3349)
+++ mgmt/trunk/cumin/resources/app.js 2009-04-30 15:10:19 UTC (rev 3350)
@@ -95,6 +95,46 @@
}
}
+ this.makeFullPageable = function (element) {
+ if (element.getElement(".fullpageTitle"))
+ return; // already fullpaged
+
+ element.removeClass('fullpageable');
+ var outer = new Element('div', {'class': 'fullpageable'});
+ var titleBack = new Element('div', {'class': 'fullpageTitle'});
+ var titleBar = new Element('div', {'class': 'fullpageTitleBar',
+ 'events': {'dblclick': function () {fullpage(this);}}});
+ var icon = new Element('p', {'class': 'fullpageIcon',
+ 'title': 'Full Page',
+ 'events': {'click': function () {fullpage(this);}}});
+ var container = new Element('div', {'class': 'widgetContainer'});
+
+ outer.appendChild(titleBack);
+ outer.appendChild(titleBar);
+ outer.appendChild(icon);
+ outer.appendChild(container);
+
+ var parent = element.parentNode;
+ outer.originalParent = parent;
+ container.appendChild(element);
+
+ parent.appendChild(outer);
+
+ var widgets = element.getElements('.fullpage_notify');
+ outer.widgetPaths = [];
+ widgets.each(function (widget) {
+ if (widget.get("id")) {
+ outer.widgetPaths.push(widget.get("id"));
+ }
+ });
+
+ if (element.onfullpage) {
+ outer.onfullpage = element.onfullpage;
+ }
+ if (element.onrestore) {
+ outer.onrestore = element.onrestore;
+ }
+ }
}
}())
@@ -105,41 +145,9 @@
for (var i=0; i<elements.length; i++) {
var element = elements[i];
- element.removeClass('fullpageable');
- var outer = new Element('div', {'class': 'fullpageable'});
- var titleBack = new Element('div', {'class': 'fullpageTitle'});
- var titleBar = new Element('div', {'class': 'fullpageTitleBar',
- 'events': {'dblclick': function () {fullpage(this);}}});
- var icon = new Element('p', {'class': 'fullpageIcon',
- 'title': 'Full Page',
- 'events': {'click': function () {fullpage(this);}}});
- var container = new Element('div', {'class': 'widgetContainer'});
-
- outer.appendChild(titleBack);
- outer.appendChild(titleBar);
- outer.appendChild(icon);
- outer.appendChild(container);
-
- var parent = element.parentNode;
- outer.originalParent = parent;
- container.appendChild(element);
-
- parent.appendChild(outer);
-
- var widgets = element.getElements('.fullpage_notify');
- outer.widgetPaths = [];
- widgets.each(function (widget) {
- if (widget.get("id")) {
- outer.widgetPaths.push(widget.get("id"));
- }
- });
-
- if (element.onfullpage) {
- outer.onfullpage = element.onfullpage;
+ if (element.getStyle("visibility") == "visible") {
+ cumin.makeFullPageable(element);
}
- if (element.onrestore) {
- outer.onrestore = element.onrestore;
- }
}
});
15 years, 7 months
rhmessaging commits: r3349 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-30 09:53:19 -0400 (Thu, 30 Apr 2009)
New Revision: 3349
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
Fix javascript bug when making widget full page that was causing the browser to hang.
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-29 19:59:11 UTC (rev 3348)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-30 13:53:19 UTC (rev 3349)
@@ -360,6 +360,8 @@
function get_max_zoom() {
// allow to zoom until each slot is at least 28px wide
+ if ((slot_map_info.size == 0) || (slot_zoom == 0))
+ return 1;
return Math.ceil(28 / (slot_map_info.size / slot_zoom));
}
15 years, 7 months
rhmessaging commits: r3348 - in store/trunk/cpp: tests and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-04-29 15:59:11 -0400 (Wed, 29 Apr 2009)
New Revision: 3348
Removed:
store/trunk/cpp/tests/cluster/
Modified:
store/trunk/cpp/configure.ac
store/trunk/cpp/tests/Makefile.am
Log:
Rolling back recent cluster tests until build difficulties can be resolved for rpm-based tests
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2009-04-29 18:52:33 UTC (rev 3347)
+++ store/trunk/cpp/configure.ac 2009-04-29 19:59:11 UTC (rev 3348)
@@ -87,8 +87,8 @@
AC_MSG_ERROR([$QPID_DIR does not appear to be a valid qpid checkout.])
test -d $QPID_DIR/python -a -d $QPID_DIR/specs || \
AC_MSG_ERROR([$QPID_DIR does not have python and specs directories.])
- QPID_LIBS="$QPID_SRC/libqpidbroker.la $QPID_SRC/libqpidclient.la $QPID_SRC/libqpidcommon.la"
- QPID_CXXFLAGS="-I$QPID_SRC -I${QPID_SRC}/gen -I${QPID_SRC}/tests"
+ QPID_LIBS="$QPID_SRC/libqpidbroker.la $QPID_SRC/libqpidcommon.la"
+ QPID_CXXFLAGS="-I$QPID_SRC -I${QPID_SRC}/gen"
else
fail=0
AC_CHECK_HEADERS([qpid/broker/MessageStore.h], , [fail=1])
@@ -179,56 +179,12 @@
AC_CHECK_PROG([RPMLINT], [rpmlint], [rpmlint])
AM_CONDITIONAL([HAS_RPMLINT], [test -n "$RPMLINT"])
-# Check for optional cluster requirements.
-tmp_LIBS=$LIBS
-LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync"
-AC_CHECK_LIB([cpg],[cpg_local_get],[have_libcpg=yes],)
-AC_CHECK_HEADERS([openais/cpg.h corosync/cpg.h],[have_cpg_h=yes],)
-AC_ARG_WITH([cpg],
- [AS_HELP_STRING([--with-cpg], [Build with CPG support for clustering.])],
- [case "${withval}" in
- yes) # yes - require dependencies
- test x$have_libcpg = xyes || AC_MSG_ERROR([libcpg not found, install openais-devel or corosync-devel])
- test x$have_cpg_h = xyes || AC_MSG_ERROR([cpg.h not found, install openais-devel or corosync-devel])
- with_cpg=yes
- ;;
- no) with_cpg=no ;;
- *) AC_MSG_ERROR([Bad value ${withval} for --with-cpg option]) ;;
- esac],
- [ # not specified - use if present
- test x$have_libcpg = xyes -a x$have_cpg_h = xyes && with_cpg=yes
- ]
-)
-AM_CONDITIONAL([HAVE_LIBCPG], [test x$with_cpg = xyes])
-
-AC_CHECK_LIB([cman],[cman_is_quorate],have_libcman=yes,)
-AC_CHECK_HEADERS([libcman.h],have_libcman_h=yes,)
-AC_ARG_WITH([libcman],
- [AS_HELP_STRING([--with-libcman], [Integration with libcman quorum service.])],
- [case "${withval}" in
- yes) # yes - require dependencies
- test x$have_libcman = xyes || AC_MSG_ERROR([libcman not found, install cman-devel or cmanlib-devel])
- test x$have_libcman_h = xyes || AC_MSG_ERROR([libcman.h not found, install cman-devel or cmanlib-devel])
- with_libcman=yes
- ;;
- no) with_libcman=no ;;
- *) AC_MSG_ERROR([Bad value ${withval} for --with-libcman option]) ;;
- esac],
- [ # not specified - use if present and we're using with_cpg
- test x$have_libcman = xyes -a x$have_libcman_h = xyes -a x$with_cpg = xyes && with_libcman=yes
- ]
-)
-AM_CONDITIONAL([HAVE_LIBCMAN], [test x$with_libcman = xyes])
-
-LIBS=$tmp_LIBS
-
# Also doxygen for documentation...
AC_CHECK_PROG([do_doxygen], [doxygen], [yes])
AM_CONDITIONAL([DOXYGEN], [test x$do_doxygen = xyes])
AC_CONFIG_FILES([
Makefile
- tests/cluster/Makefile
tests/Makefile
tests/jrnl/Makefile
tests/jrnl/jtt/Makefile
Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am 2009-04-29 18:52:33 UTC (rev 3347)
+++ store/trunk/cpp/tests/Makefile.am 2009-04-29 19:59:11 UTC (rev 3348)
@@ -28,7 +28,7 @@
TMPDIR=$(abs_srcdir)/test_tmp
-SUBDIRS = jrnl cluster .
+SUBDIRS = jrnl .
TESTS = \
SimpleTest \
15 years, 7 months
rhmessaging commits: r3347 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-29 14:52:33 -0400 (Wed, 29 Apr 2009)
New Revision: 3347
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Changed Collector title to prevent wrapping.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-04-29 18:49:35 UTC (rev 3346)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-04-29 18:52:33 UTC (rev 3347)
@@ -1990,7 +1990,7 @@
super(CuminPool, self).__init__(model, "pool", Pool)
prop = CuminProperty(self, "id")
- prop.title = "Collector ID"
+ prop.title = "Collector"
prop.summary = True
stat = self.PercentStat(self, "running")
15 years, 7 months
rhmessaging commits: r3346 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-29 14:49:35 -0400 (Wed, 29 Apr 2009)
New Revision: 3346
Modified:
mgmt/trunk/cumin/python/cumin/grid/slot.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Added some columns to SlotSet.
Added Slot tab to Pool view.
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2009-04-29 18:48:43 UTC (rev 3345)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2009-04-29 18:49:35 UTC (rev 3346)
@@ -32,6 +32,18 @@
col = self.NameColumn(app, "name")
self.add_column(col)
+ col = self.ActivityColumn(app, "activity")
+ self.add_column(col)
+
+ col = self.StateColumn(app, "state")
+ self.add_column(col)
+
+ col = self.LoadAvgColumn(app, "load_avg")
+ self.add_column(col)
+
+ col = self.JobColumn(app, "jid")
+ self.add_column(col)
+
class NameColumn(SqlTableColumn):
def render_title(self, session, data):
return "Name"
@@ -41,6 +53,35 @@
href = self.frame.slot.get_href(session, slot)
return fmt_link(href, data["name"])
+ class ActivityColumn(SqlTableColumn):
+ def render_title(self, session, data):
+ return "Activity"
+
+ class StateColumn(SqlTableColumn):
+ def render_title(self, session, data):
+ return "State"
+
+ class StateColumn(SqlTableColumn):
+ def render_title(self, session, data):
+ return "State"
+
+ class LoadAvgColumn(SqlTableColumn):
+ def render_title(self, session, data):
+ return "Load"
+
+ def render_value(self, session, value):
+ return "%2.02f" % value
+
+ class JobColumn(SqlTableColumn):
+ def render_title(self, session, data):
+ return "Current Job"
+
+ def render_content(self, session, data):
+ if data["jid"]:
+ job = Identifiable(data["jid"])
+ href = self.page.main.grid.job.get_href(session, job)
+ return fmt_link(href, data["job_id"])
+
def render_items(self, session, *args):
""" overridden because a slotset query is expensive.
the rows are cached """
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2009-04-29 18:48:43 UTC (rev 3345)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2009-04-29 18:49:35 UTC (rev 3346)
@@ -7,7 +7,8 @@
s.job_id,
j.id as jid,
c.activity,
- c.state
+ c.state,
+ c.load_avg
from slot as s
left outer join slot_stats as c on c.id = s.stats_curr_id
left outer join job as j on j.custom_id = s.job_id
15 years, 7 months
rhmessaging commits: r3345 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-29 14:48:43 -0400 (Wed, 29 Apr 2009)
New Revision: 3345
Modified:
mgmt/trunk/cumin/python/cumin/grid/pool.py
Log:
Added Slot mode to PoolFrame
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-29 16:36:15 UTC (rev 3344)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-29 18:48:43 UTC (rev 3345)
@@ -190,6 +190,9 @@
self.colls = PoolCollectorSet(app, "colls")
self.__tabs.add_tab(self.colls)
+ self.slots = PoolSlotSet(app, "slots")
+ self.__tabs.add_tab(self.slots)
+
self.negs = PoolNegotiatorSet(app, "negs")
self.__tabs.add_tab(self.negs)
15 years, 7 months
rhmessaging commits: r3344 - in mgmt/trunk/cumin/python/cumin: grid and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-29 12:36:15 -0400 (Wed, 29 Apr 2009)
New Revision: 3344
Modified:
mgmt/trunk/cumin/python/cumin/grid/pool.py
mgmt/trunk/cumin/python/cumin/grid/slot.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
mgmt/trunk/cumin/python/cumin/inventory/system.py
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/parameters.py
Log:
Adding Slot view page
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-04-29 16:36:15 UTC (rev 3344)
@@ -17,7 +17,7 @@
from collector import CollectorSet, CollectorFrame, CollectorStart, CollectorStop
from negotiator import NegotiatorSet, NegotiatorFrame, NegStart, NegStop
from limit import LimitsSet, LimitsFrame
-from slot import SlotSet, SlotStatSet
+from slot import SlotSet, SlotStatSet, SlotFrame
strings = StringCatalog(__file__)
@@ -89,6 +89,9 @@
self.submitter = SubmitterFrame(app, "sub")
self.add_mode(self.submitter)
+ self.slot = SlotFrame(app, "slot")
+ self.add_mode(self.slot)
+
self.collector = CollectorFrame(app, "coll")
self.add_mode(self.collector)
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2009-04-29 16:36:15 UTC (rev 3344)
@@ -6,6 +6,7 @@
from wooly.resources import *
from wooly.tables import *
+from cumin.stat import *
from cumin.widgets import *
strings = StringCatalog(__file__)
@@ -28,13 +29,18 @@
def __init__(self, app, name):
super(SlotSet, self).__init__(app, name)
- col = self.Name(app, "name")
+ col = self.NameColumn(app, "name")
self.add_column(col)
- class Name(SqlTableColumn):
+ class NameColumn(SqlTableColumn):
def render_title(self, session, data):
return "Name"
+ def render_content(self, session, data):
+ slot = Identifiable(data["id"])
+ href = self.frame.slot.get_href(session, slot)
+ return fmt_link(href, data["name"])
+
def render_items(self, session, *args):
""" overridden because a slotset query is expensive.
the rows are cached """
@@ -49,3 +55,56 @@
class SlotStatSet(UniqueSlot):
pass
+
+class SlotFrame(CuminFrame):
+ def __init__(self, app, name):
+ super(SlotFrame, self).__init__(app, name)
+
+ self.object = SlotParameter(app, "id")
+ self.add_parameter(self.object)
+
+ self.view = SlotView(app, "view")
+ self.add_mode(self.view)
+
+class SlotView(CuminView):
+ def __init__(self, app, name):
+ super(SlotView, self).__init__(app, name)
+
+ status = self.SlotStatus(app, "status")
+ self.add_child(status)
+
+ self.__tabs = TabbedModeSet(app, "tabs")
+ self.add_child(self.__tabs)
+
+ stats = SlotStats(app, "stats")
+ self.__tabs.add_tab(stats)
+
+ details = CuminDetails(app, "details")
+ self.__tabs.add_tab(details)
+
+ class SlotStatus(CuminStatus):
+ def render_title(self, session, *args):
+ return "Slot Status"
+
+class SlotStats(Widget):
+ def __init__(self, app, name):
+ super(SlotStats, self).__init__(app, name)
+
+ stats = StatSet(app, "general", "load")
+ self.add_child(stats)
+
+ chart = self.LoadChart(app, "chart")
+ chart.duration.param.default = "3600"
+ self.add_child(chart)
+
+ def render_title(self, session):
+ return "Statistics"
+
+ class LoadChart(StatValueChart):
+ def __init__(self, app, name):
+ super(SlotStats.LoadChart, self).__init__(app, name)
+
+ self.stats = ("LoadAvg", "CondorLoadAvg")
+
+ def render_title(self, session, sched):
+ return "Load"
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2009-04-29 16:36:15 UTC (rev 3344)
@@ -21,16 +21,32 @@
[SlotStatSet.sql]
select
- sum(case activity when 'Idle' then 1 else 0 end) as idl,
+ sum(case when (activity = 'Idle') and (state = 'Unclaimed') then 1 else 0 end) as available,
sum(1) as all
from (select
s.name,
s.pool,
s.qmf_update_time,
- c.activity
+ c.activity,
+ c.state
from slot as s
left outer join slot_stats as c on c.id = s.stats_curr_id) as s
{sql_where}
[SlotStatSet.count_sql]
1
+
+[SlotStats.html]
+<table class="twocol">
+ <tbody>
+ <tr>
+ <td>
+ <h2>General</h2>
+ {general}
+ </td>
+ <td>
+ {chart}
+ </td>
+ </tr>
+ </tbody>
+</table>
Modified: mgmt/trunk/cumin/python/cumin/inventory/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/inventory/system.py 2009-04-29 16:36:15 UTC (rev 3344)
@@ -6,6 +6,7 @@
from cumin.parameters import *
from cumin.formats import *
from cumin.util import *
+from cumin.grid.slot import SlotFrame
strings = StringCatalog(__file__)
@@ -117,6 +118,9 @@
self.view = SystemView(app, "view")
self.add_mode(self.view)
+ self.slot = SlotFrame(app, "slot")
+ self.add_mode(self.slot)
+
class SystemStatus(CuminStatus):
def render_mem_free(self, session, system):
return self.app.model.system.memFree.value_html(system)
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-04-29 16:36:15 UTC (rev 3344)
@@ -355,6 +355,7 @@
self.title = None
self.category = "general"
self.summary = False
+ self.format = None
self.link_cb = None
self.highlow = False
@@ -407,6 +408,8 @@
if value is None:
text = ""
+ elif self.format:
+ text = self.format % value
elif type(value) in (int, long):
if value == 0:
text = "0"
@@ -656,18 +659,52 @@
prop = CuminProperty(self, "JobId")
prop.title = "Current Job Id"
+ prop = CuminProperty(self, "AccountingGroup")
+ prop.title = "Accounting Group"
+
+ prop = CuminProperty(self, "Arch")
+ prop.title = "Architecture"
+
+ prop = CuminProperty(self, "OpSys")
+ prop.title = "Operating System"
+
+ prop = CuminProperty(self, "ConcurrencyLimits")
+ prop.title = "Concurrency Limits"
+
+ prop = CuminProperty(self, "Cpus")
+ prop.title = "CPUs"
+
+ prop = CuminProperty(self, "Disk")
+ prop.title = "Disk"
+
+ prop = CuminProperty(self, "Memory")
+ prop.title = "Memory"
+
+ prop = CuminProperty(self, "Mips")
+ prop.title = "MIPS"
+
+ prop = CuminProperty(self, "JobStart")
+ prop.title = "JobStart"
+
stat = CuminStat(self, "Activity")
stat.title = "Activity"
- stat.category = "general"
stat = CuminStat(self, "CondorLoadAvg")
stat.title = "Condor Load Avg"
- stat.category = "general"
+ stat.format = "%2.02f"
+ stat.category = "load"
stat = CuminStat(self, "LoadAvg")
stat.title = "Load Avg"
- stat.category = "general"
+ stat.format = "%2.02f"
+ stat.category = "load"
+ def get_title(self, session):
+ return "Slot"
+
+ def get_object_name(self, slot):
+ return slot.Name
+
class Visualization(CuminAction):
def __init__(self, cls, name):
super(Visualization, self).__init__(cls, name)
Modified: mgmt/trunk/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/parameters.py 2009-04-29 14:24:38 UTC (rev 3343)
+++ mgmt/trunk/cumin/python/cumin/parameters.py 2009-04-29 16:36:15 UTC (rev 3344)
@@ -142,6 +142,13 @@
def do_marshal(self, session):
return str(session.id)
+class SlotParameter(Parameter):
+ def do_unmarshal(self, string):
+ return Slot.get(int(string))
+
+ def do_marshal(self, slot):
+ return str(slot.id)
+
class SubmitterParameter(Parameter):
def do_unmarshal(self, string):
return Submitter.get(int(string))
15 years, 8 months