Example #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)
Example #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)
Example #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)
Example #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)
Example #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 ""
Example #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 ""