Commit 2410e2e1 by Oláh István Gergely

dashboard: quickfix node rename returning new_name

parent 824068e0
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
data: {'new_name': name}, data: {'new_name': name},
headers: {"X-CSRFToken": getCookie('csrftoken')}, headers: {"X-CSRFToken": getCookie('csrftoken')},
success: function(data, textStatus, xhr) { success: function(data, textStatus, xhr) {
$("#node-details-h1-name").html(data['new_name']).show(); $("#node-details-h1-name").html(data['new_name']).show();
$('#node-details-rename').hide(); $('#node-details-rename').hide();
// addMessage(data['message'], "success"); // addMessage(data['message'], "success");
}, },
......
...@@ -471,6 +471,7 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView): ...@@ -471,6 +471,7 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
if request.is_ajax(): if request.is_ajax():
response = { response = {
'message': success_message, 'message': success_message,
'new_name': new_name,
'node_pk': self.object.pk 'node_pk': self.object.pk
} }
return HttpResponse( return HttpResponse(
......
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 sign in to comment