Merge pull request #117 from dekz/dash_fix

Dash fixes.
This commit is contained in:
Austen 2015-09-14 20:17:36 -07:00
commit beddde479b

View File

@ -71,20 +71,17 @@ CMD.prototype.run = Promise.method(function() {
_this._resources = selectedResources;
if (!_this._resources.length) {
return false;
} else {
// TODO: Untag all other resources
return _this._resources;
}
return _this._choices;
})
.each(function(resource) {
var toggled = (!!resource.toggled || false);
if (resource.type === 'lambda') {
_this._report.targetLambdas++;
return CMDtag.tag('lambda', resource.value, false);
return CMDtag.tag('lambda', resource.value, !toggled);
} else if (resource.type === 'endpoint') {
_this._report.targetEndpoints++;
return CMDtag.tag('endpoint', resource.value, false);
return CMDtag.tag('endpoint', resource.value, !toggled);
}
});
}
@ -97,6 +94,9 @@ CMD.prototype.run = Promise.method(function() {
JawsCli.log(chalk.white('-------------------------------------------'));
JawsCli.log(chalk.white(' Dashboard: Deploying Lambdas...'));
JawsCli.log(chalk.white('-------------------------------------------'));
if (!_this._report.targetLambdas) {
return JawsCli.log(chalk.white('No Selected Lambdas to deploy.'));
}
return CMDdeployLambda.run(
_this._JAWS,
@ -110,6 +110,9 @@ CMD.prototype.run = Promise.method(function() {
JawsCli.log(chalk.white('-------------------------------------------'));
JawsCli.log(chalk.white(' Dashboard: Deploying Endpoints...'));
JawsCli.log(chalk.white('-------------------------------------------'));
if (!_this._report.targetEndpoints) {
return JawsCli.log(chalk.white('No Selected Endpoints to deploy.'));
}
return CMDdeployEndpoint.run(
_this._JAWS,
@ -366,4 +369,4 @@ CMD.prototype._promptRegion = Promise.method(function() {
_this._regions = [results[0].value];
}
});
});
});