예제 #1
0
def summary_update(request):
    """
         Response to AJAX call to get updated health info for all instruments
    """
    # Get the system health status
    data_dict = {'instruments':view_util.get_instrument_status_summary(),
                 'postprocess_status':view_util.get_system_health()
                }
    response = HttpResponse(json.dumps(data_dict), content_type="application/json")
    response['Connection'] = 'close'
    response['Content-Length'] = len(response.content)
    return response
예제 #2
0
def expert_status(request):
    """
        Internal status for development team
    """
    # Get the system health status
    global_status_url = reverse(settings.LANDING_VIEW, args=[])

    template_values = {'instruments': view_util.get_instrument_status_summary(),
                       'breadcrumbs': "<a href='%s'>home</a> &rsaquo; dashboard" % global_status_url,
                       'postprocess_status': view_util.get_system_health(),
                       'update_url': reverse('dasmon:dashboard_update'),
                       'central_services_url': reverse('dasmon:diagnostics', args=['common'])
                      }
    template_values = users.view_util.fill_template_values(request, **template_values)
    return render(request, 'dasmon/expert_status.html', template_values)
예제 #3
0
def dashboard(request):
    """
        Dashboard view showing available instruments
    """
    # Get the system health status
    global_status_url = reverse(settings.LANDING_VIEW, args=[])
    template_values = {'instruments': view_util.get_instrument_status_summary(),
                       'data': view_util.get_dashboard_data(),
                       'breadcrumbs': "<a href='%s'>home</a> &rsaquo; dashboard" % global_status_url,
                       'postprocess_status': view_util.get_system_health(),
                       'update_url': reverse('dasmon:dashboard_update')+'?plots',
                       'central_services_url': reverse('dasmon:diagnostics', args=['common'])
                      }
    template_values = users.view_util.fill_template_values(request, **template_values)
    return render(request, 'dasmon/dashboard.html', template_values)