diff --git a/src/cse_client/core.cljs b/src/cse_client/core.cljs index 6f91f440..cecce9dd 100644 --- a/src/cse_client/core.cljs +++ b/src/cse_client/core.cljs @@ -142,17 +142,15 @@ (filter #(= (:model event) (:name %))) first :variables - (filter (fn [{:keys [name causality type]}] - (and (= name (:variable event)) - (= causality (:causality event)) - (= (str/lower-case type) (str/lower-case (:type event)))))) + (filter (fn [{:keys [name]}] + (= name (:variable event)))) seq boolean)] (-> event (assoc :model-valid? model-valid? :variable-valid? variable-valid? :valid? (and model-valid? variable-valid?)) (assoc :validation-message (cond (not model-valid?) "Can't find a model with this name" - (not variable-valid?) "Can't find a variable with this name, type and causality"))))) + (not variable-valid?) "Can't find a variable with this name"))))) (defn merge-defaults [db scenario] (let [new-events (->> scenario diff --git a/src/cse_client/scenario.cljs b/src/cse_client/scenario.cljs index e8494650..df55d534 100644 --- a/src/cse_client/scenario.cljs +++ b/src/cse_client/scenario.cljs @@ -47,18 +47,14 @@ [:th "Time"] [:th "Model"] [:th "Variable"] - [:th "Type"] - [:th "Causality"] [:th "Action"] [:th "Value"]]] [:tbody - (map-indexed (fn [index {:keys [time model variable causality type action value model-valid? variable-valid? validation-message] :as event}] + (map-indexed (fn [index {:keys [time model variable action value model-valid? variable-valid? validation-message] :as event}] [:tr {:key (str "scenario-" index "-event")} [:td time] [cellie model model-valid? validation-message] [cellie variable variable-valid? validation-message] - [cellie type variable-valid? validation-message] - [cellie causality variable-valid? validation-message] [:td action] [:td value]]) (:events scenario))]]