def admin_clients(): user_form = UserForm() site_form = WifiSiteForm() site_form.populate() newuser_form = UserForm() newuser_form.populate() return render_template('admin/clients.html',user_form=user_form,site_form=site_form,newuser_form=newuser_form)
def admin_admins(): user_form = UserForm() site_form = WifiSiteForm() site_form.populate() admin_form = UserForm() admin_form.populate() return render_template('admin/admins.html',user_form=user_form,site_form=site_form,admin_form=admin_form)
def client_vouchers_designer(site_id=None): #Validate SiteID wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.debug( "Site Manage URL called with invalid paramters site_id:%s userid:%s" % (site_id, current_user.id)) abort(404) user_form = UserForm() voucherdesign_form = VoucherDesignForm() fakevoucher = Voucher(bytes_t=1000, voucher='GSG#A$#S$', duration_t="1 Hr", speed_dl=256, speed_ul=100) voucherdesign = Voucherdesign.query.filter_by(site_id=site_id).first() site_form = WifiSiteForm() site_form.populate() voucherfilesform = VoucherFilesForm() return render_template("admin/voucher_designer.html", site_id=site_id, site_form=site_form, user_form=user_form, wifisite=wifisite, voucherdesign_form=voucherdesign_form, voucherfilesform=voucherfilesform, fakevoucher=fakevoucher, voucherdesign=voucherdesign)
def admin_site(site_id): wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.error("Trying to access unknown site ID:%s"%request.url) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/site.html',user_form=user_form,site_form=site_form,site_id=site_id,wifisite=wifisite)
def admin_settings( ): #get all the sites settingsform = SettingsForm() settingsform.populate() user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/settings.html',settingsform=settingsform,user_form=user_form,site_form=site_form)
def admin_admins(): user_form = UserForm() site_form = WifiSiteForm() site_form.populate() admin_form = UserForm() admin_form.populate() return render_template('admin/admins.html', user_form=user_form, site_form=site_form, admin_form=admin_form)
def admin_clients(): user_form = UserForm() site_form = WifiSiteForm() site_form.populate() newuser_form = UserForm() newuser_form.populate() return render_template('admin/clients.html', user_form=user_form, site_form=site_form, newuser_form=newuser_form)
def client_data(site_id=None): #Validate SiteID wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.debug("Site Manage URL called with invalid paramters site_id:%s userid:%s"%(site_id,current_user.id)) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template("admin/data.html",site_id=site_id,site_form=site_form,user_form=user_form,wifisite=wifisite)
def admin_index( ): #get all the sites #get APs #get users user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/dashboard.html',user_form=user_form,site_form=site_form)
def admin_settings(): #get all the sites settingsform = SettingsForm() settingsform.populate() user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/settings.html', settingsform=settingsform, user_form=user_form, site_form=site_form)
def admin_index(): #get all the sites #get APs #get users user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/dashboard.html', user_form=user_form, site_form=site_form)
def admin_site(site_id): wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.error("Trying to access unknown site ID:%s" % request.url) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template('admin/site.html', user_form=user_form, site_form=site_form, site_id=site_id, wifisite=wifisite)
def admin_sessions(site_id=None): #Validate SiteID wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.debug("Site Manage URL called with invalid paramters site_id:%s userid:%s"%(site_id,current_user.id)) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() today = arrow.now() startdate = today.replace(days=1 - today.day).format('DD/MM/YYYY') enddate = today.format('DD/MM/YYYY') return render_template("admin/sessions.html",site_id=site_id,site_form=site_form,user_form=user_form,wifisite=wifisite, enddate=enddate,startdate=startdate)
def client_data(site_id=None): #Validate SiteID wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.debug( "Site Manage URL called with invalid paramters site_id:%s userid:%s" % (site_id, current_user.id)) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() return render_template("admin/data.html", site_id=site_id, site_form=site_form, user_form=user_form, wifisite=wifisite)
def admin_landing(site_id): wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.error("Trying to access unknown site ID:%s"%request.url) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() landingpageform = LandingPageForm() landingpageform.populate(site_id) landingpageid = wifisite.default_landing simplelandingpageform = SimpleLandingPageForm() simplelandingpageform.populate() landingfilesform = LandingFilesForm() return render_template('admin/landing.html',user_form=user_form,site_form=site_form,site_id=site_id, landingpageform=landingpageform,landingpageid=landingpageid,simplelandingpageform=simplelandingpageform, landingfilesform=landingfilesform,wifisite=wifisite)
def admin_sessions(site_id=None): #Validate SiteID wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.debug( "Site Manage URL called with invalid paramters site_id:%s userid:%s" % (site_id, current_user.id)) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() today = arrow.now() startdate = today.replace(days=1 - today.day).format('DD/MM/YYYY') enddate = today.format('DD/MM/YYYY') return render_template("admin/sessions.html", site_id=site_id, site_form=site_form, user_form=user_form, wifisite=wifisite, enddate=enddate, startdate=startdate)
def admin_landing(site_id): wifisite = Wifisite.query.filter_by(id=site_id).first() if not wifisite: current_app.logger.error("Trying to access unknown site ID:%s" % request.url) abort(404) user_form = UserForm() site_form = WifiSiteForm() site_form.populate() landingpageform = LandingPageForm() landingpageform.populate(site_id) landingpageid = wifisite.default_landing simplelandingpageform = SimpleLandingPageForm() simplelandingpageform.populate() landingfilesform = LandingFilesForm() return render_template('admin/landing.html', user_form=user_form, site_form=site_form, site_id=site_id, landingpageform=landingpageform, landingpageid=landingpageid, simplelandingpageform=simplelandingpageform, landingfilesform=landingfilesform, wifisite=wifisite)