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-26 11:42:21
|
Author: jstevens Date: 2007-04-26 07:42:22 -0400 (Thu, 26 Apr 2007) New Revision: 4870 Modified: trunk/bin/zenbackup.py trunk/bin/zenbackupcommon.py trunk/bin/zenrestore.py Log: Fixing a couple more imports/etc that were screwed up by a recent commit. Modified: trunk/bin/zenbackup.py =================================================================== --- trunk/bin/zenbackup.py 2007-04-26 11:35:13 UTC (rev 4869) +++ trunk/bin/zenbackup.py 2007-04-26 11:42:22 UTC (rev 4870) @@ -37,7 +37,8 @@ from Products.ZenUtils.ZCmdBase import ZCmdBase import sys import os -import os.pathimport tempfile +import os.path +import tempfile from datetime import date import getpass import ConfigParser Modified: trunk/bin/zenbackupcommon.py =================================================================== --- trunk/bin/zenbackupcommon.py 2007-04-26 11:35:13 UTC (rev 4869) +++ trunk/bin/zenbackupcommon.py 2007-04-26 11:42:22 UTC (rev 4870) @@ -1,3 +1,4 @@ +#! /usr/bin/env python ########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. @@ -20,7 +21,6 @@ # under the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # For complete information please visit: http://www.zenoss.com/oss/ -#! /usr/bin/env python __doc__='''zenbackupcommon.py @@ -32,6 +32,7 @@ CONFIG_FILE = 'backup.settings' CONFIG_SECTION = 'zenbackup' -CONFIG_FIELDS = ( ('dbname', 'events', 'database'), ('dbuser', 'root', 'username'), +CONFIG_FIELDS = ( ('dbname', 'events', 'database'), + ('dbuser', 'root', 'username'), ('dbpass', '', 'password')) Modified: trunk/bin/zenrestore.py =================================================================== --- trunk/bin/zenrestore.py 2007-04-26 11:35:13 UTC (rev 4869) +++ trunk/bin/zenrestore.py 2007-04-26 11:42:22 UTC (rev 4870) @@ -32,7 +32,8 @@ import sys import os import os.path -import tempfileimport ConfigParser +import tempfile +import ConfigParser from zenbackupcommon import * |
From: <sv...@ze...> - 2007-04-26 11:35:11
|
Author: jstevens Date: 2007-04-26 07:35:13 -0400 (Thu, 26 Apr 2007) New Revision: 4869 Modified: trunk/bin/zenbackup.py Log: Restoring deleted newline Modified: trunk/bin/zenbackup.py =================================================================== --- trunk/bin/zenbackup.py 2007-04-26 11:33:31 UTC (rev 4868) +++ trunk/bin/zenbackup.py 2007-04-26 11:35:13 UTC (rev 4869) @@ -32,7 +32,8 @@ Creates backup of zope data files, zenoss conf files and the events database. ''' -import Globalsfrom Products.ZenUtils.CmdBase import CmdBase +import Globals +from Products.ZenUtils.CmdBase import CmdBase from Products.ZenUtils.ZCmdBase import ZCmdBase import sys import os |
From: <sv...@ze...> - 2007-04-26 11:33:32
|
Author: jstevens Date: 2007-04-26 07:33:31 -0400 (Thu, 26 Apr 2007) New Revision: 4868 Modified: trunk/bin/zenbackup.py trunk/bin/zenrestore.py Log: Restored the #! line at the top of the files. Modified: trunk/bin/zenbackup.py =================================================================== --- trunk/bin/zenbackup.py 2007-04-26 07:29:44 UTC (rev 4867) +++ trunk/bin/zenbackup.py 2007-04-26 11:33:31 UTC (rev 4868) @@ -1,3 +1,4 @@ +#! /usr/bin/env python ########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. @@ -25,7 +26,6 @@ # under the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # For complete information please visit: http://www.zenoss.com/oss/ -#! /usr/bin/env python __doc__='''zenbackup Modified: trunk/bin/zenrestore.py =================================================================== --- trunk/bin/zenrestore.py 2007-04-26 07:29:44 UTC (rev 4867) +++ trunk/bin/zenrestore.py 2007-04-26 11:33:31 UTC (rev 4868) @@ -1,3 +1,4 @@ +#! /usr/bin/env python ########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. @@ -20,7 +21,6 @@ # under the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # For complete information please visit: http://www.zenoss.com/oss/ -#! /usr/bin/env python __doc__='''zenrestore |
From: <sv...@ze...> - 2007-04-26 07:29:44
|
Author: ian Date: 2007-04-26 03:29:44 -0400 (Thu, 26 Apr 2007) New Revision: 4867 Added: trunk/Products/ZenWidgets/skins/zenui/img/event_detail.png Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js Log: * Many bug fixes and feature additions on ZenGrids. Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-25 22:10:58 UTC (rev 4866) +++ trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-26 07:29:44 UTC (rev 4867) @@ -1,12 +1,11 @@ <tal:block metal:use-macro="here/templates/macros/page2"> <tal:block metal:fill-slot="contentPane"> +<link type="text/css" rel="stylesheet" href="css/zengrid.css"/> <script type="text/javascript" src="/zport/js/zenutils.js"></script> <script type="text/javascript" src="/zport/javascript/zengrid.js"></script> <script type="text/javascript" src="/zport/portal_skins/zenevents/zeneventsfuncs.js"></script> -<style> -</style> <form name="control" method="post" tal:attributes="action here/absolute_url_path" tal:define=" @@ -105,55 +104,20 @@ </tal:block> <tr><td> -<style> -.leftfloat { float:left } -span.ruler, -td.cell { - margin: 0px; - overflow: hidden; - white-space: nowrap; - height: 32px; - border-bottom: 1px solid #000; - border-right: 1px solid #888; - cursor: default; - padding: 0; -} -.zg_headers { - position: relative; - left: 1px; -} -.zg_headers td.cell { - font-weight: bold; - padding 0; - border: medium none; - border-right: 1px solid #888; -} -.zg_headers td.cell:hover { - background-color: #888; - color: white; -} -div.cell_inner { - padding:0 3px;margin:0; - overflow:hidden; - height: 32px; - white-space: normal; - font-size: 12px; - line-height: 132%; - vertical-align: middle; -} -</style> <div id="gridcontainer" style="width:100%;"> </div> <script> +var mybuffer, myzengrid; addLoadEvent( function() { - var b = new ZenGridBuffer(); - var mygrid = new ZenGrid('gridcontainer', 'getJSONEventsInfo', 'mygrid', b); - connect('filter', 'onkeyup', mygrid.doEventLivesearch); - connect('state', 'onchange', mygrid.refreshFromFormElement); - connect('severity', 'onchange', mygrid.refreshFromFormElement); + mybuffer = new ZenGridBuffer(); + myzengrid = new ZenGrid('gridcontainer', + 'getJSONEventsInfo', 'mygrid', mybuffer); + connect('filter', 'onkeyup', myzengrid.doEventLivesearch); + connect('state', 'onchange', myzengrid.refreshFromFormElement); + connect('severity', 'onchange', myzengrid.refreshFromFormElement); }); </script> </td></tr> Modified: trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-25 22:10:58 UTC (rev 4866) +++ trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-26 07:29:44 UTC (rev 4867) @@ -2,6 +2,7 @@ <tal:block metal:fill-slot="contentPane"> <span metal:define-macro="body"> +<link type="text/css" rel="stylesheet" href="css/zengrid.css"/> <script type="text/javascript"> var djConfig = { isDebug: true }; </script> <script type="text/javascript" src="/zport/js/zenutils.js"></script> <script type="text/javascript" src="/zport/javascript/zengrid.js"></script> @@ -91,56 +92,20 @@ --> <tr><td> -<style> -.leftfloat { float:left } -span.ruler, -td.cell { - margin: 0px; - overflow: hidden; - white-space: nowrap; - height: 32px; - border-bottom: 1px solid #000; - border-right: 1px solid #888; - cursor: default; - padding: 0; -} -.zg_headers { - position: relative; - left: 1px; -} -.zg_headers td.cell { - font-weight: bold; - padding 0; - border: medium none; - border-right: 1px solid #888; -} -.zg_headers td.cell:hover { - background-color: #888; - color: white; -} -div.cell_inner { - padding:0 3px;margin:0; - overflow:hidden; - height: 32px; - white-space: normal; - font-size: 12px; - line-height: 132%; - vertical-align: middle; -} -</style> <div id="gridcontainer" style="width:100%;"> </div> <script> +var mybuffer, myzengrid; addLoadEvent( function() { - var b = new ZenGridBuffer(); - var mygrid = new ZenGrid('gridcontainer', - 'getJSONHistoryEventsInfo', 'mygrid', b, 1); - connect('filter', 'onkeyup', mygrid.doEventLivesearch); - connect('state', 'onchange', mygrid.refreshFromFormElement); - connect('severity', 'onchange', mygrid.refreshFromFormElement); + mybuffer = new ZenGridBuffer(); + myzengrid = new ZenGrid('gridcontainer', + 'getJSONHistoryEventsInfo', 'mygrid', mybuffer); + //connect('filter', 'onkeyup', myzengrid.doEventLivesearch); + //connect('state', 'onchange', myzengrid.refreshFromFormElement); + //connect('severity', 'onchange', myzengrid.refreshFromFormElement); }); </script> </td></tr> Modified: trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css 2007-04-25 22:10:58 UTC (rev 4866) +++ trunk/Products/ZenWidgets/skins/zenui/css/zengrid.css 2007-04-26 07:29:44 UTC (rev 4867) @@ -6,3 +6,76 @@ margin: 0; } +.leftfloat { float:left } +span.ruler, +td.cell { + background-color: transparent; + margin: 0px; + overflow: hidden; + white-space: nowrap; + height: 32px; + border-bottom: 1px solid #000; + border-right: 1px solid #888; + cursor: default; + padding: 0; +} +.zg_statusbar { + height:18px; + padding: 2px; + border-bottom: 1px solid #888; + background-color: white; +} +#currentRows { + font-weight: bold; + float: right; +} +.zg_statusbar ul { + list-style-type: none; + display: inline; + margin: 0; padding: 0; +} +.zg_statusbar li { + display:inline; + text-decoration: underline; + color: darkblue; + margin: 0 4px; + cursor: pointer; +} +.zg_headers { + position: relative; + left: 1px; + height: 20px !important; +} +.zg_headers td.cell { + font-weight: bold; + padding 0; + border: medium none; + border-right: 1px solid #888; + height:20px !important; +} +.zg_headers td.cell div.cell_inner { + height:20px !important; +} +div.event_detail { + background: transparent url(img/event_detail.png) top left; + height: 32px; + width: 32px; + cursor:pointer;cursor:hand; +} +.zg_headers div.event_detail { + background-image: url(); + height: 20px; +} +.zg_headers td.cell:hover { + background-color: #888; + color: white; +} +div.cell_inner { + padding:0 3px;margin:0; + overflow:hidden; + height: 32px; + white-space: normal; + font-size: 12px; + line-height: 132%; + vertical-align: middle; +} Added: trunk/Products/ZenWidgets/skins/zenui/img/event_detail.png Property changes on: trunk/Products/ZenWidgets/skins/zenui/img/event_detail.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-25 22:10:58 UTC (rev 4866) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-26 07:29:44 UTC (rev 4867) @@ -34,10 +34,7 @@ setStyle(this.framework, { 'width':'15em', 'position':'absolute', - 'z-index':'11000', - 'top':'0', - 'left':'100', - 'visibility':'visible' + 'z-index':'11000' }); setStyle($('zengridload_content'), { 'font-weight':'bold', @@ -47,11 +44,11 @@ }); }, - show: function() { - setStyle(this.framework, {'visibility':'visible'}); + show: function(center) { + setStyle(this.framework, {'display':'block'}); }, hide: function() { - setStyle(this.framework, {'visibility':'hidden'}); + setStyle(this.framework, {'display':'none'}); } } var ZenGridBuffer = Class.create(); @@ -190,7 +187,7 @@ this.container = $(container); this.gridId = gridId; this.buffer = buffer; - this.numRows = 15; + this.numRows = 10; this.rowHeight = 32; this.checkedArray = new Array(); this.url = url; @@ -198,30 +195,61 @@ this.fields = []; this.lastOffset = 0; this.lastPixelOffset = this.lastPixelOffset || 0; - this.fontProportion = this.getFontProportion(); this.buildHTML(); + this.selectstatus = 'none'; this.clearFirst = false; this.lock = new DeferredLock(); this.scrollTimeout = null; this.loadingbox = new ZenGridLoadingMsg('Loading...'); + this.showLoading(); fieldlock = this.lock.acquire(); fieldlock.addCallback(this.refreshFields); updatelock = this.lock.acquire(); updatelock.addCallback(bind(function(r){ this.refreshTable(this.lastOffset); + this.updateStatusBar(this.lastOffset); this.lock.release(); }, this)); this.addMouseWheelListening(); connect(this.scrollbar, 'onscroll', this.handleScroll); }, - getFontProportion: function() { - var x = SPAN({class:'ruler'}, - 'abcdefghijklmnopqrstuvwxyz'); - appendChildNodes(document.body, x); - var myw = getElementDimensions(x).w/26; - removeElement(x); - return myw; + setSelectNone: function() { + this.checkedArray = new Array(); + var cbs = this.viewport.getElementsByTagName('input'); + for (i=0;i<cbs.length;i++) { + cbs[i].checked=null; + } + this.selectstatus = 'none'; }, + setSelectAll: function() { + this.checkedArray = new Array(); + var cbs = this.viewport.getElementsByTagName('input'); + for (i=0;i<cbs.length;i++) { + cbs[i].checked=true; + } + this.selectstatus = 'all'; + }, + setSelectAcked: function() { + this.checkedArray = new Array(); + var cbs = this.viewport.getElementsByTagName('input'); + var rows = this.zgtable.getElementsByTagName('tr'); + for (i=0;i<cbs.length;i++) { + rowclass = rows[i].className; + cbs[i].checked=null; + if (rowclass.match('acked')) cbs[i].checked=true; + } + this.selectstatus = 'acked'; + }, + setSelectUnacked: function() { + this.checkedArray = new Array(); + var cbs = this.viewport.getElementsByTagName('input'); + for (i=0;i<cbs.length;i++) { + rowclass = rows[i].className; + cbs[i].checked=null; + if (rowclass.match('noack')) cbs[i].checked=true; + } + this.selectstatus = 'unacked'; + }, addMouseWheelListening: function() { if (this.container.addEventListener) this.container.addEventListener( @@ -247,7 +275,7 @@ }, scrollTable: function(delta) { if (this.scrollTimeout) clearTimeout(this.scrollTimeout); - var pixelDelta = delta * (this.rowHeight+4); + var pixelDelta = this.rowToPixel(delta); this.scrollbar.scrollTop -= pixelDelta; }, getColLengths: function() { @@ -290,7 +318,7 @@ bind(function(r) { result = r; //evalJSON(r.responseText); // For POST this.buffer.totalRows = result[1]; - this.setScrollHeight(this.buffer.totalRows*(this.rowHeight+4)); + this.setScrollHeight(this.rowToPixel(this.buffer.totalRows)); this.buffer.update(result[0], offset); this.lock.release(); }, this)); @@ -298,6 +326,7 @@ refreshTable: function(offset) { this.showLoading(); var offset = offset || this.lastOffset; + this.scrollbar.scrollTop = this.rowToPixel(offset); if (offset + this.numRows > this.buffer.startPos + this.buffer.size || offset < this.buffer.startPos - this.numRows) { d = this.lock.acquire(); @@ -321,17 +350,18 @@ return TR({'class':'zengrid_row'}, cells); }, populateRow: function(row, data) { - var stuffz = getElementsByTagAndClassName('div', 'cell_inner', row) - for (i=0;i<stuffz.length;i++) { + var stuffz = row.getElementsByTagName('div') + for (i=0;i<stuffz.length-1;i++) { stuffz[i].innerHTML = data[i]; - //addElementClass(stuffz[i], data[data.length-1]); } + setElementClass(stuffz[stuffz.length-1], 'event_detail'); if (isManager) { - var cb = INPUT({type:'checkbox', - style: 'visibility:hidden;'}, null); - replaceChildNodes(stuffz[0], cb); + var cb = '<input type="checkbox" style="visibility:hidden"/>'; + stuffz[0].innerHTML = cb; } + setStyle(stuffz[0], {'width':'20px'}); + setStyle(stuffz[stuffz.length-1], {'width':'32px'}); }, getColgroup: function() { var widths = this.getColLengths(); @@ -339,6 +369,8 @@ if (parseFloat(w)<3) w=String(3); return createDOM( 'col', {width: w+'%'}, null) }, widths); + cols[0].width='0*'; + cols[cols.length-1].width='32'; colgroup = createDOM('colgroup', {span:widths.length, height:'32px'}, cols); return colgroup; @@ -387,7 +419,7 @@ if (this.isHistory) fieldparams['history'] = 1; var x = loadJSONDoc('getJSONFields', fieldparams); x.addCallback(bind(function(r){ - this.fields=r; + this.fields=concat(r,[[' ','']]); if (isManager) this.fields = concat([[' ','']], this.fields); updateColumns(); }, this)); @@ -396,60 +428,82 @@ table = this.zgtable; var cells = getElementsByTagAndClassName('div', 'cell_inner', table); for (i=0;(cell=cells[i]);i++){ - replaceChildNodes(cell, null); + cell.innerHTML=''; } }, setTableNumRows: function(numrows) { this.rowEls = map(this.getBlankRow, range(numrows)); replaceChildNodes(this.output, this.rowEls); setElementDimensions(this.viewport, - {h:parseInt(numrows*(this.rowHeight+4))} + {h:parseInt(this.rowToPixel(numrows))} ); - var scrollHeight = parseInt(numrows * (this.rowHeight+4)); + var scrollHeight = parseInt(this.rowToPixel(numrows)); if (scrollHeight<=getElementDimensions(this.zgtable).h) { setStyle(this.scrollbar, {'display':'none'}); } else { setElementDimensions(this.scrollbar, {h:scrollHeight}); } }, + shouldBeChecked: function(evid, klass) { + if (this.checkedArray[evid]=='checked') + return true; + if (this.checkedArray[evid]=='blank') + return false; + switch (this.selectstatus) { + case 'none': return false; + case 'all': return true; + case 'acked': + return !!klass.match('acked'); + case 'unacked': + return !!klass.match('noack'); + } + return false; + }, populateTable: function(data) { + var zem = this.isHistory?'/zport/dmd/ZenEventHistory': + '/zport/dmd/ZenEventManager'; var tableLength = data.length > this.numRows ? this.numRows : data.length; if (tableLength != this.rowEls.length){ - this.clearTable(); + //this.clearTable(); this.setTableNumRows(tableLength); } rows = this.rowEls; disconnectAllTo(this.markAsChecked); for (i=0;i<rows.length&&i<data.length;i++) { var mydata = data[i]; + setElementClass(rows[i], mydata[mydata.length-1]) var evid = mydata[mydata.length-2]; - var chkboxparams = {type:'checkbox', name:'evids:list', - value:evid}; - if (this.checkedArray[evid]) chkboxparams.checked=true; - var chkbox = INPUT(chkboxparams, null); + var chkbox = '<input type="checkbox" name="evids:list" '; + if (this.shouldBeChecked(evid, mydata[mydata.length-1])) + chkbox+='checked '; + chkbox += 'value="'+evid+'" id="'+evid+'"/>'; var yo = rows[i].getElementsByTagName('td'); - var divs = getElementsByTagAndClassName('div','cell_inner', rows[i]); + var divs = rows[i].getElementsByTagName('div'); var firstcol = yo[0]; if (isManager) { mydata = concat([''],mydata); - replaceChildNodes(divs[0], chkbox); - setElementClass(firstcol, 'cell ' + mydata[mydata.length-1]) - connect(chkbox, 'onclick', this.markAsChecked); + divs[0].innerHTML = chkbox; + setStyle(divs[0], {'width':'20px'}); + //setElementClass(firstcol, 'cell ' + mydata[mydata.length-1]) + connect($(evid), 'onclick', this.markAsChecked); } - for (j=isManager?1:0;j<yo.length;j++) { + var lastcol = yo[yo.length-1]; + //setElementClass(lastcol, 'cell ' + mydata[mydata.length-1]) + setElementClass(divs[yo.length-1], 'event_detail'); + disconnectAll(divs[yo.length-1]); + connect(divs[yo.length-1], 'onclick', function() { + eventWindow(zem, evid); + }); + divs[yo.length-1].title = "View detailed information" + + " about this event." + for (j=isManager?1:0;j<yo.length-1;j++) { var cellwidth = this.abswidths[j] - switch (this.fields[j][0]) { - case 'firstTime': - case 'lastTime': - replaceChildNodes(divs[j], isoTimestamp(mydata[j])); - default: - divs[j].innerHTML = mydata[j]; - } - divs[j].title = this.abswidths[j]; - var newClass = 'cell ' + mydata[mydata.length-1]; - if (yo[j].className!=newClass) - setElementClass(yo[j], newClass) + divs[j].innerHTML = mydata[j]; + yo[j].title = mydata[j]; + //var newClass = 'cell ' + mydata[mydata.length-1]; + //if (yo[j].className!=newClass) + //setElementClass(yo[j], newClass) } } @@ -459,7 +513,7 @@ getTotalRows: function() { cb = bind(function(r) { this.buffer.totalRows = r; - this.setScrollHeight(this.buffer.totalRows*(this.rowHeight+4)); + this.setScrollHeight(this.rowToPixel(this.buffer.totalRows)); this.lock.release(); }, this); d = loadJSONDoc('getEventCount'); @@ -493,6 +547,20 @@ TFOOT(null, null) ]); this.viewport = DIV( {id: getId('viewport')}, this.zgtable ); + this.statusBar = DIV( {id:getId('statusbar'), class:'zg_statusbar'}, + SPAN({id:'currentRows'}, String(0+1 + '-' + + parseInt(parseInt(0)+parseInt(this.numRows)) + + ' of ' + this.buffer.totalRows)), + [ 'Select: ', + UL(null, + [ + LI({'id':'setSelectNone'}, 'None'), + LI({'id':'setSelectAll'}, 'All'), + LI({'id':'setSelectAcked'}, 'Acknowledged'), + LI({'id':'setSelectUnacked'}, 'Unacknowledged') + ]) + ] + ); this.headers = TABLE( {id: getId('headers'), class:"zg_headers", cellspacing:0, cellpadding:0}, [ this.headcolgroup, @@ -515,7 +583,7 @@ }); setStyle(this.viewport, { 'width':'98%', - 'height':(this.rowHeight+4)*(this.numRows)+'px', + 'height':this.rowToPixel(this.numRows)+'px', 'overflow':'hidden', 'float':'left', 'border':'1px solid black', @@ -526,14 +594,19 @@ { 'border': '1px solid black', 'border-left': 'medium none', 'overflow': 'auto', + 'z-index':'300', 'position': 'relative', 'left': '-3px', 'width': '19px', - 'height': (this.rowHeight+4)*(this.numRows)+'px' + 'height': this.rowToPixel(this.numRows)+'px' }); - var scrollHeight = this.buffer.totalRows * (this.rowHeight+4); + var scrollHeight = this.rowToPixel(this.buffer.totalRows); this.setScrollHeight(scrollHeight); - appendChildNodes(this.container, this.headers, this.innercont); + appendChildNodes(this.container, this.statusBar, this.headers, this.innercont); + connect('setSelectNone', 'onclick', this.setSelectNone); + connect('setSelectAll', 'onclick', this.setSelectAll); + connect('setSelectAcked', 'onclick', this.setSelectAcked); + connect('setSelectUnacked', 'onclick', this.setSelectUnacked); }, setScrollHeight: function(scrlheight) { @@ -542,26 +615,34 @@ {'height':String(parseInt(scrlheight)) + 'px'} ); }, + rowToPixel: function(row) { + return row * (this.rowHeight+4); + }, + pixelToRow: function(pixel) { + var prow = parseInt(pixel/(this.rowHeight+4)); + return Math.max(0, prow); + }, scrollToPixel: function(pixel) { - this.lastPixelOffset = this.lastPixelOffset || 0; - //var diff = (pixel-this.lastPixelOffset) % (this.rowHeight+4); - //if (diff) { - //pixel += diff; - //} - var newOffset = Math.round(pixel/(this.rowHeight+4)); + var diff = this.lastPixelOffset-pixel; + if (diff==0.00) return; + var sign = Math.abs(diff)/diff; + pixel = sign<0? + Math.ceil(pixel/(this.rowHeight+4))*(this.rowHeight+4): + Math.floor(pixel/(this.rowHeight+4))*(this.rowHeight+4); + var newOffset = this.pixelToRow(pixel); + this.updateStatusBar(newOffset); this.refreshTable(newOffset); - this.scrollbar.scrollTop = pixel; this.lastPixelOffset = pixel; }, handleScroll: function() { this.showLoading(); - clearTimeout(this.scrollTimeout); + //clearTimeout(this.scrollTimeout); this.nextScrollPosition = this.scrollbar.scrollTop || 0; if (this.nextScrollPosition==0) this.scrollToPixel(this.nextScrollPosition); - this.scrollTimeout = setTimeout ( - bind(function() { + //this.scrollTimeout = setTimeout ( + //bind(function() { this.scrollToPixel(this.nextScrollPosition) - }, this), 50); + //}, this), 0); }, refreshFromFormElement: function(e) { node = e.src(); @@ -597,14 +678,31 @@ }, this), 500); }, + updateStatusBar: function(rownum) { + $('currentRows').innerHTML = rownum+1 + '-' + + parseInt(parseInt(rownum)+parseInt(this.numRows)) + + ' of ' + this.buffer.totalRows; + }, markAsChecked: function(e) { var node = e.src(); - this.checkedArray[node.value] = node.checked; + + this.checkedArray[node.value] = node.checked? + 'checked':'blank' }, + getViewportCenter: function() { + var dims = getElementDimensions(this.viewport); + var pos = getElementPosition(this.viewport); + return {x:(dims.w/2)+pos.x, y:(dims.h/2)+pos.y} + }, showLoading: function() { clearTimeout(this.isLoading); this.isLoading = setTimeout( bind(function() { - this.loadingbox.show(); + var p = this.getViewportCenter(); + var d = getElementDimensions(this.loadingbox); + var pos = {x:p.x-(d.w/2),y:p.y-(d.h/2)}; + this.loadingbox.style.top = pos.y; + this.loadingbox.style.left = pos.x; + this.loadingbox.show(p); }, this), 500); }, killLoading: function() { |
From: <sv...@ze...> - 2007-04-25 22:11:01
|
Author: ian Date: 2007-04-25 18:10:58 -0400 (Wed, 25 Apr 2007) New Revision: 4866 Modified: trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt trunk/Products/ZenModel/EventView.py trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js Log: * Added a loading box on event console. Still need to position it centered. Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 21:08:31 UTC (rev 4865) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 22:10:58 UTC (rev 4866) @@ -939,13 +939,6 @@ REQUEST.RESPONSE.setHeader("Pragma", "no-cache") return info - - security.declareProtected('View','getJSONHistoryEventsInfo') - def getJSONHistoryEventsInfo(self, context, **kwargs): - kwargs['history'] = True - return self.getJSONEventsInfo(context, **kwargs) - - security.declareProtected('View','getJSONEventsInfo') def getJSONEventsInfo(self, context, offset=0, count=50, getTotalCount=True, @@ -954,7 +947,6 @@ """ Event data in JSON format. """ fields = self.lookupManagedEntityResultFields(context.event_key) - if orderby=='count': orderby='rows' data, totalCount = self.getEventListME(context, offset=offset, rows=count, resultFields=fields, getTotalCount=getTotalCount, filter=filter, severity=severity, Modified: trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-25 21:08:31 UTC (rev 4865) +++ trunk/Products/ZenEvents/skins/zenevents/viewEvents.pt 2007-04-25 22:10:58 UTC (rev 4866) @@ -147,15 +147,14 @@ </div> -<script tal:content="string: +<script> addLoadEvent( function() { var b = new ZenGridBuffer(); - var mygrid = new ZenGrid('gridcontainer', 'getJSONEventsInfo', - ${resultFields}, 'mygrid', b); + var mygrid = new ZenGrid('gridcontainer', 'getJSONEventsInfo', 'mygrid', b); connect('filter', 'onkeyup', mygrid.doEventLivesearch); connect('state', 'onchange', mygrid.refreshFromFormElement); connect('severity', 'onchange', mygrid.refreshFromFormElement); -});"> +}); </script> </td></tr> <!-- END TABLE CONTENTS --> Modified: trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-25 21:08:31 UTC (rev 4865) +++ trunk/Products/ZenEvents/skins/zenevents/viewHistoryEvents.pt 2007-04-25 22:10:58 UTC (rev 4866) @@ -93,34 +93,51 @@ <style> .leftfloat { float:left } +span.ruler, td.cell { - font-family: Trebuchet,verdana,helvetica,sans-serif; - font-size: 11px; - line-height: 12px; margin: 0px; overflow: hidden; white-space: nowrap; - border-spacing: 1px; - border: 1px solid #666; - height: 22px; + height: 32px; + border-bottom: 1px solid #000; + border-right: 1px solid #888; cursor: default; + padding: 0; } +.zg_headers { + position: relative; + left: 1px; +} +.zg_headers td.cell { + font-weight: bold; + padding 0; + border: medium none; + border-right: 1px solid #888; +} +.zg_headers td.cell:hover { + background-color: #888; + color: white; +} +div.cell_inner { + padding:0 3px;margin:0; + overflow:hidden; + height: 32px; + white-space: normal; + font-size: 12px; + line-height: 132%; + vertical-align: middle; +} </style> <div id="gridcontainer" style="width:100%;"> </div> -<script tal:content="string: - var thisurl = '${here/absolute_url_path}'"> - </script> - <script> addLoadEvent( function() { var b = new ZenGridBuffer(); var mygrid = new ZenGrid('gridcontainer', - thisurl + '/ZenEventHistory/getJSONEventsInfo', - 'mygrid', b); + 'getJSONHistoryEventsInfo', 'mygrid', b, 1); connect('filter', 'onkeyup', mygrid.doEventLivesearch); connect('state', 'onchange', mygrid.refreshFromFormElement); connect('severity', 'onchange', mygrid.refreshFromFormElement); Modified: trunk/Products/ZenModel/EventView.py =================================================================== --- trunk/Products/ZenModel/EventView.py 2007-04-25 21:08:31 UTC (rev 4865) +++ trunk/Products/ZenModel/EventView.py 2007-04-25 22:10:58 UTC (rev 4866) @@ -56,10 +56,11 @@ return self.getEventHistory().getJSONEventsInfo(self, **kwargs) - def getJSONFields(self): + def getJSONFields(self, history=False): """Return the current event list for this managed entity. """ - return self.getEventManager().getJSONFields(self) + if history: return self.getEventHistory().getJSONFields(self) + else: return self.getEventManager().getJSONFields(self) def getStatus(self, statusclass=None, **kwargs): Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-25 21:08:31 UTC (rev 4865) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-25 22:10:58 UTC (rev 4866) @@ -9,6 +9,51 @@ var isManager = true; +var ZenGridLoadingMsg = Class.create(); +ZenGridLoadingMsg.prototype = { + __init__: function(msg) { + bindMethods(this); + this.framework = DIV( + {'class':'zengridload_container'}, + [ + //top row + DIV({'class':'dbox_tl'}, + [ DIV({'class':'dbox_tr'}, + [ DIV({'class':'dbox_tc'}, null)])]), + //middle row + DIV({'class':'dbox_ml'}, + [ DIV({'class':'dbox_mr'}, + [ DIV({'class':'dbox_mc', + 'id':'zengridload_content'}, msg)])]), + //bottom row + DIV({'class':'dbox_bl'}, + [ DIV({'class':'dbox_br'}, + [ DIV({'class':'dbox_bc'}, null)])]) + ]); + appendChildNodes(currentDocument().body, this.framework); + setStyle(this.framework, { + 'width':'15em', + 'position':'absolute', + 'z-index':'11000', + 'top':'0', + 'left':'100', + 'visibility':'visible' + }); + setStyle($('zengridload_content'), { + 'font-weight':'bold', + 'font-size':'2em', + 'text-align':'center' + + }); + + }, + show: function() { + setStyle(this.framework, {'visibility':'visible'}); + }, + hide: function() { + setStyle(this.framework, {'visibility':'hidden'}); + } +} var ZenGridBuffer = Class.create(); ZenGridBuffer.prototype = { @@ -61,6 +106,8 @@ if (newSize > this.maxQuery) newSize = this.maxQuery; } + if (newSize > this.maxQuery) + newSize = this.maxQuery; return newSize; }, queryOffset: function(offset) { @@ -137,13 +184,12 @@ var ZenGrid = Class.create(); ZenGrid.prototype = { - __init__: function(container, url, fields, gridId, buffer) { + __init__: function(container, url, gridId, buffer, isHistory) { bindMethods(this); - this.fieldnames = fields; + this.isHistory = isHistory || 0; this.container = $(container); this.gridId = gridId; this.buffer = buffer; - this.maxRows = 300; this.numRows = 15; this.rowHeight = 32; this.checkedArray = new Array(); @@ -157,6 +203,7 @@ this.clearFirst = false; this.lock = new DeferredLock(); this.scrollTimeout = null; + this.loadingbox = new ZenGridLoadingMsg('Loading...'); fieldlock = this.lock.acquire(); fieldlock.addCallback(this.refreshFields); updatelock = this.lock.acquire(); @@ -200,7 +247,7 @@ }, scrollTable: function(delta) { if (this.scrollTimeout) clearTimeout(this.scrollTimeout); - var pixelDelta = delta * this.rowHeight; + var pixelDelta = delta * (this.rowHeight+4); this.scrollbar.scrollTop -= pixelDelta; }, getColLengths: function() { @@ -243,12 +290,13 @@ bind(function(r) { result = r; //evalJSON(r.responseText); // For POST this.buffer.totalRows = result[1]; - this.setScrollHeight(this.buffer.totalRows*this.rowHeight); + this.setScrollHeight(this.buffer.totalRows*(this.rowHeight+4)); this.buffer.update(result[0], offset); this.lock.release(); }, this)); }, refreshTable: function(offset) { + this.showLoading(); var offset = offset || this.lastOffset; if (offset + this.numRows > this.buffer.startPos + this.buffer.size || offset < this.buffer.startPos - this.numRows) { @@ -335,7 +383,9 @@ this.setTableNumRows(this.numRows); this.lock.release(); }, this); - var x = loadJSONDoc('getJSONFields'); + fieldparams = {}; + if (this.isHistory) fieldparams['history'] = 1; + var x = loadJSONDoc('getJSONFields', fieldparams); x.addCallback(bind(function(r){ this.fields=r; if (isManager) this.fields = concat([[' ','']], this.fields); @@ -353,20 +403,19 @@ this.rowEls = map(this.getBlankRow, range(numrows)); replaceChildNodes(this.output, this.rowEls); setElementDimensions(this.viewport, - {h:parseInt(numrows*(this.rowHeight))} + {h:parseInt(numrows*(this.rowHeight+4))} ); - - var scrollHeight = parseInt(numrows * (this.rowHeight)); + var scrollHeight = parseInt(numrows * (this.rowHeight+4)); if (scrollHeight<=getElementDimensions(this.zgtable).h) { setStyle(this.scrollbar, {'display':'none'}); } else { - setElementDimensions(this.scrollbar, {h:scrollHeight}); + setElementDimensions(this.scrollbar, {h:scrollHeight}); } }, populateTable: function(data) { - var tableLength = data.length > this.maxRows ? - this.maxRows : data.length; - if (tableLength != this.numRows){ + var tableLength = data.length > this.numRows ? + this.numRows : data.length; + if (tableLength != this.rowEls.length){ this.clearTable(); this.setTableNumRows(tableLength); } @@ -379,7 +428,7 @@ value:evid}; if (this.checkedArray[evid]) chkboxparams.checked=true; var chkbox = INPUT(chkboxparams, null); - var yo = getElementsByTagAndClassName('td', 'cell', rows[i]); + var yo = rows[i].getElementsByTagName('td'); var divs = getElementsByTagAndClassName('div','cell_inner', rows[i]); var firstcol = yo[0]; if (isManager) { @@ -405,11 +454,12 @@ } connectCheckboxListeners(); + this.killLoading(); }, getTotalRows: function() { cb = bind(function(r) { this.buffer.totalRows = r; - this.setScrollHeight(this.buffer.totalRows*(this.rowHeight)); + this.setScrollHeight(this.buffer.totalRows*(this.rowHeight+4)); this.lock.release(); }, this); d = loadJSONDoc('getEventCount'); @@ -465,7 +515,7 @@ }); setStyle(this.viewport, { 'width':'98%', - 'height':this.rowHeight*(this.numRows)+'px', + 'height':(this.rowHeight+4)*(this.numRows)+'px', 'overflow':'hidden', 'float':'left', 'border':'1px solid black', @@ -479,9 +529,9 @@ 'position': 'relative', 'left': '-3px', 'width': '19px', - 'height': this.rowHeight*(this.numRows)+'px' + 'height': (this.rowHeight+4)*(this.numRows)+'px' }); - var scrollHeight = this.buffer.totalRows * (this.rowHeight+3); + var scrollHeight = this.buffer.totalRows * (this.rowHeight+4); this.setScrollHeight(scrollHeight); appendChildNodes(this.container, this.headers, this.innercont); }, @@ -494,18 +544,20 @@ }, scrollToPixel: function(pixel) { this.lastPixelOffset = this.lastPixelOffset || 0; - var diff = (pixel-this.lastPixelOffset) % this.rowHeight; - if (diff) { - pixel += diff; - } - var newOffset = Math.round(pixel/this.rowHeight); + //var diff = (pixel-this.lastPixelOffset) % (this.rowHeight+4); + //if (diff) { + //pixel += diff; + //} + var newOffset = Math.round(pixel/(this.rowHeight+4)); this.refreshTable(newOffset); this.scrollbar.scrollTop = pixel; this.lastPixelOffset = pixel; }, handleScroll: function() { + this.showLoading(); clearTimeout(this.scrollTimeout); this.nextScrollPosition = this.scrollbar.scrollTop || 0; + if (this.nextScrollPosition==0) this.scrollToPixel(this.nextScrollPosition); this.scrollTimeout = setTimeout ( bind(function() { this.scrollToPixel(this.nextScrollPosition) @@ -515,7 +567,7 @@ node = e.src(); id = node.id; params = {}; - params[id] = node.value; + if (!!node.value) params[id] = node.value; this.refreshWithParams(params) }, LSTimeout: null, @@ -548,8 +600,19 @@ markAsChecked: function(e) { var node = e.src(); this.checkedArray[node.value] = node.checked; + }, + showLoading: function() { + clearTimeout(this.isLoading); + this.isLoading = setTimeout( bind(function() { + this.loadingbox.show(); + }, this), 500); + }, + killLoading: function() { + clearTimeout(this.isLoading); + if (this.loadingbox) { + this.loadingbox.hide(); + } } - } log('ZenGrid javascript loaded.'); |
From: <sv...@ze...> - 2007-04-25 21:08:29
|
Author: ian Date: 2007-04-25 17:08:31 -0400 (Wed, 25 Apr 2007) New Revision: 4865 Modified: trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt Log: * Fixed wrong js function on filterboxes Modified: trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt 2007-04-25 21:08:23 UTC (rev 4864) +++ trunk/Products/ZenWidgets/skins/zenui/zenuimacros.pt 2007-04-25 21:08:31 UTC (rev 4865) @@ -139,8 +139,7 @@ <input type="text" name="filter" id="filter" onfocus="select(this)" tal:attributes="value ts/filter | string:; - onkeypress python:test(tableName, 'handleFilterbox(event)', - 'getPageViaEnter(event)' )" /> + onkeypress string:submitViaEnter(event)" /> </div> </tal:block> |
From: <sv...@ze...> - 2007-04-25 21:08:23
|
Author: marc Date: 2007-04-25 17:08:23 -0400 (Wed, 25 Apr 2007) New Revision: 4864 Modified: trunk/Products/ZenModel/DeviceClass.py trunk/Products/ZenModel/DeviceManagerBase.py Log: #1309 * Fixed delete for organizers and classes (different once again!) Modified: trunk/Products/ZenModel/DeviceClass.py =================================================================== --- trunk/Products/ZenModel/DeviceClass.py 2007-04-25 20:44:47 UTC (rev 4863) +++ trunk/Products/ZenModel/DeviceClass.py 2007-04-25 21:08:23 UTC (rev 4864) @@ -207,6 +207,17 @@ REQUEST['RESPONSE'].redirect(target.getPrimaryUrlPath()) + def removeDevices(self, deviceNames=None, REQUEST=None): + """see IManageDevice""" + if not deviceNames: return self() + if type(deviceNames) in types.StringTypes: deviceNames = (deviceNames,) + for devname in deviceNames: + dev = self.findDevice(devname) + dev.deleteDevice() + if REQUEST: + return self.callZenScreen(REQUEST) + + security.declareProtected('View', 'getEventDeviceInfo') def getEventDeviceInfo(self): """getEventDeviceInfo() -> return the info for NcoEventPopulator""" Modified: trunk/Products/ZenModel/DeviceManagerBase.py =================================================================== --- trunk/Products/ZenModel/DeviceManagerBase.py 2007-04-25 20:44:47 UTC (rev 4863) +++ trunk/Products/ZenModel/DeviceManagerBase.py 2007-04-25 21:08:23 UTC (rev 4864) @@ -41,7 +41,7 @@ if REQUEST: REQUEST['RESPONSE'].redirect(target.getPrimaryUrlPath()) - ''' + def removeDevices(self, deviceNames=None, REQUEST=None): """see IManageDevice""" if not deviceNames: return self() @@ -49,17 +49,6 @@ for devname in deviceNames: self.devices._delObject(devname) if REQUEST: return self() - ''' - - def removeDevices(self, deviceNames=None, REQUEST=None): - """see IManageDevice""" - if not deviceNames: return self() - if type(deviceNames) in types.StringTypes: deviceNames = (deviceNames,) - for devname in deviceNames: - dev = self.devices._getOb(devname) - dev.deleteDevice() - if REQUEST: - return self.callZenScreen(REQUEST) def setGroups(self, groupPaths=None, deviceNames=None, REQUEST=None): |
From: <sv...@ze...> - 2007-04-25 20:44:47
|
Author: ecn Date: 2007-04-25 16:44:47 -0400 (Wed, 25 Apr 2007) New Revision: 4863 Modified: trunk/Products/DataCollector/plugins/zenoss/snmp/HRSWRunMap.py Log: * match processes in the correct order Modified: trunk/Products/DataCollector/plugins/zenoss/snmp/HRSWRunMap.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/snmp/HRSWRunMap.py 2007-04-25 20:25:33 UTC (rev 4862) +++ trunk/Products/DataCollector/plugins/zenoss/snmp/HRSWRunMap.py 2007-04-25 20:44:47 UTC (rev 4863) @@ -60,7 +60,9 @@ fullname = (om.procName + " " + om.parameters).rstrip() processes = device.getDmdRoot("Processes") - for pc in processes.getSubOSProcessClassesGen(): + pcs = list(processes.getSubOSProcessClassesGen()) + pcs.sort(lambda a, b: cmp(a.sequence,b.sequence)) + for pc in pcs: if pc.match(fullname): om.setOSProcessClass = pc.getPrimaryDmdId() id = om.procName |
From: <sv...@ze...> - 2007-04-25 20:25:32
|
Author: ecn Date: 2007-04-25 16:25:33 -0400 (Wed, 25 Apr 2007) New Revision: 4862 Removed: trunk/inst/VERSION.txt Log: * we've made a little progress since this version Deleted: trunk/inst/VERSION.txt |
From: <sv...@ze...> - 2007-04-25 20:17:20
|
Author: ecn Date: 2007-04-25 16:17:17 -0400 (Wed, 25 Apr 2007) New Revision: 4861 Modified: trunk/inst/zen2dump.py trunk/inst/zen2load.py trunk/inst/zenUsers2dump.py Log: * copyrights Modified: trunk/inst/zen2dump.py =================================================================== --- trunk/inst/zen2dump.py 2007-04-25 20:02:29 UTC (rev 4860) +++ trunk/inst/zen2dump.py 2007-04-25 20:17:17 UTC (rev 4861) @@ -1,9 +1,16 @@ #!/usr/bin/env python -################################################################# +########################################################################### # -# Copyright (c) 2003 Zenoss, Inc. All rights reserved. +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. # -################################################################# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### __doc__="""ExportRM Modified: trunk/inst/zen2load.py =================================================================== --- trunk/inst/zen2load.py 2007-04-25 20:02:29 UTC (rev 4860) +++ trunk/inst/zen2load.py 2007-04-25 20:17:17 UTC (rev 4861) @@ -1,9 +1,16 @@ #!/usr/bin/env python -################################################################# +########################################################################### # -# Copyright (c) 2003 Zenoss, Inc. All rights reserved. +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. # -################################################################# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### __doc__="""ImportRM Modified: trunk/inst/zenUsers2dump.py =================================================================== --- trunk/inst/zenUsers2dump.py 2007-04-25 20:02:29 UTC (rev 4860) +++ trunk/inst/zenUsers2dump.py 2007-04-25 20:17:17 UTC (rev 4861) @@ -1,3 +1,15 @@ +########################################################################### +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### import Globals import transaction |
From: <sv...@ze...> - 2007-04-25 20:02:43
|
Author: ecn Date: 2007-04-25 16:02:29 -0400 (Wed, 25 Apr 2007) New Revision: 4860 Modified: trunk/Products/ZenTestCase/__init__.py trunk/Products/ZenUITests/__init__.py trunk/Products/ZenUITests/tests/__init__.py trunk/Products/ZenUITests/tests/testBrowserRecordings.py Log: * copyrights Modified: trunk/Products/ZenTestCase/__init__.py =================================================================== --- trunk/Products/ZenTestCase/__init__.py 2007-04-25 20:00:44 UTC (rev 4859) +++ trunk/Products/ZenTestCase/__init__.py 2007-04-25 20:02:29 UTC (rev 4860) @@ -0,0 +1,13 @@ +########################################################################### +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### + Modified: trunk/Products/ZenUITests/__init__.py =================================================================== --- trunk/Products/ZenUITests/__init__.py 2007-04-25 20:00:44 UTC (rev 4859) +++ trunk/Products/ZenUITests/__init__.py 2007-04-25 20:02:29 UTC (rev 4860) @@ -0,0 +1,13 @@ +########################################################################### +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### + Modified: trunk/Products/ZenUITests/tests/__init__.py =================================================================== --- trunk/Products/ZenUITests/tests/__init__.py 2007-04-25 20:00:44 UTC (rev 4859) +++ trunk/Products/ZenUITests/tests/__init__.py 2007-04-25 20:02:29 UTC (rev 4860) @@ -0,0 +1,13 @@ +########################################################################### +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### + Modified: trunk/Products/ZenUITests/tests/testBrowserRecordings.py =================================================================== --- trunk/Products/ZenUITests/tests/testBrowserRecordings.py 2007-04-25 20:00:44 UTC (rev 4859) +++ trunk/Products/ZenUITests/tests/testBrowserRecordings.py 2007-04-25 20:02:29 UTC (rev 4860) @@ -1,3 +1,15 @@ +########################################################################### +# +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### import unittest from glob import glob @@ -29,3 +41,4 @@ if __name__ == '__main__': unittest.TextTestRunner().run(nonZopeSuite()) + |
From: <sv...@ze...> - 2007-04-25 20:00:49
|
Author: ecn Date: 2007-04-25 16:00:44 -0400 (Wed, 25 Apr 2007) New Revision: 4859 Modified: trunk/Products/ZenTestCase/BaseTestCase.py Log: * copyrights Modified: trunk/Products/ZenTestCase/BaseTestCase.py =================================================================== --- trunk/Products/ZenTestCase/BaseTestCase.py 2007-04-25 19:12:20 UTC (rev 4858) +++ trunk/Products/ZenTestCase/BaseTestCase.py 2007-04-25 20:00:44 UTC (rev 4859) @@ -1,8 +1,15 @@ -################################################################# +########################################################################### # -# Copyright (c) 2006 Zentinel Systems, Inc. All rights reserved. +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. # -################################################################# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### import os import unittest @@ -91,8 +98,9 @@ gen = PortalGenerator() gen.create(self.app, 'zport', True) # builder params: - # portal, evtuser, evtpass, evtdb, smtphost, smtpport, snpphost, snppport - builder = Builder(self.app.zport, 'dbuser', 'dbpass', 'dbtable', + # portal, cvthost, evtuser, evtpass, evtdb, + # smtphost, smtpport, snpphost, snppport + builder = Builder(self.app.zport, 'localhost', 'dbuser', 'dbpass', 'dbtable', 'localhost', '25', 'localhost', '0') builder.build() self.dmd = builder.dmd |
From: <sv...@ze...> - 2007-04-25 19:12:21
|
Author: ecn Date: 2007-04-25 15:12:20 -0400 (Wed, 25 Apr 2007) New Revision: 4858 Modified: trunk/Products/ZenWin/zenwin.py Log: * fix copy-paste-error Modified: trunk/Products/ZenWin/zenwin.py =================================================================== --- trunk/Products/ZenWin/zenwin.py 2007-04-25 19:01:19 UTC (rev 4857) +++ trunk/Products/ZenWin/zenwin.py 2007-04-25 19:12:20 UTC (rev 4858) @@ -127,7 +127,7 @@ wcode, source, descr, hfile, hcont, scode = info scode = abs(scode) if scode != TIMEOUT_CODE: - self.deviceDown(srec, str(ex)) + self.deviceDown(srec, str(e)) def processLoop(self): print [d.name for d in self.devices] |
Author: ecn Date: 2007-04-25 15:01:19 -0400 (Wed, 25 Apr 2007) New Revision: 4857 Added: trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt Modified: trunk/Products/DataCollector/Plugins.py trunk/Products/DataCollector/PortscanClient.py trunk/Products/DataCollector/SnmpClient.py trunk/Products/DataCollector/maps/commandmaps/ifconfigMap.py trunk/Products/DataCollector/maps/commandmaps/vxprintMap.py trunk/Products/DataCollector/plugins/__init__.py trunk/Products/DataCollector/plugins/zenoss/__init__.py trunk/Products/DataCollector/plugins/zenoss/cmd/__init__.py trunk/Products/DataCollector/plugins/zenoss/cmd/darwin/__init__.py trunk/Products/DataCollector/plugins/zenoss/cmd/linux/__init__.py trunk/Products/DataCollector/plugins/zenoss/cmd/uname.py trunk/Products/DataCollector/plugins/zenoss/portscan/__init__.py trunk/Products/DataCollector/plugins/zenoss/snmp/__init__.py trunk/Products/ZenEvents/Availability.py trunk/Products/ZenEvents/CustomEventView.py trunk/Products/ZenEvents/EventClassInst.py trunk/Products/ZenEvents/Exceptions.py trunk/Products/ZenEvents/MySqlEventManager.py trunk/Products/ZenEvents/ZenEventClasses.py trunk/Products/ZenEvents/tests/sendEvents.py trunk/Products/ZenEvents/tests/sendSyslog.py trunk/Products/ZenHub/__init__.py trunk/Products/ZenHub/pbClient.py trunk/Products/ZenHub/pbClient3.py trunk/Products/ZenHub/pbclient2.py trunk/Products/ZenHub/services/EventService.py trunk/Products/ZenHub/services/ProcessConfig.py trunk/Products/ZenHub/services/__init__.py trunk/Products/ZenHub/xmlClient.py trunk/Products/ZenModel/ConfigurationError.py trunk/Products/ZenModel/HWComponent.py trunk/Products/ZenModel/OSProcessOrganizer.py trunk/Products/ZenModel/TerminalServer.py trunk/Products/ZenModel/ZDeviceLoader.py trunk/Products/ZenModel/ZVersion.py trunk/Products/ZenModel/ZenPackable.py trunk/Products/ZenModel/ZenossInfo.py trunk/Products/ZenModel/data/scrub.py trunk/Products/ZenModel/interfaces.py trunk/Products/ZenModel/migrate/changeeventaction.py trunk/Products/ZenModel/migrate/defaultcommandtimeout.py trunk/Products/ZenModel/migrate/deviceTemplatesProperty.py trunk/Products/ZenModel/migrate/event_commands.py trunk/Products/ZenModel/migrate/event_newclasses.py trunk/Products/ZenModel/migrate/eventdbname.py trunk/Products/ZenModel/migrate/keypath.py trunk/Products/ZenModel/migrate/loadaveragereport.py trunk/Products/ZenModel/migrate/maxoids.py trunk/Products/ZenModel/migrate/menus.py trunk/Products/ZenModel/migrate/monitors.py trunk/Products/ZenModel/migrate/reportserver.py trunk/Products/ZenModel/migrate/standalone_datapoint_rename.py trunk/Products/ZenModel/migrate/statusconnecttimeout.py trunk/Products/ZenModel/migrate/winminseverity.py trunk/Products/ZenModel/migrate/wmiignore.py trunk/Products/ZenModel/migrate/zCollectorPlugins.py trunk/Products/ZenModel/migrate/zcollectordecoding.py trunk/Products/ZenModel/migrate/zenmigrate.py trunk/Products/ZenModel/migrate/zlinks.py trunk/Products/ZenModel/migrate/zlocal.py trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt trunk/Products/ZenModel/tests/ClassifierTest.py trunk/Products/ZenModel/tests/ZenModelBaseTest.py trunk/Products/ZenModel/tests/__init__.py trunk/Products/ZenModel/tests/getAllCountsProf.py trunk/Products/ZenModel/tests/portal/Devices/__init__.py trunk/Products/ZenModel/tests/portal/Monitors/__init__.py trunk/Products/ZenModel/tests/portal/Systems/__init__.py trunk/Products/ZenModel/tests/portal/__init__.py trunk/Products/ZenModel/zendmd.py trunk/Products/ZenRRD/Exceptions.py trunk/Products/ZenRRD/RRDToolItem.py trunk/Products/ZenRRD/__init__.py trunk/Products/ZenRRD/plugins/__init__.py trunk/Products/ZenRRD/plugins/randomExample.py trunk/Products/ZenRRD/tests/RenderServerTest.py trunk/Products/ZenRRD/tests/badPackets.py trunk/Products/ZenRRD/tests/test.py trunk/Products/ZenRRD/tests/testttgraph.py trunk/Products/ZenRRD/tests/xtest.py trunk/Products/ZenRRD/zenperfxmlrpc.py trunk/Products/ZenRelations/checkrel.py trunk/Products/ZenRelations/schemadoc.py trunk/Products/ZenRelations/tests/__init__.py trunk/Products/ZenReports/Utilization.py trunk/Products/ZenReports/__init__.py trunk/Products/ZenReports/plugins/__init__.py trunk/Products/ZenStatus/ZenTcpClient.py trunk/Products/ZenStatus/__init__.py trunk/Products/ZenStatus/pingjob.py trunk/Products/ZenStatus/sendevent.py trunk/Products/ZenStatus/test/configget.py trunk/Products/ZenStatus/zenping.py trunk/Products/ZenUtils/Exceptions.py trunk/Products/ZenUtils/PBUtil.py trunk/Products/ZenUtils/Security.py trunk/Products/ZenUtils/Version.py trunk/Products/ZenUtils/ZenTales.py trunk/Products/ZenUtils/__init__.py trunk/Products/ZenUtils/patches/__init__.py trunk/Products/ZenUtils/patches/pasmonkey.py trunk/Products/ZenUtils/tests/testVersion.py trunk/Products/ZenWin/WinEventlog.py trunk/Products/ZenWin/WinServiceTest.py trunk/Products/ZenWin/zenwinmodeler.py Log: * Process Class resequencing Modified: trunk/Products/DataCollector/Plugins.py =================================================================== --- trunk/Products/DataCollector/Plugins.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/Plugins.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + from Products.ZenUtils.Utils import importClass import sys import os Modified: trunk/Products/DataCollector/PortscanClient.py =================================================================== --- trunk/Products/DataCollector/PortscanClient.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/PortscanClient.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import logging from twisted.internet import reactor, error Modified: trunk/Products/DataCollector/SnmpClient.py =================================================================== --- trunk/Products/DataCollector/SnmpClient.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/SnmpClient.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import socket import logging log = logging.getLogger("zen.SnmpClient") Modified: trunk/Products/DataCollector/maps/commandmaps/ifconfigMap.py =================================================================== --- trunk/Products/DataCollector/maps/commandmaps/ifconfigMap.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/maps/commandmaps/ifconfigMap.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/maps/commandmaps/vxprintMap.py =================================================================== --- trunk/Products/DataCollector/maps/commandmaps/vxprintMap.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/maps/commandmaps/vxprintMap.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/cmd/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/cmd/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/cmd/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/cmd/darwin/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/cmd/darwin/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/cmd/darwin/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/cmd/linux/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/cmd/linux/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/cmd/linux/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/cmd/uname.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/cmd/uname.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/cmd/uname.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -26,3 +26,4 @@ om.uname = results.strip() return om + Modified: trunk/Products/DataCollector/plugins/zenoss/portscan/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/portscan/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/portscan/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/DataCollector/plugins/zenoss/snmp/__init__.py =================================================================== --- trunk/Products/DataCollector/plugins/zenoss/snmp/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/DataCollector/plugins/zenoss/snmp/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenEvents/Availability.py =================================================================== --- trunk/Products/ZenEvents/Availability.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/Availability.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import time from Globals import InitializeClass Modified: trunk/Products/ZenEvents/CustomEventView.py =================================================================== --- trunk/Products/ZenEvents/CustomEventView.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/CustomEventView.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import logging log = logging.getLogger("zen.EventView") Modified: trunk/Products/ZenEvents/EventClassInst.py =================================================================== --- trunk/Products/ZenEvents/EventClassInst.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/EventClassInst.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import os import copy import re Modified: trunk/Products/ZenEvents/Exceptions.py =================================================================== --- trunk/Products/ZenEvents/Exceptions.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/Exceptions.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,12 +10,8 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + from Products.ZenUtils.Exceptions import ZentinelException class ZenEventError(ZentinelException): Modified: trunk/Products/ZenEvents/MySqlEventManager.py =================================================================== --- trunk/Products/ZenEvents/MySqlEventManager.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/MySqlEventManager.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import types import logging log = logging.getLogger("zen.Events") Modified: trunk/Products/ZenEvents/ZenEventClasses.py =================================================================== --- trunk/Products/ZenEvents/ZenEventClasses.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/ZenEventClasses.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -36,6 +36,6 @@ Status_Web = "/Status/Web" Status_Wmi = "/Status/Wmi" Status_Wmi_Conn = "/Status/Wmi/Conn" -Status_WinSrv = "/Status/WinSrv" +Status_WinService = "/Status/WinService" Status_XmlRpc = "/Status/XmlRpc" Unknown = "/Unknown" Modified: trunk/Products/ZenEvents/tests/sendEvents.py =================================================================== --- trunk/Products/ZenEvents/tests/sendEvents.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/tests/sendEvents.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import Globals from Products.ZenUtils.ZCmdBase import ZCmdBase zodb = ZCmdBase(noopts=True) Modified: trunk/Products/ZenEvents/tests/sendSyslog.py =================================================================== --- trunk/Products/ZenEvents/tests/sendSyslog.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenEvents/tests/sendSyslog.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -20,3 +20,5 @@ s.sendto(m, ('localhost', 514) ) + + Modified: trunk/Products/ZenHub/__init__.py =================================================================== --- trunk/Products/ZenHub/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -12,3 +12,6 @@ ########################################################################### "Turn ZenHub into a module" + + + Modified: trunk/Products/ZenHub/pbClient.py =================================================================== --- trunk/Products/ZenHub/pbClient.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/pbClient.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + #! /usr/bin/python from twisted.spread import pb Modified: trunk/Products/ZenHub/pbClient3.py =================================================================== --- trunk/Products/ZenHub/pbClient3.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/pbClient3.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + #! /usr/bin/python from twisted.spread import pb Modified: trunk/Products/ZenHub/pbclient2.py =================================================================== --- trunk/Products/ZenHub/pbclient2.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/pbclient2.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import Globals from twisted.internet import reactor Modified: trunk/Products/ZenHub/services/EventService.py =================================================================== --- trunk/Products/ZenHub/services/EventService.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/services/EventService.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -22,8 +22,12 @@ class EventService(HubService): def remote_sendEvent(self, evt): - 'XMLRPC requests are processed asynchronously in a thread' - return self.zem.sendEvent(evt) + try: + return self.zem.sendEvent(evt) + except Exception, ex: + import logging + log = logging.getLogger('log') + log.exception(ex) def remote_sendEvents(self, evts): Modified: trunk/Products/ZenHub/services/ProcessConfig.py =================================================================== --- trunk/Products/ZenHub/services/ProcessConfig.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/services/ProcessConfig.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -29,3 +29,4 @@ return listener.callRemote('updateDevice', config) + Modified: trunk/Products/ZenHub/services/__init__.py =================================================================== --- trunk/Products/ZenHub/services/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/services/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -14,3 +14,6 @@ "" + + + Modified: trunk/Products/ZenHub/xmlClient.py =================================================================== --- trunk/Products/ZenHub/xmlClient.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenHub/xmlClient.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,12 +10,8 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + from xmlrpclib import ServerProxy from socket import getfqdn Modified: trunk/Products/ZenModel/ConfigurationError.py =================================================================== --- trunk/Products/ZenModel/ConfigurationError.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/ConfigurationError.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -14,3 +14,6 @@ class ConfigurationError(Exception): pass + + + Modified: trunk/Products/ZenModel/HWComponent.py =================================================================== --- trunk/Products/ZenModel/HWComponent.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/HWComponent.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -26,3 +26,4 @@ hw = self.hw() if hw: return hw.device() + Modified: trunk/Products/ZenModel/OSProcessOrganizer.py =================================================================== --- trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/OSProcessOrganizer.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -66,6 +66,12 @@ , 'permissions' : ( Permissions.view, ) }, + { 'id' : 'resequence' + , 'name' : 'Sequence' + , 'action' : 'osProcessResequence' + , 'permissions' : ( + Permissions.view, ) + }, # { 'id' : 'manage' # , 'name' : 'Manage' # , 'action' : 'osProcessOrganizerManage' Modified: trunk/Products/ZenModel/TerminalServer.py =================================================================== --- trunk/Products/ZenModel/TerminalServer.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/TerminalServer.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -20,3 +20,5 @@ return "Device" + + Modified: trunk/Products/ZenModel/ZDeviceLoader.py =================================================================== --- trunk/Products/ZenModel/ZDeviceLoader.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/ZDeviceLoader.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -1,10 +1,16 @@ -############################################################################### +########################################################################### # -# Copyright (c) 2004 Zentinel Systems. +# This program is part of Zenoss Core, an open source monitoring platform. +# Copyright (C) 2007, Zenoss Inc. # -############################################################################### +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# For complete information please visit: http://www.zenoss.com/oss/ +# +########################################################################### - __doc__="""ZDeviceLoader.py load devices from a GUI screen in the ZMI Modified: trunk/Products/ZenModel/ZVersion.py =================================================================== --- trunk/Products/ZenModel/ZVersion.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/ZVersion.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -12,3 +12,6 @@ ########################################################################### VERSION="1.2.0" + + + Modified: trunk/Products/ZenModel/ZenPackable.py =================================================================== --- trunk/Products/ZenModel/ZenPackable.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/ZenPackable.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -25,3 +25,4 @@ ) + Modified: trunk/Products/ZenModel/ZenossInfo.py =================================================================== --- trunk/Products/ZenModel/ZenossInfo.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/ZenossInfo.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import os import re import time Modified: trunk/Products/ZenModel/data/scrub.py =================================================================== --- trunk/Products/ZenModel/data/scrub.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/data/scrub.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -23,3 +23,4 @@ for regex, sub in subs: line = re.sub(regex, sub, line) + Modified: trunk/Products/ZenModel/interfaces.py =================================================================== --- trunk/Products/ZenModel/interfaces.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/interfaces.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import zope.interface class IDeviceManager: Modified: trunk/Products/ZenModel/migrate/changeeventaction.py =================================================================== --- trunk/Products/ZenModel/migrate/changeeventaction.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/changeeventaction.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ ChangeEventAction() + Modified: trunk/Products/ZenModel/migrate/defaultcommandtimeout.py =================================================================== --- trunk/Products/ZenModel/migrate/defaultcommandtimeout.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/defaultcommandtimeout.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ DefaultCommandTimeout() + Modified: trunk/Products/ZenModel/migrate/deviceTemplatesProperty.py =================================================================== --- trunk/Products/ZenModel/migrate/deviceTemplatesProperty.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/deviceTemplatesProperty.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -22,3 +22,5 @@ DeviceTemplatesProperty() + + Modified: trunk/Products/ZenModel/migrate/event_commands.py =================================================================== --- trunk/Products/ZenModel/migrate/event_commands.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/event_commands.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -25,3 +25,4 @@ EventCommands() + Modified: trunk/Products/ZenModel/migrate/event_newclasses.py =================================================================== --- trunk/Products/ZenModel/migrate/event_newclasses.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/event_newclasses.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -25,3 +25,4 @@ EventNewClasses() + Modified: trunk/Products/ZenModel/migrate/eventdbname.py =================================================================== --- trunk/Products/ZenModel/migrate/eventdbname.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/eventdbname.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ dmd.ZenEventHistory.database = 'events' EventDBName() + Modified: trunk/Products/ZenModel/migrate/keypath.py =================================================================== --- trunk/Products/ZenModel/migrate/keypath.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/keypath.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ dmd.Devices._setProperty("zKeyPath", "~/.ssh/id_dsa") KeyPath() + Modified: trunk/Products/ZenModel/migrate/loadaveragereport.py =================================================================== --- trunk/Products/ZenModel/migrate/loadaveragereport.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/loadaveragereport.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -28,3 +28,4 @@ LoadAverageReport() + Modified: trunk/Products/ZenModel/migrate/maxoids.py =================================================================== --- trunk/Products/ZenModel/migrate/maxoids.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/maxoids.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -28,3 +28,4 @@ MaxOIDPerRequest() + Modified: trunk/Products/ZenModel/migrate/menus.py =================================================================== --- trunk/Products/ZenModel/migrate/menus.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/menus.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,6 +10,11 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### +# This program is part of Zenoss Core, an open source monitoring platform. +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# For complete information please visit: http://www.zenoss.com/oss/ __doc__=''' @@ -423,6 +428,8 @@ action= 'dialog_moveOSProcesses', permissions=('Manage DMD',), isdialog= True), + ], + 'OSProcessResequence_list': [ dict( ordering=3.0, id = 'resequenceOsProcesses', @@ -430,7 +437,7 @@ action = 'javascript:submitFormToMethod("processList", "manage_resequenceProcesses")', permissions= ('Manage DMD',) ), - ], + ], 'Manufacturer_list': [ ZenPackItems, dict( Modified: trunk/Products/ZenModel/migrate/monitors.py =================================================================== --- trunk/Products/ZenModel/migrate/monitors.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/monitors.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -25,3 +25,4 @@ Monitors() + Modified: trunk/Products/ZenModel/migrate/reportserver.py =================================================================== --- trunk/Products/ZenModel/migrate/reportserver.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/reportserver.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ ReportServer() + Modified: trunk/Products/ZenModel/migrate/standalone_datapoint_rename.py =================================================================== --- trunk/Products/ZenModel/migrate/standalone_datapoint_rename.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/standalone_datapoint_rename.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -20,3 +20,5 @@ base = os.path.basename(f[:-4]) os.rename(fullpath, os.path.join(d, '%s_%s.rrd' % (base, base))) + + Modified: trunk/Products/ZenModel/migrate/statusconnecttimeout.py =================================================================== --- trunk/Products/ZenModel/migrate/statusconnecttimeout.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/statusconnecttimeout.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -29,3 +29,4 @@ StatusConnectTimeout() + Modified: trunk/Products/ZenModel/migrate/winminseverity.py =================================================================== --- trunk/Products/ZenModel/migrate/winminseverity.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/winminseverity.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ WinMinSeverity() + Modified: trunk/Products/ZenModel/migrate/wmiignore.py =================================================================== --- trunk/Products/ZenModel/migrate/wmiignore.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/wmiignore.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -29,3 +29,4 @@ WmiIgnore() + Modified: trunk/Products/ZenModel/migrate/zCollectorPlugins.py =================================================================== --- trunk/Products/ZenModel/migrate/zCollectorPlugins.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/zCollectorPlugins.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ + Modified: trunk/Products/ZenModel/migrate/zcollectordecoding.py =================================================================== --- trunk/Products/ZenModel/migrate/zcollectordecoding.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/zcollectordecoding.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -28,3 +28,4 @@ ZCollectorDecoding() + Modified: trunk/Products/ZenModel/migrate/zenmigrate.py =================================================================== --- trunk/Products/ZenModel/migrate/zenmigrate.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/zenmigrate.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -20,3 +20,5 @@ if __name__ == '__main__': main() + + Modified: trunk/Products/ZenModel/migrate/zlinks.py =================================================================== --- trunk/Products/ZenModel/migrate/zlinks.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/zlinks.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -26,3 +26,4 @@ zLinks() + Modified: trunk/Products/ZenModel/migrate/zlocal.py =================================================================== --- trunk/Products/ZenModel/migrate/zlocal.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/migrate/zlocal.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ dmd.Devices._setProperty("zLocalInterfaceNames", '^lo|^vmnet') ZLocalIps() + Modified: trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/skins/zenmodel/osProcessOrganizerOverview.pt 2007-04-25 19:01:19 UTC (rev 4857) @@ -80,8 +80,6 @@ <span tal:condition="objects" tal:omit-tag=""> <tr> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( - tableName,'sequence','Seq')"/> - <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'name','Name')"/> <th tal:replace="structure python:here.ZenTableManager.getTableHeader( tableName,'regex','Regex')"/> @@ -91,15 +89,6 @@ tableName,'count','Count')"/> </tr> <tr tal:repeat="svcinst batch" tal:define="editable here/isManager"> - <td> - <input tal:condition="editable" - type="text" name="seqmap:list" size="2" - tal:attributes="value svcinst/sequence"/> - <input tal:condition="editable" - type="hidden" name="origseq:list" - tal:attributes="value svcinst/sequence" /> - <span tal:condition="not:editable" tal:content="svcinst/sequence"/> - </td> <td class="tablevalues"> <input tal:condition="editable" type="checkbox" name="ids:list" Added: trunk/Products/ZenModel/skins/zenmodel/osProcessResequence.pt Modified: trunk/Products/ZenModel/tests/ClassifierTest.py =================================================================== --- trunk/Products/ZenModel/tests/ClassifierTest.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/ClassifierTest.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -20,3 +20,5 @@ else: print 'Failed' + + Modified: trunk/Products/ZenModel/tests/ZenModelBaseTest.py =================================================================== --- trunk/Products/ZenModel/tests/ZenModelBaseTest.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/ZenModelBaseTest.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -19,3 +19,5 @@ ZenModel unit tests. """ + + Modified: trunk/Products/ZenModel/tests/__init__.py =================================================================== --- trunk/Products/ZenModel/tests/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenModel/tests/getAllCountsProf.py =================================================================== --- trunk/Products/ZenModel/tests/getAllCountsProf.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/getAllCountsProf.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ #runtest() #showresults() + Modified: trunk/Products/ZenModel/tests/portal/Devices/__init__.py =================================================================== --- trunk/Products/ZenModel/tests/portal/Devices/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/portal/Devices/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenModel/tests/portal/Monitors/__init__.py =================================================================== --- trunk/Products/ZenModel/tests/portal/Monitors/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/portal/Monitors/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenModel/tests/portal/Systems/__init__.py =================================================================== --- trunk/Products/ZenModel/tests/portal/Systems/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/portal/Systems/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenModel/tests/portal/__init__.py =================================================================== --- trunk/Products/ZenModel/tests/portal/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/tests/portal/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenModel/zendmd.py =================================================================== --- trunk/Products/ZenModel/zendmd.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenModel/zendmd.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import os import atexit import socket Modified: trunk/Products/ZenRRD/Exceptions.py =================================================================== --- trunk/Products/ZenRRD/Exceptions.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/Exceptions.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -26,3 +26,4 @@ class RRDGraphError(RRDException): pass + Modified: trunk/Products/ZenRRD/RRDToolItem.py =================================================================== --- trunk/Products/ZenRRD/RRDToolItem.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/RRDToolItem.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ InitializeClass(RRDToolItem) + Modified: trunk/Products/ZenRRD/__init__.py =================================================================== --- trunk/Products/ZenRRD/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -27,3 +27,4 @@ permission="Add DMD Objects", constructors = (addRenderServer, manage_addRenderServer), ) + Modified: trunk/Products/ZenRRD/plugins/__init__.py =================================================================== --- trunk/Products/ZenRRD/plugins/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/plugins/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenRRD/plugins/randomExample.py =================================================================== --- trunk/Products/ZenRRD/plugins/randomExample.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/plugins/randomExample.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,7 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This plugin gives you a sample of how to do more custom graphs. + # It probably isn't a great example to follow style-wise. import os Modified: trunk/Products/ZenRRD/tests/RenderServerTest.py =================================================================== --- trunk/Products/ZenRRD/tests/RenderServerTest.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/tests/RenderServerTest.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -23,3 +23,4 @@ i = server.render + Modified: trunk/Products/ZenRRD/tests/badPackets.py =================================================================== --- trunk/Products/ZenRRD/tests/badPackets.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/tests/badPackets.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import sys sys.path.insert(0, '/home/ecn/work/zenoss/home/lib/python') # sys.path.insert(0, '/home/ecn/work/zenoss/inst/build/pysnmp-3.4.3') Modified: trunk/Products/ZenRRD/tests/test.py =================================================================== --- trunk/Products/ZenRRD/tests/test.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/tests/test.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import Zope app = Zope.app() #linux = app.zport.dmd.Devices.Servers.Linux._getOb('edahl04.confmon.loc') @@ -22,3 +18,5 @@ router = app.zport.dmd.Devices.NetworkDevices.Router._getOb( + + Modified: trunk/Products/ZenRRD/tests/testttgraph.py =================================================================== --- trunk/Products/ZenRRD/tests/testttgraph.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/tests/testttgraph.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -15,3 +15,6 @@ tt = app.zport.dmd.Devices.rrdconfig._getOb('RRDTargetType-SRPInterface') print tt.graphView('SRPAllOctets', tt, 'lkj', 213423) + + + Modified: trunk/Products/ZenRRD/tests/xtest.py =================================================================== --- trunk/Products/ZenRRD/tests/xtest.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/tests/xtest.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ s.register_function(cs, 'cs') s.serve_forever() + Modified: trunk/Products/ZenRRD/zenperfxmlrpc.py =================================================================== --- trunk/Products/ZenRRD/zenperfxmlrpc.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRRD/zenperfxmlrpc.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,7 +11,6 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### - __doc__='''zenperfxmlrpc Gets xmlrpc performance data and stores it in the RRD files. Modified: trunk/Products/ZenRelations/checkrel.py =================================================================== --- trunk/Products/ZenRelations/checkrel.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRelations/checkrel.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import sys import logging logging.basicConfig() Modified: trunk/Products/ZenRelations/schemadoc.py =================================================================== --- trunk/Products/ZenRelations/schemadoc.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRelations/schemadoc.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import sys, os, shutil import logging logging.basicConfig() Modified: trunk/Products/ZenRelations/tests/__init__.py =================================================================== --- trunk/Products/ZenRelations/tests/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenRelations/tests/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenReports/Utilization.py =================================================================== --- trunk/Products/ZenReports/Utilization.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenReports/Utilization.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -28,3 +28,4 @@ summary['function'] = swapper.get(current, current) return summary + Modified: trunk/Products/ZenReports/__init__.py =================================================================== --- trunk/Products/ZenReports/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenReports/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -12,3 +12,6 @@ ########################################################################### "" + + + Modified: trunk/Products/ZenReports/plugins/__init__.py =================================================================== --- trunk/Products/ZenReports/plugins/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenReports/plugins/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -12,3 +12,6 @@ ########################################################################### "" + + + Modified: trunk/Products/ZenStatus/ZenTcpClient.py =================================================================== --- trunk/Products/ZenStatus/ZenTcpClient.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/ZenTcpClient.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -28,7 +28,6 @@ from socket import getfqdn hostname = getfqdn() -# this is needed to do the setUnjellyableForClass from Products.ZenHub.services.StatusConfig import ServiceConfig class ZenTcpTest(protocol.Protocol): Modified: trunk/Products/ZenStatus/__init__.py =================================================================== --- trunk/Products/ZenStatus/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenStatus/pingjob.py =================================================================== --- trunk/Products/ZenStatus/pingjob.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/pingjob.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + ''' pingmonitor creates a queue of hosts to be pinged (jobs), and pings them until they respond, or the Modified: trunk/Products/ZenStatus/sendevent.py =================================================================== --- trunk/Products/ZenStatus/sendevent.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/sendevent.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import xmlrpclib from AuthTransport import BasicAuthTransport Modified: trunk/Products/ZenStatus/test/configget.py =================================================================== --- trunk/Products/ZenStatus/test/configget.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/test/configget.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -23,3 +23,4 @@ for device in devices: print device + Modified: trunk/Products/ZenStatus/zenping.py =================================================================== --- trunk/Products/ZenStatus/zenping.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenStatus/zenping.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,7 +10,6 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -#!/usr/bin/env python2.1 __doc__=''' ZenPing Modified: trunk/Products/ZenUtils/Exceptions.py =================================================================== --- trunk/Products/ZenUtils/Exceptions.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/Exceptions.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -22,3 +22,5 @@ """When walking a path something along the way wasn't found.""" pass + + Modified: trunk/Products/ZenUtils/PBUtil.py =================================================================== --- trunk/Products/ZenUtils/PBUtil.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/PBUtil.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,8 +10,11 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### + # taken from r1.10 of buildbot.sf.net/buildbot/pbutil.py + # flumotion has nearly the same code + """Base classes handy for use with PB clients. """ Modified: trunk/Products/ZenUtils/Security.py =================================================================== --- trunk/Products/ZenUtils/Security.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/Security.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + import os from random import random from datetime import datetime Modified: trunk/Products/ZenUtils/Version.py =================================================================== --- trunk/Products/ZenUtils/Version.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/Version.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + """ Zenoss versioning module. Modified: trunk/Products/ZenUtils/ZenTales.py =================================================================== --- trunk/Products/ZenUtils/ZenTales.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/ZenTales.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -30,3 +30,4 @@ if not compiled: _compiled[express] = compiled = getEngine().compile(express) return compiled + Modified: trunk/Products/ZenUtils/__init__.py =================================================================== --- trunk/Products/ZenUtils/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -16,3 +16,6 @@ # import any monkey patches that may be necessary from patches import pasmonkey + + + Modified: trunk/Products/ZenUtils/patches/__init__.py =================================================================== --- trunk/Products/ZenUtils/patches/__init__.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/patches/__init__.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -11,3 +11,6 @@ # ########################################################################### + + + Modified: trunk/Products/ZenUtils/patches/pasmonkey.py =================================================================== --- trunk/Products/ZenUtils/patches/pasmonkey.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/patches/pasmonkey.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -10,11 +10,7 @@ # For complete information please visit: http://www.zenoss.com/oss/ # ########################################################################### -# This program is part of Zenoss Core, an open source monitoring platform. -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# For complete information please visit: http://www.zenoss.com/oss/ + ''' This module contains monkey patches we needed to make to PAS when we switched from native ZODB-managed authentication to pluggable authentication. Modified: trunk/Products/ZenUtils/tests/testVersion.py =================================================================== --- trunk/Products/ZenUtils/tests/testVersion.py 2007-04-25 18:09:25 UTC (rev 4856) +++ trunk/Products/ZenUtils/tests/testVersion.py 2007-04-25 19:01:19 UTC (rev 4857) @@ -26,3 +26,4 @@ if __name__ == '__main__': ... [truncated message content] |
From: <sv...@ze...> - 2007-04-25 18:09:26
|
Author: ian Date: 2007-04-25 14:09:25 -0400 (Wed, 25 Apr 2007) New Revision: 4856 Modified: trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenModel/EventView.py trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js Log: * Caused the event console to respect context and event views. Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 17:41:17 UTC (rev 4855) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 18:09:25 UTC (rev 4856) @@ -265,13 +265,16 @@ def getEventListME(self, me, **kwargs): where = self.lookupManagedEntityWhere(me) - resultfields = self.lookupManagedEntityResultFields(me.event_key) - return self.getEventList(resultFields=resultfields,where=where,**kwargs) + try: + resultFields = kwargs['resultFields']; del kwargs['resultFields'] + except KeyError: + resultFields = self.lookupManagedEntityResultFields(me.event_key) + return self.getEventList(resultFields=resultFields,where=where,**kwargs) def getEventList(self, resultFields=[], where="", orderby="", severity=None, state=0, startdate=None, enddate=None, offset=0, rows=0, - getTotalCount=False, filter=""): + getTotalCount=False, filter="", **kwargs): """see IEventList. """ try: @@ -305,7 +308,7 @@ select.append("order by") select.append(orderby) if rows: - select.append("limit %d, %d" % (offset, rows)) + select.append("limit %s, %s" % (offset, rows)) select.append(';') select = " ".join(select) if getTotalCount: @@ -936,41 +939,40 @@ REQUEST.RESPONSE.setHeader("Pragma", "no-cache") return info + security.declareProtected('View','getJSONHistoryEventsInfo') - def getJSONHistoryEventsInfo(self, **kwargs): + def getJSONHistoryEventsInfo(self, context, **kwargs): kwargs['history'] = True - return self.getJSONEventsInfo(**kwargs) + return self.getJSONEventsInfo(context, **kwargs) + security.declareProtected('View','getJSONEventsInfo') - def getJSONEventsInfo(self, offset=0, count=50, fields=[], + def getJSONEventsInfo(self, context, offset=0, count=50, getTotalCount=True, filter='', severity=2, state=1, - orderby='', REQUEST=None): + orderby='', **kwargs): """ Event data in JSON format. """ - argnames = ('offset count getTotalCount ' - 'filter severity state orderby').split() - myargs = {} - for arg in argnames: - myargs[arg] = eval(arg) - if not fields: fields = self.defaultResultFields - myargs['resultFields'] = fields - myargs['rows'] = myargs['count']; del myargs['count'] - if myargs['orderby']=='count': myargs['orderby']=='rows'; - data, totalCount = self.getEventList(**myargs) + fields = self.lookupManagedEntityResultFields(context.event_key) + if orderby=='count': orderby='rows' + data, totalCount = self.getEventListME(context, + offset=offset, rows=count, resultFields=fields, + getTotalCount=getTotalCount, filter=filter, severity=severity, + state=state, orderby=orderby) results = [x.getDataForJSON(fields) + [x.getCssClass()] for x in data] return simplejson.dumps((results, totalCount)) + security.declareProtected('View','getJSONFields') - def getJSONFields(self, fields=[], REQUEST=None): - if not fields: - fields = self.defaultResultFields + def getJSONFields(self, context): + fields = self.lookupManagedEntityResultFields(context.event_key) lens = map(self.getAvgFieldLength, fields) total = sum(lens) lens = map(lambda x:x/total*100, lens) zipped = zip(fields, lens) return simplejson.dumps(zipped) + def getAvgFieldLength(self, fieldname): conn = self.connect() try: Modified: trunk/Products/ZenModel/EventView.py =================================================================== --- trunk/Products/ZenModel/EventView.py 2007-04-25 17:41:17 UTC (rev 4855) +++ trunk/Products/ZenModel/EventView.py 2007-04-25 18:09:25 UTC (rev 4856) @@ -56,11 +56,10 @@ return self.getEventHistory().getJSONEventsInfo(self, **kwargs) - def getJSONFields(self, **kwargs): + def getJSONFields(self): """Return the current event list for this managed entity. """ - kwargs = locals(); del kwargs['self'] - return self.getEventHistory().getJSONFields(self, **kwargs) + return self.getEventManager().getJSONFields(self) def getStatus(self, statusclass=None, **kwargs): Modified: trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js =================================================================== --- trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-25 17:41:17 UTC (rev 4855) +++ trunk/Products/ZenWidgets/skins/zenui/javascript/zengrid.js 2007-04-25 18:09:25 UTC (rev 4856) @@ -206,14 +206,13 @@ getColLengths: function() { var lens = new Array(); this.fieldMapping = { - summary: 0, + summary: -2, firstTime: 0, lastTime: 0, - component: -3, + component: -1, count: +3 } this.fieldOffsetTotal = 0; - //this.fieldOffsetTotal = 10+-4+-4+-5; for (i=0;i<this.fields.length;i++) { var field = this.fields[i]; var offset = this.fieldMapping[field[0]] || 0; @@ -234,7 +233,7 @@ this.lastOffset = offset; var qs = update(this.lastparams, { 'offset': this.buffer.queryOffset(offset), - 'fields:list': this.fieldnames, + //'fields:list': this.fieldnames, 'count': this.buffer.querySize(offset), 'getTotalCount': 1 }); @@ -336,7 +335,7 @@ this.setTableNumRows(this.numRows); this.lock.release(); }, this); - var x = loadJSONDoc('getJSONFields', {'fields:list':this.fieldnames}); + var x = loadJSONDoc('getJSONFields'); x.addCallback(bind(function(r){ this.fields=r; if (isManager) this.fields = concat([[' ','']], this.fields); @@ -507,7 +506,6 @@ handleScroll: function() { clearTimeout(this.scrollTimeout); this.nextScrollPosition = this.scrollbar.scrollTop || 0; - log(this.nextScrollPosition); this.scrollTimeout = setTimeout ( bind(function() { this.scrollToPixel(this.nextScrollPosition) |
From: <sv...@ze...> - 2007-04-25 17:41:40
|
Author: ecn Date: 2007-04-25 13:41:17 -0400 (Wed, 25 Apr 2007) New Revision: 4855 Added: trunk/Products/ZenUITests/ Removed: trunk/test/ZenUITests/ Log: moving test stuff back... we use it Copied: trunk/Products/ZenUITests (from rev 4854, trunk/test/ZenUITests) |
From: <sv...@ze...> - 2007-04-25 17:41:23
|
Author: ecn Date: 2007-04-25 13:41:08 -0400 (Wed, 25 Apr 2007) New Revision: 4854 Added: trunk/Products/ZenTestRunner/ Removed: trunk/test/ZenTestRunner/ Log: moving test stuff back... we use it Copied: trunk/Products/ZenTestRunner (from rev 4853, trunk/test/ZenTestRunner) |
From: <sv...@ze...> - 2007-04-25 17:41:00
|
Author: ecn Date: 2007-04-25 13:40:51 -0400 (Wed, 25 Apr 2007) New Revision: 4853 Added: trunk/Products/ZenTestCase/ Removed: trunk/test/ZenTestCase/ Log: moving test stuff back... we use it Copied: trunk/Products/ZenTestCase (from rev 4852, trunk/test/ZenTestCase) |
From: <sv...@ze...> - 2007-04-25 17:25:44
|
Author: ecn Date: 2007-04-25 13:25:27 -0400 (Wed, 25 Apr 2007) New Revision: 4852 Modified: trunk/wmi/GNUmakefile Log: define clean target Modified: trunk/wmi/GNUmakefile =================================================================== --- trunk/wmi/GNUmakefile 2007-04-25 16:32:24 UTC (rev 4851) +++ trunk/wmi/GNUmakefile 2007-04-25 17:25:27 UTC (rev 4852) @@ -19,6 +19,10 @@ cp wmi/_pywmi.so $(PYLIBDIR) && \ cp wmi/pywmi.py $(PYLIBDIR) +clean: + cd pycom && rm -rf build + cd Samba/source && make clean + pycom-installed: cd pycom && \ python setup.py install \ |
From: <sv...@ze...> - 2007-04-25 16:32:25
|
Author: ahajda Date: 2007-04-25 12:32:24 -0400 (Wed, 25 Apr 2007) New Revision: 4851 Modified: trunk/wmi/Samba/source/lib/com/dcom/main.c trunk/wmi/Samba/source/wmi/wmicore.c Log: Removed memory leaks in Connect/Disconnect stuff. Modified: trunk/wmi/Samba/source/lib/com/dcom/main.c =================================================================== --- trunk/wmi/Samba/source/lib/com/dcom/main.c 2007-04-25 16:10:58 UTC (rev 4850) +++ trunk/wmi/Samba/source/lib/com/dcom/main.c 2007-04-25 16:32:24 UTC (rev 4851) @@ -33,6 +33,40 @@ #define DCOM_NEGOTIATED_PROTOCOLS { EPM_PROTOCOL_TCP, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NCALRPC } +static NTSTATUS dcerpc_binding_from_STRINGBINDING(TALLOC_CTX *mem_ctx, struct dcerpc_binding **b_out, struct STRINGBINDING *bd) +{ + char *host, *endpoint; + struct dcerpc_binding *b; + + b = talloc_zero(mem_ctx, struct dcerpc_binding); + if (!b) { + return NT_STATUS_NO_MEMORY; + } + + b->transport = dcerpc_transport_by_endpoint_protocol(bd->wTowerId); + + if (b->transport == -1) { + DEBUG(1, ("Can't find transport match endpoint protocol %d\n", bd->wTowerId)); + return NT_STATUS_NOT_SUPPORTED; + } + + host = talloc_strdup(b, bd->NetworkAddr); + endpoint = strchr(host, '['); + + if (endpoint) { + *endpoint = '\0'; + endpoint++; + + endpoint[strlen(endpoint)-1] = '\0'; + } + + b->host = host; + b->endpoint = talloc_strdup(b, endpoint); + + *b_out = b; + return NT_STATUS_OK; +} + struct cli_credentials *dcom_get_server_credentials(struct com_context *ctx, const char *server) { struct dcom_server_credentials *c; @@ -55,24 +89,49 @@ for (c = ctx->dcom->credentials; c; c = c->next) { if ((server == NULL && c->server == NULL) ||(server && c->server && !strcmp(c->server, server))) { - c->credentials = credentials; - talloc_steal(ctx->event_ctx, c->credentials); + if (c->credentials && c->credentials != credentials) { + talloc_unlink(c, c->credentials); + c->credentials = credentials; + if (talloc_find_parent_bytype(c->credentials, struct dcom_server_credentials)) + (void)talloc_reference(c, c->credentials); + else + talloc_steal(c, c->credentials); + } return; } } - - c = talloc(ctx, struct dcom_server_credentials); - c->server = talloc_strdup(ctx, server); + c = talloc(ctx->event_ctx, struct dcom_server_credentials); + c->server = talloc_strdup(c, server); c->credentials = credentials; - talloc_steal(ctx->event_ctx, c->credentials); + if (talloc_find_parent_bytype(c->credentials, struct dcom_server_credentials)) + (void)talloc_reference(c, c->credentials); + else + talloc_steal(c, c->credentials); DLIST_ADD(ctx->dcom->credentials, c); } +void dcom_update_credentials_for_aliases(struct com_context *ctx, const char *server, struct DUALSTRINGARRAY *pds) +{ + struct cli_credentials *cc; + struct dcerpc_binding *b; + uint32_t i; + NTSTATUS status; + + cc = dcom_get_server_credentials(ctx, server); + for (i = 0; pds->stringbindings[i]; ++i) { + if (pds->stringbindings[i]->wTowerId != EPM_PROTOCOL_TCP) continue; + status = dcerpc_binding_from_STRINGBINDING(ctx, &b, pds->stringbindings[i]); + if (!NT_STATUS_IS_OK(status)) continue; + dcom_set_server_credentials(ctx, b->host, cc); + talloc_free(b); + } +} + struct dcom_client_context *dcom_client_init(struct com_context *ctx, struct cli_credentials *credentials) { ctx->dcom = talloc_zero(ctx, struct dcom_client_context); if (!credentials) { - credentials = cli_credentials_init(ctx->event_ctx); + credentials = cli_credentials_init(ctx); cli_credentials_set_conf(credentials); cli_credentials_parse_string(credentials, "%", CRED_SPECIFIED); } @@ -80,40 +139,6 @@ return ctx->dcom; } -static NTSTATUS dcerpc_binding_from_STRINGBINDING(TALLOC_CTX *mem_ctx, struct dcerpc_binding **b_out, struct STRINGBINDING *bd) -{ - char *host, *endpoint; - struct dcerpc_binding *b; - - b = talloc_zero(mem_ctx, struct dcerpc_binding); - if (!b) { - return NT_STATUS_NO_MEMORY; - } - - b->transport = dcerpc_transport_by_endpoint_protocol(bd->wTowerId); - - if (b->transport == -1) { - DEBUG(1, ("Can't find transport match endpoint protocol %d\n", bd->wTowerId)); - return NT_STATUS_NOT_SUPPORTED; - } - - host = talloc_strdup(b, bd->NetworkAddr); - endpoint = strchr(host, '['); - - if (endpoint) { - *endpoint = '\0'; - endpoint++; - - endpoint[strlen(endpoint)-1] = '\0'; - } - - b->host = host; - b->endpoint = talloc_strdup(b, endpoint); - - *b_out = b; - return NT_STATUS_OK; -} - static NTSTATUS dcom_connect_host(struct com_context *ctx, struct dcerpc_pipe **p, const char *server) { struct dcerpc_binding *bd; @@ -194,24 +219,6 @@ return object_exporter_by_oxid(ctx, ip->obj.u_objref.u_standard.std.oxid); } -void dcom_update_credentials_for_aliases(struct com_context *ctx, const char *server, struct DUALSTRINGARRAY *pds) -{ - struct cli_credentials *cc; - struct dcerpc_binding *b; - uint32_t i; - NTSTATUS status; - - cc = dcom_get_server_credentials(ctx, server); - for (i = 0; pds->stringbindings[i]; ++i) { - if (pds->stringbindings[i]->wTowerId != EPM_PROTOCOL_TCP) continue; - status = dcerpc_binding_from_STRINGBINDING(ctx, &b, pds->stringbindings[i]); - if (!NT_STATUS_IS_OK(status)) continue; - dcom_set_server_credentials(ctx, b->host, cc); - talloc_free(b); - } -} - - WERROR dcom_create_object(struct com_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct IUnknown ***ip, WERROR *results) { uint16_t protseq[] = DCOM_NEGOTIATED_PROTOCOLS; @@ -236,8 +243,8 @@ DEBUG(1, ("Unable to connect to %s - %s\n", server, nt_errstr(status))); return ntstatus_to_werror(status); } + loc_ctx = talloc_new(ctx); - loc_ctx = talloc_new(ctx); ifaces = talloc_array(loc_ctx, struct MInterfacePointer *, num_ifaces); ZERO_STRUCT(r.in); @@ -261,6 +268,7 @@ r.out.results = results; status = dcerpc_RemoteActivation(p, loc_ctx, &r); + talloc_free(p); if(NT_STATUS_IS_ERR(status)) { DEBUG(1, ("Error while running RemoteActivation %s\n", nt_errstr(status))); hr = ntstatus_to_werror(status); @@ -276,6 +284,8 @@ goto end; } + m = object_exporter_update_oxid(ctx, oxid, pds); + ru_template = NULL; *ip = talloc_array(ctx, struct IUnknown *, num_ifaces); for (i = 0; i < num_ifaces; i++) { @@ -289,19 +299,23 @@ } } - m = object_exporter_update_oxid(ctx, oxid, pds); - m->pipe = NULL; - - if (!ru_template) { - DEBUG(1,("dcom_create_object: Cannot Create IRemUnknown - template interface not available\n")); - hr = WERR_GENERAL_FAILURE; + /* TODO:avg check when exactly oxid should be updated,its lifetime etc */ + if (m->rem_unknown && memcmp(&m->rem_unknown->obj.u_objref.u_standard.std.ipid, &ipidRemUnknown, sizeof(ipidRemUnknown))) { + talloc_free(m->rem_unknown); + m->rem_unknown = NULL; } - m->rem_unknown = talloc_zero(m, struct IRemUnknown); - memcpy(m->rem_unknown, ru_template, sizeof(struct IUnknown)); - GUID_from_string(COM_IREMUNKNOWN_UUID, &m->rem_unknown->obj.iid); - m->rem_unknown->obj.u_objref.u_standard.std.ipid = ipidRemUnknown; - m->rem_unknown->vtable = (struct IRemUnknown_vtable *)dcom_proxy_vtable_by_iid(&m->rem_unknown->obj.iid); - /* TODO:avg copy stringbindigs?? */ + if (!m->rem_unknown) { + if (!ru_template) { + DEBUG(1,("dcom_create_object: Cannot Create IRemUnknown - template interface not available\n")); + hr = WERR_GENERAL_FAILURE; + } + m->rem_unknown = talloc_zero(m, struct IRemUnknown); + memcpy(m->rem_unknown, ru_template, sizeof(struct IUnknown)); + GUID_from_string(COM_IREMUNKNOWN_UUID, &m->rem_unknown->obj.iid); + m->rem_unknown->obj.u_objref.u_standard.std.ipid = ipidRemUnknown; + m->rem_unknown->vtable = (struct IRemUnknown_vtable *)dcom_proxy_vtable_by_iid(&m->rem_unknown->obj.iid); + /* TODO:avg copy stringbindigs?? */ + } dcom_update_credentials_for_aliases(ctx, server, pds); hr = WERR_OK; Modified: trunk/wmi/Samba/source/wmi/wmicore.c =================================================================== --- trunk/wmi/Samba/source/wmi/wmicore.c 2007-04-25 16:10:58 UTC (rev 4850) +++ trunk/wmi/Samba/source/wmi/wmicore.c 2007-04-25 16:32:24 UTC (rev 4851) @@ -8,7 +8,7 @@ #define WERR_CHECK(msg) if (!W_ERROR_IS_OK(result)) { \ DEBUG(0, ("ERROR: %s\n", msg)); \ - goto error; \ + goto end; \ } else { \ DEBUG(1, ("OK : %s\n", msg)); \ } @@ -27,7 +27,7 @@ struct cli_credentials *cc; cred = talloc_asprintf(NULL, "%s%%%s", user, password); - cc = cli_credentials_init(ctx); + cc = cli_credentials_init(cred); cli_credentials_set_conf(cc); cli_credentials_parse_string(cc, cred, CRED_SPECIFIED); dcom_set_server_credentials(ctx, server, cc); @@ -45,7 +45,9 @@ result = IWbemLevel1Login_NTLMLogin(pL, ctx, nspace, locale, flags, wbem_ctx, services); WERR_CHECK("Login to remote object."); -error: + + IUnknown_Release((struct IUnknown *)pL, ctx); +end: return result; } |
From: <sv...@ze...> - 2007-04-25 16:11:06
|
Author: marc Date: 2007-04-25 12:10:58 -0400 (Wed, 25 Apr 2007) New Revision: 4850 Modified: trunk/Products/ZenEvents/EventCommand.py trunk/Products/ZenEvents/EventManagerBase.py trunk/Products/ZenEvents/skins/zenevents/listEventCommands.pt Log: #1170 * Delete of commands now works, cursor error fixed Modified: trunk/Products/ZenEvents/EventCommand.py =================================================================== --- trunk/Products/ZenEvents/EventCommand.py 2007-04-25 16:05:29 UTC (rev 4849) +++ trunk/Products/ZenEvents/EventCommand.py 2007-04-25 16:10:58 UTC (rev 4850) @@ -91,7 +91,7 @@ conn = zem.connect() try: delcmd = "delete from alert_state where %s" % self.sqlwhere() - curs = self.dmd.ZenEventManager.cursor() + curs = conn.cursor() curs.execute(delcmd) finally: zem.close(conn) Modified: trunk/Products/ZenEvents/EventManagerBase.py =================================================================== --- trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 16:05:29 UTC (rev 4849) +++ trunk/Products/ZenEvents/EventManagerBase.py 2007-04-25 16:10:58 UTC (rev 4850) @@ -1408,10 +1408,7 @@ def manage_deleteCommands(self, ids, REQUEST=None): "add a new EventCommand" for id in ids: - try: - self.commands._delObject(id) - except (AttributeError, KeyError): - pass + self.commands._delObject(id) if REQUEST: return self.callZenScreen(REQUEST) Modified: trunk/Products/ZenEvents/skins/zenevents/listEventCommands.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/listEventCommands.pt 2007-04-25 16:05:29 UTC (rev 4849) +++ trunk/Products/ZenEvents/skins/zenevents/listEventCommands.pt 2007-04-25 16:10:58 UTC (rev 4850) @@ -83,7 +83,6 @@ </tal:block> -<input type="submit" name="manage_editCommands:method" value="Submit"/> </form> </tal:block> </tal:block> |
From: <sv...@ze...> - 2007-04-25 16:05:28
|
Author: ecn Date: 2007-04-25 12:05:29 -0400 (Wed, 25 Apr 2007) New Revision: 4849 Added: trunk/test/ZenUITests/ Removed: trunk/Products/ZenUITests/ Log: cleaning up to fix copyright issues Copied: trunk/test/ZenUITests (from rev 4848, trunk/Products/ZenUITests) |
From: <sv...@ze...> - 2007-04-25 16:04:40
|
Author: ecn Date: 2007-04-25 12:04:39 -0400 (Wed, 25 Apr 2007) New Revision: 4848 Removed: trunk/Products/SiteScopeParser/ trunk/Products/SnmpCollector/ Log: cleaning up to fix copyright issues |
From: <sv...@ze...> - 2007-04-25 16:03:23
|
Author: edahl Date: 2007-04-25 12:03:23 -0400 (Wed, 25 Apr 2007) New Revision: 4847 Modified: trunk/Products/ZenModel/EventView.py Log: * changes to eventview to allow args to be passed properly Modified: trunk/Products/ZenModel/EventView.py =================================================================== --- trunk/Products/ZenModel/EventView.py 2007-04-25 16:03:01 UTC (rev 4846) +++ trunk/Products/ZenModel/EventView.py 2007-04-25 16:03:23 UTC (rev 4847) @@ -36,58 +36,33 @@ return self.ZenEventHistory - def getResultFields(self): - if hasattr(self, 'event_key'): - return self.getEventManager().lookupManagedEntityResultFields( - self.event_key) - else: - return self.getEventManager().defaultResultFields - - - def getHistResultFields(self): - if hasattr(self, 'event_key'): - return self.getEventHistory().lookupManagedEntityResultFields( - self.event_key) - else: - return self.getEventHistory().lookupResultFields() - - - def getEventList(self, **kwargs): + 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. """ - if hasattr(self, 'event_key'): - return self.getEventManager().getEventListME(self, **kwargs) - else: - return self.getEventManager().getEventList(**kwargs) - + kwargs = locals(); del kwargs['self'] + return self.getEventManager().getJSONEventsInfo(self, **kwargs) - def getEventHistoryList(self, **kwargs): - """Return the current event list for this managed entity. - """ - if hasattr(self, 'event_key'): - return self.getEventHistory().getEventListME(self, **kwargs) - else: - return self.getEventHistory().getEventList(**kwargs) - - def getJSONEventsInfo(self, **kwargs): + def getJSONHistoryEventsInfo(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. """ - return self.getEventManager().getJSONEventsInfo(**kwargs) + kwargs = locals(); del kwargs['self'] + return self.getEventHistory().getJSONEventsInfo(self, **kwargs) def getJSONFields(self, **kwargs): """Return the current event list for this managed entity. """ - return self.getEventManager().getJSONFields(**kwargs) + kwargs = locals(); del kwargs['self'] + return self.getEventHistory().getJSONFields(self, **kwargs) - def getJSONHistoryEventsInfo(self, **kwargs): - """Return the current history event list for this managed entity. - """ - return self.getEventHistory().getJSONEventsInfo(**kwargs) - - def getStatus(self, statusclass=None, **kwargs): """Return the status number for this device of class statClass. """ |
From: <sv...@ze...> - 2007-04-25 16:03:02
|
Author: ecn Date: 2007-04-25 12:03:01 -0400 (Wed, 25 Apr 2007) New Revision: 4846 Added: trunk/test/ZenTestRunner/ Removed: trunk/Products/ZenTestRunner/ Log: cleaning up to fix copyright issues Copied: trunk/test/ZenTestRunner (from rev 4845, trunk/Products/ZenTestRunner) |