ui: use moment.js

Signed-off-by: Sergei Ianovich <ynvich@gmail.com>
ui: display latest state in device view

Signed-off-by: Sergei Ianovich <ynvich@gmail.com>