add simple url/view for sending user to a read-only grafana dashboard snapshot

pull/3/head
lance 4 years ago
parent fa88d2d2c8
commit a001f90544

@ -8,5 +8,6 @@ urlpatterns = [
path('robots.txt', lambda x: HttpResponse("User-Agent: *\nDisallow: /", content_type="text/plain"), name="robots_file"),
path('help/', views.get_help, name='get_help'),
path('health/', views.health, name='health'),
path('devops/', views.devops_dashboard, name='devops_dashboard'),
path('shipping/edit/', views.edit_shipping, name='edit_shipping'),
]

@ -3,6 +3,7 @@ from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core.cache import cache
from django.conf import settings
from core.forms import UserShippingAddressForm
from core.models import UserShippingAddress
from core.monero import AuctionDaemon, AuctionWallet
@ -35,6 +36,13 @@ def health(request):
return JsonResponse(context)
def devops_dashboard(request):
dodb = settings.DEVOPS_DASHBOARD
if dodb:
return HttpResponseRedirect(dodb)
else:
return HttpResponseRedirect(reverse('health'))
def get_help(request):
return render(request, 'core/help.html')

@ -29,6 +29,7 @@ ESCROW_PERIOD_DAYS = os.environ.get('ESCROW_PERIOD_DAYS', 30)
PLATFORM_FEE_PERCENT = os.environ.get('PLATFORM_FEE_PERCENT', 0)
BLOCK_CONFIRMATIONS_RCV = os.environ.get('BLOCK_CONFIRMATIONS_RCV', 3)
BLOCK_EXPLORER = 'https://community.xmr.to/explorer/%s'
DEVOPS_DASHBOARD = os.environ.get('DEVOPS_DASHBOARD', None)
# Social