Esempio n. 1
0
    def GET(self, mac, x):
        if web.ctx.env.get('HTTP_AUTHORIZATION') is None:
            raise web.seeother('/login')

        if mac in [client[1] for client in config.getClients()]:
            raise web.seeother()

        form = self.form()
        return render.register(form, mac)
Esempio n. 2
0
 def GET(self):
     active_devices = arping.get_active_devices()
     return render.index(active_devices, config.getClients())