Commits

Miki Tebeka  committed 34d366a

Dummy metrics

  • Participants
  • Parent commits 0141f36

Comments (0)

Files changed (1)

File metrics/src/metrics.clj

   (page [:span "URL: " [:select#urls nil]] [:span#add-url.ui-icon.ui-icon-plus {:title "Add URL"}]
         [:div#url-metrics]))
 
+(defn metrics-page []
+  "Dummy metrics page"
+  (let [metrics ["metric1" "metric2" "metric3"]]
+    (apply str (map #(format "%s: %d\n" % (rand-int 100)) metrics))))
+
 (defroutes app-routes
   (GET "/" [] (home-page))
   (GET "/config" [] (config-page))
        (json-reply (db/fetch (params "url") (params "metric") *num-values*)))
   (GET "/urls" [] 
        (json-reply (db/urls)))
+  (GET "/metrics" [] (metrics-page))
   (route/resources "/")
   (route/not-found "Sorry, can't find it."))