├── public ├── js │ ├── .jshintignore │ ├── noty │ │ ├── layouts │ │ │ ├── inline.js │ │ │ ├── top.js │ │ │ ├── bottom.js │ │ │ ├── topLeft.js │ │ │ ├── topRight.js │ │ │ ├── topCenter.js │ │ │ ├── bottomLeft.js │ │ │ ├── bottomRight.js │ │ │ ├── bottomCenter.js │ │ │ ├── center.js │ │ │ ├── centerLeft.js │ │ │ └── centerRight.js │ │ └── themes │ │ │ └── default.js │ ├── ChartHandler.js │ ├── flot │ │ ├── jquery.flot.symbol.min.js │ │ ├── jquery.flot.threshold.min.js │ │ ├── jquery.flot.crosshair.min.js │ │ ├── jquery.flot.fillbetween.min.js │ │ ├── jquery.flot.resize.min.js │ │ ├── jquery.flot.stack.min.js │ │ ├── jquery.flot.categories.min.js │ │ ├── jquery.flot.image.min.js │ │ ├── jquery.flot.symbol.js │ │ ├── jquery.colorhelpers.min.js │ │ ├── jquery.flot.resize.js │ │ ├── jquery.flot.canvas.min.js │ │ ├── jquery.flot.selection.min.js │ │ ├── jquery.flot.threshold.js │ │ ├── jquery.flot.errorbars.min.js │ │ ├── jquery.flot.crosshair.js │ │ ├── jquery.flot.navigate.min.js │ │ ├── jquery.flot.fillbetween.js │ │ ├── jquery.flot.time.min.js │ │ ├── jquery.flot.categories.js │ │ ├── jquery.colorhelpers.js │ │ ├── jquery.flot.stack.js │ │ ├── jquery.flot.image.js │ │ ├── jquery.flot.canvas.js │ │ └── jquery.flot.pie.min.js │ ├── .jshintrc │ ├── DataModel.js │ ├── RedisHandler.js │ └── jquery.blockUI.js ├── img │ └── close.png ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── templates │ ├── errors │ │ ├── 404.dust │ │ └── not-connected.dust │ ├── newJob.dust │ ├── queueList.dust │ ├── jobList.dust │ ├── index.dust │ └── layouts │ │ └── master.dust └── css │ └── master.css ├── .gitignore ├── config ├── index.js ├── development.json └── production.json ├── index.js ├── lib ├── server.js ├── enforceConnection.js ├── redisConnector.js ├── setupAndMiddleware.js └── updateInfo.js ├── app.js ├── models └── bull.js ├── controllers ├── newjob.js ├── queues.js ├── failed.js ├── pending.js ├── complete.js ├── active.js ├── delayed.js ├── index.js └── jobs.js ├── package.json ├── LICENSE.md └── README.md /public/js/.jshintignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea/ 3 | .build/ 4 | *.iml 5 | node_modules/ -------------------------------------------------------------------------------- /public/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andris9/Matador/master/public/img/close.png -------------------------------------------------------------------------------- /public/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andris9/Matador/master/public/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andris9/Matador/master/public/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andris9/Matador/master/public/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andris9/Matador/master/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = require('./'+(process.env.NODE_ENV ? process.env.NODE_ENV.toLowerCase() : "development")); -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var config = require('./config'), 2 | app = require('./app')(config); 3 | 4 | app.listen(config.port, function() { 5 | console.log("Matador listening on port", config.port, "in", process.env.NODE_ENV, "mode"); 6 | }); -------------------------------------------------------------------------------- /public/templates/errors/404.dust: -------------------------------------------------------------------------------- 1 | {>"layouts/master" /} 2 | 3 | {Page not found! 5 |
6 |
7 | We looked everywhere! It just ain't here. Sorry 'bout that. 8 |
9 | {/body} 10 | -------------------------------------------------------------------------------- /config/development.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1337, 3 | "redis": { 4 | "host": "localhost", 5 | "port": 6379 6 | }, 7 | "errorPages": { 8 | "404": "errors/404", 9 | "not-connected": "errors/not-connected" 10 | }, 11 | "development": true 12 | } 13 | -------------------------------------------------------------------------------- /config/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 1337, 3 | "redis": { 4 | "host": "localhost", 5 | "port": 6379 6 | }, 7 | "errorPages": { 8 | "404": "errors/404", 9 | "not-connected": "errors/not-connected" 10 | }, 11 | "production": true 12 | } 13 | -------------------------------------------------------------------------------- /lib/server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'), 2 | cons = require('consolidate'), 3 | dust = require('dustjs-linkedin'), 4 | app = express(); 5 | 6 | app.engine('dust', cons.dust); 7 | app.set('view engine', 'dust'); 8 | app.set("views", __dirname + "/../public/templates/"); 9 | 10 | module.exports = app; -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var app = require('./lib/server'); 4 | 5 | /** 6 | * @param {Object} options 7 | * @param {Object} [options.redis] optional redis settings (host, port, password). 8 | * Defaults to the development redis settings in ./config 9 | * 10 | */ 11 | module.exports = function(options) { 12 | require('./lib/setupAndMiddleware')(app, options); 13 | return app; 14 | }; -------------------------------------------------------------------------------- /public/templates/errors/not-connected.dust: -------------------------------------------------------------------------------- 1 |

Not Connected

2 |
3 |

There was an error connecting to the redis server specified in the config file.
4 | Please check your config file and verify that your redis server is up and able to be connected to from this IP address.

5 |

After you have verified that you can connect to your server, refresh the page.

6 |
7 | -------------------------------------------------------------------------------- /lib/enforceConnection.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = exports = function (options){ 3 | options = options || {}; 4 | return function (req, res, next) { 5 | if (!redis.connected) { 6 | if (req.xhr) { 7 | res.json({success: false, message: "Not connected to redis database."}); 8 | } else { 9 | res.render(options.errorPages["not-connected"]); 10 | } 11 | } else { 12 | next(); 13 | } 14 | }; 15 | }; -------------------------------------------------------------------------------- /lib/redisConnector.js: -------------------------------------------------------------------------------- 1 | var redisAdapter = require('redis'), 2 | Promise = require('bluebird'), 3 | updateInfo = require('./updateInfo'); 4 | 5 | exports.connect = function(settings){ 6 | Promise.promisifyAll(redisAdapter); 7 | redis = redisAdapter.createClient(settings.port, settings.host, settings.options); 8 | if(settings.password){ 9 | redis.auth(settings.password); 10 | } 11 | redis.on("error", console.log); 12 | updateInfo.startUpdatingInfo(); 13 | }; 14 | -------------------------------------------------------------------------------- /public/js/noty/layouts/inline.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | $.noty.layouts.inline = { 4 | name: 'inline', 5 | options: {}, 6 | container: { 7 | object: '