Changeset 2054 for pykota/trunk/pykota/reporters
- Timestamp:
- 02/13/05 23:02:29 (19 years ago)
- Location:
- pykota/trunk/pykota/reporters
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/reporters/html.py
r1278 r2054 22 22 # 23 23 # $Log$ 24 # Revision 1.9 2005/02/13 22:02:29 jalet 25 # Big database structure changes. Upgrade script is now included as well as 26 # the new LDAP schema. 27 # Introduction of the -o | --overcharge command line option to edpykota. 28 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 29 # Introduction of the new 'maxdenybanners' directive. 30 # 24 31 # Revision 1.8 2004/01/12 15:28:45 jalet 25 32 # Now can output the user's history on several printers at the same time. … … 81 88 else : 82 89 oddevenclass = "even" 83 (pages, money, name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid ) = self.getQuota(entry, entrypquota)90 (pages, money, name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid, overcharge, warncount) = self.getQuota(entry, entrypquota) 84 91 if datelimit : 85 92 if datelimit == "DENY" : … … 89 96 if (not self.tool.config.getDisableHistory()) and (not self.isgroup) : 90 97 name = '<a href="%s?username=%s&printername=%s&history=1">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), name, printer.Name, name) 91 self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (name, reached, pagecounter, soft, hard, balance, datelimit or " ", lifepagecounter, lifetimepaid)])))98 self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (name, reached, overcharge, pagecounter, soft, hard, balance, datelimit or " ", lifepagecounter, lifetimepaid, warncount)]))) 92 99 total += pages 93 100 totalmoney += money … … 95 102 if total or totalmoney : 96 103 (tpage, tmoney) = self.getTotals(total, totalmoney) 97 self.report.append('<tr class="totals"><td colspan=" 7"> </td><td align="right">%s</td><td align="right">%s</td></tr>' % (tpage, tmoney))98 self.report.append('<tr class="realpagecounter"><td colspan=" 7"> </td><td align="right">%s</td></tr>' % self.getPrinterRealPageCounter(printer))104 self.report.append('<tr class="totals"><td colspan="8"> </td><td align="right">%s</td><td align="right">%s</td><td> </td></tr>' % (tpage, tmoney)) 105 self.report.append('<tr class="realpagecounter"><td colspan="8"> </td><td align="right">%s</td><td> </td></tr>' % self.getPrinterRealPageCounter(printer)) 99 106 self.report.append('</table>') 100 107 if self.isgroup : -
pykota/trunk/pykota/reporters/text.py
r1257 r2054 22 22 # 23 23 # $Log$ 24 # Revision 1.10 2005/02/13 22:02:29 jalet 25 # Big database structure changes. Upgrade script is now included as well as 26 # the new LDAP schema. 27 # Introduction of the -o | --overcharge command line option to edpykota. 28 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 29 # Introduction of the new 'maxdenybanners' directive. 30 # 24 31 # Revision 1.9 2004/01/08 14:10:33 jalet 25 32 # Copyright year changed. … … 78 85 self.report.append('-' * len(header)) 79 86 for (entry, entrypquota) in getattr(self.tool.storage, "getPrinter%ssAndQuotas" % prefix)(printer, self.ugnames) : 80 (pages, money, name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid ) = self.getQuota(entry, entrypquota)81 self.report.append("%- 9.9s %s %7i %7s %7s %10s %-10.10s %8i %10s" % (name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid))87 (pages, money, name, reached, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid, overcharge, warncount) = self.getQuota(entry, entrypquota) 88 self.report.append("%-15.15s %s %5s %7i %7s %7s %10s %-10.10s %8i %10s %4s" % (name, reached, overcharge, pagecounter, soft, hard, balance, datelimit, lifepagecounter, lifetimepaid, warncount)) 82 89 total += pages 83 90 totalmoney += money … … 85 92 if total or totalmoney : 86 93 (tpage, tmoney) = self.getTotals(total, totalmoney) 87 self.report.append((" " * 50) + tpage + tmoney)88 self.report.append((" " * 51) + self.getPrinterRealPageCounter(printer))94 self.report.append((" " * 62) + tpage + tmoney) 95 self.report.append((" " * 63) + self.getPrinterRealPageCounter(printer)) 89 96 self.report.append("") 90 97 if self.isgroup :