mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fix and improve admin search fields
This commit is contained in:
parent
0477885998
commit
ea6526f81c
15
api/admin.py
15
api/admin.py
@ -93,9 +93,15 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
|||||||
search_fields = [
|
search_fields = [
|
||||||
"id",
|
"id",
|
||||||
"reference",
|
"reference",
|
||||||
"maker",
|
"maker__username",
|
||||||
"taker",
|
"taker__username",
|
||||||
"amount",
|
"amount",
|
||||||
|
"payout__payment_hash",
|
||||||
|
"maker_bond__payment_hash",
|
||||||
|
"taker_bond__payment_hash",
|
||||||
|
"trade_escrow__payment_hash",
|
||||||
|
"payout_tx__txid",
|
||||||
|
"payout_tx__address",
|
||||||
"min_amount",
|
"min_amount",
|
||||||
"max_amount",
|
"max_amount",
|
||||||
]
|
]
|
||||||
@ -105,7 +111,7 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
|||||||
"maker_wins",
|
"maker_wins",
|
||||||
"taker_wins",
|
"taker_wins",
|
||||||
"return_everything",
|
"return_everything",
|
||||||
"compite_median_trade_time",
|
"compute_median_trade_time",
|
||||||
]
|
]
|
||||||
|
|
||||||
@admin.action(description="Solve dispute: maker wins")
|
@admin.action(description="Solve dispute: maker wins")
|
||||||
@ -220,7 +226,7 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@admin.action(description="Compute median trade completion time")
|
@admin.action(description="Compute median trade completion time")
|
||||||
def compite_median_trade_time(self, request, queryset):
|
def compute_median_trade_time(self, request, queryset):
|
||||||
"""
|
"""
|
||||||
Computes the median time from an order taken to finishing
|
Computes the median time from an order taken to finishing
|
||||||
successfully for the set of selected orders.
|
successfully for the set of selected orders.
|
||||||
@ -289,6 +295,7 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
|
|||||||
ordering = ("-expires_at",)
|
ordering = ("-expires_at",)
|
||||||
search_fields = [
|
search_fields = [
|
||||||
"payment_hash",
|
"payment_hash",
|
||||||
|
"preimage",
|
||||||
"num_satoshis",
|
"num_satoshis",
|
||||||
"sender__username",
|
"sender__username",
|
||||||
"receiver__username",
|
"receiver__username",
|
||||||
|
Loading…
Reference in New Issue
Block a user