 
 (def cursor [:page :service :wizard :ports])
 
+(defn- not-suggested?
+  [port]
+  (not
+    (some #(= (:containerPort port)
+              (:containerPort %)) (state/get-value cursor))))
+
 (defn- public-ports-handler
   [{:keys [name tag] :as repository}]
   (handler/get

                  :repositoryTag  tag}
     :on-success (fn [response]
                   (doseq [port response]
                     (state/add-item port cursor)))}))

(defn- dockerhub-ports-handler
  [distribution-id {:keys [name tag] :as repository}]

                  :repositoryTag  tag}
     :on-success (fn [response]
                   (doseq [port response]
                     (if (not-suggested? port)
                       (state/add-item port cursor))))}))

(defn- registry-ports-handler
  [distribution-id {:keys [name tag] :as repository}]
