                            #(reduce - 0 (map metric (val %)))
                            (group-by :table all-regions)))
 
-        ;; Tables to show
-        visible-tables (set (if (seq tables) tables all-tables))
-
         ;; Filter regions by table name
         visible-regions (map byte-buffers->str
-                             (filter #(visible-tables (:table %)) all-regions))
+                             (if (seq tables)
+                               (let [tables (set tables)]
+                                 (filter #(tables (:table %)) all-regions))
+                               all-regions))
 
         ;; Group by server, sort the pairs, build a list of maps with :name and :regions
         grouped (map #(zipmap [:name :regions] %)

  "Builds a small HTML snippet for each table to be used in bootstrap popover"
  [props]
  (build-popover
    [:h3 (:name props)]
    [:regions
     :store-files
     :store-file-size-mb

  [title keys props]
  (let [has-locality (:has-locality @cached)
        {:keys [table encoded-name]} props]
    (str
      title
      "<table class=\"table table-condensed table-striped\"><tbody>"
      (apply str
             (map #(let [[k v] (format-val % (% props) props)]
                     (str "<tr><th class=\"col-xs-2\">" k "</th><td>" (escape-html v) "</td></tr>"))
                  (filter #(and (% props)
                                ;; Ignore locality if not available
                                (or has-locality (not= % :locality))) keys)))
      "</tbody></table>")))

(defn build-region-popover
  "Builds a small HTML snippet for each region to be used in bootstrap popover"
  [props]
  (let [{:keys [table encoded-name]} props]
    (build-popover
      (str "<h3>" (escape-html table)
           " <small>" (escape-html encoded-name) "</small></h3>")
      [:server
       :start-key :end-key
       :store-file-size-mb
