Viewer for remote files

Kaos

[H]ard|Gawd
Joined
Oct 14, 2003
Messages
1,328
Hey all!

I've taken on a little project for myself and came up with some of how I want to handle it and just wanted to run the concept as a whole past some other technical folks before going too much down a bad path.

Need:
Web based viewer for text files. Only a few of us actually have access to the machine where the logs are actually located but many people need to read them. Short of copying them to another location (too many logs to do this), I thought this might be a decent solution.

I have a directory structure on a machine separate from the webserver that's a linux box. The directories that the logs are in are always going to follow the same pattern:
/logdir/projectname/logs/YYYYMMDD

I've been using an SSH library for interacting with the remote machines and capturing the output of "cat" for this purpose. What I really want to build is a tree-view of the directories on the left "navigation" area, then the right portion would have a list of the files on top and then a tabbed section below when you "open" a file to view it. I was just going to continue to use the SSH lib that I have along with some other libraries.

I'm going to get an initial snapshot of just the directories and then use ajax to update the list of files when one is "opened" and for logs that are over a certain size, just tail a certain number of lines from the log. Any glaring issues with this approach? There are SSH libs for all the languages I'd be interested in writing this in, so language isn't even part of my initial concern, just the approach.
 
Back
Top