def dashboard(): """Primary dashboard the users will interact with.""" logger.info("User: {} authenticated proceeding to dashboard.".format(session.get('id_token')['sub'])) if "Mozilla-LDAP" in session.get('userinfo')['sub']: logger.info("Mozilla IAM user detected. Attempt enriching with ID-Vault data.") try: session['idvault_userinfo'] = person_api.get_userinfo(session.get('id_token')['sub']) except Exception as e: logger.error("Could not enrich profile. Perhaps it doesn't exist?") # Transfer any updates in to the app_tiles. S3Transfer(config.Config(app).settings).sync_config() # Send the user session and browser headers to the alert rules engine. Rules(userinfo=session['userinfo'], request=request).run() user = User(session, config.Config(app).settings) apps = user.apps(Application().apps) return render_template( 'dashboard.html', config=app.config, user=user, apps=apps, alerts=None )
def styleguide_dashboard(): user = FakeUser(config.Config(app).settings) apps = user.apps(Application(app_list.apps_yml).apps) return render_template('dashboard.html', config=app.config, user=user, apps=apps, alerts=None)
def dashboard(): """Primary dashboard the users will interact with.""" user = User(session) alerts = redis_store.lrange(user.userhash(), 0, -1) all_apps = Application().apps apps = user.apps(all_apps)['apps'] return render_template('dashboard.html', user=user, apps=apps, alerts=alerts)
def dashboard(): """Primary dashboard the users will interact with.""" logger.info("User authenticated proceeding to dashboard.") AppFetcher().sync_config_and_images() user = User(session) alerts = Alert(user, app).get() all_apps = Application().apps apps = user.apps(all_apps)['apps'] return render_template('dashboard.html', user=user, apps=apps, alerts=alerts)