Navigation Menu

Skip to content

Commit

Permalink
Adds more checks for issue-52
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrePaul committed Aug 20, 2015
1 parent d0b5089 commit 48a6728
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
1 change: 0 additions & 1 deletion jeto/models/vagrant.py
Expand Up @@ -141,7 +141,6 @@ def __str__(self):
return self.__unicode__()

def post(self):
print request.json
return self

@orm.reconstructor
Expand Down
23 changes: 18 additions & 5 deletions jeto/static/js/controllers/instances.js
Expand Up @@ -95,8 +95,14 @@ function InstancesController($scope, Instances, Projects, Hosts, $http, $locatio
instance.archive_url = $scope.instanceInfo.archive_url;
instance.state = 'create';
instance.async = true;
instance.$save(function(data){
instance.$save({}, function(data){
$location.path('/instances/' + data.instance.id);
}, function(error){
$('.loading').hide();
alert("Something failed ... try to refresh.\n"
+"if you think it's a bug please report it on github\n"
+"https://github.com/StudioQi/jeto/issues\n"
+"Error message :\n" + error.message);
});
}
},
Expand Down Expand Up @@ -137,10 +143,17 @@ function InstancesController($scope, Instances, Projects, Hosts, $http, $locatio
instanceId = $scope.deleteId;
$('.loading').show();
$http.delete('/api/instances/' + instanceId)
.success(function(infos) {
setTimeout($scope.updateInfos, 100);
$scope.deleteId = undefined;
});
.success(function(){
setTimeout($scope.updateInfos, 100);
$scope.deleteId = undefined;
})
.error(function(error){
$('.loading').hide();
alert("Something failed ... try to refresh.\n"
+"if you think it's a bug please report it on github\n"
+"https://github.com/StudioQi/jeto/issues\n"
+"Error message :\n" + error.message);
});
}
},
cancel: {
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
@@ -1,7 +1,7 @@
Babel==1.3
Flask==0.10.1
Flask-Babel==0.9
Flask-RESTful==0.2.5
Flask-RESTful==0.3.4
Flask-SQLAlchemy==1.0
Flask-Migrate==1.2.0
Flask-OAuth
Expand All @@ -28,6 +28,6 @@ six==1.6.1
speaklater==1.3
wsgiref==0.1.2
redis==2.9.1
rq==0.5.3
rq==0.5.4
times==0.6.2
ansiconv==1.0.0

0 comments on commit 48a6728

Please sign in to comment.