def controller_log_data_all(request, cluster, controller):
    init_db_connection()
    time_now = time.time()*1000 #conver to ms
    # we only get one day for now, this will be fixed when we move to an actually scalable solution
    data_dict = get_log_event_data(cluster, controller, time_now - 86400000, time_now)
    arr = get_array_from_dict(data_dict, True)
    return generic_server_side_datatable(request, arr)
Beispiel #2
0
def controller_log_data_all(request, cluster, controller):
    init_db_connection()
    time_now = time.time() * 1000  #conver to ms
    # we only get one day for now, this will be fixed when we move to an actually scalable solution
    data_dict = get_log_event_data(cluster, controller, time_now - 86400000,
                                   time_now)
    arr = get_array_from_dict(data_dict, True)
    return generic_server_side_datatable(request, arr)
def controller_log_data_controller(request, cluster, controller):
    init_db_connection()
    time_now = time.time()*1000 #conver to ms
    # we only get one day for now, this will be fixed when we move to an actually scalable solution
    data_dict = get_log_event_data(cluster, controller, time_now - 86400000, time_now)
    filtered_dict = []
    for e in data_dict:
        if e['component'] == 'sdnplatform' or e['component'] == 'sdnplatform.request':
            filtered_dict.append(e)
    arr = get_array_from_dict(filtered_dict, False)
    return generic_server_side_datatable(request, arr)
Beispiel #4
0
def controller_log_data_sdncon(request, cluster, controller):
    init_db_connection()
    time_now = time.time() * 1000  #conver to ms
    # we only get one day for now, this will be fixed when we move to an actually scalable solution
    data_dict = get_log_event_data(cluster, controller, time_now - 86400000,
                                   time_now)
    filtered_dict = []
    for e in data_dict:
        if e['component'] == 'sdncon':
            filtered_dict.append(e)
    arr = get_array_from_dict(filtered_dict, False)
    return generic_server_side_datatable(request, arr)