mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
22 lines
581 B
Python
Executable file
22 lines
581 B
Python
Executable file
from django.shortcuts import render
|
|
from django.views import View
|
|
|
|
from apps.statistics.models import MStatistics
|
|
|
|
class Errors(View):
|
|
|
|
def get(self, request):
|
|
statistics = MStatistics.all()
|
|
data = {
|
|
'feed_success': statistics['feeds_fetched'],
|
|
}
|
|
chart_name = "errors"
|
|
chart_type = "counter"
|
|
|
|
context = {
|
|
"data": data,
|
|
"chart_name": chart_name,
|
|
"chart_type": chart_type,
|
|
}
|
|
return render(request, 'monitor/prometheus_data.html', context, content_type="text/plain")
|
|
|