def list_instances_xhr(): """ - List User's Instances Registered on SLATE (json response) """ if request.method == 'GET': instances = list_instances_request() user_groups_list = list_user_groups(session) user_groups = [] for groups in user_groups_list: user_groups.append(groups['metadata']['name']) return jsonify(instances, user_groups)
def view_user_groups(): if request.method == 'GET': user_groups = list_user_groups(session) return jsonify(user_groups)
def applications_create_xhr(): """ View form to install new application """ if request.method == 'GET': # Get groups that user belongs to groups = list_user_groups(session) return jsonify(groups)