Opened 12 years ago

Closed 12 years ago

#35 closed task (fixed)

Shuffle all action logging into DNSDB.pm

Reported by: Kris Deugau Owned by:
Priority: minor Milestone:
Version: Keywords:
Cc:

Description

Current logging practice is mostly separate calls from the UI layer, using a UI-local sub that directly accesses the database (problem: SQL in the UI, see #1). For consistency and reduced code bulk/duplication in the UI layer, logging should be moved to the internals of each sub.

This requires that userdata be more conveniently accessible in DNSDB.pm.

Change History (20)

comment:1 by Kris Deugau, 12 years ago

(In [278]) /trunk

Checkpoint, diversion to get userdata somewhere handy(er) for logging
Copy-paste base login processing from dns.cg to login() in DNSDB.pm.
See #35.

comment:2 by Kris Deugau, 12 years ago

(In [279]) /trunk

Moving login SQL into DNSDB.pm complete. See #1
Checkpoint, moving logging into DNSDB.pm. See #1, #35.

Still requires a bit of commented-old-code cleanup

comment:3 by Kris Deugau, 12 years ago

(In [283]) /trunk

Convert zone status change logging to DNSDB-internal. See #35
Add a global for holding general result messages for subs that
return booleans. This allows us to easily display the same text
as was added to the log.
Fix docucomment on mailNotify(); it (still!) referred to its
copy-paste parent in the IP Database.

comment:4 by Kris Deugau, 12 years ago

(In [284]) /trunk

Clean up dangling failure logging in the UI layer for add domain.
Also clean up interim userdata-passing that's no longer necessary.
See #35

comment:5 by Kris Deugau, 12 years ago

(In [285]) /trunk

Move action logging for zone delete (deldom/delrevzone) into delZone()
See #35

comment:6 by Kris Deugau, 12 years ago

(In [286]) /trunk

Convert action logging for "Add reverse zone" to DNSDB-internal. See #35

  • don't pass userdata, either in the upstream caller (dns.cgi) or internally to _log()
  • don't expect userdata to be passed in

Fix up some warning-message-propagation in addRDNS()
Remove domain_id from addDomain() failure logging; if the domain wasn't
added then the log can't usefully refer to it by domain ID.
File off stale ##fixme's on reclist page
Fine-tune handling of message parameters in changepage(); if we're
going to go to the effort of converting newlines to <br> we should
use the result.

comment:7 by Kris Deugau, 12 years ago

(In [287]) /trunk

Move action logging for addRec() into DNSDB.pm. See #35

comment:8 by Kris Deugau, 12 years ago

(In [289]) /trunk

Forgot to move failed-action logging for addRec() and
updateRec(), done.
Removed commented domain-name-canonicalization for record-update page
See #35

comment:9 by Kris Deugau, 12 years ago

(In [290]) /trunk

Move action logging for delRec() into DNSDB.pm. See #35

comment:10 by Kris Deugau, 12 years ago

(In [292]) /trunk

Move action logging for addGroup() into DNSDB.pm. See #35

comment:11 by Kris Deugau, 12 years ago

(In [293]) /trunk

Move action logging for delGroup() into DNSDB.pm. See #35.
Extend checks for Things in the group a little
Delete default reverse records as well

comment:12 by Kris Deugau, 12 years ago

(In [294]) /trunk

"Move action logging for change group default permissions" mutated
into "Move action logging for (change group default permissions),
(add user), (update user), (update user permissions)". See #35.

comment:13 by Kris Deugau, 12 years ago

(In [295]) /trunk

Move entity-relationship reference hashes up into the same area
as other (semi)globals in DNSDB.pm since I was starting to add
an accidental duplicate of %par_tbl.
Move action logging for bulk domain change to DNSDB.pm: (See #35)

  • Clean up dns.cgi to match previous changes to zoneStatus() and delZone()
  • Less not-quite-identical code in dns.cgi can now be factored down
  • Updated changeGroup() with action logging and more error handling
  • Tweak logging and messages in delZone()

comment:14 by Kris Deugau, 12 years ago

(In [296]) /trunk

Move action logging for user status change into userStatus(). See #35

comment:15 by Kris Deugau, 12 years ago

(In [297]) /trunk

Move action logging for user delete into delUser(). See #35
Tweak log entry/result message for userStatus() for consistency
and clarity

comment:16 by Kris Deugau, 12 years ago

(In [298]) /trunk

Checkpoint updating importAXFR() action logging (see #35):

  • convert _ZONE() to handle the conversion from CIDR to formal .arpa zone name
  • add _zone2cidr() for the inverse operation; convert the .arpa zone name to the CIDR netblock

comment:17 by Kris Deugau, 12 years ago

(In [307]) /trunk

Fix a taint mode gotcha in _zone2cidr(), introduced with the
extension in r304 for supporting both range and netmask-based
sub-octet reverse zone names

Finalize updates to importAXFR() for reverse zones (see #26) and
action logging (see #35).
Includes some commented code and stubbery to do more complex handling
of NS and CNAME records for sub-octet subzones in revzones, probably
hinging on introducing a new pseudotype "DELEGATE"

comment:18 by Kris Deugau, 12 years ago

(In [308]) /trunk

UI-layer changes to move action logging for importAXFR() out of
dns.cgi (see #35) and introduce a UI checkbox to merge matching
A/AAAA and PTR records on import (see #26, sort of)

comment:19 by Kris Deugau, 12 years ago

(In [311]) /trunk

Move SQL for SOA update to DNSDB.pm (see #1)
Clean up support for reverse zones (see #26)
Move action logging for SOA updates to DNSDB.pm (see #35)

Includes log/info message consistency cleanups, dropping stale
commented code, dropping if(0)'ed code, tweaks to fillsoa() to
retain user changes on errors, updates to getSOA() for consistency,
removal of a stale form input

comment:20 by Kris Deugau, 12 years ago

Resolution: fixed
Status: newclosed

(In [315]) /trunk

Action logging all appears to be moved to DNSDB.pm. Removed
logaction() in dns.cgi. Closes #35

Note: See TracTickets for help on using tickets.