 ;; TODO this seems a little bit slow when calculating durations for really complex builds with
 ;; lots of containers. Is there a good way to avoid recalculating this when selecting container pills? (Perhaps caching the calculated value using IWillUpdate / IShouldUpdate?)
 (defn container-utilization-duration
-  [container]
-  (apply + (map action-duration-ms (:actions container))))
+  [actions]
+  (apply + (map action-duration-ms actions)))
+
+(defn container-duration-label [{:keys [actions]}]
+  (reify
+    om/IRender
+    (render [_]
+      (html
+        [:span.lower-pill-section
+         "("
+         (datetime/as-duration (container-utilization-duration actions))
+         ")"]))))
 
 (defn container-pill-v2 [{:keys [container current-container-id build-running?]} owner]
   (reify

                              {:react-key (:index container)}))
                  (if (> subsequent-container-count 0)
                    [:a.container-selector-v2.page-container-pills
                     {:on-click #(om/set-state! owner :container-index (+ container-index paging-width))}
                     [:div.pill-details ;; just for flexbox container
                      [:div "Next " subsequent-container-count]
                      [:div container-count " total"]]

                 [:div.container-list-v2
                  (if (> previous-container-count 0)
                    [:a.container-selector-v2.page-container-pills
                     {:on-click #(om/set-state! owner :paging-offset (- paging-offset paging-width))}
                     [:div.nav-caret
                      [:i.fa.fa-2x.fa-angle-left]]
                     [:div.pill-details ;; just for flexbox container
                      [:div "Previous " paging-width]
                      [:div (count containers) " total"]]])
                  (for [container (subvec containers
                                          paging-offset
                                          (min container-count (+ paging-offset paging-width)))]
                    (om/build container-pill-v2
                              {:container container
                               :build-running? build-running?
