            {:href  (routes/path-for-frontend :service-info (select-keys service [:id]))
             :label "Back"}))]]
      [:div.form-service-edit
-      [:div.form-service-edit-group
-       (comp/form-section "General settings")
-       (settings/form true)]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section-add "Ports" ports/add-item)
-       (ports/form-update)]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section "Networks")
-       (networks/form-update (:networks service))]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section-add "Mounts" mounts/add-item)
-       (mounts/form-update volumes)]
-      [:div.form-service-edit-group.form-service-group-border
-       (if (empty? secrets)
-         (comp/form-section "Secrets")
-         (comp/form-section-add "Secrets" secrets/add-item))
-       (secrets/form-update secrets)]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section-add "Environment variables" variables/add-item)
-       (variables/form-update)]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section-add "Labels" labels/add-item)
-       (labels/form-update)]
-      [:div.form-service-edit-group.form-service-group-border
-       (comp/form-section "Deployment")
-       (deployment/form placement)]]]))+      (form-settings)
+      (form-ports)
+      (form-networks)
+      (form-mounts)
+      (form-secrets)
+      (form-variables)
+      (form-labels)
+      (form-deployment)]]))
                       (str "Service update failed. Reason: " (:error response))))})))

(defn- init-state
  [item]
  (state/set-value (select-keys item [:registry :repository :version :serviceName :mode :replicas]) settings/cursor)
  (state/set-value (:ports item) ports/cursor)
  (state/set-value (:networks item) networks/cursor)
  (state/set-value (:mounts item) mounts/cursor)
  (state/set-value (:secrets item) secrets/cursor)
  (state/set-value (:variables item) variables/cursor)
  (state/set-value (:labels item) labels/cursor)
  (state/set-value (:deployment item) deployment/cursor))

(def init-state-mixin
  (mixin/init
    (fn [{:keys [service]}]
      (init-state service))))

(rum/defc form < rum/static
                 init-state-mixin [data]
  (let [{:keys [secrets volumes placement service]} data]
    [:div
     [:div.form-panel
      [:div.form-panel-left

            [swarmpit.component.service.form-variables :as variables]
            [swarmpit.component.service.form-labels :as labels]
            [swarmpit.component.service.form-deployment :as deployment]
            [swarmpit.component.service.form-deployment-placement :as placement]
            [swarmpit.component.message :as message]
            [swarmpit.routes :as routes]
            [rum.core :as rum]))
