Commit c931a2a0 authored by Leo Iannacone's avatar Leo Iannacone

send logs file as text/plain

parent 01d306f0
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* [new] [module] add parser for blhc log file * [new] [module] add parser for blhc log file
* [new] show file size for package files * [new] show file size for package files
* [new] disable autoscroll pressing on "back on top" panel * [new] disable autoscroll pressing on "back on top" panel
* [new] log files can be now showed directly in the browsers
* [fix] [module] use readline while parsing piuparts log file * [fix] [module] use readline while parsing piuparts log file
* [fix] add support to sourceupload.changes * [fix] add support to sourceupload.changes
* [fix] add support to source format 1.0 - closes #6 * [fix] add support to source format 1.0 - closes #6
......
...@@ -5,6 +5,7 @@ app = module.exports = require("express")() ...@@ -5,6 +5,7 @@ app = module.exports = require("express")()
server = require("http").createServer(app) server = require("http").createServer(app)
io = require("socket.io")(server) io = require("socket.io")(server)
path = require("path")
serve_static = require("serve-static") serve_static = require("serve-static")
serve_index = require("serve-index") serve_index = require("serve-index")
errorhandler = require("errorhandler") errorhandler = require("errorhandler")
...@@ -64,6 +65,14 @@ if config.routes.debomatic ...@@ -64,6 +65,14 @@ if config.routes.debomatic
next() next()
return return
app.get config.routes.debomatic + '/:distribution/logs/:file', (req, res) ->
distribution = req.params.distribution
file = req.params.file
full_path = path.join(config.debomatic.path, distribution, 'logs', file)
res.set('Content-Type', 'text/plain')
res.sendFile(full_path)
app.use(config.routes.debomatic, serve_static(config.debomatic.path)) app.use(config.routes.debomatic, serve_static(config.debomatic.path))
app.use(config.routes.debomatic, serve_index(config.debomatic.path, app.use(config.routes.debomatic, serve_index(config.debomatic.path,
{view: "details", icons: true})) {view: "details", icons: true}))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment