Changeset 4909


Ignore:
Timestamp:
27 Jan 2010, 13:17:38 (15 years ago)
Author:
uli
Message:
  • Fix link to logfile after processing.
  • Remove ability to delete logfiles with the UI.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/trunk/src/waeup/browser/pages.py

    r4898 r4909  
    562562
    563563        if showlog is not None:
    564             logfilename = "logs/datacenter.log" # % (self.filename, self.mode)
     564            logfilename = "datacenter.log"
    565565            session['logname'] = logfilename
    566566            self.redirect(self.url(self.context, '@@show'))
     
    593593    pnav = 0
    594594
    595     def update(self, show=None, remove=None, logname=None, back=None):
     595    def update(self, show=None, logname=None, back=None):
    596596        session = ISession(self.request)['waeup.sirp']
    597597        if back is not None:
     
    600600        if logname is not None:
    601601            session['logname'] = logname
    602             if remove is not None:
    603                 fullpath = os.path.join(self.context.storage, logname)
    604                 try:
    605                     os.unlink(fullpath)
    606                     self.flash('File %s deleted.' % logname)
    607                 except:
    608                     self.flash("Could not delete %s: " % logname)
    609                     self.flash("Problem: %s" % sys.exc_info()[1])
    610 
    611602        if show is not None:
    612603            self.redirect(self.url(self.context, '@@show'))
     
    630621        self.filename = logname
    631622        self.files = self.context.getLogFiles()
    632         fullpath = os.path.join(self.context.storage, logname)
     623        fullpath = os.path.join(self.context.storage, 'logs', logname)
    633624        self.filecontents = open(fullpath, 'rb').read()
    634625
Note: See TracChangeset for help on using the changeset viewer.