def show_user_data(): if not current_user.is_authenticated(): return redirect(url_for('user.login')) if not 'user_container_name' in session: return redirect(url_for('user.logout')) error="" # determine hostname/IP we are currently using # (needed for accessing container) host_url = urlparse(request.host_url).hostname container_name = session['user_container_name'] application_names = docker_interface.get_application_image_names() role_names = map(lambda x: str(x.name), current_user.roles) return render_template('show_user_data.html', **locals())
def show_user_data(): if not current_user.is_authenticated: return redirect(url_for('user.login')) if not 'user_container_name' in session: return redirect(url_for('user.logout')) error = "" # determine hostname/IP we are currently using # (needed for accessing container) host_url = urlparse(request.host_url).hostname container_name = session['user_container_name'] application_names = docker_interface.get_application_image_names() role_names = map(lambda x: str(x.name), current_user.roles) return render_template('show_user_data.html', **locals())
def application_names(): application_name = '' if 'application_name' in session: application_name = session['application_name'] return jsonify(result=docker_interface.get_application_image_names(), selection=application_name)