               :initial-width 132 :resizable? false
               :column-data column-data
               :sort-by (zipmap access-levels (range)) :sort-initial :asc
-              :render (fn [data]
-                        (let [access-level (:access-level data)]
-                          [:div {:style {:paddingLeft 14}}
-                           (if (= access-level "NO ACCESS")
-                             (style/create-link {:text (prettify access-level)
-                                                 :onClick #(modal/push-modal
-                                                            [RequestAuthDomainAccessDialog
-                                                             {:workspace-id (:workspace-id data)
-                                                              :ws-auth-domains (:auth-domains data)}])})
-                             (prettify access-level))]))}])
+              :render (fn [{:keys [access-level workspace-id auth-domains]}]
+                        [:div {:style {:paddingLeft 14}}
+                         (if (= access-level "NO ACCESS")
+                           (style/create-link {:text (prettify access-level)
+                                               :onClick #(push-request-access-modal workspace-id auth-domains)})
+                           (prettify access-level))])}])
           :behavior {:reorderable-columns? false}
           :style {:header-row {:color (:text-lighter style/colors) :fontSize "90%"}
                   :header-cell {:padding "0.4rem 0"}


(def non-dbGap-disabled-text "Click to request access.")

(react/defc StatusCell
  {:render
   (fn [{:keys [props]}]
     (let [{:keys [data]} props
           {:keys [status no-access? hover-text workspace-id]} data]
       [:a {:href (if no-access?
                    "javascript:;"
                    (nav/get-link :workspace-summary workspace-id))
            :style {:display "block" :position "relative"
                    :backgroundColor (if no-access?
                                       (:disabled-state style/colors)
                                       (style/color-for-status status))
                    :cursor (when no-access? "default")
                    :margin "2px 0 2px 2px" :height (- row-height-px 4)}
            :title hover-text}
        [:span {:style {:position "absolute" :top 0 :right 0 :bottom 0 :left 0
                        :backgroundColor "rgba(0,0,0,0.2)"}}]
        (style/center {}
          (case status
            "Complete" [icons/CompleteIcon]
            "Running" [icons/RunningIcon]
            "Exception" [icons/ExceptionIcon]))]))})

(react/defc RequestAuthDomainAccessDialog
  {:get-initial-state
   (fn [{:keys [props state]}]

                  (swap! state update-in [:ws-auth-domains group-index :data]
                         assoc :requesting? false :requested? true))}))})

(defn- get-workspace-name-string [column-data]
  (str (get-in column-data [:workspace-id :namespace]) "/" (get-in column-data [:workspace-id :name])))

