     (drop-down "file" log-files)
     [:input {:type "submit" :value "Switch file"}]]])
 
-(defn pager-links [fname start length file-size]
+(defn pager-links [fname start length file-size type]
   (let [prev-start (max 0 (- start length))
         next-start (if (> file-size 0)
                      (min (max 0 (- file-size length)) (+ start length))
                      (+ start length))]
     [[:div
       (concat
-          [(to-btn-link (url "/log"
+          [(to-btn-link (url (str "/" type)
                           {:file fname
                            :start (max 0 (- start length))
                            :length length})
                           "Prev" :enabled (< prev-start start))]
-          [(to-btn-link (url "/log"
+          [(to-btn-link (url (str "/" type)
                            {:file fname
                             :start 0
                             :length length}) "First")]
-          [(to-btn-link (url "/log"
+          [(to-btn-link (url (str "/" type)
                            {:file fname
                             :length length})
                         "Last")]
-          [(to-btn-link (url "/log"
+          [(to-btn-link (url (str "/" type)
                           {:file fname
                            :start (min (max 0 (- file-size length))
                                        (+ start length))

  [fname user ^String root-dir is-daemon search num-matches offset callback origin]
  (let [file (.getCanonicalFile (File. root-dir fname))]
    (if (.exists file)
      (if (or (blank? (*STORM-CONF* UI-FILTER))
            (authorized-log-user? user fname *STORM-CONF*))
        (let [num-matches-int (if num-matches
                                (try-parse-int-param "num-matches"
                                  num-matches))

                        (filter #(.contains % grep))
                        (string/join "\n"))
                   log-string)])
          (let [pager-data (if (is-txt-file fname) (pager-links fname start length file-length "daemonlog") nil)]
            (html (concat (search-file-form fname "yes")
                          (log-file-selection-form reordered-files-str "daemonlog") ; list all daemon logs
                          pager-data
