Reload environments page after all the environments have been deleted
Closes-Bug: #1486499 Change-Id: I5be35fd9d2ef7101eed89a1d3a649f6c47d5cfd2
This commit is contained in:
parent
2350c6d2a0
commit
c0809d5c2a
@ -31,3 +31,18 @@ $(function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var reloadEnvironmentCalled = false;
|
||||
|
||||
$(function() {
|
||||
"use strict";
|
||||
$("table#environments").on("update", function () {
|
||||
var $environmentsRows = $(this).find('tbody tr:visible').not('.empty');
|
||||
if ($environmentsRows.length === 0) {
|
||||
if (reloadEnvironmentCalled === false) {
|
||||
reloadEnvironmentCalled = true;
|
||||
location.reload(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
@ -8,10 +8,9 @@
|
||||
<script src="{% static 'muranodashboard/js/add-select.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/draggable-components.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/environments-in-place.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/environments-in-place.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/external-ad.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/horizon.muranotopology.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/horizon.tables+reload.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/murano.tables.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/load-modals.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/mixed-mode.js' %}"></script>
|
||||
<script src="{% static 'muranodashboard/js/murano.service.js' %}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user