            [:hr]
            (clear-cache-button "source" project-data owner)]]]))))
 
-(defn remove-env-var-button [{:keys [env-var project-id]} owner]
-  (reify
-    om/IInitState
-    (init-state [_]
-      {:show-modal? false})
-    om/IRenderState
-    (render-state [_ {:keys [show-modal?]}]
-      (html
-       [:span
-        (table/action-button
-         "Remove"
-         (icon/delete)
-         #(om/set-state! owner :show-modal? true))
-        (when show-modal?
-          (let [close-fn #(om/set-state! owner :show-modal? false)]
-            (modal/modal-dialog {:title "Are you sure?"
-                                 :body (html
-                                        [:span
-                                         "Are you sure you want to remove the environment variable \""
-                                         (:name env-var)
-                                         "\"?"])
-                                 :actions [(button/button {:on-click close-fn} "Cancel")
-                                           (button/button {:primary? true
-                                                           :on-click #(raise! owner [:deleted-env-var {:project-id project-id
-                                                                                                       :env-var-name (:name env-var)}])}
-                                                          "Remove")]
-                                 :close-fn close-fn})))]))))
-
 (defn env-vars [project-data owner]
   (reify
     om/IInitState

                                         :value code
                                         :on-click #(.select (.-target %))}]]]]]]))))

(defn remove-ssh-key-button [{:keys [ssh-key project-id]} owner]
  (reify
    om/IInitState
    (init-state [_]
      {:show-modal? false})
    om/IRenderState
    (render-state [_ {:keys [show-modal?]}]
      (html
       [:span
        (table/action-button
         "Remove"
         (icon/delete)
         #(om/set-state! owner :show-modal? true))
        (when show-modal?
          (let [close-fn #(om/set-state! owner :show-modal? false)]
            (modal/modal-dialog {:title "Are you sure?"
                                 :body (html
                                        [:span
                                         "Are you sure you want to remove the \""
                                         (:hostname ssh-key)
                                         "\" SSH key?"])
                                 :actions [(button/button {:on-click close-fn} "Cancel")
                                           (button/button {:primary? true
                                                           :on-click
                                                           #(raise! owner [:deleted-ssh-key (-> ssh-key
                                                                                                (select-keys [:hostname :fingerprint])
                                                                                                (assoc :project-id project-id))])}
                                                          "Remove")]
                                 :close-fn close-fn})))]))))

(defn ssh-keys [project-data owner]
  (reify
    om/IRender

                                      :type #{:shrink :right}
                                      :cell-fn
                                      (fn [env-var]
                                        (om/build remove-action-button
                                                  {:confirmation-question
                                                   (str
                                                    "Are you sure you want to remove the environment variable \""
                                                    (:name env-var)
                                                    "\"?")

                                                   :remove-fn
                                                   #(raise! owner [:deleted-env-var {:project-id project-id
                                                                                     :env-var-name (:name env-var)}])}))}]}))]))]])))))

(defn advance [project-data owner]
  (reify
