Commit 59d15d69 authored by Georgios Ouzounis's avatar Georgios Ouzounis
Browse files

Merge pull request #218 from ioantsaf/create-instance-improvements

Create instance improvements
parents 36b44adb deb3aba0
......@@ -5,7 +5,7 @@ export default Ember.Component.extend({
create(newLambdaInstance) {
newLambdaInstance.set('instanceName', this.get('instanceName'));
newLambdaInstance.set('masterName', this.get('masterName'));
newLambdaInstance.set('slaves', this.$("input[name='slaves']")[0].value);
newLambdaInstance.set('projectName', this.$("select[name='okeanos_project']")[0].value);
......@@ -25,8 +25,8 @@ export default Ember.Component.extend({
}
newLambdaInstance.set('publicKeyName', requestedPublicKeys);
if (typeof this.get("kafkaTopics") !== 'undefined') {
var kafkaTopicsString = this.get("kafkaTopics");
var kafkaTopicsString = this.get("kafkaTopics");
if (kafkaTopicsString) {
newLambdaInstance.set('kafkaTopics', kafkaTopicsString.split(','));
}
......
......@@ -34,6 +34,16 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
deactivate: function () {
Ember.run.cancel(this.poll);
},
actions: {
error: function(error) {
if (error && error.errors[0].status === 404) {
this.deactivate();
return this.transitionTo('lambda-instances.index');
}
return false;
}
}
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment