Exemplo n.º 1
0
 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        
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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