Open ahaas opened 9 years ago
Good work! The page looks nice and clean. Two things:
After you make the above 2 changes, I can merge. Great job!
In regards to (1), I think this already exists through the /api/systemstats route I added.
/api/systemstats returns a JSON object corresponding to the systemStats struct.
Currently index.js
regularly queries the /api/systemstats endpoint to update the displayed info.
Ah, right you are. Sorry!
Finally got around to testing this. I get the following error when running:
1 gabe@pantry:~/src/giles/stats⟫ go run stats.go
# command-line-arguments
./stats.go:83: cannot use bootTime (type uint64) as type int64 in argument to time.Unix
Also, this should really be folded into the main archiver service, rather than being a standalone program. Take a look at how I handle running multiple web servers in https://github.com/gtfierro/giles/blob/master/giles.go#L47-L65.
The port should also be configurable. You can handle this in https://github.com/gtfierro/giles/blob/master/archiver/config.go
How close is this to done? Are there outstanding commits, or should I test and merge?
You can test and merge. By the way, I believe the old bug is now still present intermittently - #40