function save() {
if (cstVm.invalidConfig) {
// @TODO handle this more gracefully and get rid of lint ignore
alert('Invalid configuration JSON'); // jshint ignore:line
return;
}
// @TODO convert to _.camelCase() on webserver and get rid of jscs ignore
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
cstVm.test.is_configured = true;
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
modifying(false);
// !!!!HERE
cstVm.test.config = JSON.parse(cstVm.test.config);
serviceTestsService.update(cstVm.deploymentId, cstVm.test).then(function() {
$scope.$emit('test.saved');
});
}