Skip to content

Commit

Permalink
make last changed/last seen clearer, and add hh:mm:ss to date tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald Koch committed Jul 31, 2016
1 parent f1c356f commit aa3906c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/cljs/homeautomation/presence.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns homeautomation.presence
(:require [homeautomation.ajax :refer [fetch send]]
[homeautomation.misc :refer [render-table fmt-date-recent fmt-date]]
(:require [homeautomation.ajax :refer [fetch send ]]
[homeautomation.misc :refer [render-table fmt-date-recent fmt-time]]
[reagent.core :refer [atom]]
[re-frame.core :refer [dispatch dispatch-sync subscribe]]
[ajax.core :refer [GET POST]]))
Expand Down Expand Up @@ -95,7 +95,7 @@

(defn devices-table [items]
[:table.table.table-striped.table-condensed
[:thead [:tr [:th "Device"] [:th "Owner"] [:th "Ignore"] [:th "Status"] [:th "Seen"]]]
[:thead [:tr [:th "Device"] [:th "Owner"] [:th "Ignore"] [:th "Status"] [:th [:div "Last Change"] [:div "Last Seen"]]]]
(into [:tbody]
(for [device items]
^{:key (:id device)}
Expand All @@ -105,9 +105,9 @@
[:td [ignore-checkbox (:id device) (:ignore device)]]
[:td (:status device)]
[:td
[:div {:title (fmt-date (:last_status_change device))}
[:div {:title (fmt-time (:last_status_change device))}
(fmt-date-recent (:last_status_change device))]
[:div {:title (fmt-date (:last_seen device))}
[:div {:title (fmt-time (:last_seen device))}
(fmt-date-recent (:last_seen device))]]]))])

(defn show-devices []
Expand All @@ -133,7 +133,7 @@

(defn macaddr-table [items]
[:table.table.table-striped.table-condensed
[:thead [:tr [:th "Device"] [:th "Name"] [:th "Ignore"] [:th "Status"] [:th "Seen"]]]
[:thead [:tr [:th "Device"] [:th "Name"] [:th "Ignore"] [:th "Status"] [:th [:div "Last Change"] [:div "Last Seen"]]]]
(into [:tbody]
(for [device items]
^{:key (:id device)}
Expand All @@ -143,9 +143,9 @@
[:td (:ignore device)]
[:td (:status device)]
[:td
[:div {:title (fmt-date (:last-status_change device))}
[:div {:title (fmt-time (:last-status_change device))}
(fmt-date-recent (:last_status_change device))]
[:div {:title (fmt-date (:last-seen device))}
[:div {:title (fmt-time (:last-seen device))}
(fmt-date-recent (:last_seen device))]]]))])

(defn macaddrs []
Expand Down

0 comments on commit aa3906c

Please sign in to comment.