2
# Copyright 2013 Canonical Ltd.
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Affero General Public License version 3, as
6
# published by the Free Software Foundation.
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranties of
10
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
# PURPOSE. See the GNU Affero General Public License for more details.
13
# You should have received a copy of the GNU Affero General Public License
14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
from django.views.decorators.http import require_GET
19
from common.utils import (
24
from memevent.models import (
32
def detail_overview(request, build_number):
34
details = MemoryEventDetail.objects.filter(
36
image__build_number=build_number,
39
serializer = MySerializer()
40
data = serializer.serialize(details)
42
return JSONResponse(data)
46
def machine_overview(request):
48
details = MemoryEventMachine.objects.filter(
52
serializer = MySerializer()
53
data = serializer.serialize(details)
55
return JSONResponse(data)
59
def image_overview(request):
61
details = MemoryEventImage.objects.filter(
65
serializer = MySerializer()
66
data = serializer.serialize(details)
68
return JSONResponse(data)