# Path: tsuru_autoscale/event/client.py
# def host():
# def list(alarm_name, token):


from django.shortcuts import render
from tsuru_autoscale.event import client



def list(request, alarm_name):
    token = request.GET.get("TSURU_TOKEN")
    events = client.list(alarm_name, token).json()
    context = {
        "list": events,
    }

# Path: tsuru_autoscale/event/client.py
# def host():
# def list(alarm_name, token):


# Path: tsuru_autoscale/event/views.py
from django.shortcuts import render
from tsuru_autoscale.event import client




def list(request, alarm_name):
    token = request.GET.get("TSURU_TOKEN")
    events = client.list(alarm_name, token).json()
    context = {
        "list": events,
    }

    return render(request, "event/list.html", context)