             body['data'][i.ip]['status'] = false
           ep.emit 'one_data'
 
-app.get '/wlst/:from-:to\::port_tmp', (req, res) ->
-  ports = (Number(i) for i in req.params.port_tmp.split '|')
+app.get '/wlst', (req, res) ->
+  ports = (Number(i) for i in req.query.ports.split '|')
   res.setHeader('Content-Type', 'application/json; charset=utf-8')
   body = {}
   body['data'] = {}
-  db.ips.find {'ip': {$in : num2ip(i) for i in [ip2num(req.params.from)..ip2num(req.params.to)]}}, {'_id': false, 'update': false}, (err,docs) ->
+  db.ips.find {'ip': {$in : num2ip(i) for i in [ip2num(req.query.from)..ip2num(req.query.to)]}}, {'_id': false, 'update': false}, (err,docs) ->
     if err then throw err
     if docs
       ep = new EventProxy()

  if ip_tmp != '' and port_tmp == ''
    ips = ip_tmp.split '-'
    if ips.length == 1
      res.redirect "/fip/#{ips[0]}-#{ips[0]}"
    else
      res.redirect "/fip/#{ips[0]}-#{ips[1]}"
  else if ip_tmp == '' and port_tmp != ''
    ports = port_tmp.split '-'
    if ports.length == 1
      res.redirect "/fport/#{ports[0]}-#{ports[0]}"
    else
      res.redirect "/fport/#{ports[0]}-#{ports[1]}"
  else
    ips = ip_tmp.split '-'
    res.redirect "/wlst/#{ips[0]}-#{ips[1]}:#{port_tmp}"

app.listen(3000)


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

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