rhmessaging commits: r3410 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-29 15:14:32 -0400 (Fri, 29 May 2009)
New Revision: 3410
Modified:
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Remove {status} from CuminView
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2009-05-29 19:11:31 UTC (rev 3409)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2009-05-29 19:14:32 UTC (rev 3410)
@@ -154,8 +154,6 @@
}
[CuminView.html]
-{status}
-
<ul class="context">{frames}</ul>
{summary}
15 years, 7 months
rhmessaging commits: r3409 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-29 15:11:31 -0400 (Fri, 29 May 2009)
New Revision: 3409
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.strings
Log:
Order of magnitude increase in efficiency for JobGroupSet.count_sql
Modified: mgmt/trunk/cumin/python/cumin/grid/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-29 15:07:26 UTC (rev 3408)
+++ mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-29 19:11:31 UTC (rev 3409)
@@ -143,15 +143,13 @@
j.custom_group as job_group,
count(*) as jobs
from job as j
-inner join scheduler as s on s.id = j.scheduler_id
{sql_where}
group by j.custom_group
{sql_orderby}
{sql_limit}
[JobGroupSet.count_sql]
-select count(distinct j.custom_group)
-from job as j
+select count(1) from (select count(1) from job as j group by j.custom_group) as s;
{sql_where}
[JobGroupStats.html]
15 years, 7 months
rhmessaging commits: r3408 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-29 11:07:26 -0400 (Fri, 29 May 2009)
New Revision: 3408
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.py
Log:
Don't render the word False for the job phase switch when in group mode
Modified: mgmt/trunk/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-29 14:56:41 UTC (rev 3407)
+++ mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-29 15:07:26 UTC (rev 3408)
@@ -1075,7 +1075,7 @@
return "Jobs %s" % fmt_count(self.jobs_tab.get_full_item_count(session, *args))
def render_phase(self, session, *args):
- return self.mode.get(session) == self.jobs_tab and self.jobs_tab.phase.render(session)
+ return self.mode.get(session) == self.jobs_tab and self.jobs_tab.phase.render(session) or ""
class JobGroupTab(JobGroupSet, Form):
def __init__(self, app, name):
15 years, 7 months
rhmessaging commits: r3407 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-29 10:56:41 -0400 (Fri, 29 May 2009)
New Revision: 3407
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.py
mgmt/trunk/cumin/python/cumin/grid/job.strings
Log:
Change JobsAndGroupsTab to a TabbedModeSet to avoid extraneous sql calls
Modified: mgmt/trunk/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-29 14:48:07 UTC (rev 3406)
+++ mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-29 14:56:41 UTC (rev 3407)
@@ -251,6 +251,9 @@
self.job_search = self.JobSearch(app, "job_search")
self.add_child(self.job_search)
+ def render_title(self, session, *args):
+ return "Jobs"
+
def find_job(self, session):
search_term = self.job_search.get(session)
@@ -279,7 +282,7 @@
#return {"custom_id": self.job_search.get(session), "pool": pool.id}
def get_full_item_count(self, session, *args):
- # request item count will phase=="a"
+ # request item count with phase=="a"
new_args = (args[0], "a")
return self.get_item_count(session, *new_args)
@@ -1036,9 +1039,9 @@
col = self.GroupColumn(app, "job_group")
self.add_column(col)
- col = self.JobsCountColumn(app, "jobs")
- col.alignment = "right"
- self.add_column(col)
+ #col = self.JobsCountColumn(app, "jobs")
+ #col.alignment = "right"
+ #self.add_column(col)
class GroupColumn(SqlTableColumn):
def render_title(self, session, data):
@@ -1057,50 +1060,23 @@
def render_title(self, session, data):
return "Jobs"
-class JobsAndGroupsTab(Widget):
+class JobsAndGroupsTab(TabbedModeSet):
def __init__(self, app, name):
super(JobsAndGroupsTab, self).__init__(app, name)
- self.is_group = GroupSwitch(app, "group")
- self.add_child(self.is_group)
+ self.jobs_tab = JobTab(app, "jobtab")
+ self.add_tab(self.jobs_tab)
+ self.add_tab(JobGroupTab(app, "jobgrouptab"))
- self.job_tab = JobTab(app, "jobtab")
- self.add_child(self.job_tab)
-
- self.job_group_tab = JobGroupTab(app, "jobgrouptab")
- self.add_child(self.job_group_tab)
-
def get_args(self, session):
return self.frame.get_args(session)
def render_title(self, session, *args):
- return "Jobs %s" % fmt_count(self.job_tab.get_full_item_count(session, *args))
+ return "Jobs %s" % fmt_count(self.jobs_tab.get_full_item_count(session, *args))
- def show_status_switch(self, session):
- is_group = self.is_group.get(session)
- return is_group == "j"
-
- def set_switch(self, session, switch):
- if switch == "group":
- self.is_group.set(session, "g")
- else:
- self.is_group.set(session, "j")
-
def render_phase(self, session, *args):
- is_group = self.is_group.get(session)
- if is_group == "j":
- return self.job_tab.phase.render(session)
+ return self.mode.get(session) == self.jobs_tab and self.jobs_tab.phase.render(session)
- def render_jobs(self, session, *args):
- is_group = self.is_group.get(session)
- if is_group == "j":
- return self.job_tab.render(session)
-
- def render_job_groups(self, session, *args):
- is_group = self.is_group.get(session)
- if is_group == "g":
- return self.job_group_tab.render(session)
-
class JobGroupTab(JobGroupSet, Form):
def __init__(self, app, name):
super(JobGroupTab, self).__init__(app, name)
@@ -1116,6 +1092,9 @@
self.set_default_column_name("job_group")
+ def render_title(self, session, *args):
+ return "Job Groups"
+
class Remove(FormButton):
def process_submit(self, session):
ids = self.parent.ids.get(session)
Modified: mgmt/trunk/cumin/python/cumin/grid/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-29 14:48:07 UTC (rev 3406)
+++ mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-29 14:56:41 UTC (rev 3407)
@@ -162,12 +162,10 @@
[JobsAndGroupsTab.html]
- <div class="rfloat">{phase}</div>
-{group}
+<div style="float: right;">{phase}</div>
+<ul class="radiotabs tabs">{tabs}</ul>
+<div class="radiotabs mode">{content}</div>
-{jobs}{job_groups}
-
-
[JobGroupTab.html]
<form id="{id}" method="post" action="?">
<div class="sactions">
15 years, 7 months
rhmessaging commits: r3406 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-29 10:48:07 -0400 (Fri, 29 May 2009)
New Revision: 3406
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
Use style "display" instead of "visibility" to hide slot vis so it doesn't take up space on the page.
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-05-28 21:39:35 UTC (rev 3405)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-05-29 14:48:07 UTC (rev 3406)
@@ -401,7 +401,7 @@
oControls.style.display = "none";
}
}
- $("slot_visualization").style.visibility = "visible";
+ $("slot_visualization").style.display = "block";
cumin.makeFullPageable($("slot_visualization"));
slot_zoom_initialized = true;
@@ -916,7 +916,7 @@
div#slot_visualization {
position: relative;
- visibility: hidden;
+ display: none;
}
div.zoom_node {
15 years, 7 months
rhmessaging commits: r3405 - in mgmt/trunk/mint: sql and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2009-05-28 17:39:35 -0400 (Thu, 28 May 2009)
New Revision: 3405
Modified:
mgmt/trunk/mint/python/mint/model.py
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/python/mint/schemaparser.py
mgmt/trunk/mint/python/mint/sql.py
mgmt/trunk/mint/python/mint/update.py
mgmt/trunk/mint/sql/schema.sql
Log:
handle agent disconnect, marking any transient objects in the database as deleted; add a similar clean-up at mint startup, to mark any left over transient objects as deleted
Modified: mgmt/trunk/mint/python/mint/model.py
===================================================================
--- mgmt/trunk/mint/python/mint/model.py 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/python/mint/model.py 2009-05-28 21:39:35 UTC (rev 3405)
@@ -203,6 +203,11 @@
self.qmfSession = qmf.console.Session \
(self, manageConnections=True, rcvObjects=self.app.updateEnabled)
+ # clean up any transient objects that a previous instance may have left behind in the DB
+ # it's basically an unconstrained agent disconnect update, for any agent
+ up = update.AgentDisconnectUpdate(self, 0)
+ self.app.updateThread.enqueue(up)
+
def start(self):
pass
@@ -316,15 +321,16 @@
def newAgent(self, agent):
""" Invoked when a QMF agent is discovered. """
- pass
+ log.info("Agent connected: ", agent)
def delAgent(self, agent):
""" Invoked when a QMF agent disconects. """
- pass
+ log.info("Agent disconnected: ", agent)
+ up = update.AgentDisconnectUpdate(self, self.getAgentDBId(agent, agent.getBroker().getBrokerId()))
+ self.app.updateThread.enqueue(up)
def objectProps(self, broker, record):
""" Invoked when an object is updated. """
-
if not self.app.updateThread.isAlive():
return
@@ -378,3 +384,6 @@
up = update.MethodUpdate(self, mbroker, seq, response)
self.app.updateThread.enqueue(up)
+
+ def getAgentDBId(self, agent, brokerId):
+ return "%s.%d.%d" % (brokerId, agent.getBrokerBank(), agent.getAgentBank())
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/python/mint/schema.py 2009-05-28 21:39:35 UTC (rev 3405)
@@ -12,12 +12,13 @@
class Slot(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -85,7 +86,6 @@
class SlotStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
slot = ForeignKey('Slot', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -135,12 +135,13 @@
class Job(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -238,7 +239,6 @@
class JobStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
job = ForeignKey('Job', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -249,12 +249,13 @@
class Scheduler(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -277,10 +278,19 @@
DaemonStartTime = TimestampCol(default=None)
+ def Submit(self, model, callback, Ad, Id):
+ actualArgs = list()
+ if Ad is not None:
+ actualArgs.append(Ad)
+ if Id is not None:
+ actualArgs.append(Id)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "Submit",
+ callback, args=actualArgs)
+
class SchedulerStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
scheduler = ForeignKey('Scheduler', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -304,12 +314,13 @@
class Submitter(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -328,7 +339,6 @@
class SubmitterStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
submitter = ForeignKey('Submitter', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -342,12 +352,13 @@
class Negotiator(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -385,6 +396,66 @@
model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "SetLimit",
callback, args=actualArgs)
+ def GetStats(self, model, callback, Name, Ad):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if Ad is not None:
+ actualArgs.append(Ad)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "GetStats",
+ callback, args=actualArgs)
+
+ def SetPriority(self, model, callback, Name, Priority):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if Priority is not None:
+ actualArgs.append(Priority)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "SetPriority",
+ callback, args=actualArgs)
+
+ def SetPriorityFactor(self, model, callback, Name, PriorityFactor):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if PriorityFactor is not None:
+ actualArgs.append(PriorityFactor)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "SetPriorityFactor",
+ callback, args=actualArgs)
+
+ def SetUsage(self, model, callback, Name, Usage):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if Usage is not None:
+ actualArgs.append(Usage)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "SetUsage",
+ callback, args=actualArgs)
+
+ def GetRawConfig(self, model, callback, Name, Value):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if Value is not None:
+ actualArgs.append(Value)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "GetRawConfig",
+ callback, args=actualArgs)
+
+ def SetRawConfig(self, model, callback, Name, Value):
+ actualArgs = list()
+ if Name is not None:
+ actualArgs.append(Name)
+ if Value is not None:
+ actualArgs.append(Value)
+ originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
+ model.callMethod(self.qmfBrokerId, originalId, self.qmfClassKey, "SetRawConfig",
+ callback, args=actualArgs)
+
def Reconfig(self, model, callback):
actualArgs = list()
originalId = ObjectId(None, self.qmfScopeId, self.qmfObjectId)
@@ -394,7 +465,6 @@
class NegotiatorStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
negotiator = ForeignKey('Negotiator', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -412,12 +482,13 @@
class Collector(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -437,7 +508,6 @@
class CollectorStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
collector = ForeignKey('Collector', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -454,12 +524,13 @@
class Master(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -500,7 +571,6 @@
class MasterStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
master = ForeignKey('Master', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -518,12 +588,13 @@
class Grid(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -544,7 +615,6 @@
class GridStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
grid = ForeignKey('Grid', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -562,12 +632,13 @@
class Acl(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -593,7 +664,6 @@
class AclStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
acl = ForeignKey('Acl', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -605,12 +675,13 @@
class Cluster(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -647,7 +718,6 @@
class ClusterStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
cluster = ForeignKey('Cluster', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -658,12 +728,13 @@
class Store(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -688,7 +759,6 @@
class StoreStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
store = ForeignKey('Store', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -708,12 +778,13 @@
class Journal(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -749,7 +820,6 @@
class JournalStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
journal = ForeignKey('Journal', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -789,12 +859,13 @@
class System(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -814,7 +885,6 @@
class SystemStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
system = ForeignKey('System', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -825,12 +895,13 @@
class Broker(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -898,7 +969,6 @@
class BrokerStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
broker = ForeignKey('Broker', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -910,12 +980,13 @@
class Agent(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -935,7 +1006,6 @@
class AgentStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
agent = ForeignKey('Agent', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -946,12 +1016,13 @@
class Vhost(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -968,7 +1039,6 @@
class VhostStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
vhost = ForeignKey('Vhost', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -979,12 +1049,13 @@
class Queue(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1013,7 +1084,6 @@
class QueueStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
queue = ForeignKey('Queue', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1051,12 +1121,13 @@
class Exchange(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1075,7 +1146,6 @@
class ExchangeStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
exchange = ForeignKey('Exchange', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1098,12 +1168,13 @@
class Binding(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1122,7 +1193,6 @@
class BindingStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
binding = ForeignKey('Binding', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1134,12 +1204,13 @@
class ClientConnection(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1168,7 +1239,6 @@
class ClientConnectionStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
clientConnection = ForeignKey('ClientConnection', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1184,12 +1254,13 @@
class Link(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1241,7 +1312,6 @@
class LinkStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
link = ForeignKey('Link', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1254,12 +1324,13 @@
class Bridge(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1291,7 +1362,6 @@
class BridgeStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
bridge = ForeignKey('Bridge', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1302,12 +1372,13 @@
class Session(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1353,7 +1424,6 @@
class SessionStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
session = ForeignKey('Session', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
@@ -1370,12 +1440,13 @@
class Sysimage(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfBrokerId = StringCol(length=1000, default=None)
qmfScopeId = BigIntCol(default=None)
+ qmfAgentId = StringCol(length=1000, default=None)
qmfObjectId = BigIntCol(default=None)
qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)
qmfClassKey = StringCol(length=1000, default=None)
+ qmfPersistent = BoolCol(default=None)
qmfUpdateTime = TimestampCol(default=None)
qmfCreateTime = TimestampCol(default=None)
qmfDeleteTime = TimestampCol(default=None)
@@ -1398,7 +1469,6 @@
class SysimageStats(SQLObject):
class sqlmeta:
lazyUpdate = True
-
qmfUpdateTime = TimestampCol(default=None)
sysimage = ForeignKey('Sysimage', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
Modified: mgmt/trunk/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/trunk/mint/python/mint/schemaparser.py 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/python/mint/schemaparser.py 2009-05-28 21:39:35 UTC (rev 3405)
@@ -98,10 +98,17 @@
def generateLazyUpdate(self, lazyUpdate=True):
self.pythonOutput += " class sqlmeta:\n"
- self.pythonOutput += " lazyUpdate = %s\n\n" % (lazyUpdate)
+ self.pythonOutput += " lazyUpdate = %s\n" % (lazyUpdate)
- def generateQmfIdsIndex(self, className):
+ def generateQmfIdsIndex(self):
+ self.generateAttrib("qmfBrokerId", "StringCol", "length=1000")
+ self.generateAttrib("qmfScopeId", "BigIntCol")
+ self.generateAttrib("qmfAgentId", "StringCol", "length=1000")
+ self.generateAttrib("qmfObjectId", "BigIntCol")
self.pythonOutput += " qmfIdsUnique = DatabaseIndex(qmfBrokerId, qmfScopeId, qmfObjectId, unique=True)\n"
+# self.pythonOutput += " qmfIdsUnique = DatabaseIndex(qmfAgentId, qmfObjectId, unique=True)\n"
+ self.generateAttrib("qmfClassKey", "StringCol", "length=1000")
+ self.generateAttrib("qmfPersistent", "BoolCol")
def generateClassAttribs(self, schemaName, elements):
if (schemaName == "JournalStats"):
@@ -161,11 +168,7 @@
self.generateMultipleJoin(origPythonName, pythonName, "stats")
else:
self.entityClasses.append(str(pythonName))
- self.generateAttrib("qmfBrokerId", "StringCol", "length=1000")
- self.generateAttrib("qmfScopeId", "BigIntCol")
- self.generateAttrib("qmfObjectId", "BigIntCol")
- self.generateQmfIdsIndex(pythonName)
- self.generateAttrib("qmfClassKey", "StringCol", "length=1000")
+ self.generateQmfIdsIndex()
self.generateTimestampAttrib("Update")
self.generateTimestampAttrib("Create")
self.generateTimestampAttrib("Delete")
Modified: mgmt/trunk/mint/python/mint/sql.py
===================================================================
--- mgmt/trunk/mint/python/mint/sql.py 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/python/mint/sql.py 2009-05-28 21:39:35 UTC (rev 3405)
@@ -249,3 +249,26 @@
print
print "Total statement execute time: %9.3f seconds" % executeTime
print "Total commit time: %9.3f seconds" % self.commitTime
+
+
+class SqlAgentDisconnect(SqlOperation):
+ def __init__(self, useAgentId = True):
+ super(SqlAgentDisconnect, self).__init__("disconnect_agent")
+ self.useAgentId = useAgentId
+
+ def generate(self):
+ sql = ""
+ for cls in mint.schema.entityClasses:
+ sql += """
+ update %s
+ set qmf_delete_time = now()
+ where qmf_persistent = 'f'
+ and qmf_delete_time is null""" % (dbStyle.pythonClassToDBTable(cls))
+ if self.useAgentId:
+ sql += """
+ and qmf_agent_id = %(qmf_agent_id)s;
+ """
+ else:
+ sql += """;
+ """
+ return sql
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/python/mint/update.py 2009-05-28 21:39:35 UTC (rev 3405)
@@ -240,7 +240,10 @@
attrs["qmfScopeId"] = oid.first
attrs["qmfObjectId"] = oid.second
attrs["qmfClassKey"] = str(self.object.getClassKey())
- attrs["qmfBrokerId"] = str(self.broker.qmfBroker.getBrokerId())
+ qmfBrokerId = str(self.broker.qmfBroker.getBrokerId())
+ attrs["qmfBrokerId"] = qmfBrokerId
+ attrs["qmfAgentId"] = self.model.getAgentDBId(oid, qmfBrokerId)
+ attrs["qmfPersistent"] = oid.isDurable()
cursor = thread.cursor()
@@ -419,6 +422,21 @@
thread.expireUpdateCount += 1
+
+class AgentDisconnectUpdate(ModelUpdate):
+ def __init__(self, model, agentId):
+ super(AgentDisconnectUpdate, self).__init__(model, None, None)
+ self.agentId = agentId
+
+ def process(self, thread):
+ cursor = thread.cursor()
+ useAgentId = self.agentId != 0
+ op = SqlAgentDisconnect(useAgentId)
+ if useAgentId:
+ op.execute(cursor, {"qmf_agent_id": self.agentId})
+ else:
+ op.execute(cursor)
+
class UpdateQueue(ConcurrentQueue):
def __init__(self, maxsize=0, slotCount=1):
self.slotCount = slotCount
Modified: mgmt/trunk/mint/sql/schema.sql
===================================================================
--- mgmt/trunk/mint/sql/schema.sql 2009-05-28 20:19:48 UTC (rev 3404)
+++ mgmt/trunk/mint/sql/schema.sql 2009-05-28 21:39:35 UTC (rev 3405)
@@ -54,8 +54,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -68,8 +70,8 @@
last_acl_load TIMESTAMP
);
CREATE UNIQUE INDEX acl_qmfIdsUnique ON acl (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX acl_statsCurrIndex ON acl (stats_curr_id);
CREATE INDEX acl_statsPrevIndex ON acl (stats_prev_id);
-CREATE INDEX acl_statsCurrIndex ON acl (stats_curr_id);
CREATE TABLE acl_stats (
id SERIAL PRIMARY KEY,
@@ -82,8 +84,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -97,8 +101,8 @@
agent_bank BIGINT
);
CREATE UNIQUE INDEX agent_qmfIdsUnique ON agent (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX agent_statsCurrIndex ON agent (stats_curr_id);
CREATE INDEX agent_statsPrevIndex ON agent (stats_prev_id);
-CREATE INDEX agent_statsCurrIndex ON agent (stats_curr_id);
CREATE TABLE agent_stats (
id SERIAL PRIMARY KEY,
@@ -110,8 +114,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -124,8 +130,8 @@
origin VARCHAR(1000)
);
CREATE UNIQUE INDEX binding_qmfIdsUnique ON binding (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX binding_statsCurrIndex ON binding (stats_curr_id);
CREATE INDEX binding_statsPrevIndex ON binding (stats_prev_id);
-CREATE INDEX binding_statsCurrIndex ON binding (stats_curr_id);
CREATE TABLE binding_stats (
id SERIAL PRIMARY KEY,
@@ -138,8 +144,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -172,8 +180,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -205,8 +215,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -241,8 +253,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -272,8 +286,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -287,8 +303,8 @@
public_network_ip_addr VARCHAR(1000)
);
CREATE UNIQUE INDEX collector_qmfIdsUnique ON collector (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX collector_statsCurrIndex ON collector (stats_curr_id);
CREATE INDEX collector_statsPrevIndex ON collector (stats_prev_id);
-CREATE INDEX collector_statsCurrIndex ON collector (stats_curr_id);
CREATE TABLE collector_stats (
id SERIAL PRIMARY KEY,
@@ -306,8 +322,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -320,8 +338,8 @@
arguments BYTEA
);
CREATE UNIQUE INDEX exchange_qmfIdsUnique ON exchange (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX exchange_statsCurrIndex ON exchange (stats_curr_id);
CREATE INDEX exchange_statsPrevIndex ON exchange (stats_prev_id);
-CREATE INDEX exchange_statsCurrIndex ON exchange (stats_curr_id);
CREATE TABLE exchange_stats (
id SERIAL PRIMARY KEY,
@@ -345,8 +363,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -361,8 +381,8 @@
grid_resource_unavailable_time TIMESTAMP
);
CREATE UNIQUE INDEX grid_qmfIdsUnique ON grid (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX grid_statsPrevIndex ON grid (stats_prev_id);
CREATE INDEX grid_statsCurrIndex ON grid (stats_curr_id);
-CREATE INDEX grid_statsPrevIndex ON grid (stats_prev_id);
CREATE TABLE grid_stats (
id SERIAL PRIMARY KEY,
@@ -381,8 +401,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -431,8 +453,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -495,8 +519,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -524,8 +550,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -562,8 +590,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -579,8 +609,8 @@
daemon_start_time TIMESTAMP
);
CREATE UNIQUE INDEX negotiator_qmfIdsUnique ON negotiator (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX negotiator_statsCurrIndex ON negotiator (stats_curr_id);
CREATE INDEX negotiator_statsPrevIndex ON negotiator (stats_prev_id);
-CREATE INDEX negotiator_statsCurrIndex ON negotiator (stats_curr_id);
CREATE TABLE negotiator_stats (
id SERIAL PRIMARY KEY,
@@ -603,8 +633,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -658,8 +690,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -703,8 +737,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -739,8 +775,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -852,8 +890,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -894,8 +934,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -908,8 +950,8 @@
schedd_name VARCHAR(1000)
);
CREATE UNIQUE INDEX submitter_qmfIdsUnique ON submitter (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX submitter_statsCurrIndex ON submitter (stats_curr_id);
CREATE INDEX submitter_statsPrevIndex ON submitter (stats_prev_id);
-CREATE INDEX submitter_statsCurrIndex ON submitter (stats_curr_id);
CREATE TABLE submitter_stats (
id SERIAL PRIMARY KEY,
@@ -924,8 +966,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -962,8 +1006,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
@@ -977,8 +1023,8 @@
machine VARCHAR(1000)
);
CREATE UNIQUE INDEX system_qmfIdsUnique ON system (qmf_broker_id, qmf_scope_id, qmf_object_id);
+CREATE INDEX system_statsCurrIndex ON system (stats_curr_id);
CREATE INDEX system_statsPrevIndex ON system (stats_prev_id);
-CREATE INDEX system_statsCurrIndex ON system (stats_curr_id);
CREATE TABLE system_stats (
id SERIAL PRIMARY KEY,
@@ -990,8 +1036,10 @@
id SERIAL PRIMARY KEY,
qmf_broker_id VARCHAR(1000),
qmf_scope_id BIGINT,
+ qmf_agent_id VARCHAR(1000),
qmf_object_id BIGINT,
qmf_class_key VARCHAR(1000),
+ qmf_persistent BOOL,
qmf_update_time TIMESTAMP,
qmf_create_time TIMESTAMP,
qmf_delete_time TIMESTAMP,
15 years, 7 months
rhmessaging commits: r3404 - in mgmt/trunk/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-28 16:19:48 -0400 (Thu, 28 May 2009)
New Revision: 3404
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/resources/app.js
Log:
Remove the loading animation after 1 minute.
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-05-28 20:18:50 UTC (rev 3403)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-05-28 20:19:48 UTC (rev 3404)
@@ -114,6 +114,9 @@
loading.style.visibility = "hidden";
loading.style.display = "block";
var left = (img.getSize().x - loading.getSize().x) / 2;
+ if (left < 0) {
+ left = '25%';
+ }
loading.setStyles({
left: left,
display: 'block',
@@ -121,6 +124,12 @@
});
}
}
+function hideLoading(id) {
+ $(id).getElement(".loading").setStyles({
+ display: 'none',
+ visibility: 'hidden'
+ });
+}
function changeDuration(state, a, id) {
li = a.parentNode;
@@ -136,10 +145,10 @@
branch.duration = state;
src = branch.marshal();
src = cumin.refreshTime(src);
+ oImg.src = src;
- $(oImg).onload = function () {this.className = ""};
+ $(oImg).onerror = $(oImg).onload = function () {this.className = ""};
oImg.className = "Loading";
- oImg.src = src;
var hash = wooly.session.hash();
hash[id] = state;
@@ -148,6 +157,7 @@
var loading = $(id).getElement(".loading");
loading.loading = true;
setTimeout("showLoading('"+id+"')", 1000);
+ setTimeout("hideLoading('"+id+"')", 1000 * 60);
return false;
}
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-05-28 20:18:50 UTC (rev 3403)
+++ mgmt/trunk/cumin/resources/app.js 2009-05-28 20:19:48 UTC (rev 3404)
@@ -118,10 +118,16 @@
src = cumin.refreshTime(src);
oImg.className = "Loading";
+ oImg.onerror = oImg.onload = function () {this.className = ""};
oImg.width = width;
oImg.height = height;
oImg.style.visibility = "hidden";
oImg.src = src;
+
+ var loading = $(id).getElement(".loading");
+ loading.loading = true;
+ setTimeout("showLoading('"+id+"')", 1000);
+ setTimeout("hideLoading('"+id+"')", 1000 * 60);
}
}
15 years, 7 months
rhmessaging commits: r3403 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-28 16:18:50 -0400 (Thu, 28 May 2009)
New Revision: 3403
Modified:
mgmt/trunk/wooly/python/wooly/pages.py
Log:
Return the correct content type for .gif resources.
Modified: mgmt/trunk/wooly/python/wooly/pages.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.py 2009-05-28 19:02:13 UTC (rev 3402)
+++ mgmt/trunk/wooly/python/wooly/pages.py 2009-05-28 20:18:50 UTC (rev 3403)
@@ -344,6 +344,8 @@
if name:
if name.endswith(".png"):
type = "image/png"
+ if name.endswith(".gif"):
+ type = "image/gif"
elif name.endswith(".jpeg"):
type = "image/jpeg"
elif name.endswith(".html"):
15 years, 7 months
rhmessaging commits: r3402 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-28 15:02:13 -0400 (Thu, 28 May 2009)
New Revision: 3402
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Center the loading animation
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-05-28 15:58:29 UTC (rev 3401)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-05-28 19:02:13 UTC (rev 3402)
@@ -107,9 +107,18 @@
[JSDurationSwitch.javascript]
function showLoading(id) {
- var loading = $(id).getElement(".loading");
+ var container = $(id);
+ var loading = container.getElement(".loading");
+ var img = container.getElement("img");
if (loading.loading) {
- loading.setStyle('display', 'block');
+ loading.style.visibility = "hidden";
+ loading.style.display = "block";
+ var left = (img.getSize().x - loading.getSize().x) / 2;
+ loading.setStyles({
+ left: left,
+ display: 'block',
+ visibility: 'visible'
+ });
}
}
@@ -128,7 +137,7 @@
src = branch.marshal();
src = cumin.refreshTime(src);
- $(oImg).addEvent('load', function () {this.className = ""});
+ $(oImg).onload = function () {this.className = ""};
oImg.className = "Loading";
oImg.src = src;
15 years, 7 months
rhmessaging commits: r3401 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-05-28 11:58:29 -0400 (Thu, 28 May 2009)
New Revision: 3401
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Tweak to allow IE to show charts full page.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-05-28 15:56:24 UTC (rev 3400)
+++ mgmt/trunk/cumin/resources/app.js 2009-05-28 15:58:29 UTC (rev 3401)
@@ -175,7 +175,7 @@
for (var i=0; i<elements.length; i++) {
var element = elements[i];
- if (element.getStyle("visibility") == "visible") {
+ if (element.getStyle("visibility") != "hidden") {
cumin.makeFullPageable(element);
}
}
15 years, 7 months