mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
commit
beddde479b
@ -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];
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user