Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
4,144 additions
and
3,964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
iisnode | ||
iisnode | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
|
||
pids | ||
logs | ||
results | ||
|
||
npm-debug.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
New BSD License | ||
http://www.opensource.org/licenses/bsd-license.php | ||
Copyright (c) 2013, Rob Conery (rob@tekpub.com) | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
Neither the name of the Tekpub nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Congo, a Backbone MongoDB Explorer from Tekpub | ||
===== | ||
|
||
A MongoDB Explorer written in Backbone using Twitter Bootstrap. Part of [Tekpub's Backbone.series](http://tekpub.com/productions/backbone) | ||
|
||
Congo is a bit of work-in-progress. We need this tool at Tekpub and in course of creating it, decided to record our work and present it to you, along with the project. | ||
|
||
There are a number of things that we'd like to add, but right now Congo will: | ||
|
||
- Browse local MongoDB databases, collections, and documents | ||
- Allow you to edit each document using the excellent Ace Text Editor | ||
|
||
The next work item is building in a query tool, and also some ad-hoc Map Reduce. | ||
|
||
### Requirements | ||
Congo is written in Backbone and, of course, requires MongoDB. The project itself was created in WebMatrix so if you're a Microsoft developer you'll be able to download this directly and open it in WebMatrix 2. | ||
|
||
The web server is NodeJS, [so you'll want to have Node installed as well](http://nodejs.org). If you receive errors on first start, run `npm install` in the root of the site (from the command line) to install any modules that don't get loaded from the repo. | ||
|
||
### Installation | ||
Clone this repo: `got clone https://github.com/tekpub/congo.git` into any directory and make sure that MongoDB and Node are installed on your machine. If you're using WebMatrix you can hit "Run" and up it will go. | ||
|
||
On Mac/Linux, change directories into Congo and "npm start" to start up the web server. If you receive any errors on start, be sure to make sure that all modules are installed using `npm install -d` | ||
|
||
**A note on builds**: Normally there would be some kind of build process which would concat/minify the JS files but we don't find much of a need for that here. Ideally this application won't be served for public consumption and is for admin needs only. | ||
|
||
If you do need to build/minify - we suggest using CodeKit, LiveReload, Cassette, or whatever tool you normall use - and make it part of your development process. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,87 @@ | ||
<html> | ||
<head> | ||
<title>iisnode logs</title> | ||
<style type="text/css"> | ||
body | ||
{ | ||
font-family: "Trebuchet MS" , Arial, Helvetica, sans-serif; | ||
} | ||
table | ||
{ | ||
border-collapse: collapse; | ||
} | ||
td, th | ||
{ | ||
border: 1px solid lightgray; | ||
padding: 3px 7px 2px 7px; | ||
} | ||
th | ||
{ | ||
text-align: left; | ||
padding-top: 5px; | ||
padding-bottom: 4px; | ||
background-color: Gray; | ||
color: #ffffff; | ||
} | ||
td.stderr | ||
{ | ||
color: Red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<table id="logFilesTable"> | ||
<tr> | ||
<th> | ||
Computer name | ||
</th> | ||
<th> | ||
PID | ||
</th> | ||
<th> | ||
Type | ||
</th> | ||
<th> | ||
Created | ||
</th> | ||
<th> | ||
Link | ||
</th> | ||
</tr> | ||
</table> | ||
<p id="lastUpdated"></p> | ||
<script type="text/javascript"> | ||
|
||
// this is replaced with actual data at runtime by code in interceptor.js | ||
var logFiles = [{"file":"PUKA-1328-stdout-1358553538996.txt","computername":"PUKA","pid":1328,"type":"stdout","created":1358553538996},{"file":"PUKA-1476-stdout-1358543697505.txt","computername":"PUKA","pid":1476,"type":"stdout","created":1358543697505},{"file":"PUKA-1724-stdout-1358554237344.txt","computername":"PUKA","pid":1724,"type":"stdout","created":1358554237344},{"file":"PUKA-2400-stdout-1358553605351.txt","computername":"PUKA","pid":2400,"type":"stdout","created":1358553605351},{"file":"PUKA-2508-stdout-1358553510667.txt","computername":"PUKA","pid":2508,"type":"stdout","created":1358553510667},{"file":"PUKA-2580-stdout-1358553182486.txt","computername":"PUKA","pid":2580,"type":"stdout","created":1358553182486},{"file":"PUKA-2676-stdout-1358553091880.txt","computername":"PUKA","pid":2676,"type":"stdout","created":1358553091880},{"file":"PUKA-2696-stderr-1358543671614.txt","computername":"PUKA","pid":2696,"type":"stderr","created":1358543671614},{"file":"PUKA-2696-stdout-1358543671600.txt","computername":"PUKA","pid":2696,"type":"stdout","created":1358543671600},{"file":"PUKA-2844-stdout-1358553018821.txt","computername":"PUKA","pid":2844,"type":"stdout","created":1358553018821},{"file":"PUKA-3628-stdout-1358553683342.txt","computername":"PUKA","pid":3628,"type":"stdout","created":1358553683342},{"file":"PUKA-3864-stdout-1358543487698.txt","computername":"PUKA","pid":3864,"type":"stdout","created":1358543487698},{"file":"PUKA-4188-stdout-1358553394351.txt","computername":"PUKA","pid":4188,"type":"stdout","created":1358553394351},{"file":"PUKA-4224-stdout-1358553328732.txt","computername":"PUKA","pid":4224,"type":"stdout","created":1358553328732},{"file":"PUKA-4376-stdout-1358552841203.txt","computername":"PUKA","pid":4376,"type":"stdout","created":1358552841203},{"file":"PUKA-4636-stdout-1358554106795.txt","computername":"PUKA","pid":4636,"type":"stdout","created":1358554106795},{"file":"PUKA-4772-stdout-1358553667325.txt","computername":"PUKA","pid":4772,"type":"stdout","created":1358553667325},{"file":"PUKA-4792-stdout-1358553231439.txt","computername":"PUKA","pid":4792,"type":"stdout","created":1358553231439},{"file":"PUKA-4996-stderr-1358543655299.txt","computername":"PUKA","pid":4996,"type":"stderr","created":1358543655299},{"file":"PUKA-4996-stdout-1358543655276.txt","computername":"PUKA","pid":4996,"type":"stdout","created":1358543655276},{"file":"PUKA-5072-stdout-1358553658552.txt","computername":"PUKA","pid":5072,"type":"stdout","created":1358553658552}]; | ||
var lastUpdated = 1358554237582; | ||
var date = new Date(); | ||
|
||
date.setTime(lastUpdated); | ||
document.getElementById('lastUpdated').innerHTML = 'Index was last updated ' + date; | ||
|
||
logFiles.sort(function (a, b) { | ||
return b.created - a.created; | ||
}); | ||
|
||
var logFilesTable = document.getElementById("logFilesTable"); | ||
for (var i = 0; i < logFiles.length; i++) { | ||
var logFile = logFiles[i]; | ||
date.setTime(logFile.created); | ||
var row = logFilesTable.insertRow(-1); | ||
var computerNameCell = row.insertCell(0); | ||
var pidCell = row.insertCell(1); | ||
var typeCell = row.insertCell(2); | ||
var dateCell = row.insertCell(3); | ||
var logCell = row.insertCell(4); | ||
computerNameCell.innerHTML = logFile.computername; | ||
pidCell.innerHTML = logFile.pid.toString(); | ||
typeCell.innerHTML = logFile.type; | ||
typeCell.setAttribute('class', logFile.type); | ||
dateCell.innerHTML = date.toString(); | ||
logCell.innerHTML = '<a href="' + logFile.file + '">log</a>'; | ||
}; | ||
|
||
</script> | ||
</body> | ||
</html> | ||
<html> | ||
<head> | ||
<title>iisnode logs</title> | ||
<style type="text/css"> | ||
body | ||
{ | ||
font-family: "Trebuchet MS" , Arial, Helvetica, sans-serif; | ||
} | ||
table | ||
{ | ||
border-collapse: collapse; | ||
} | ||
td, th | ||
{ | ||
border: 1px solid lightgray; | ||
padding: 3px 7px 2px 7px; | ||
} | ||
th | ||
{ | ||
text-align: left; | ||
padding-top: 5px; | ||
padding-bottom: 4px; | ||
background-color: Gray; | ||
color: #ffffff; | ||
} | ||
td.stderr | ||
{ | ||
color: Red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<table id="logFilesTable"> | ||
<tr> | ||
<th> | ||
Computer name | ||
</th> | ||
<th> | ||
PID | ||
</th> | ||
<th> | ||
Type | ||
</th> | ||
<th> | ||
Created | ||
</th> | ||
<th> | ||
Link | ||
</th> | ||
</tr> | ||
</table> | ||
<p id="lastUpdated"></p> | ||
<script type="text/javascript"> | ||
|
||
// this is replaced with actual data at runtime by code in interceptor.js | ||
var logFiles = [{"file":"BLARP-6052-stdout-1359494907870.txt","computername":"BLARP","pid":6052,"type":"stdout","created":1359494907870},{"file":"BLARP-6680-stdout-1359494654898.txt","computername":"BLARP","pid":6680,"type":"stdout","created":1359494654898},{"file":"BLARP-7080-stdout-1359424511540.txt","computername":"BLARP","pid":7080,"type":"stdout","created":1359424511540},{"file":"BLARP-720-stdout-1359495426737.txt","computername":"BLARP","pid":720,"type":"stdout","created":1359495426737},{"file":"BLARP-7660-stdout-1359495909174.txt","computername":"BLARP","pid":7660,"type":"stdout","created":1359495909174},{"file":"BLARP-976-stdout-1359495348674.txt","computername":"BLARP","pid":976,"type":"stdout","created":1359495348674},{"file":"PUKA-1348-stdout-1359152705550.txt","computername":"PUKA","pid":1348,"type":"stdout","created":1359152705550},{"file":"PUKA-2308-stderr-1359576346092.txt","computername":"PUKA","pid":2308,"type":"stderr","created":1359576346092},{"file":"PUKA-2308-stdout-1359576345764.txt","computername":"PUKA","pid":2308,"type":"stdout","created":1359576345764},{"file":"PUKA-2504-stdout-1359151140083.txt","computername":"PUKA","pid":2504,"type":"stdout","created":1359151140083},{"file":"PUKA-3188-stdout-1359577008945.txt","computername":"PUKA","pid":3188,"type":"stdout","created":1359577008945},{"file":"PUKA-3764-stdout-1359143401944.txt","computername":"PUKA","pid":3764,"type":"stdout","created":1359143401944},{"file":"PUKA-3788-stdout-1359143317170.txt","computername":"PUKA","pid":3788,"type":"stdout","created":1359143317170},{"file":"PUKA-4044-stdout-1359583170970.txt","computername":"PUKA","pid":4044,"type":"stdout","created":1359583170970},{"file":"PUKA-4532-stdout-1359422182278.txt","computername":"PUKA","pid":4532,"type":"stdout","created":1359422182278},{"file":"PUKA-4808-stdout-1359582299791.txt","computername":"PUKA","pid":4808,"type":"stdout","created":1359582299791},{"file":"PUKA-5452-stdout-1359400950079.txt","computername":"PUKA","pid":5452,"type":"stdout","created":1359400950079},{"file":"PUKA-5504-stdout-1359401218459.txt","computername":"PUKA","pid":5504,"type":"stdout","created":1359401218459},{"file":"PUKA-5608-stdout-1359422501190.txt","computername":"PUKA","pid":5608,"type":"stdout","created":1359422501190},{"file":"PUKA-5784-stdout-1359400394264.txt","computername":"PUKA","pid":5784,"type":"stdout","created":1359400394264}]; | ||
var lastUpdated = 1359583171208; | ||
var date = new Date(); | ||
|
||
date.setTime(lastUpdated); | ||
document.getElementById('lastUpdated').innerHTML = 'Index was last updated ' + date; | ||
|
||
logFiles.sort(function (a, b) { | ||
return b.created - a.created; | ||
}); | ||
|
||
var logFilesTable = document.getElementById("logFilesTable"); | ||
for (var i = 0; i < logFiles.length; i++) { | ||
var logFile = logFiles[i]; | ||
date.setTime(logFile.created); | ||
var row = logFilesTable.insertRow(-1); | ||
var computerNameCell = row.insertCell(0); | ||
var pidCell = row.insertCell(1); | ||
var typeCell = row.insertCell(2); | ||
var dateCell = row.insertCell(3); | ||
var logCell = row.insertCell(4); | ||
computerNameCell.innerHTML = logFile.computername; | ||
pidCell.innerHTML = logFile.pid.toString(); | ||
typeCell.innerHTML = logFile.type; | ||
typeCell.setAttribute('class', logFile.type); | ||
dateCell.innerHTML = date.toString(); | ||
logCell.innerHTML = '<a href="' + logFile.file + '">log</a>'; | ||
}; | ||
|
||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.