      (if-not (:entities-loaded? @locals)
        (do (swap! state assoc :blocker "Loading attributes...")
            (endpoints/call-ajax-orch
-            {:endpoint (endpoints/get-entity-types (:workspace-id props))
-             :on-done (fn [{:keys [success? get-parsed-response status-text]}]
-                        (if success?
-                          (let [loaded-config (:loaded-config @state)
-                                entity-types (get-parsed-response)
-                                workspace-attributes (get-in props [:workspace :workspace :workspace-attributes])
-                                selected-entity-type (get-in loaded-config [:methodConfiguration :rootEntityType])]
-                            (swap! locals assoc :entities-loaded? true)
-                            (swap! state assoc
-                                   :blocker nil
-                                   :entity-types entity-types
-                                   :autocomplete-list (build-autocomplete-list
-                                                       (utils/restructure workspace-attributes entity-types selected-entity-type)))
-                            (this :-begin-editing))
-                          ;; FIXME: :data-attribute-load-error is unused
-                          (swap! state assoc :data-attribute-load-error status-text)))}))
+             {:endpoint (endpoints/get-entity-types (:workspace-id props))
+              :on-done (fn [{:keys [success? get-parsed-response status-text]}]
+                         (if success?
+                           (let [loaded-config (:loaded-config @state)
+                                 entity-types (get-parsed-response)
+                                 workspace-attributes (get-in props [:workspace :workspace :workspace-attributes])
+                                 selected-entity-type (get-in loaded-config [:methodConfiguration :rootEntityType])]
+                             (swap! locals assoc :entities-loaded? true)
+                             (swap! state assoc
+                                    :blocker nil
+                                    :entity-types entity-types
+                                    :autocomplete-list (build-autocomplete-list
+                                                         (utils/restructure workspace-attributes entity-types selected-entity-type)))
+                             (this :-begin-editing))
+                           ;; FIXME: :data-attribute-load-error is unused
+                           (swap! state assoc :data-attribute-load-error status-text)))}))
        (let [{:keys [loaded-config inputs-outputs redacted?]} @state]
          ((@refs "IOTables") :start-editing)
          (swap! state assoc :editing? true :original-config loaded-config :original-inputs-outputs inputs-outputs :original-redacted? redacted?))))

       (when (and (not methods) loaded-config)
         (let [{:keys [methodName methodNamespace]} (get-in loaded-config [:methodConfiguration :methodRepoMethod])]
           (endpoints/call-ajax-orch
            {:endpoint (endpoints/list-method-snapshots methodNamespace methodName)
             :on-done (fn [{:keys [success? get-parsed-response status-text]}]
                        (let [response (get-parsed-response)]
                          (if success?
                            (swap! state assoc
                                   :methods-response response
                                   :methods {[methodNamespace methodName] (mapv :snapshotId response)})
                            ;; FIXME: :error-message is unused
                            (swap! state assoc :error-message status-text))))})))))
   :-render-display
   (fn [{:keys [props state locals this]}]
     (let [locked? (get-in props [:workspace :workspace :isLocked])

(ns broadfcui.page.workspace.method-configs.method-config-editor
  (:require
    [dmohs.react :as react]
    [clojure.string :as string]
    [broadfcui.common :as common]
    [broadfcui.common.components :as comps]
    [broadfcui.common.method.config-io :refer [IOTables]]
    [broadfcui.common.style :as style]
    [broadfcui.components.buttons :as buttons]
    [broadfcui.components.entity-details :refer [EntityDetails]]
    [broadfcui.components.sticky :refer [Sticky]]
    [broadfcui.endpoints :as endpoints]
    [broadfcui.page.workspace.method-configs.delete-config :as delete]
    [broadfcui.page.workspace.method-configs.launch-analysis :as launch]
    [broadfcui.page.workspace.method-configs.publish :as publish]
    [broadfcui.page.workspace.method-configs.synchronize :as mc-sync]
    [broadfcui.page.workspace.workspace-common :as ws-common]
    [broadfcui.utils :as utils]
    [broadfcui.common.input :as input]))

(defn- filter-empty [coll]
  (->> coll (map string/trim) (remove string/blank?) vec))
