Ejemplo n.º 1
0
def send_dummy_order(modeladmin, request, queryset):
    orders_sent = 0
    for ws in queryset:
        if station_connection_manager.is_workstation_available(ws):
            station_connection_manager.push_dummy_order(ws)
            orders_sent += 1
    modeladmin.message_user(request, _("%d dummy orders sent") % orders_sent)
Ejemplo n.º 2
0
def send_dummy_order(modeladmin, request, queryset):
    orders_sent = 0
    for ws in queryset:
        if station_connection_manager.is_workstation_available(ws):
            station_connection_manager.push_dummy_order(ws)
            orders_sent += 1
    modeladmin.message_user(request, _("%d dummy orders sent") % orders_sent)
Ejemplo n.º 3
0
def check_connection(modeladmin, request, queryset):
    checks_performed = 0
    for ws in queryset:
        if station_connection_manager.is_workstation_available(ws):
            station_connection_manager.check_connection(ws)
            checks_performed += 1
    modeladmin.message_user(request, _("%d checks performed successfully") % checks_performed)
Ejemplo n.º 4
0
def check_connection(modeladmin, request, queryset):
    checks_performed = 0
    for ws in queryset:
        if station_connection_manager.is_workstation_available(ws):
            station_connection_manager.check_connection(ws)
            checks_performed += 1
    modeladmin.message_user(
        request,
        _("%d checks performed successfully") % checks_performed)
Ejemplo n.º 5
0
 def online_status(self, obj):
     if station_connection_manager.is_workstation_available(obj):
         return '<img src="%s">' % ("/static/images/online_small.gif")
     else:
         return ""
Ejemplo n.º 6
0
 def online_status(self, obj):
     if station_connection_manager.is_workstation_available(obj):
         return '<img src="%s">' % ("/static/images/online_small.gif")
     else:
         return ""