From: John Spray Date: Fri, 29 Sep 2017 11:02:21 +0000 (-0400) Subject: mgr/dashboard: redirect away if viewed filesystem is removed X-Git-Tag: v13.0.1~364^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=83800cd7c11e229e291c699ed45bc65c7fcd9357;p=ceph.git mgr/dashboard: redirect away if viewed filesystem is removed Previously this would sit there with stale data in the browser if you were viewing a filesystem and then deleted it in the background. Signed-off-by: John Spray --- diff --git a/src/pybind/mgr/dashboard/filesystem.html b/src/pybind/mgr/dashboard/filesystem.html index 55bbdb188303b..761e5ff42fadf 100644 --- a/src/pybind/mgr/dashboard/filesystem.html +++ b/src/pybind/mgr/dashboard/filesystem.html @@ -11,6 +11,10 @@ $.get("{{ url_prefix }}/filesystem_data/" + content_data.fs_status.filesystem.id + "/", function(data) { _.extend(content_data.fs_status, data); setTimeout(refresh, 5000); + }).fail(function() { + // Perhaps the filesystem we're viewing no longer exists. + // Go back to home. + window.location.href = "{{ url_prefix }}/"; }); };