Commit 21d1c8b4 authored by Heinz N. Gies's avatar Heinz N. Gies

Add new hypervisor fields

parent 0fe26b87
......@@ -16,26 +16,33 @@
(defn actions [{uuid :uuid}]
[(del/menue-item uuid)])
(def config
(mk-config
root "Hypervisors" actions
:name {:title "Name" :key :alias :order -20}
:version {:title "Version" :key :version :order 1}
:os-version {:title "OS Version" :key [:sysinfo (keyword "Live Image")] :order 2}
:host {:title "Host" :key :host :order 3 :show false}
:last-seen {:title "Last seen" :key :last_seen
:sort-key (fn [h] (* -1 (:last_seen h)))
:type [:ago :s] :order 4}
:uptime {:title "Uptime" :key (fn [h] (str->int (get-in h [:sysinfo (keyword "Boot Time")])))
:sort-key (fn [h] (* -1 (str->int (get-in h [:sysinfo (keyword "Boot Time")]))))
:type [:ago :s] :order 5}
:used-men {:title "Used Memory" :key [:resources :provisioned-memory]
:type [:bytes :mb] :order 6}
:name {:title "Name" :key :alias :order -20}
:version {:title "Version" :key :version :order 1}
:os-version {:title "OS Version" :key [:sysinfo (keyword "Live Image")] :order 2}
:host {:title "Host" :key :host :order 3 :show false}
:last-seen {:title "Last seen" :key :last_seen
:sort-key (fn [h] (* -1 (:last_seen h)))
:type [:ago :s] :order 4}
:uptime {:title "Uptime" :key (fn [h] (str->int (get-in h [:sysinfo (keyword "Boot Time")])))
:sort-key (fn [h] (* -1 (str->int (get-in h [:sysinfo (keyword "Boot Time")]))))
:type [:ago :s] :order 5}
:used-men {:title "Used Memory" :key [:resources :provisioned-memory]
:type [:bytes :mb] :order 6}
:reserved-men {:title "Reserved Memory" :key [:resources :reserved-memory]
:type [:bytes :mb] :order 7}
:free-men {:title "Free Memory" :key [:resources :free-memory]
:type [:bytes :mb] :order 8}))
:free-men {:title "Free Memory" :key [:resources :free-memory]
:type [:bytes :mb] :order 8}
:zpool-free {:title "ZPool Free" :key [:pools :zones :free]
:type [:bytes :mb] :order 9 :show false}
:zpool-used {:title "ZPool Used" :key [:pools :zones :used]
:type [:bytes :mb] :order 10 :show false}
:zpool-total {:title "ZPool Size" :key [:pools :zones :size]
:type [:bytes :mb] :order 11 :show false}
:zpool-health {:title "ZPool Health" :key [:pools :zones :health]
:order 12 :show false}))
(set-state! [root :fields] (initial-state config))
......
......@@ -10,7 +10,7 @@
(def root :hypervisors)
(def list-fields
"uuid,version,alias,resources,sysinfo,last_seen,host")
"uuid,version,alias,resources,sysinfo,last_seen,host,pools")
(defn list [data]
(api/list data root list-fields))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment