]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/health.html
update sources to 12.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / health.html
index 48cea82f1097c69476fc43923ae49e5db7e82957..e076d4bb0ad528232176c6b4fec19d7d3c4ce95c 100644 (file)
             };
 
             rivets.formatters.pg_status_style = function(pg_status) {
-                var unhealthy = false;
-                var scrubbing = false;
                 $.each(pg_status, function(state, count) {
-                    if (state == "active+clean") {
-
-                    } else if (state == "active+clean+scrubbing"
-                    || state == "active+clean+scrubbing+deep") {
-                        scrubbing = true;
+                    if (state == "active+clean"
+                     || state == "active+clean+scrubbing"
+                     || state == "active+clean+scrubbing+deep") {
+                        return "color: #00bb00";
                     } else {
-                        unhealthy = true;
+                        return "color: #FFC200";
                     }
                 });
-
-                if (unhealthy) {
-                    return "color: #FFC200";
-                } else if (scrubbing) {
-                    return "color: #0000bb";
-                } else {
-                    return "color: #00bb00";
-                }
             };
 
             rivets.formatters.pg_status = function(pg_status) {
             rivets.bind($("#content"), content_data);
 
             var refresh = function() {
-                $.get("/health_data", function(data) {
+                $.get("{{ url_prefix }}/health_data", function(data) {
                     _.extend(content_data, data);
                     draw_usage_charts();
                     setTimeout(refresh, 5000);