   if ip_tmp != '' and port_tmp == ''
     ips = ip_tmp.split '-'
     if ips.length == 1
-      res.redirect "/fip/#{ips[0]}-#{ips[0]}"
+      res.redirect "/fip?from=#{ips[0]}&to=#{ips[0]}"
     else
-      res.redirect "/fip/#{ips[0]}-#{ips[1]}"
+      res.redirect "/fip?from=#{ips[0]}&to=#{ips[1]}"
   else if ip_tmp == '' and port_tmp != ''
     ports = port_tmp.split '-'
     if ports.length == 1
-      res.redirect "/fport/#{ports[0]}-#{ports[0]}"
+      res.redirect "/fport?from=#{ports[0]}&to=#{ports[0]}"
     else
-      res.redirect "/fport/#{ports[0]}-#{ports[1]}"
+      res.redirect "/fport?from=#{ports[0]}&to=#{ports[1]}"
   else
     ips = ip_tmp.split '-'
-    res.redirect "/wlst/#{ips[0]}-#{ips[1]}:#{port_tmp}"
+    res.redirect "/wlst?from=#{ips[0]}&to=#{ips[1]}&ports=#{port_tmp}"
 
 app.listen(3000)
 

          body['data'][i] = (j['ip'] for j in docs)
        ep.emit 'one_port'

app.get '/alarm/:port_tmp', (req, res) ->
  ports = (Number(i) for i in req.params.port_tmp.split '|')
  res.setHeader('Content-Type', 'application/json; charset=utf-8')
  body = {}
  body['data'] = {}

          body['data'][i.ip]['port'] = i.port
          ep.emit 'one_ip'

app.get '/fport', (req, res) ->
  ep = new EventProxy()
  ep.after 'one_port', [Number(req.query.from)..Number(req.query.to)].length, ->
    res.end(JSON.stringify body, null, 2)
  res.setHeader('Content-Type', 'application/json; charset=utf-8')
  body = {}
  body['data'] = {}
  for i in [Number(req.query.from)..Number(req.query.to)]
    do (i) ->
      db.ips.find {'port': {$all: [i]}}, {'_id': false, 'port': false, 'update': false}, (err, docs) ->
        if err then throw err
