 
 (defn- node-item-state [value]
   (case value
-    "ready" (label/green value)
-    "down" (label/red value)))
+    "ready" (label/header value "green")
+    "down" (label/header value "red")))
 
 (defn- me-handler
   [node-id]

            [swarmpit.component.progress :as progress]
            [swarmpit.component.task.list :as tasks]
            [swarmpit.component.dialog :as dialog]
            [swarmpit.component.menu :as menu]
            [swarmpit.component.common :as common]
            [swarmpit.storage :as storage]
            [swarmpit.url :refer [dispatch!]]

                     (str "Node detach failed. " (:error response))))}))

(defn form-pin-action
  [id pinned? group?]
  (if pinned?
    {:onClick #(detach-node-handler id)
     :icon    (comp/svg icon/pin-path)
     :group   group?
     :name    "Detach"}
    {:onClick #(pin-node-handler id)
     :icon    (comp/svg icon/pin-path)
     :group   group?
     :name    "Pin"}))

(defn form-actions
  [id pinned?]
  [(form-pin-action id pinned? true)
   {:onClick #(dispatch! (routes/path-for-frontend :node-edit {:id id}))
    :icon    (comp/svg icon/edit-path)
    :main    true
    :group   true
    :name    "Edit"}
   {:onClick #(state/update-value [:open] true dialog/dialog-cursor)
    :icon    (comp/svg icon/trash-path)
    :color   "secondary"
    :name    "Delete"}])

(rum/defc form-general < rum/static [node pinned?]
  (let [cpu (-> node :resources :cpu (int))
