def get_context_data(self, **kwargs): context = super(AllGraphsView, self).get_context_data(**kwargs) since_string = self.request.session.get('since_string') servers = Server.objects.all() databases = ServerSchema.objects.all() r = Rrdtool() r.server_graph(servers, since_string, 'full') r.database_graph(databases, since_string, 'full') context['servers'] = servers context['databases'] = databases return context
def get_object(self, queryset=None): table = get_object_or_404(DatabaseTable, id=self.kwargs.get('id')) since_string = self.request.session.get('since_string') r = Rrdtool() r.table_graph(table, since_string , 'full') return table
def get_object(self, queryset=None): db = get_object_or_404(ServerSchema, id=self.kwargs.get('id')) since_string = self.request.session.get('since_string') r = Rrdtool() r.database_graph(db, since_string, 'full') return db
def get_object(self, queryset=None): server = get_object_or_404(Server, id=self.kwargs.get('id')) since_string = self.request.session.get('since_string') r = Rrdtool() r.server_graph(server, since_string, 'full') return server