rhmessaging commits: r3824 - mgmt/trunk/cumin/python/cumin/usergrid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-27 10:52:45 -0500 (Wed, 27 Jan 2010)
New Revision: 3824
Modified:
mgmt/trunk/cumin/python/cumin/usergrid/model.strings
Log:
Change SQL to reflect 'activity' moving from stats to slot table.
Modified: mgmt/trunk/cumin/python/cumin/usergrid/model.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/usergrid/model.strings 2010-01-27 15:13:55 UTC (rev 3823)
+++ mgmt/trunk/cumin/python/cumin/usergrid/model.strings 2010-01-27 15:52:45 UTC (rev 3824)
@@ -15,9 +15,8 @@
[LoadUserSlotStats.sql]
select
count(*) as total,
- count(case c.activity when 'Busy' then 1 end) as busy,
- count(case c.activity when 'Idle' then 1 end) as idle,
- count(case c.activity when 'Suspended' then 1 end) as suspended
+ count(case s.activity when 'Busy' then 1 end) as busy,
+ count(case s.activity when 'Idle' then 1 end) as idle,
+ count(case s.activity when 'Suspended' then 1 end) as suspended
from slot as s
-left outer join slot_stats as c on c.id = s.stats_curr_id
where s.remote_owner like '{user_name}@%'
15 years, 1 month
rhmessaging commits: r3823 - in mgmt/trunk/parsley: bin and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-01-27 10:13:55 -0500 (Wed, 27 Jan 2010)
New Revision: 3823
Added:
mgmt/trunk/parsley/bin/
mgmt/trunk/parsley/bin/parsley-test
Log:
Add a test for parsley's collectionsex module
Added: mgmt/trunk/parsley/bin/parsley-test
===================================================================
--- mgmt/trunk/parsley/bin/parsley-test (rev 0)
+++ mgmt/trunk/parsley/bin/parsley-test 2010-01-27 15:13:55 UTC (rev 3823)
@@ -0,0 +1,6 @@
+#!/usr/bin/python
+
+from parsley.collectionsex import *
+
+x = defaultdict(list)
+x["a"].append(1)
Property changes on: mgmt/trunk/parsley/bin/parsley-test
___________________________________________________________________
Name: svn:executable
+ *
15 years, 1 month
rhmessaging commits: r3822 - mgmt/trunk/parsley/python/parsley.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-01-27 10:13:06 -0500 (Wed, 27 Jan 2010)
New Revision: 3822
Modified:
mgmt/trunk/parsley/python/parsley/collectionsex.py
Log:
Use the right kind of super call
Modified: mgmt/trunk/parsley/python/parsley/collectionsex.py
===================================================================
--- mgmt/trunk/parsley/python/parsley/collectionsex.py 2010-01-26 21:40:21 UTC (rev 3821)
+++ mgmt/trunk/parsley/python/parsley/collectionsex.py 2010-01-27 15:13:06 UTC (rev 3822)
@@ -9,7 +9,7 @@
def __getitem__(self, key):
try:
- super(dict, self).__getitem__(key)
+ dict.__getitem__(self, key)
except KeyError:
if self.default_factory is None:
raise
15 years, 1 month
rhmessaging commits: r3821 - mgmt/trunk/sesame/cpp/src.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2010-01-26 16:40:21 -0500 (Tue, 26 Jan 2010)
New Revision: 3821
Modified:
mgmt/trunk/sesame/cpp/src/SysAgent.cpp
Log:
Removed unused local, added missing return statement in 'main'.
Modified: mgmt/trunk/sesame/cpp/src/SysAgent.cpp
===================================================================
--- mgmt/trunk/sesame/cpp/src/SysAgent.cpp 2010-01-26 18:57:53 UTC (rev 3820)
+++ mgmt/trunk/sesame/cpp/src/SysAgent.cpp 2010-01-26 21:40:21 UTC (rev 3821)
@@ -320,8 +320,6 @@
{
qpid::log::Logger& logger = qpid::log::Logger::instance();
qpid::log::Options logOptions(argv[0], "sesame");
- qpid::log::SinkOptions* sinkOptions =
- static_cast<qpid::log::SinkOptions*>(logOptions.sinkOptions.get());
singleton = new ManagementAgent::Singleton();
signal(SIGINT, shutdown);
@@ -382,6 +380,7 @@
// Allocate core object
SysAgent core(agent, options["state-dir"].value + "/uuid");
core.run();
+ return 0;
}
int main(int argc, char** argv)
15 years, 1 month
rhmessaging commits: r3820 - mgmt/trunk/sesame/cpp/src.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2010-01-26 13:57:53 -0500 (Tue, 26 Jan 2010)
New Revision: 3820
Modified:
mgmt/trunk/sesame/cpp/src/SysAgent.cpp
Log:
Remove include to non-distributed header file.
Modified: mgmt/trunk/sesame/cpp/src/SysAgent.cpp
===================================================================
--- mgmt/trunk/sesame/cpp/src/SysAgent.cpp 2010-01-26 16:09:26 UTC (rev 3819)
+++ mgmt/trunk/sesame/cpp/src/SysAgent.cpp 2010-01-26 18:57:53 UTC (rev 3820)
@@ -4,7 +4,7 @@
#include <qpid/agent/ManagementAgent.h>
#include <qpid/sys/Mutex.h>
#include "qpid/log/Logger.h"
-#include "qpid/log/posix/SinkOptions.h"
+#include "qpid/log/SinkOptions.h"
#include "qpid/sys/SystemInfo.h"
#include "qpid/framing/Uuid.h"
#include "qmf/com/redhat/sesame/Package.h"
@@ -320,8 +320,8 @@
{
qpid::log::Logger& logger = qpid::log::Logger::instance();
qpid::log::Options logOptions(argv[0], "sesame");
- qpid::log::posix::SinkOptions* sinkOptions =
- static_cast<qpid::log::posix::SinkOptions*>(logOptions.sinkOptions.get());
+ qpid::log::SinkOptions* sinkOptions =
+ static_cast<qpid::log::SinkOptions*>(logOptions.sinkOptions.get());
singleton = new ManagementAgent::Singleton();
signal(SIGINT, shutdown);
@@ -348,7 +348,6 @@
logOptions.selectors.clear();
logOptions.selectors.push_back(options["log-enable"].value);
logOptions.time = false;
- sinkOptions->logToSyslog = true;
logger.configure(logOptions);
// Create the qmf management agent
15 years, 1 month
rhmessaging commits: r3819 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-26 11:09:26 -0500 (Tue, 26 Jan 2010)
New Revision: 3819
Modified:
mgmt/trunk/cumin/python/cumin/grid/slot.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Change the flash slot vis to show the slot page when a slot is clicked.
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-26 16:08:35 UTC (rev 3818)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-26 16:09:26 UTC (rev 3819)
@@ -280,6 +280,7 @@
el.value = records[i]["name"] and records[i]["name"] or ""
el.load_avg = records[i]["load_avg"] and round(records[i]["load_avg"], 2) or 0
el.name = "slot"
+ el.slot_id = records[i]["id"]
level_list.append(el)
return level_list
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-26 16:08:35 UTC (rev 3818)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-26 16:09:26 UTC (rev 3819)
@@ -760,11 +760,6 @@
vis.fire_slot_info(click_info.index);
}
}
- function go_to_slot(id) {
- var branch = wooly.session.branch(show_slot_url);
- branch[branch.frame + ".id"] = id;
- window.location.href = branch.marshal();
- }
}
}
@@ -777,7 +772,7 @@
return false;
}
- function doDoubleClick(e) {
+ function doDoubleClick(e) {
var now = new Date();
clicks.doubleclick_when = now.getTime();
if (clicks.click_handle != null) {
@@ -787,9 +782,18 @@
if (!e) var e = window.event;
var posxy = get_relative_event_pos(e);
vis.zoom_in_slots(posxy);
- }
+ }
}())
+function go_to_slot(id) {
+ var branch = wooly.session.branch(show_slot_url);
+ branch[branch.frame + ".id"] = id;
+ window.location.href = branch.marshal();
+}
+function vis_clicked(slot) {
+ go_to_slot(slot);
+}
+
/* generic get value from cookie */
function get_cookie(name) {
return get_value(document.cookie, name, ";");
@@ -1091,6 +1095,7 @@
{slot_info}
<script type="text/javascript">
//<![CDATA[
+ var show_slot_url = "{slot_url}";
var flashversion = swfobject.getFlashPlayerVersion();
if (flashversion.major < 9) {
var psm = document.getElementById('pngSlotMap');
@@ -1101,7 +1106,6 @@
theImage.src = "{image_href}";
}
var slot_current_id = "{id}";
- var show_slot_url = "{slot_url}";
var slot_job_index = "{job_index_param}";
var slot_map_info = {size: 0, width: 0, height: 0, count: 0, rows: 0, cols: 0};
var slot_clip_size = {slot_clip_size};
15 years, 1 month
rhmessaging commits: r3818 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-26 11:08:35 -0500 (Tue, 26 Jan 2010)
New Revision: 3818
Modified:
mgmt/trunk/cumin/resources/slots.swf
Log:
Handle click event on slot and call javascript function with slot id.
Modified: mgmt/trunk/cumin/resources/slots.swf
===================================================================
(Binary files differ)
15 years, 1 month
rhmessaging commits: r3817 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-25 14:06:04 -0500 (Mon, 25 Jan 2010)
New Revision: 3817
Modified:
mgmt/trunk/cumin/python/cumin/grid/slot.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Change the png slot vis to show the slot page when a slot is clicked.
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-25 15:15:05 UTC (rev 3816)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-25 19:06:04 UTC (rev 3817)
@@ -340,12 +340,10 @@
def get_scheduler_select(self, session):
raise Exception("Must implement get_scheduler_select")
- def render_slot_job_url(self, session):
- job = Identifiable("XXX")
- select = self.get_scheduler_select(session)
+ def render_slot_url(self, session):
+ slot = Identifiable("XXX")
try:
- scheduler = Scheduler.select(select)[0]
- return self.page.main.grid.pool.job.get_href(session, job, scheduler)
+ return self.page.main.grid.pool.slot.get_href(session, slot)
except:
pass
@@ -375,10 +373,13 @@
return state
class SlotInfo(ItemSet):
- display_names = {"job_id": "Job ID",
- "system": "System", "machine": "Machine",
- "state": "State", "activity": "Activity",
- "name": "Name"}
+ display_names = {"job_id": ("Job ID", "", ""),
+ "system": ("System", "", ""),
+ "machine": ("Machine", "", ""),
+ "state": ("State", "", ""),
+ "activity": ("Activity", "", ""),
+ "name": ("Name", "", ""),
+ "id": ("Slot_ID", "slotInfo_id", "hidden_row")}
def __init__(self, app, name):
super(SlotMap.SlotInfo, self).__init__(app, name)
@@ -427,17 +428,17 @@
def render_slot_info_index(self, session):
return self.index.path
- def render_item_title(self, session, item):
- return item[0]
-
def render_item_value(self, session, item):
return item[1]
- def render_item_job_id(self, session, item):
- return item[0] == "Job ID" and "id='job_id'" or ""
+ def render_item_title(self, session, item):
+ return item[0][0]
+ def render_item_id(self, session, item):
+ return item[0][1] and "id='%s'" % item[0][1] or ""
+
def render_item_row_class(self, session, item):
- return ""
+ return item[0][2] and "class='%s'" % item[0][2] or ""
class SlotActivities(ItemSet):
activities = (("Idle", "clear"),
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-25 15:15:05 UTC (rev 3816)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-01-25 19:06:04 UTC (rev 3817)
@@ -2,6 +2,7 @@
select
s.id,
s.name,
+ s.pool,
s.machine,
s.system,
s.job_id,
@@ -638,19 +639,28 @@
function got_slot_info(xhtml, args) {
if (slot_last_index == -1) return;
var oInfo = $(slot_info_id);
- var for_jid = null;
+ var slot_clicked = null;
if (oInfo) {
oInfo.style.display = "none";
+ if (oInfo.slot_clicked) {
+ slot_clicked = oInfo.slot_clicked;
+ oInfo.slot_clicked = null;
+ }
}
wooly.updatePage(xhtml);
var oInfo = $(slot_info_id);
if (oInfo) {
oInfo.click_index = args.index;
+ oInfo.slot_clicked = null;
+ if (slot_clicked) {
+ clicks.doClick(slot_clicked.x, slot_clicked.y);
+ return;
+ }
document.body.appendChild(oInfo); // so position is absolute to entire page
- oInfo.style.left = "-1000px";
- oInfo.style.visibility = "hidden";
+ //oInfo.style.left = "-1000px";
+ //oInfo.style.visibility = "hidden";
oInfo.style.display = "block";
var oMap = document.getElementById(slot_current_id);
@@ -733,10 +743,28 @@
var click_info = vis.get_index(x, y);
var oInfo = $(slot_info_id);
if (oInfo && click_info) {
- // fetch the slot info so we can get the job id
- oInfo.for_jid = {fetching: true, x: x, y: y};
- vis.fire_slot_info(click_info.index);
+ if ((typeof oInfo.click_index != "undefined") &&
+ (oInfo.click_index == click_info.index)) {
+ // we already fetched the info for this slot
+ var oInfoCellId = document.getElementById("slotInfo_id");
+ if (oInfoCellId) {
+ var slotid = oInfoCellId.innerHTML;
+ if (slotid != "") {
+ go_to_slot(slotid);
+ return false;
+ }
+ }
+ } else {
+ // fetch the slot info so we can get the slot id
+ oInfo.slot_clicked = {fetching: true, x: x, y: y};
+ vis.fire_slot_info(click_info.index);
+ }
}
+ function go_to_slot(id) {
+ var branch = wooly.session.branch(show_slot_url);
+ branch[branch.frame + ".id"] = id;
+ window.location.href = branch.marshal();
+ }
}
}
@@ -1073,7 +1101,7 @@
theImage.src = "{image_href}";
}
var slot_current_id = "{id}";
- var show_slot_job_url = "{slot_job_url}";
+ var show_slot_url = "{slot_url}";
var slot_job_index = "{job_index_param}";
var slot_map_info = {size: 0, width: 0, height: 0, count: 0, rows: 0, cols: 0};
var slot_clip_size = {slot_clip_size};
@@ -1173,7 +1201,7 @@
[SlotInfo.item_html]
<tr {item_row_class}>
<td class="slot_info_title">{item_title}</td>
- <td {item_job_id} class="slot_info_value">{item_value}</td>
+ <td {item_id} class="slot_info_value">{item_value}</td>
</tr>
[SlotLegend.css]
15 years, 1 month
rhmessaging commits: r3816 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-25 10:15:05 -0500 (Mon, 25 Jan 2010)
New Revision: 3816
Modified:
mgmt/trunk/cumin/resources/slots.swf
Log:
Change slot vis line size based on size of square.
Modified: mgmt/trunk/cumin/resources/slots.swf
===================================================================
(Binary files differ)
15 years, 1 month
rhmessaging commits: r3815 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-01-22 13:28:13 -0500 (Fri, 22 Jan 2010)
New Revision: 3815
Modified:
mgmt/trunk/cumin/python/cumin/grid/slot.py
Log:
Change sort order for slot vis to Activity+State+Name. This will auto-group slots within a system or accounting group.
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-22 16:19:04 UTC (rev 3814)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py 2010-01-22 18:28:13 UTC (rev 3815)
@@ -270,7 +270,9 @@
# leaf
if level == len(groups):
if leaves:
- for i in sorted(plist, key=lambda x:records[x]["name"]):
+ #for i in sorted(plist, key=lambda x:records[x]["name"]):
+ for i in sorted(plist, key=lambda x:"%s%s%s" %
+ (records[x]["activity"], records[x]["state"], records[x]["name"])):
el = Element()
el.job_id = records[i]["job_id"] and records[i]["job_id"] or ""
el.activity = records[i]["activity"] and records[i]["activity"] or "Unknown"
15 years, 1 month