X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fresourceview.py;h=f0f856ae9bcc3573cce2d1a1a2dbb9a1d3259894;hb=c53dc9c19c4b4832d1258cb392774909b6d9a755;hp=7e08fe8255e11d21e1b57101539866634e5f54e7;hpb=38afe61d364a7035df19f00a786c5788a55fb138;p=myslice.git diff --git a/portal/resourceview.py b/portal/resourceview.py index 7e08fe82..f0f856ae 100644 --- a/portal/resourceview.py +++ b/portal/resourceview.py @@ -1,17 +1,16 @@ -from django.views.generic.base import TemplateView - from manifold.core.query import Query from unfold.page import Page +from unfold.loginrequired import FreeAccessView from ui.topmenu import topmenu_items, the_user from plugins.googlemap import GoogleMap -from plugins.hazelnut import Hazelnut +from plugins.querytable import QueryTable from plugins.lists.simplelist import SimpleList -from plugins.slicestat import Slicestat +from plugins.slicestat import SliceStat # View for 1 platform and its details -class ResourceView(TemplateView): +class ResourceView(FreeAccessView): template_name = "resource.html" def get_context_data(self, **kwargs): @@ -32,7 +31,7 @@ class ResourceView(TemplateView): page.expose_js_metadata() page.expose_queries() - resourcelist = Hazelnut( + resourcelist = QueryTable( page = page, title = 'List', domid = 'checkboxes', @@ -66,7 +65,7 @@ class ResourceView(TemplateView): # query = resource_query, # ) - resource_stats = Slicestat( + resource_stats = SliceStat( title = None, page = page, stats = 'node', @@ -84,7 +83,7 @@ class ResourceView(TemplateView): # more general variables expected in the template context['title'] = 'Information about a resource' # the menu items on the top - context['topmenu_items'] = topmenu_items('Dashboard', self.request) + context['topmenu_items'] = topmenu_items(None, self.request) # so we can sho who is logged context['username'] = the_user(self.request)