Commit 78ec43bf by Oláh István Gergely

dashboard: refresh node activity on ajax success

parent 808f7c95
...@@ -162,6 +162,7 @@ $(function() { ...@@ -162,6 +162,7 @@ $(function() {
// change big status span // change big status span
$('#node-info-pane').load(location.href+" #node-info-data"); $('#node-info-pane').load(location.href+" #node-info-data");
$('#activity-timeline-wrapper').load(location.href+" #activity-timeline");
} }
$('#table_container').on('click','.node-enable',function() { $('#table_container').on('click','.node-enable',function() {
...@@ -173,6 +174,7 @@ $(function() { ...@@ -173,6 +174,7 @@ $(function() {
$('#node-info-pane').on('click','.node-enable',function(){ $('#node-info-pane').on('click','.node-enable',function(){
// post, change node status // post, change node status
enablenode($(this).attr('data-node-pk'),$(this).attr('data-status'),enabledetailsSuccess); enablenode($(this).attr('data-node-pk'),$(this).attr('data-status'),enabledetailsSuccess);
return false; return false;
}); });
......
{% load i18n %} {% load i18n %}
<div id="activity-timeline" class="timeline">
{% for a in activities %} {% for a in activities %}
<div class="activity" data-activity-id="{{ a.pk }}"> <div class="activity" data-activity-id="{{ a.pk }}">
<span class="timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"> <span class="timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}">
...@@ -25,3 +26,4 @@ ...@@ -25,3 +26,4 @@
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}
</div>
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<h3>{% trans "Activity" %}</h3> <h3>{% trans "Activity" %}</h3>
<div id="activity-timeline" class="timeline"> <div id="activity-timeline-wrapper">
{% include "dashboard/node-detail/_activity-timeline.html" %} {% include "dashboard/node-detail/_activity-timeline.html" %}
</div> </div>
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