           [:i.fa.fa-play]]
          [c/button [:i.fa.fa-save]]
          [c/button [:i.fa.fa-file-o]]]]
-       [:div.panel-body {:style {:padding "0px" :overflow "scroll" :height "calc(100% - 56px)"}}
-        [code-mirror cm {:mode "text/x-sql"}]]
-       [:div.panel-footer @status]])))
-
-(defn mk-console-control [data-tabs active-tab]
-  (let [q-id (atom 0)]
-    (ConsoleControl. data-tabs active-tab q-id)))
+       [:div.panel-body {:style {:padding "0px" :overflow "scroll" :height "calc(100% - 46px)"}}
+        [code-mirror cm {:mode "text/x-sql"}]]])))
 
 (defn retrieve-table-meta [db tbl data-fn error-fn]
   (GET (str "/ds/" (db "id") "/tables/" tbl) :response-format :json

            [cljsjs.mousetrap]
            [ajax.core :refer [GET POST]]))

(deftype ConsoleControl [data-tabs active-tab q-id]
  Object
  (preview [_ tbl]
    (when-not (some #(= tbl (:id %)) @data-tabs)

                   :title (r/as-element
                           [:span {:title (:title t)} id
                            [c/close-button #(.delete-tab ops t)]])}
            (cond
              (:raw-sql t) [query-table db t]
              (:table t) [table-meta db (:table t)]
              :else [sql-output t])])]]])))
