ui: reload acls after creating

fixes #323
This commit is contained in:
Jack Pearkes 2014-10-15 15:55:53 -07:00
parent c8ac05b39e
commit cc8c3bbd98
1 changed files with 10 additions and 0 deletions

View File

@ -401,6 +401,16 @@ App.AclsController = Ember.ArrayController.extend({
}).then(function(response) {
// transition to the acl
controller.transitionToRoute('acls.show', response.ID);
// Get the ACL again, including the newly created one
Ember.$.getJSON(formatUrl('/v1/acl/list', dc, token)).then(function(data) {
var objs = [];
data.map(function(obj){
objs.push(App.Acl.create(obj));
});
controller.set('items', objs);
});
controller.set('isLoading', false);
}).fail(function(response) {
// Render the error message on the form if the request failed