You can subscribe to this list here.
2007 |
Jan
|
Feb
(65) |
Mar
(276) |
Apr
(544) |
May
(638) |
Jun
(225) |
Jul
(204) |
Aug
(294) |
Sep
(532) |
Oct
(506) |
Nov
(324) |
Dec
(359) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(208) |
Feb
(225) |
Mar
(248) |
Apr
(388) |
May
(222) |
Jun
(47) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ze...> - 2007-04-30 02:55:37
|
Author: jstevens Date: 2007-04-29 22:55:35 -0400 (Sun, 29 Apr 2007) New Revision: 4945 Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt Log: refs #1333 * using ian's snazzy new dots instead of the tired old sitescope dots. Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-29 13:23:10 UTC (rev 4944) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-30 02:55:35 UTC (rev 4945) @@ -78,14 +78,14 @@ <td class="tablevalues" align="center"> <img border="0" tal:attributes="src python:test(intf.operStatus==1, - '/zport/dmd/img/green_dot.png', - '/zport/dmd/img/red_dot.png')"> + here.getStatusImgSrc(0), + here.getStatusImgSrc(3))" /> </td> <td class="tablevalues" align="center"> <img border="0" tal:attributes="src python:test(intf.adminStatus==1, - '/zport/dmd/img/green_dot.png', - '/zport/dmd/img/red_dot.png')"> + here.getStatusImgSrc(0), + here.getStatusImgSrc(3))" /> </td> <td class="tablevalues" align="center"> <img tal:condition="intf/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> @@ -150,8 +150,8 @@ <td class="tablevalues" tal:content="srv/startName"/> <td class="tablevalues" tal:content="srv/name"/> <td class="tablevalues" align="center" width="40"> - <img border="0" - tal:attributes="src python:here.getStatusImgSrc(srv.getStatus())"> + <img border="0" tal:attributes="src + python:here.getStatusImgSrc(srv.getStatus())" /> </td> <td class="tablevalues" align="center" width="40"> <img tal:condition="srv/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> @@ -231,8 +231,8 @@ <td class="tablevalues" tal:content="proc/alertOnRestart"/> <td class="tablevalues" tal:content="proc/getFailSeverityString"/> <td class="tablevalues" align="center" width="40"> - <img border="0" - tal:attributes="src python:here.getStatusImgSrc(proc.getStatus())"> + <img border="0" tal:attributes="src + python:here.getStatusImgSrc(proc.getStatus())" /> </td> <td class="tablevalues" align="center" width="40"> <img tal:condition="proc/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> @@ -311,8 +311,8 @@ </td> <td class="tablevalues" tal:content="srv/getDescription"/> <td class="tablevalues" align="center" width="40"> - <img border="0" - tal:attributes="src python:here.getStatusImgSrc(srv.getStatus())"> + <img border="0" tal:attributes="src + python:here.getStatusImgSrc(srv.getStatus())" /> </td> <td class="tablevalues" align="center" width="40"> <img tal:condition="srv/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> |
From: <sv...@ze...> - 2007-04-29 13:23:12
|
Author: ecn Date: 2007-04-29 09:23:10 -0400 (Sun, 29 Apr 2007) New Revision: 4944 Modified: trunk/Products/ZenRRD/zenperfsnmp.py trunk/Products/ZenRRD/zenprocess.py Log: good defaults for cycles Modified: trunk/Products/ZenRRD/zenperfsnmp.py =================================================================== --- trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-29 13:15:04 UTC (rev 4943) +++ trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-29 13:23:10 UTC (rev 4944) @@ -229,7 +229,8 @@ # these names need to match the property values in StatusMonitorConf maxRrdFileAge = 30 * (24*60*60) # seconds - perfsnmpConfigInterval = 5*60 + perfsnmpConfigInterval = 20*60 + perfsnmpCycleInterval = 5*60 properties = SnmpDaemon.properties + ('perfsnmpCycleInterval',) initialServices = SnmpDaemon.initialServices + ['SnmpPerfConfig'] Modified: trunk/Products/ZenRRD/zenprocess.py =================================================================== --- trunk/Products/ZenRRD/zenprocess.py 2007-04-29 13:15:04 UTC (rev 4943) +++ trunk/Products/ZenRRD/zenprocess.py 2007-04-29 13:23:10 UTC (rev 4944) @@ -248,7 +248,8 @@ statusEvent = { 'eventClass' : Status_OSProcess, 'eventGroup' : 'Process' } initialServices = SnmpDaemon.initialServices + ['ProcessConfig'] - processConfigInterval = 5*60 + processConfigInterval = 20*60 + processCycleInterval = 5*60 properties = SnmpDaemon.properties + ('processCycleInterval',) def __init__(self): |
From: <sv...@ze...> - 2007-04-29 13:15:07
|
Author: ecn Date: 2007-04-29 09:15:04 -0400 (Sun, 29 Apr 2007) New Revision: 4943 Modified: trunk/Products/ZenWin/zenwinmodeler.py Log: bug found during demo Modified: trunk/Products/ZenWin/zenwinmodeler.py =================================================================== --- trunk/Products/ZenWin/zenwinmodeler.py 2007-04-29 05:18:07 UTC (rev 4942) +++ trunk/Products/ZenWin/zenwinmodeler.py 2007-04-29 13:15:04 UTC (rev 4943) @@ -23,12 +23,12 @@ import Globals from WinCollector import WinCollector as Base from Products.ZenEvents.ZenEventClasses import \ - Heartbeat, Status_WinSrv, Status_Wmi + Heartbeat, Status_WinService, Status_Wmi from Products.ZenUtils.Utils import prepId class zenwinmodeler(Base): - evtClass = Status_WinSrv + evtClass = Status_WinService name = agent = "zenwinmodeler" evtAlertGroup = "ServiceTest" deviceConfig = 'getDeviceWinInfo' |
From: <sv...@ze...> - 2007-04-29 05:18:35
|
Author: ian Date: 2007-04-29 01:18:07 -0400 (Sun, 29 Apr 2007) New Revision: 4942 Modified: trunk/Products/ZenWidgets/skins/zenui/css/tables.css trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css Log: * Added some pretty to select all/none bars Modified: trunk/Products/ZenWidgets/skins/zenui/css/tables.css =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/css/tables.css 2007-04-29 05:09:06 UTC (rev 4941) +++ trunk/Products/ZenWidgets/skins/zenui/css/tables.css 2007-04-29 05:18:07 UTC (rev 4942) @@ -32,6 +32,7 @@ position: relative; top: -2px; text-align: left; + background: transparent url('img/stripe.png'); } .zentable_selectionbar ul { list-style-type: none; Modified: trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css 2007-04-29 05:09:06 UTC (rev 4941) +++ trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css 2007-04-29 05:18:07 UTC (rev 4942) @@ -23,7 +23,7 @@ height:18px; padding: 2px; border-bottom: 1px solid #888; - background-color: white; + background: transparent url('img/stripe.png'); } #currentRows { font-weight: bold; |
From: <sv...@ze...> - 2007-04-29 05:09:19
|
Author: ian Date: 2007-04-29 01:09:06 -0400 (Sun, 29 Apr 2007) New Revision: 4941 Modified: trunk/Products/ZenUtils/js/zenui.js trunk/Products/ZenWidgets/skins/zenui/css/tables.css Log: * Fixes #1035: Add js function to check if a table has checkboxes; if so, adds select all/none bar Modified: trunk/Products/ZenUtils/js/zenui.js =================================================================== --- trunk/Products/ZenUtils/js/zenui.js 2007-04-28 18:56:39 UTC (rev 4940) +++ trunk/Products/ZenUtils/js/zenui.js 2007-04-29 05:09:06 UTC (rev 4941) @@ -239,5 +239,49 @@ } } +function getChildCheckboxes(element) { + return filter( + function(x){return x.type=='checkbox'}, + element.getElementsByTagName('input') + ) +} + +var tablesOnPage=0; +function insertSelBar(table) { + var getselall = function() { + return function() {selectAllCheckboxes(table)} + } + var getselnone = function() { + return function() {selectNoneCheckboxes(table)} + } + var all = LI(null, 'All'); + var nun = LI(null, 'None'); + var selbar = DIV({'class':'zentable_selectionbar'}, + [ 'Select: ', UL(null, [all, nun ]) ]); + insertSiblingNodesBefore(table, selbar); + connect(all, 'onclick', getselall()); + connect(nun, 'onclick', getselnone()); +} + +function selectAllCheckboxes(table) { + var cbs = getChildCheckboxes(table); + map(function(x){x.checked=true},cbs); +} + +function selectNoneCheckboxes(table) { + var cbs = getChildCheckboxes(table); + map(function(x){x.checked=null},cbs); +} + +function addSelectionBar() { + var tables = getElementsByTagAndClassName('table', 'innerzentable'); + for (i=0;i<tables.length;i++) { + var inputs = tables[i].getElementsByTagName('input'); + var cbs = filter(function(x){return x.type=='checkbox'}, inputs); + if (cbs.length) insertSelBar(tables[i]); + } +} + +addLoadEvent(addSelectionBar); addLoadEvent(checkForCollapsed); log("Left pane toggle javascript loaded."); Modified: trunk/Products/ZenWidgets/skins/zenui/css/tables.css =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/css/tables.css 2007-04-28 18:56:39 UTC (rev 4940) +++ trunk/Products/ZenWidgets/skins/zenui/css/tables.css 2007-04-29 05:09:06 UTC (rev 4941) @@ -20,3 +20,28 @@ padding: 1px; font-size: 8pt; } + + +.zentable_selectionbar { + height:14px; + font-size: 10px; + line-height: 14px; + padding: 2px; + border-left: 3px solid #5a6f8f; + border-right: 3px solid #5a6f8f; + position: relative; + top: -2px; + text-align: left; +} +.zentable_selectionbar ul { + list-style-type: none; + display: inline; + margin: 0; padding: 0; +} +.zentable_selectionbar li { + display:inline; + text-decoration: underline; + color: darkblue; + margin: 0 4px; + cursor: pointer; +} |
From: <sv...@ze...> - 2007-04-28 18:57:08
|
Author: ian Date: 2007-04-28 14:56:39 -0400 (Sat, 28 Apr 2007) New Revision: 4940 Modified: trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenModel/skins/zenmodel/zenoss.css Log: * Fixes #1339: if no average lengths in mysql table, return default of 10 * Removed min-height CSS declaration on contentPane element Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-27 22:58:48 UTC (rev 4939) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-28 18:56:39 UTC (rev 4940) @@ -1008,8 +1008,8 @@ curs.execute(selstatement) avglen = curs.fetchone() finally: self.close(conn) - if not avglen: return 0. - else: return float(avglen[0]) + try: return float(avglen[0]) + except TypeError: return 10. #========================================================================== Modified: trunk/Products/ZenModel/skins/zenmodel/zenoss.css =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/zenoss.css 2007-04-27 22:58:48 UTC (rev 4939) +++ trunk/Products/ZenModel/skins/zenmodel/zenoss.css 2007-04-28 18:56:39 UTC (rev 4940) @@ -275,7 +275,6 @@ #contentPane { padding: 5px 15px; background: #E0E0E0; - min-height: 400px; border: 1px solid black; /* border-left: 5px solid #b1bcd2 ; |
From: <sv...@ze...> - 2007-04-27 22:58:51
|
Author: ian Date: 2007-04-27 18:58:48 -0400 (Fri, 27 Apr 2007) New Revision: 4939 Modified: trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenModel/EventView.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenWidgets/skins/zenui/dialog_moveEventsToHistory.pt trunk/Products/ZenWidgets/skins/zenui/dialog_undeleteHistoryEvents.pt trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js Log: * ZenGrid can now ack, delete, undelete events that aren't on the screen or in the buffer. All checked events, even if scrolled elsewhere. * Altered menus and dialogs to use the new JS functions * Fixed a bug that prevented accurate scrolling at the very bottom Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-27 22:58:48 UTC (rev 4939) @@ -271,9 +271,35 @@ resultFields = self.lookupManagedEntityResultFields(me.event_key) return self.getEventList(resultFields=resultFields,where=where,**kwargs) + + def getEventBatchME(self, me, selectstatus=None, + goodevids=[], badevids=[], **kwargs): + where = self.lookupManagedEntityWhere(me) + badevidsstr, goodevidsstr = '','' + if badevids: badevidsstr = " and evid not in ('%s')" %( + "','".join(badevids)) + if goodevids: goodevidsstr = " and evid in ('%s')" %( + "','".join(goodevids)) + if selectstatus=='all': + where += badevidsstr + elif selectstatus=='none': + where += goodevidsstr or ' and 0' + elif selectstatus=='acked': + oper = bool(goodevidsstr) and ' or' or ' and' + where += goodevidsstr + oper + " (eventstate=1 %s) " % badevidsstr + elif selectstatus=='unacked': + oper = bool(goodevidsstr) and ' or' or 'and' + where += goodevidsstr + oper + " (eventstate=0 %s) " % badevidsstr + try: + resultFields = kwargs['resultFields']; del kwargs['resultFields'] + except KeyError: + resultFields = self.lookupManagedEntityResultFields(me.event_key) + events = self.getEventList(resultFields=resultFields,where=where,**kwargs) + return [ev.evid for ev in events] + def getEventList(self, resultFields=[], where="", orderby="", severity=None, - state=0, startdate=None, enddate=None, offset=0, rows=0, + state=2, startdate=None, enddate=None, offset=0, rows=0, getTotalCount=False, filter="", **kwargs): """see IEventList. """ Modified: trunk/Products/ZenModel/EventView.py =================================================================== --- trunk/Products/ZenModel/EventView.py 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenModel/EventView.py 2007-04-27 22:58:48 UTC (rev 4939) @@ -38,6 +38,7 @@ def getJSONEventsInfo(self, offset=0, count=50, fields=[], getTotalCount=True, + filter='', severity=2, state=1, orderby='', REQUEST=None): """Return the current event list for this managed entity. @@ -68,8 +69,7 @@ """Return the status number for this device of class statClass. """ try: - return self.getEventManager().getStatusME(self, - statusclass=statusclass, **kwargs) + return self.getEventManager().getStatusME(self, statusclass=statusclass, **kwargs) except MySQLError: log.exception("exception getting status") return -1 @@ -113,6 +113,16 @@ if REQUEST: return self.callZenScreen(REQUEST) + #security.declareProtected('Manage Events','manage_deleteBatchEvents') + def manage_deleteBatchEvents(self, selectstatus='none', goodevids=[], + badevids=[], REQUEST=None, **kwargs): + """Delete events form this managed entity. + """ + evids = self.getEventManager().getEventBatchME(self, selectstatus, + goodevids, badevids, **kwargs) + return self.manage_deleteEvents(evids, REQUEST) + + security.declareProtected('Manage Events','manage_undeleteEvents') def manage_undeleteEvents(self, evids=(), REQUEST=None): """Delete events form this managed entity. @@ -123,6 +133,16 @@ return self.callZenScreen(REQUEST) + #security.declareProtected('Manage Events','manage_undeleteBatchEvents') + def manage_undeleteBatchEvents(self, selectstatus='none', goodevids=[], + badevids=[], REQUEST=None, **kwargs): + """Delete events form this managed entity. + """ + evids = self.getEventManager().getEventBatchME(self, selectstatus, + goodevids, badevids, **kwargs) + return self.manage_undeleteEvents(evids, REQUEST) + + security.declareProtected('Manage Events','manage_deleteHeartbeat') def manage_deleteHeartbeat(self, REQUEST=None): """Delete events form this managed entity. @@ -141,6 +161,16 @@ if REQUEST: return self.callZenScreen(REQUEST) + security.declareProtected('Manage Events','manage_ackBatchEvents') + def manage_ackBatchEvents(self, selectstatus='none', goodevids=[], + badevids=[], REQUEST=None, **kwargs): + """Delete events form this managed entity. + """ + evids = self.getEventManager().getEventBatchME(self, selectstatus, + goodevids, badevids, **kwargs) + return self.manage_ackEvents(evids, REQUEST) + + security.declareProtected('Manage Events','manage_setEventStates') def manage_setEventStates(self, eventState=None, evids=(), REQUEST=None): """Set event state form this managed entity. Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-27 22:58:48 UTC (rev 4939) @@ -734,8 +734,7 @@ ordering=80.0, id= 'acknowledgeEvents', description='Acknowledge Events', - action= ('javascript:submitFormToMethod(' - '"control", "manage_ackEvents")'), + action= ('javascript:eventZenGrid.acknowledgeBatch()'), permissions=('Manage DMD',) ), dict( Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_moveEventsToHistory.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_moveEventsToHistory.pt 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_moveEventsToHistory.pt 2007-04-27 22:58:48 UTC (rev 4939) @@ -5,10 +5,9 @@ </p> <br/> <div id="dialog_buttons"> -<input type="submit" name="manage_deleteEvents:method" +<input type="button" name="manage_deleteEvents:method" value="Yes" - tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/absolute_url_path}')" /> + tal:attributes="onclick string:$$('dialog').hide();;eventZenGrid.deleteBatch()" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_undeleteHistoryEvents.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_undeleteHistoryEvents.pt 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_undeleteHistoryEvents.pt 2007-04-27 22:58:48 UTC (rev 4939) @@ -5,10 +5,9 @@ </p> <br/> <div id="dialog_buttons"> -<input type="submit" name="manage_undeleteEvents:method" +<input type="button" name="manage_undeleteEvents:method" value="Yes" - tal:attributes="onclick string:return $$('dialog').submit_form( - '${here/absolute_url_path}')" /> + tal:attributes="onclick string:$$('dialog').hide();;eventZenGrid.undeleteBatch()" /> <input id="dialog_cancel" type="button" value="Cancel" onclick="$('dialog').hide()"/> </div> Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-27 21:38:32 UTC (rev 4938) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-27 22:58:48 UTC (rev 4939) @@ -180,6 +180,8 @@ this.rowHeight = 32; this.checkedArray = new Array(); this.url = this.absurl + '/' + url; + this.zem = this.isHistory?this.absurl+'/ZenEventHistory': + this.absurl+'/ZenEventManager'; this.lastparams = this.isHistory?{startdate:$('startdate').value, enddate:$('enddate').value }: {}; @@ -240,7 +242,9 @@ for (i=0;i<cbs.length;i++) { rowclass = rows[i].className; cbs[i].checked=null; - if (rowclass.match('acked')) cbs[i].checked=true; + if (rowclass.match('acked')) { + cbs[i].checked=true; + } } this.selectstatus = 'acked'; }, @@ -250,7 +254,9 @@ for (i=0;i<cbs.length;i++) { rowclass = rows[i].className; cbs[i].checked=null; - if (rowclass.match('noack')) cbs[i].checked=true; + if (rowclass.match('noack')) { + cbs[i].checked=true; + } } this.selectstatus = 'unacked'; }, @@ -499,8 +505,6 @@ return false; }, populateTable: function(data) { - var zem = this.isHistory?this.absurl+'/ZenEventHistory': - this.absurl+'/ZenEventManager'; var tableLength = data.length > this.numRows ? this.numRows : data.length; if (tableLength != this.rowEls.length){ @@ -532,7 +536,7 @@ var geteventwindow = function(zeml, evidl) { return function() { eventWindow(zeml, evidl) } } - connect(divs[yo.length-1], 'onclick', geteventwindow(zem, evid)); + connect(divs[yo.length-1], 'onclick', geteventwindow(this.zem, evid)); divs[yo.length-1].title = "View detailed information" + " about this event." for (j=isManager?1:0;j<yo.length-1;j++) { @@ -666,7 +670,8 @@ Math.floor(pixel/(this.rowSizePlus))*(this.rowSizePlus); var newOffset = this.pixelToRow(pixel); this.updateStatusBar(newOffset); - if (newOffset==0) this.refreshTable(newOffset); + if (newOffset==0||newOffset==this.buffer.totalRows-this.numRows) + this.refreshTable(newOffset); clearTimeout(this.scrollTimeout); this.scrollTimeout = setTimeout ( bind(function() { @@ -675,7 +680,6 @@ this.lastPixelOffset = pixel; }, handleScroll: function() { - //this.showLoading(); this.scrollToPixel(this.scrollbar.scrollTop||0) }, refreshFromFormElement: function(e) { @@ -720,9 +724,7 @@ }, markAsChecked: function(e) { var node = e.src(); - - this.checkedArray[node.value] = node.checked? - 'checked':'blank' + this.checkedArray[node.value] = node.checked?'checked':'blank'; }, showLoading: function() { if (this.isLoading) clearTimeout(this.isLoading); @@ -741,11 +743,9 @@ Math.max(0, getElementDimensions(this.viewport).h + getElementPosition(this.viewport).y); - log("Current: " + curTableBottom); - log("Max: " + maxTableBottom); var diff = maxTableBottom - curTableBottom; var rowdiff = Math.floor(diff/this.rowSizePlus); - if (rowdiff==0) return; + if (rowdiff==0 && this.buffer.totalRows!=0) return; this.numRows = this.buffer.pageSize = Math.max(1, this.numRows + rowdiff); this.setTableNumRows( Math.min( this.numRows, this.buffer.totalRows)); this.refreshTable(this.lastOffset); @@ -776,9 +776,70 @@ this.headcolgroup = swapDOM(this.headcolgroup, this.getColgroup()); //this.refreshTable(this.lastOffset); }, - getEvidSummary: function() { - //this.checkedArray; - //this.selectstatus; + deleteBatch: function() { + var url = this.absurl + '/manage_deleteBatchEvents'; + var selectstatus = this.selectstatus; + var goodevids = []; + var badevids = []; + for (var evid in this.checkedArray) { + if (this.checkedArray[evid]=='checked') goodevids.push(evid); + else badevids.push(evid); + } + qs = { 'selectstatus':selectstatus, + 'goodevids':goodevids, + 'badevids':badevids } + qs = update(qs, this.lastparams); + d = doXHR(url, {queryString:qs}); + d.addCallback(bind( + function(r) { + this.buffer.clear(); + this.refreshTable(this.lastOffset); + this.setSelectNone(); + }, this)); + }, + undeleteBatch: function() { + var url = this.absurl + '/manage_undeleteBatchEvents'; + var selectstatus = this.selectstatus; + var goodevids = []; + var badevids = []; + for (var evid in this.checkedArray) { + if (this.checkedArray[evid]=='checked') goodevids.push(evid); + else badevids.push(evid); + } + qs = { 'selectstatus':selectstatus, + 'goodevids':goodevids, + 'badevids':badevids } + qs = update(qs, this.lastparams); + d = doXHR(url, {queryString:qs}); + d.addCallback(bind( + function(r) { + this.buffer.clear(); + this.refreshTable(this.lastOffset); + this.setSelectNone(); + }, this)); + + }, + acknowledgeBatch: function() { + var url = this.absurl + '/manage_ackBatchEvents'; + var selectstatus = this.selectstatus; + var goodevids = []; + var badevids = []; + for (var evid in this.checkedArray) { + if (this.checkedArray[evid]=='checked') goodevids.push(evid); + else badevids.push(evid); + } + qs = { 'selectstatus':selectstatus, + 'goodevids':goodevids, + 'badevids':badevids } + qs = update(qs, this.lastparams); + this.showLoading(); + d = doXHR(url, {queryString:qs}); + d.addCallback(bind( + function(r) { + this.buffer.clear(); + this.refreshTable(this.lastOffset); + this.setSelectNone(); + }, this)); } } |
From: <sv...@ze...> - 2007-04-27 21:38:34
|
Author: marc Date: 2007-04-27 17:38:32 -0400 (Fri, 27 Apr 2007) New Revision: 4938 Modified: trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenModel/OperatingSystem.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt trunk/Products/ZenWidgets/skins/zenui/dialog_lock.pt Log: #1333 * Fixed tabs and columns and images Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-27 20:49:28 UTC (rev 4937) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-27 21:38:32 UTC (rev 4938) @@ -1085,7 +1085,7 @@ ''' Return the img source for a status number ''' if status < 0: - src = 'magenta' + src = 'purple' if status == 0: src = 'green' elif status == 1: @@ -1094,7 +1094,7 @@ src = 'yellow' else: src = 'red' - return 'misc_/SiteScopeParser/%sball_img' % src + return '/zport/dmd/img/%s_dot.png' % src def getEventCssClass(self, severity, acked=False): Modified: trunk/Products/ZenModel/OperatingSystem.py =================================================================== --- trunk/Products/ZenModel/OperatingSystem.py 2007-04-27 20:49:28 UTC (rev 4937) +++ trunk/Products/ZenModel/OperatingSystem.py 2007-04-27 21:38:32 UTC (rev 4938) @@ -114,11 +114,11 @@ , 'action' : '../viewDevicePerformance' , 'permissions' : (permissions.view, ) }, - { 'id' : 'viewHistory' - , 'name' : 'Modifications' - , 'action' : '../viewHistory' - , 'permissions' : (permissions.view, ) - }, + #{ 'id' : 'viewHistory' + #, 'name' : 'Modifications' + #, 'action' : '../viewHistory' + #, 'permissions' : (permissions.view, ) + #}, { 'id' : 'edit' , 'name' : 'Edit' , 'action' : '../editDevice' Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-27 20:49:28 UTC (rev 4937) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-27 21:38:32 UTC (rev 4938) @@ -117,6 +117,13 @@ id='viewHistory', permissions=('Change Device',) ), + dict(action='../viewHistory', + allowed_classes=['OperatingSystem',], + description='Modifications', + ordering=2.0, + id='viewHistory_os', + permissions=('Change Device',) + ), dict(action='objRRDTemplate', allowed_classes=['Device', 'FileSystem', Modified: trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-27 20:49:28 UTC (rev 4937) +++ trunk/Products/ZenModel/skins/zenmodel/deviceOsDetail.pt 2007-04-27 21:38:32 UTC (rev 4938) @@ -19,8 +19,9 @@ <tal:block metal:fill-slot="zentablecontents"> <!-- BEGIN TABLE CONTENTS --> + <tr tal:condition="batch"> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'primarySortKey','Name')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -31,9 +32,9 @@ <th tal:condition="here/zIfDescription" tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'description','Descr')"/> - <th class="tableheader" align="center">O</th> - <th class="tableheader" align="center">A</th> - <th class="tableheader" align="center">Lock</th> + <th class="tableheader" align="center" width="30">O</th> + <th class="tableheader" align="center" width="30">A</th> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tr tal:condition="not:batch"> <th class="tableheader" align="left"> @@ -77,14 +78,14 @@ <td class="tablevalues" align="center"> <img border="0" tal:attributes="src python:test(intf.operStatus==1, - 'misc_/SiteScopeParser/greenball_img', - 'misc_/SiteScopeParser/redball_img')"> + '/zport/dmd/img/green_dot.png', + '/zport/dmd/img/red_dot.png')"> </td> <td class="tablevalues" align="center"> <img border="0" tal:attributes="src python:test(intf.adminStatus==1, - 'misc_/SiteScopeParser/greenball_img', - 'misc_/SiteScopeParser/redball_img')"> + '/zport/dmd/img/green_dot.png', + '/zport/dmd/img/red_dot.png')"> </td> <td class="tablevalues" align="center"> <img tal:condition="intf/isLockedFromDeletion" border="0" src="locked-delete-icon.png"> @@ -121,7 +122,7 @@ <!-- BEGIN TABLE CONTENTS --> <tr> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'caption','Caption')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -131,8 +132,9 @@ <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'name','Name')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'getStatus','Status','cmp')"/> - <th class="tableheader" align="center">Lock</th> + tableName,'getStatus','Status','cmp')" + width="60" /> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tal:block tal:repeat="srv batch"> <tr tal:define="odd repeat/srv/odd" @@ -199,7 +201,7 @@ <!-- BEGIN TABLE CONTENTS --> <tr> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'getOSProcessClass','Class')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -209,8 +211,9 @@ <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'getFailSeverityString','Fail Severity')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'getStatus','Status','cmp')"/> - <th class="tableheader" align="center">Lock</th> + tableName,'getStatus','Status','cmp')" + width="60" /> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tal:block tal:repeat="proc batch"> <tr tal:define="odd repeat/proc/odd" @@ -268,7 +271,7 @@ <!-- BEGIN TABLE CONTENTS --> <tr> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'getKeyword','Name')">Name </th> @@ -286,8 +289,9 @@ Description </th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'getStatus','Status','cmp')"/> - <th class="tableheader" align="center">Lock</th> + tableName,'getStatus','Status','cmp')" + width="60" /> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tal:block tal:repeat="srv batch"> <tr tal:define="odd repeat/srv/odd" @@ -346,7 +350,7 @@ <!-- BEGIN TABLE CONTENTS --> <tr tal:condition="objects"> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'mount','Mount')">Mount </th> @@ -367,7 +371,7 @@ tableName,'storageDevice','Storage Device')">Device </th> --> - <th class="tableheader" align="center">Lock</th> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tr tal:condition="not:objects"> <th class="tableheader" align="left"> @@ -439,7 +443,7 @@ <!-- BEGIN TABLE CONTENTS --> <tr tal:condition="batch"> - <th class="tableheader"></th> + <th class="tableheader" width="20"></th> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'primarySortKey','Destination')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -450,7 +454,7 @@ tableName,'routeproto','Protocol')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'routetype','Type')"/> - <th class="tableheader" align="center">Lock</th> + <th class="tableheader" align="center" width="30">Lock</th> </tr> <tr tal:condition="not:batch"> <th class="tableheader" align="left"> Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_lock.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_lock.pt 2007-04-27 20:49:28 UTC (rev 4937) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_lock.pt 2007-04-27 21:38:32 UTC (rev 4938) @@ -7,7 +7,7 @@ checked here/sendEventWhenBlocked" />Send event when actions are blocked by a lock<br/> </p> -<p align="right"> +<p style="text-align:right;"> <input type="submit" name="lockFromUpdates:method" value="Lock from deletion and updates" /><br/> <input type="submit" name="lockFromDeletion:method" |
From: <sv...@ze...> - 2007-04-27 20:49:28
|
Author: marc Date: 2007-04-27 16:49:28 -0400 (Fri, 27 Apr 2007) New Revision: 4937 Modified: trunk/Products/ZenModel/migrate/menus.py Log: #1336 * Added editCustSchema menu item on DeviceClass Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-27 20:19:55 UTC (rev 4936) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-27 20:49:28 UTC (rev 4937) @@ -173,6 +173,13 @@ id='pushConfig_os', permissions=('Change Device',) ), + dict(action='editCustSchema', + allowed_classes=['DeviceClass',], + description='Custom Schema', + ordering=60.0, + id='editCustSchema', + permissions=('Change Device',) + ), dict(action='deviceCustomEdit', allowed_classes=['Device'], description='Custom', |
From: <sv...@ze...> - 2007-04-27 20:19:56
|
Author: marc Date: 2007-04-27 16:19:55 -0400 (Fri, 27 Apr 2007) New Revision: 4936 Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addUser.pt trunk/Products/ZenModel/skins/zenmodel/dialog_deleteUsers.pt Modified: trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/skins/zenmodel/manageUserFolder.pt trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt Log: #1321 * Added table menu and ordering table menu items Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-27 19:59:50 UTC (rev 4935) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-27 20:19:55 UTC (rev 4936) @@ -240,6 +240,25 @@ permissions=('View',) ), ], + 'User_list': [ + ZenPackItems, + dict( + ordering=90.0, + id= 'addUser', + description='Add New User...', + action= 'dialog_addUser', + permissions=('Manage DMD',), + isdialog= True, + ), + dict( + ordering=70.0, + id= 'deleteUser', + description='Delete Users...', + action= 'dialog_deleteUsers', + permissions=('Manage DMD',), + isdialog=True + ), + ], 'Organizer_list': [ ZenPackItems, dict( @@ -484,7 +503,7 @@ dict( ordering=1.01, id= 'removeZenPack', - description='Delete ZenPack', + description='Delete ZenPack...', permissions=('Manage DMD',), action= 'dialog_removeZenPacks', isdialog=True, @@ -876,7 +895,7 @@ dict( ordering=90.0, id= 'changeClass', - description='Change Class', + description='Change Class...', action= 'dialog_changeClass', isdialog=True, permissions=('Change Device',), @@ -885,7 +904,7 @@ dict( ordering=80.0, id= 'setProductionState', - description='Set Production State', + description='Set Production State...', action= 'dialog_setProductionState', permissions=('Change Device',), isdialog=True, @@ -894,7 +913,7 @@ dict( ordering=70.0, id= 'setPriority', - description='Set Priority', + description='Set Priority...', action= 'dialog_setPriority', isdialog=True, permissions=('Change Device',), @@ -911,7 +930,7 @@ dict( ordering=50.0, id= 'resetIp', - description='Reset IP', + description='Reset IP...', action= 'dialog_resetIp', isdialog=True, permissions=('Change Device',), @@ -928,7 +947,7 @@ dict( ordering=30.0, id= 'renameDevice', - description='Rename Device', + description='Rename Device...', action= 'dialog_renameDevice', isdialog=True, permissions=('Change Device',), @@ -937,7 +956,7 @@ dict( ordering=20.0, id= 'deleteDevice', - description='Delete Device', + description='Delete Device...', action= 'dialog_deleteDevice', isdialog=True, permissions=('Change Device',), @@ -953,7 +972,7 @@ 'IpService', 'OSProcess', 'IpRouteEntry'], - description='Lock', + description='Lock...', ordering=10.0, id='lockObject', isdialog=True, Added: trunk/Products/ZenModel/skins/zenmodel/dialog_addUser.pt Added: trunk/Products/ZenModel/skins/zenmodel/dialog_deleteUsers.pt Modified: trunk/Products/ZenModel/skins/zenmodel/manageUserFolder.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/manageUserFolder.pt 2007-04-27 19:59:50 UTC (rev 4935) +++ trunk/Products/ZenModel/skins/zenmodel/manageUserFolder.pt 2007-04-27 20:19:55 UTC (rev 4936) @@ -28,7 +28,9 @@ ztm here/ZenTableManager; objects here/getAllUserSettings; showfilterbox python:True; - batch python:ztm.getBatch(tableName, objects); tabletitle string:User Folder"> + batch python:ztm.getBatch(tableName, objects); + tabletitle string:User Folder; + menu_id string:User_list"> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> <!--====Optional titlebar slots============= @@ -45,10 +47,6 @@ <!-- BEGIN TABLE CONTENTS --> - <tr tal:condition="exists: request/message"> - <th class=tabletitle colspan=4 - tal:content="request/message" /> - </tr> <tr> <th tal:replace="structure python:ztm.getTableHeader( tableName,'primarySortKey','UserId')"/> @@ -90,28 +88,10 @@ </tr> </tal:block> <tr> - <td colspan="4" class="tableheader"> + <td colspan="0" class="tableheader"> <span metal:use-macro="here/zenTableNavigation/macros/navtool"/> </td> </tr> - <tr tal:condition="here/isManager"> - <td class="tableheader" colspan="4"> - Userid: - <input class="tableheader" type="text" name="userid" size=10/> - Email: - <input class="tableheader" type="text" name="email" - onkeypress="return submitViaEnter(event,'manage_addUser');"/> - <input class="tableheader" type="submit" - name="manage_addUser:method" value=" Add " /> - | - <input class="tableheader" type="submit" - name="manage_deleteUsers:method" value=" Delete " /> - | - <input class="tableheader" type="submit" - name="SelectButton" value="Select All" - onClick="toggleSelect(this.form);return false"/> - </td> - </tr> <!-- END TABLE CONTENTS --> Modified: trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt 2007-04-27 19:59:50 UTC (rev 4935) +++ trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt 2007-04-27 20:19:55 UTC (rev 4936) @@ -165,6 +165,10 @@ pathtrans)" tal:condition="menuitems"> + <tal:block tal:condition="menuitems"> + <tal:block tal:define="dummy menuitems/sort"/> + </tal:block> + <div class="devmovemenu" tal:attributes="id string:${menu_id}_btn"> </div> @@ -187,6 +191,8 @@ <input tal:attributes="id string:${thisid}input" type="hidden"/> <a tal:attributes="id thisid; href actionpath" tal:content="item/description">description</a> + <tal:block tal:condition="python:getattr(request, 'showMenuOrder', None)" + tal:content="item/ordering"/> </tal:block> </li> |
From: <sv...@ze...> - 2007-04-27 19:59:52
|
Author: jstevens Date: 2007-04-27 15:59:50 -0400 (Fri, 27 Apr 2007) New Revision: 4935 Added: trunk/Products/ZenModel/migrate/processsequence.py Modified: trunk/Products/ZenModel/OSProcessClass.py trunk/Products/ZenModel/OSProcessOrganizer.py trunk/Products/ZenModel/migrate/__init__.py trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt Log: fixes #1326 * Fixes sequencing on Processes/sequence page * removes sequence tab from suborganizers Modified: trunk/Products/ZenModel/OSProcessClass.py =================================================================== --- trunk/Products/ZenModel/OSProcessClass.py 2007-04-27 19:48:11 UTC (rev 4934) +++ trunk/Products/ZenModel/OSProcessClass.py 2007-04-27 19:59:50 UTC (rev 4935) @@ -158,4 +158,11 @@ return self.instances() + def getPrimaryParentOrgName(self): + ''' Return the organizer name for the primary parent + ''' + return self.getPrimaryParent().getOrganizerName() + + + InitializeClass(OSProcessClass) Modified: trunk/Products/ZenModel/OSProcessOrganizer.py =================================================================== --- trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-27 19:48:11 UTC (rev 4934) +++ trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-27 19:59:50 UTC (rev 4935) @@ -101,6 +101,16 @@ self.buildZProperties() + def zentinelTabs(self, templateName): + """Return a list of hashs that define the screen tabs for this object. + [{'name':'Name','action':'template','selected':False},...] + """ + tabs = Organizer.zentinelTabs(self, templateName) + if self.getPrimaryId() != '/zport/dmd/Processes': + tabs = [t for t in tabs if t['id'] != 'resequence'] + return tabs + + def getSubOSProcessClassesGen(self): """Return generator that goes through all process classes. """ @@ -109,6 +119,18 @@ for subgroup in self.children(): for proc in subgroup.getSubOSProcessClassesGen(): yield proc + + + def getSubOSProcessClassesSorted(self): + '''Return list of the process classes sorted by sequence. + ''' + def cmpProc(a, b): + return cmp(a.sequence, b.sequence) + procs = list(self.getSubOSProcessClassesGen()) + procs.sort(cmpProc) + for i, p in enumerate(procs): + p.sequence = i + return procs def countClasses(self): @@ -136,8 +158,8 @@ def manage_resequenceProcesses(self, seqmap=(), origseq=(), REQUEST=None): "resequence the OsProcesses" from Products.ZenUtils.Utils import resequence - return resequence(self, - self.osProcessClasses(), seqmap, origseq, REQUEST) + return resequence(self, self.getSubOSProcessClassesGen(), + seqmap, origseq, REQUEST) def unmonitorOSProcessClasses(self, ids=None, REQUEST=None): return self.monitorOSProcessClasses(ids, False, REQUEST) Modified: trunk/Products/ZenModel/migrate/__init__.py =================================================================== --- trunk/Products/ZenModel/migrate/__init__.py 2007-04-27 19:48:11 UTC (rev 4934) +++ trunk/Products/ZenModel/migrate/__init__.py 2007-04-27 19:59:50 UTC (rev 4935) @@ -80,3 +80,4 @@ import zCollectorPlugins import zenpackdatasources import zpropscleanup +import processsequence Added: trunk/Products/ZenModel/migrate/processsequence.py Modified: trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt 2007-04-27 19:48:11 UTC (rev 4934) +++ trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt 2007-04-27 19:59:50 UTC (rev 4935) @@ -1,14 +1,16 @@ <tal:block metal:use-macro="here/templates/macros/page2"> <tal:block metal:fill-slot="contentPane"> -<form method="post" name="processList" tal:attributes="action here/absolute_url_path"> +<form method="POST" name="processList" tal:attributes="action here/absolute_url_path"> <tal:block - tal:define="objects here/getSubOSProcessClassesGen; - menu_id string:OSProcessResequence_list; + tal:define="objects here/getSubOSProcessClassesSorted; + menu_id string:OSProcessResequence_list; tableName string:osprocessresequencelist; tabletitle string:Processes Order; - batch python:here.ZenTableManager.getBatch(tableName,objects);"> + + batch python:here.ZenTableManager.getBatch(tableName, objects, + sortedHeader='sequence');"> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> <tal:block metal:fill-slot="zentablecontents"> @@ -21,7 +23,7 @@ <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'sequence','Seq')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'sequence','Folder')"/> + tableName,'getPrimaryParentOrgName','Folder')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'name','Name')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( @@ -53,11 +55,6 @@ <td class="tablevalues" tal:content="svcinst/zMonitor"/> <td class="tablevalues" tal:content="svcinst/count"/> </tr> - <tr> - <td colspan="0" class="tableheader"> - <span metal:use-macro="here/zenTableNavigation/macros/navbody" /> - </td> - </tr> </span> <!-- END TABLE CONTENTS --> |
From: <sv...@ze...> - 2007-04-27 19:48:15
|
Author: marc Date: 2007-04-27 15:48:11 -0400 (Fri, 27 Apr 2007) New Revision: 4934 Modified: trunk/Products/ZenModel/skins/zenmodel/editMenus.pt Log: #1238 * Ordered Menu dropdown * Now displaying new columns Modified: trunk/Products/ZenModel/skins/zenmodel/editMenus.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/editMenus.pt 2007-04-27 19:34:42 UTC (rev 4933) +++ trunk/Products/ZenModel/skins/zenmodel/editMenus.pt 2007-04-27 19:48:11 UTC (rev 4934) @@ -1,16 +1,18 @@ <tal:block metal:use-macro="here/templates/macros/page2"> <tal:block metal:fill-slot="contentPane" - tal:define="menus here/getMenus; + tal:define="menus here/zenMenus; menuid python:request.get('menuid', 'TopLevel')"> <script type="text/javascript" src="/zport/js/MochiKit.js"></script> <form method="post" action="/zport/dmd/editMenus"> - Menu ID: <select class="tablevalues" name="menuid" onchange="form.submit()"> - <option tal:repeat="vmenuid menus" - tal:content="vmenuid" - tal:attributes="selected python:vmenuid==menuid"/> + Menu ID: <select class="tablevalues" + name="menuid" + onchange="form.submit()"> + <option tal:repeat="menu menus" + tal:content="menu/id" + tal:attributes="selected python:menu.id==menuid"/> </select> </form> <br/> @@ -18,7 +20,7 @@ <tal:block tal:condition="menuid"> <form method=post tal:attributes="name menuid" - tal:define="menuitems python:menus[menuid]"> + tal:define="menuitems python:getattr(here.zenMenus, menuid).zenMenuItems()"> <input type="hidden" name="zenScreenName" tal:attributes="value template/id" /> <input type="hidden" name="menuid" tal:attributes="value menuid" /> @@ -45,6 +47,8 @@ <th class="tableheader"></th> <th class="tableheader">Ordering</th> <th class="tableheader">Menu Item</th> + <th class="tableheader">Description</th> + <th class="tableheader">Action</th> </tr> <tr tal:repeat="menuitem menuitems"> @@ -62,8 +66,14 @@ value menuitem/ordering"/> </td> <td class="tablevalues"> + <tal:block tal:content="menuitem/id"/> + </td> + <td class="tablevalues"> <tal:block tal:content="menuitem/description"/> </td> + <td class="tablevalues"> + <tal:block tal:content="menuitem/action"/> + </td> </tr> <!-- END TABLE CONTENTS --> |
From: <sv...@ze...> - 2007-04-27 19:34:42
|
Author: ian Date: 2007-04-27 15:34:42 -0400 (Fri, 27 Apr 2007) New Revision: 4933 Added: trunk/Products/ZenWidgets/skins/zenui/img/yellow_dot.png Modified: trunk/Products/ZenWidgets/skins/zenui/img/dots.png Log: * Added a yellow dot image Modified: trunk/Products/ZenWidgets/skins/zenui/img/dots.png =================================================================== (Binary files differ) Added: trunk/Products/ZenWidgets/skins/zenui/img/yellow_dot.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/yellow_dot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ze...> - 2007-04-27 19:30:53
|
Author: ian Date: 2007-04-27 15:30:19 -0400 (Fri, 27 Apr 2007) New Revision: 4932 Added: trunk/Products/ZenWidgets/skins/zenui/img/dots.png trunk/Products/ZenWidgets/skins/zenui/img/green_dot.png trunk/Products/ZenWidgets/skins/zenui/img/purple_dot.png trunk/Products/ZenWidgets/skins/zenui/img/red_dot.png Log: * Added new dots images Added: trunk/Products/ZenWidgets/skins/zenui/img/dots.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/dots.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Products/ZenWidgets/skins/zenui/img/green_dot.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/green_dot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Products/ZenWidgets/skins/zenui/img/purple_dot.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/purple_dot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/Products/ZenWidgets/skins/zenui/img/red_dot.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/red_dot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ze...> - 2007-04-27 19:15:22
|
Author: marc Date: 2007-04-27 15:15:11 -0400 (Fri, 27 Apr 2007) New Revision: 4931 Modified: trunk/Products/ZenModel/DataRoot.py trunk/Products/ZenModel/ZenModelBase.py trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addOIDMapping.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addTemplate.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addTrap.pt trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt trunk/Products/ZenModel/skins/zenmodel/dialog_renameDevice.pt trunk/Products/ZenUtils/js/zenutils.js trunk/Products/ZenWidgets/skins/zenui/dialog_addDataSource.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addGraph.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addManufacturer.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addMonitor.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addNetwork.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addOrganizer.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addThreshold.pt trunk/Products/ZenWidgets/skins/zenui/dialog_addZenPack.pt Log: #1246 * Added context to checkValidId Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/DataRoot.py 2007-04-27 19:15:11 UTC (rev 4931) @@ -18,13 +18,12 @@ name space. """ -import re, sys +import re from AccessControl import ClassSecurityInfo from AccessControl import getSecurityManager from OFS.OrderedFolder import OrderedFolder from OFS.CopySupport import CopyError, eNotSupported -from OFS.ObjectManager import checkValidId from ImageFile import ImageFile from Globals import HTMLFile, DTMLFile from Globals import InitializeClass @@ -39,8 +38,6 @@ import DateTime import socket -from urllib import unquote - from AccessControl import Permissions as permissions from ZenModelRM import ZenModelRM @@ -131,7 +128,7 @@ , 'permissions' : ( "Manage DMD", ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'dataRootManage' , 'permissions' : ('Manage DMD',) }, @@ -221,20 +218,6 @@ ZenModelRM.__init__(self, id, title) - def checkValidId(self, new_id): - """Checks a valid id - """ - test_id = unquote(new_id) - try: - checkValidId(self, test_id) - if getattr(self, test_id, False): - return 'The id "%s" id already being used.' % test_id - else: - return True - except: - return str(sys.exc_info()[1]) - - def getResultFields(self): """Result fields for dashboard. """ Modified: trunk/Products/ZenModel/ZenModelBase.py =================================================================== --- trunk/Products/ZenModel/ZenModelBase.py 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/ZenModelBase.py 2007-04-27 19:15:11 UTC (rev 4931) @@ -21,6 +21,10 @@ import re import time +import sys +from urllib import unquote +from OFS.ObjectManager import checkValidId as globalCheckValidId + from AccessControl import ClassSecurityInfo, getSecurityManager, Unauthorized from Globals import InitializeClass from Acquisition import aq_base, aq_chain @@ -75,6 +79,20 @@ def prepId(self, id, subchar='_'): return globalPrepId(id, subchar) + def checkValidId(self, id): + """Checks a valid id + """ + new_id = unquote(id) + try: + globalCheckValidId(self, new_id) + try: + globalCheckValidId(self, self.prepId(id=new_id)) + return True + except: + return str(sys.exc_info()[1]) + except: + return str(sys.exc_info()[1]) + def getIdLink(self): """Return an A link to this object with its id as the name. """ Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addFileSystem.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> </p> <div id="dialog_buttons"> <input type="submit" name="addFileSystem:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpInterface.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> </p> <div id="dialog_buttons"> <input type="submit" name="addIpInterface:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpRouteEntry.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">Destination: </span> <input id="new_id" name="dest" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> Next Hop: <input name="nexthopid"><br/><br/> Interface: <select name="interface" tal:define="interfaces here/os/interfaces/objectValuesAll"> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addIpService.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> Protocol: <select name="protocol"> <option tal:repeat="e python:('udp','tcp')" tal:content="e" tal:attributes="value e"/> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addMenuItem.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/><br/> Description: <input name="description"><br/><br/> Action: <input name="action"><br/><br/> Ordering: <input name="ordering" size="5"><br/><br/> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOIDMapping.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOIDMapping.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOIDMapping.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -9,7 +9,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> OID: <input type="text" name="oid"><br/><br/> Type: <input type="text" name="nodetype"> </p> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcess.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/Processes/absolute_url}', this.id)"><br/><br/> Process Class: <select name="className" tal:define="targets python:here.getDmdRoot('Processes').getOrganizerNames()"> <option tal:repeat="target targets" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addOSProcessClass.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -9,7 +9,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addOSProcessClass:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addReport.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/getPrimaryUrlPath}', this.id)"><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addDeviceReport:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addReportClass.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/getPrimaryUrlPath}', this.id)"><br/><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addReportClass:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addTemplate.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addTemplate.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addTemplate.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addRRDTemplate:method" Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addTrap.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addTrap.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addTrap.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -9,7 +9,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> OID: <input type="text" name="oid"><br/><br/> Type: <input type="text" name="nodetype"> </p> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_addWinService.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url}', this.id)"><br/><br/> Description: <input name="description"><br/><br/> </p> <div id="dialog_buttons"> Modified: trunk/Products/ZenModel/skins/zenmodel/dialog_renameDevice.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/dialog_renameDevice.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenModel/skins/zenmodel/dialog_renameDevice.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -12,7 +12,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="newId" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/getPrimaryUrlPath}', this.id)"><br/><br/> </p> <br/> <div id="dialog_buttons"> Modified: trunk/Products/ZenUtils/js/zenutils.js =================================================================== --- trunk/Products/ZenUtils/js/zenutils.js 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenUtils/js/zenutils.js 2007-04-27 19:15:11 UTC (rev 4931) @@ -45,7 +45,7 @@ event.returnValue = false; } -function checkValidId(input_id){ +function checkValidId(path, input_id){ var errmsg = $('errmsg'); var input = $(input_id); var label = $(input_id+'_label'); @@ -55,7 +55,7 @@ Morph(input_id, {"style": {"color": "black"}}); Morph(label.id, {"style": {"color": "white"}}); - d = callLater(0, doXHR, 'checkValidId', {queryString:{'new_id':new_id}}); + d = callLater(0, doXHR, path+'/checkValidId', {queryString:{'id':new_id}}); d.addCallback(function (r) { if (r.responseText != 'True') { Morph(input_id, {"style": {"color": "red"}}); Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addDataSource.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addDataSource.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addDataSource.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -7,7 +7,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/><br/> Type: <select name='dsOption'> <option tal:repeat="option here/getDataSourceOptions" tal:attributes="value python: option[1]" Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addGraph.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addGraph.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addGraph.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/> </p> <div align="center"> Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addManufacturer.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addManufacturer.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addManufacturer.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="manufacturerName" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addManufacturer:method" Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addMonitor.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addMonitor.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addMonitor.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addMonitor:method" Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addNetwork.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addNetwork.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addNetwork.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -6,7 +6,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="newPath" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/getPrimaryUrlPath}', this.id)"><br/> </p> <div id="dialog_buttons"> Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addOrganizer.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addOrganizer.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addOrganizer.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="newPath" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/getPrimaryUrlPath}', this.id)"><br/> </p> <div id="dialog_buttons"> <input type="submit" name="manage_addOrganizer:method" Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addThreshold.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addThreshold.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addThreshold.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -8,7 +8,7 @@ <span id="new_id_label">ID: </span> <input id="new_id" name="id" - onblur="checkValidId(this.id)"><br/> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"><br/> <div align="center"> <input type="submit" name="manage_addRRDThreshold:method" value="Add"/> Modified: trunk/Products/ZenWidgets/skins/zenui/dialog_addZenPack.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/dialog_addZenPack.pt 2007-04-27 18:36:16 UTC (rev 4930) +++ trunk/Products/ZenWidgets/skins/zenui/dialog_addZenPack.pt 2007-04-27 19:15:11 UTC (rev 4931) @@ -10,7 +10,7 @@ </td><td> <input id="new_id" name="id" - onblur="checkValidId(this.id)"> + tal:attributes="onblur string:checkValidId('${here/absolute_url_path}', this.id)"> </td></tr> <tr><td>Author: </td><td><input name="author"/></td></tr> <tr><td>Organization: </td><td><input name="organization"/></td></tr> |
From: <sv...@ze...> - 2007-04-27 18:36:18
|
Author: ecn Date: 2007-04-27 14:36:16 -0400 (Fri, 27 Apr 2007) New Revision: 4930 Modified: trunk/Products/ZenStatus/zenping.py Log: go back to using status conf Modified: trunk/Products/ZenStatus/zenping.py =================================================================== --- trunk/Products/ZenStatus/zenping.py 2007-04-27 17:32:45 UTC (rev 4929) +++ trunk/Products/ZenStatus/zenping.py 2007-04-27 18:36:16 UTC (rev 4930) @@ -48,7 +48,7 @@ timeOut = 1.5 tries = 2 chunk = 75 - pingCycleInterval = 60 + cycleInterval = 60 configCycleInterval = 20*60 maxFailures = 2 pinger = None @@ -98,7 +98,7 @@ changed = False smc = self.dmd.getObjByPath(self.configpath) for att in ("timeOut", "tries", "chunk", - "pingCycleInterval", "configCycleInterval", + "cycleInterval", "configCycleInterval", "maxFailures",): before = getattr(self, att) after = getattr(smc, att) @@ -159,7 +159,7 @@ def pingCycle(self): "Start a new run against the ping job tree" - reactor.callLater(self.pingCycleInterval, self.pingCycle) + reactor.callLater(self.cycleInterval, self.pingCycle) if self.pingTreeIter == None: self.start = time.time() |
From: <sv...@ze...> - 2007-04-27 17:32:46
|
Author: ecn Date: 2007-04-27 13:32:45 -0400 (Fri, 27 Apr 2007) New Revision: 4929 Modified: trunk/Products/ZenHub/services/StatusConfig.py Log: everything goes on performance config Modified: trunk/Products/ZenHub/services/StatusConfig.py =================================================================== --- trunk/Products/ZenHub/services/StatusConfig.py 2007-04-27 17:29:16 UTC (rev 4928) +++ trunk/Products/ZenHub/services/StatusConfig.py 2007-04-27 17:32:45 UTC (rev 4929) @@ -40,7 +40,7 @@ def __init__(self, dmd, instance): HubService.__init__(self, dmd, instance) - self.config = self.dmd.Monitors.StatusMonitors._getOb(self.instance) + self.config = self.dmd.Monitors.Performance._getOb(self.instance) def remote_propertyItems(self): return self.config.propertyItems() |
From: <sv...@ze...> - 2007-04-27 17:29:22
|
Author: ecn Date: 2007-04-27 13:29:16 -0400 (Fri, 27 Apr 2007) New Revision: 4928 Modified: trunk/Products/ZenRRD/zenperfsnmp.py trunk/Products/ZenRRD/zenprocess.py Log: fix parent inheritence Modified: trunk/Products/ZenRRD/zenperfsnmp.py =================================================================== --- trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-27 17:20:03 UTC (rev 4927) +++ trunk/Products/ZenRRD/zenperfsnmp.py 2007-04-27 17:29:16 UTC (rev 4928) @@ -230,7 +230,7 @@ # these names need to match the property values in StatusMonitorConf maxRrdFileAge = 30 * (24*60*60) # seconds perfsnmpConfigInterval = 5*60 - properties = RRDDaemon.properties + ('perfsnmpCycleInterval',) + properties = SnmpDaemon.properties + ('perfsnmpCycleInterval',) initialServices = SnmpDaemon.initialServices + ['SnmpPerfConfig'] def __init__(self): Modified: trunk/Products/ZenRRD/zenprocess.py =================================================================== --- trunk/Products/ZenRRD/zenprocess.py 2007-04-27 17:20:03 UTC (rev 4927) +++ trunk/Products/ZenRRD/zenprocess.py 2007-04-27 17:29:16 UTC (rev 4928) @@ -249,7 +249,7 @@ 'eventGroup' : 'Process' } initialServices = SnmpDaemon.initialServices + ['ProcessConfig'] processConfigInterval = 5*60 - properties = RRDDaemon.properties + ('processCycleInterval',) + properties = SnmpDaemon.properties + ('processCycleInterval',) def __init__(self): SnmpDaemon.__init__(self, 'zenprocess') |
From: <sv...@ze...> - 2007-04-27 17:20:31
|
Author: ian Date: 2007-04-27 13:20:03 -0400 (Fri, 27 Apr 2007) New Revision: 4927 Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js Log: * Made submenus appear Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js 2007-04-27 16:10:02 UTC (rev 4926) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js 2007-04-27 17:20:03 UTC (rev 4927) @@ -51,7 +51,7 @@ } var hideMenu = function(menu) { - setStyle(menu, {'visibility':'hidden','z-index':'1', 'overflow':'hidden'}); + setStyle(menu, {'visibility':'hidden','z-index':'1'}); if (navigator.userAgent.match('Mac')) { try {setStyle(eventZenGrid.scrollbar, {'overflow':'auto'})} catch(e) {noop()}; @@ -62,8 +62,7 @@ dropOtherMenuButtons(rel); var relPos = calcMenuPos(rel, menu); setElementPosition(menu, relPos); - setStyle(menu, {'visibility':'visible','z-index':'10000','opacity':'0.98', - 'overflow':'hidden'}); + setStyle(menu, {'visibility':'visible','z-index':'10000','opacity':'0.98' }); if (navigator.userAgent.match('Mac')) { try {setStyle(eventZenGrid.scrollbar, {'overflow':'hidden'})} catch(e) {noop()}; |
From: <sv...@ze...> - 2007-04-27 16:10:02
|
Author: ian Date: 2007-04-27 12:10:02 -0400 (Fri, 27 Apr 2007) New Revision: 4926 Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js Log: * Fixed an FF/Mac scrollbar z-index issue Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js 2007-04-27 16:02:03 UTC (rev 4925) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/menus.js 2007-04-27 16:10:02 UTC (rev 4926) @@ -51,14 +51,23 @@ } var hideMenu = function(menu) { - setStyle(menu, {'visibility':'hidden','z-index':'1'}); + setStyle(menu, {'visibility':'hidden','z-index':'1', 'overflow':'hidden'}); + if (navigator.userAgent.match('Mac')) { + try {setStyle(eventZenGrid.scrollbar, {'overflow':'auto'})} + catch(e) {noop()}; + } } var showMenu = function(rel, menu) { dropOtherMenuButtons(rel); var relPos = calcMenuPos(rel, menu); setElementPosition(menu, relPos); - setStyle(menu, {'visibility':'visible','z-index':'10000','opacity':'0.98'}); + setStyle(menu, {'visibility':'visible','z-index':'10000','opacity':'0.98', + 'overflow':'hidden'}); + if (navigator.userAgent.match('Mac')) { + try {setStyle(eventZenGrid.scrollbar, {'overflow':'hidden'})} + catch(e) {noop()}; + } } var showContextMenu = function() { |
From: <sv...@ze...> - 2007-04-27 16:02:02
|
Author: marc Date: 2007-04-27 12:02:03 -0400 (Fri, 27 Apr 2007) New Revision: 4925 Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt trunk/Products/ZenModel/skins/zenmodel/deviceList.pt Log: * When form is submitted notabs param is now passed Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-27 15:53:07 UTC (rev 4924) +++ trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-27 16:02:03 UTC (rev 4925) @@ -23,6 +23,9 @@ page string:getEventListPage; "> <input type='hidden' name='zenScreenName' tal:attributes="value template/id" /> +<input type='hidden' name='notabs' + tal:condition="python:getattr(request, 'notabs', False)" + tal:attributes="value string:1" /> <tal:block metal:define-macro="eventTable"> <tal:block tal:define="tabletitle string:Event List;menu_id string:Event_list"> <tal:block metal:use-macro="here/zenuimacros/macros/zentable"> Modified: trunk/Products/ZenModel/skins/zenmodel/deviceList.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/deviceList.pt 2007-04-27 15:53:07 UTC (rev 4924) +++ trunk/Products/ZenModel/skins/zenmodel/deviceList.pt 2007-04-27 16:02:03 UTC (rev 4925) @@ -11,6 +11,9 @@ batch python: here.ZenTableManager.getBatch(tableName,objects);" > <input type="hidden" name="zenScreenName" tal:attributes="value template/id"/> +<input type='hidden' name='notabs' + tal:condition="python:getattr(request, 'notabs', False)" + tal:attributes="value string:1" /> <input type="hidden" name="tableName" tal:attributes="value tableName"/> <tal:block tal:define="tabletitle string:Device List; showfilterbox python:True; |
From: <sv...@ze...> - 2007-04-27 15:53:07
|
Author: marc Date: 2007-04-27 11:53:07 -0400 (Fri, 27 Apr 2007) New Revision: 4924 Modified: trunk/Products/ZenModel/Commandable.py trunk/Products/ZenModel/Device.py trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/DeviceOrganizer.py trunk/Products/ZenModel/IpService.py trunk/Products/ZenModel/IpServiceClass.py trunk/Products/ZenModel/OSProcess.py trunk/Products/ZenModel/OSProcessClass.py trunk/Products/ZenModel/OSProcessOrganizer.py trunk/Products/ZenModel/ServiceClass.py trunk/Products/ZenModel/ServiceOrganizer.py trunk/Products/ZenModel/System.py trunk/Products/ZenModel/WinService.py trunk/Products/ZenModel/migrate/menus.py Log: * Menu/Tab changes * Re-added DeviceClass methods Modified: trunk/Products/ZenModel/Commandable.py =================================================================== --- trunk/Products/ZenModel/Commandable.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/Commandable.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -207,7 +207,7 @@ def getPathToManageTab(self, commandId=None): # Try to dig up a management tab from the factory information. candidates = [a for a in self.factory_type_information[0]['actions'] - if a['name'] == 'Manage'] + if a['name'] == 'Administration'] if candidates: action = candidates[0] url = '%s/%s' % (self.getPrimaryUrlPath(), action['action']) Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/Device.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -305,7 +305,7 @@ , 'permissions' : ("Change Device",) }, # { 'id' : 'management' -# , 'name' : 'Manage' +# , 'name' : 'Administration' # , 'action' : 'deviceManagement' # , 'permissions' : ("Change Device",) # }, Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -210,8 +210,65 @@ dev.deleteDevice() if REQUEST: return self.callZenScreen(REQUEST) - - + + def setGroups(self, groupPaths=None, deviceNames=None, REQUEST=None): + """ Provide a method to set device groups from any organizer """ + if not groupPaths or not deviceNames: return self() + if type(deviceNames) == type(''): deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.setGroups(groupPaths) + if REQUEST: REQUEST['RESPONSE'].redirect(self.getPrimaryUrlPath()) + + def setSystems(self, systemPaths=None, deviceNames=None, REQUEST=None): + """ Provide a method to set device systems from any organizer """ + if not systemPaths or not deviceNames: return self() + if type(deviceNames) == types.StringType: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.setSystems(systemPaths) + if REQUEST: return self() + + def setLocation(self, locationPath=None, deviceNames=None, REQUEST=None): + """ Provide a method to set device location from any organizer """ + if not locationPath or not deviceNames: return self() + if type(deviceNames) == types.StringType: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.setLocation(locationPath) + if REQUEST: return self() + + + def unlockDevices(self, deviceNames=None, sendEventWhenBlocked=None, REQUEST=None): + """Unlock devices""" + if not deviceNames: return self() + if type(deviceNames) in types.StringTypes: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.unlock(sendEventWhenBlocked) + if REQUEST: + return self.callZenScreen(REQUEST) + + def lockDevicesFromDeletion(self, deviceNames=None, sendEventWhenBlocked=None, REQUEST=None): + """Lock devices from being deleted""" + if not deviceNames: return self() + if type(deviceNames) in types.StringTypes: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.lockFromDeletion(sendEventWhenBlocked) + if REQUEST: + return self.callZenScreen(REQUEST) + + def lockDevicesFromUpdates(self, deviceNames=None, sendEventWhenBlocked=None, REQUEST=None): + """Lock devices from being deleted or updated""" + if not deviceNames: return self() + if type(deviceNames) in types.StringTypes: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.lockFromUpdates(sendEventWhenBlocked) + if REQUEST: + return self.callZenScreen(REQUEST) + security.declareProtected('View', 'getEventDeviceInfo') def getEventDeviceInfo(self): """getEventDeviceInfo() -> return the info for NcoEventPopulator""" Modified: trunk/Products/ZenModel/DeviceOrganizer.py =================================================================== --- trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/DeviceOrganizer.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -67,7 +67,7 @@ permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'deviceOrganizerManage' , 'permissions' : ('Manage DMD',) }, Modified: trunk/Products/ZenModel/IpService.py =================================================================== --- trunk/Products/ZenModel/IpService.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/IpService.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -87,7 +87,7 @@ Permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'ipServiceManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/IpServiceClass.py =================================================================== --- trunk/Products/ZenModel/IpServiceClass.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/IpServiceClass.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -70,7 +70,7 @@ , 'permissions' : ("Manage DMD", ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'ipServiceClassManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/OSProcess.py =================================================================== --- trunk/Products/ZenModel/OSProcess.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/OSProcess.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -77,7 +77,7 @@ # , 'permissions' : ("Change Device", ) # }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'osProcessManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/OSProcessClass.py =================================================================== --- trunk/Products/ZenModel/OSProcessClass.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/OSProcessClass.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -77,7 +77,7 @@ , 'permissions' : ("Manage DMD", ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'osProcessClassManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/OSProcessOrganizer.py =================================================================== --- trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -73,7 +73,7 @@ Permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'osProcessOrganizerManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/ServiceClass.py =================================================================== --- trunk/Products/ZenModel/ServiceClass.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/ServiceClass.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -93,7 +93,7 @@ , 'permissions' : ("Manage DMD", ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'serviceClassManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/ServiceOrganizer.py =================================================================== --- trunk/Products/ZenModel/ServiceOrganizer.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/ServiceOrganizer.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -72,7 +72,7 @@ Permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'serviceOrganizerManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/System.py =================================================================== --- trunk/Products/ZenModel/System.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/System.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -107,7 +107,7 @@ permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'deviceOrganizerManage' , 'permissions' : ('Manage DMD',) }, Modified: trunk/Products/ZenModel/WinService.py =================================================================== --- trunk/Products/ZenModel/WinService.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/WinService.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -70,7 +70,7 @@ Permissions.view, ) }, { 'id' : 'manage' - , 'name' : 'Manage' + , 'name' : 'Administration' , 'action' : 'winServiceManage' , 'permissions' : ("Manage DMD",) }, Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-27 15:34:37 UTC (rev 4923) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-27 15:53:07 UTC (rev 4924) @@ -201,17 +201,6 @@ id='deviceManagement_os', permissions=('Change Device',) ), - dict(action='deviceOrganizerManage', - allowed_classes=['DeviceOrganizer', - 'DeviceGroup', - 'Location', - 'DeviceClass', - 'System'], - description='Administration', - ordering=70.0, - id='deviceOrganizerManage', - permissions=('Manage DMD',) - ), dict(action='eventClassInstSequence', allowed_classes=['EventClassInst'], description='Sequence', |
From: <sv...@ze...> - 2007-04-27 15:34:38
|
Author: ecn Date: 2007-04-27 11:34:37 -0400 (Fri, 27 Apr 2007) New Revision: 4923 Modified: trunk/Products/ZenEvents/EventFilter.py Log: fixed 1143 : add Location as a filter attribute for alertin rules Modified: trunk/Products/ZenEvents/EventFilter.py =================================================================== --- trunk/Products/ZenEvents/EventFilter.py 2007-04-27 15:24:48 UTC (rev 4922) +++ trunk/Products/ZenEvents/EventFilter.py 2007-04-27 15:34:37 UTC (rev 4923) @@ -60,6 +60,7 @@ return dict( eventClass=Select('Event Class', organizers), summary=Text("Summary"), + location=Text("Location"), prodState=Enumerated("Production State",pconv), severity=Enumerated("Severity",sconv), eventState=Enumerated("Event State",esconv), |
From: <sv...@ze...> - 2007-04-27 15:24:47
|
Author: ecn Date: 2007-04-27 11:24:48 -0400 (Fri, 27 Apr 2007) New Revision: 4922 Modified: trunk/inst/docs/HelloWorldZenPack/objects/objects.xml Log: rename Edit -> More Modified: trunk/inst/docs/HelloWorldZenPack/objects/objects.xml =================================================================== --- trunk/inst/docs/HelloWorldZenPack/objects/objects.xml 2007-04-27 15:23:31 UTC (rev 4921) +++ trunk/inst/docs/HelloWorldZenPack/objects/objects.xml 2007-04-27 15:24:48 UTC (rev 4922) @@ -251,7 +251,7 @@ 0 </property> </object> -<object id='/zport/dmd/zenMenus/Edit/zenMenuItems/hello' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> +<object id='/zport/dmd/zenMenus/More/zenMenuItems/hello' module='Products.ZenModel.ZenMenuItem' class='ZenMenuItem'> <property type="text" id="description" mode="w" > hello report </property> |
From: <sv...@ze...> - 2007-04-27 15:23:30
|
Author: ian Date: 2007-04-27 11:23:31 -0400 (Fri, 27 Apr 2007) New Revision: 4921 Modified: trunk/Products/ZenEvents/ZEvent.py trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js Log: * Added links back into event console * Tweaked resizing to handle negative values properly, and leave some margin Modified: trunk/Products/ZenEvents/ZEvent.py =================================================================== --- trunk/Products/ZenEvents/ZEvent.py 2007-04-27 15:17:39 UTC (rev 4920) +++ trunk/Products/ZenEvents/ZEvent.py 2007-04-27 15:23:31 UTC (rev 4921) @@ -17,6 +17,7 @@ # version 2.1 of the License, or (at your option) any later version. import cgi +import urllib from Globals import InitializeClass from AccessControl import ClassSecurityInfo @@ -40,7 +41,7 @@ def getDataForJSON(self, fields): """ returns data ready for serialization """ - return map(lambda x:getattr(self, x, None), list(fields)+['evid']) + return self.getDataListWithLinks(list(fields)+['evid']) def getDataListWithLinks(self, fields, cssClass=''): """return a list of data elements that map to the fields parameter. @@ -49,17 +50,15 @@ for field in fields: value = getattr(self, field) _shortvalue = str(value) or '' - if len(_shortvalue) > 50: - _shortvalue = _shortvalue[:47]+'...' + #if len(_shortvalue) > 50: + # _shortvalue = _shortvalue[:47]+'...' if field == "device": - value = ('<a class="%s"' % (cssClass) + + value = urllib.quote('<a class="%s"' % (cssClass) + ' href="/zport/dmd/deviceSearchResults' '?query=%s">%s</a>' % (value, _shortvalue)) elif field == 'eventClass': - value = ('<a class="%s" ' % (cssClass) + + value = urllib.quote('<a class="%s" ' % (cssClass) + 'href="/zport/dmd/Events%s">%s</a>' % (value,_shortvalue)) - elif field == 'summary' or field == 'message': - value = cgi.escape(_shortvalue) else: value = _shortvalue data.append(value) Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-27 15:17:39 UTC (rev 4920) +++ trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-27 15:23:31 UTC (rev 4921) @@ -111,15 +111,16 @@ </div> <script tal:content="string: -var mybuffer, myzengrid; +var eventZenGridBuffer, eventZenGrid; addLoadEvent( function() { - mybuffer = new ZenGridBuffer(); - myzengrid = new ZenGrid('gridcontainer', - 'getJSONEventsInfo', 'mygrid', mybuffer, '${here/absolute_url_path}'); + eventZenGridBuffer = new ZenGridBuffer(); + eventZenGrid = new ZenGrid('gridcontainer', + 'getJSONEventsInfo', 'mygrid', eventZenGridBuffer, + '${here/absolute_url_path}'); - connect('filter', 'onkeyup', myzengrid.doEventLivesearch); - connect('state', 'onchange', myzengrid.refreshFromFormElement); - connect('severity', 'onchange', myzengrid.refreshFromFormElement); + connect('filter', 'onkeyup', eventZenGrid.doEventLivesearch); + connect('state', 'onchange', eventZenGrid.refreshFromFormElement); + connect('severity', 'onchange', eventZenGrid.refreshFromFormElement); });"> </script> </td></tr> Modified: trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-27 15:17:39 UTC (rev 4920) +++ trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-27 15:23:31 UTC (rev 4921) @@ -78,11 +78,11 @@ </div> <script tal:content="string: -var mybuffer, myzengrid; +var eventZenGridBuffer, eventZenGrid; addLoadEvent( function() { - mybuffer = new ZenGridBuffer(); - myzengrid = new ZenGrid('gridcontainer', - 'getJSONHistoryEventsInfo', 'mygrid', mybuffer, + eventZenGridBuffer = new ZenGridBuffer(); + eventZenGrid = new ZenGrid('gridcontainer', + 'getJSONHistoryEventsInfo', 'mygrid', eventZenGridBuffer, '${here/absolute_url_path}', 1 ); });"> </script> @@ -102,7 +102,7 @@ edate = new Date(sdate.getTime() + 86400000); enddateInput.value = getDateString(edate); } - myzengrid.refreshWithParams({ + eventZenGrid.refreshWithParams({ startdate:$('startdate').value, enddate:$('enddate').value }); Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-27 15:17:39 UTC (rev 4920) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-27 15:23:31 UTC (rev 4921) @@ -185,10 +185,10 @@ {}; this.fields = []; this.fieldMapping = { - summary: -2, + summary: -4, firstTime: 0, lastTime: 0, - component: -1, + component: +1, count: +3 } this.lastOffset = 0; @@ -475,7 +475,9 @@ {h:parseInt(this.rowToPixel(numrows))} ); var scrollHeight = parseInt(this.rowToPixel(numrows)); - if (scrollHeight<=getElementDimensions(this.zgtable).h-2) { + if (scrollHeight <= 0) + setElementDimensions(this.scrollbar, {h:0}); + else if (scrollHeight<=getElementDimensions(this.zgtable).h-2) { setStyle(this.scrollbar, {'display':'none'}); } else { setElementDimensions(this.scrollbar, {h:scrollHeight}); @@ -535,8 +537,8 @@ " about this event." for (j=isManager?1:0;j<yo.length-1;j++) { var cellwidth = this.abswidths[j] - divs[j].innerHTML = mydata[j]; - yo[j].title = mydata[j]; + divs[j].innerHTML = unescape(mydata[j]); + yo[j].title = scrapeText(divs[j]); } } @@ -734,14 +736,18 @@ }, resizeTable: function() { var maxTableBottom = getViewportDimensions().h + - getViewportPosition().y; - var curTableBottom = getElementDimensions(this.viewport).h + - getElementPosition(this.viewport).y; + getViewportPosition().y - 20; + var curTableBottom = + Math.max(0, + getElementDimensions(this.viewport).h + + getElementPosition(this.viewport).y); + log("Current: " + curTableBottom); + log("Max: " + maxTableBottom); var diff = maxTableBottom - curTableBottom; var rowdiff = Math.floor(diff/this.rowSizePlus); - this.numRows += rowdiff; - this.setTableNumRows( - Math.min(this.rowEls.length + rowdiff, this.buffer.totalRows)); + if (rowdiff==0) return; + this.numRows = this.buffer.pageSize = Math.max(1, this.numRows + rowdiff); + this.setTableNumRows( Math.min( this.numRows, this.buffer.totalRows)); this.refreshTable(this.lastOffset); this.updateStatusBar(this.lastOffset); }, @@ -769,6 +775,10 @@ this.colgroup = swapDOM(this.colgroup, this.getColgroup()); this.headcolgroup = swapDOM(this.headcolgroup, this.getColgroup()); //this.refreshTable(this.lastOffset); + }, + getEvidSummary: function() { + //this.checkedArray; + //this.selectstatus; } } |