Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup/bug fixes

  • Loading branch information...
commit c98fd9a35bc5cefdceb0c611c8e884f8f373515b 1 parent ba64f03
@russellhaering russellhaering authored
View
2  lib/stack.js
@@ -415,7 +415,7 @@ Stack.prototype.getRegionSummary = function(region, callback) {
callback(err, err ? null : {
name: region,
deployed_revision: revision,
- latest_deployment: self.newestDeployments[region] || null
+ latest_deployment: self.newestDeployments[region].toString() || null
});
});
};
View
24 lib/web/app.js
@@ -108,7 +108,6 @@ exports.registerAPI = function(dreadnot, authdb) {
// API is behind Basic auth
basic = express.basicAuth(function(username, password, callback) {
authdb.validate(username, password, function(err, valid) {
- return callback(err, null);
if (err || !valid) {
callback(err, null);
} else {
@@ -118,24 +117,25 @@ exports.registerAPI = function(dreadnot, authdb) {
});
app.configure(function() {
+ app.use(basic);
app.use(middleware.apiresponse());
});
// Register handlers
- app.get('/1.0', basic, apiHandlers.getDreadnot);
+ app.get('/1.0', apiHandlers.getDreadnot);
- app.get('/1.0/stacks', basic, apiHandlers.getStacks);
- app.get('/1.0/stacks/:stack', basic, apiHandlers.getStack);
- app.get('/1.0/stacks/:stack/regions', basic, apiHandlers.getRegions);
- app.get('/1.0/stacks/:stack/regions/:region', basic, apiHandlers.getRegion);
- app.get('/1.0/stacks/:stack/regions/:region/deployments', basic, apiHandlers.getDeployments);
- app.get('/1.0/stacks/:stack/regions/:region/deployments/:deployment', basic, apiHandlers.getDeployment);
- app.get('/1.0/stacks/:stack/regions/:region/deployments/:deployment/log', basic, apiHandlers.getDeploymentLog);
+ app.get('/1.0/stacks', apiHandlers.getStacks);
+ app.get('/1.0/stacks/:stack', apiHandlers.getStack);
+ app.get('/1.0/stacks/:stack/regions', apiHandlers.getRegions);
+ app.get('/1.0/stacks/:stack/regions/:region', apiHandlers.getRegion);
+ app.get('/1.0/stacks/:stack/regions/:region/deployments', apiHandlers.getDeployments);
+ app.get('/1.0/stacks/:stack/regions/:region/deployments/:deployment', apiHandlers.getDeployment);
+ app.get('/1.0/stacks/:stack/regions/:region/deployments/:deployment/log', apiHandlers.getDeploymentLog);
- app.post('/1.0/stacks/:stack/regions/:region/deployments', basic, apiHandlers.deploy);
+ app.post('/1.0/stacks/:stack/regions/:region/deployments', apiHandlers.deploy);
- app.get('/1.0/warning', basic, apiHandlers.getWarning);
- app.put('/1.0/warning', basic, apiHandlers.saveWarning);
+ app.get('/1.0/warning', apiHandlers.getWarning);
+ app.put('/1.0/warning', apiHandlers.saveWarning);
return app;
};
View
1  lib/web/handlers/web.js
@@ -58,7 +58,6 @@ exports.getWebHandlers = function(dreadnot, authdb) {
if (err) {
handleError(req, res, err);
} else {
- console.log('DATA', data);
render(req, res, template, data);
}
};
View
1  static/js/dreadnot.js
@@ -47,6 +47,7 @@ function streamLogs(log) {
if (typeof entry !== 'boolean') {
pushEntry(entry);
} else {
+ done = true;
$('pre.deployment_log p').last().addClass(entry ? 'success' : 'error');
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.