-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1185] Changes according to PR review
- Loading branch information
Showing
8 changed files
with
115 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,46 @@ | ||
from django.contrib import admin | ||
from django.utils.translation import gettext as _ | ||
|
||
from .models import OutgoingRequestsLog | ||
|
||
|
||
@admin.register(OutgoingRequestsLog) | ||
class OutgoingRequestsLogAdmin(admin.ModelAdmin): | ||
fields = ( | ||
"url", | ||
"hostname", | ||
"path", | ||
"params", | ||
"query_params", | ||
"params", | ||
"status_code", | ||
"method", | ||
"response_ms", | ||
"timestamp", | ||
"req_content_type", | ||
"res_content_type", | ||
"trace", | ||
) | ||
readonly_fields = fields | ||
list_display = fields | ||
list_display = ( | ||
"hostname", | ||
"query_params", | ||
"params", | ||
"status_code", | ||
"method", | ||
"response_ms", | ||
"timestamp", | ||
) | ||
list_filter = ("method", "status_code", "hostname") | ||
search_fields = ("path",) | ||
search_fields = ("params", "query_params", "hostname") | ||
date_hierarchy = "timestamp" | ||
show_full_result_count = False | ||
|
||
def has_add_permission(self, request): | ||
return False | ||
|
||
def has_change_permission(self, request, obj=None): | ||
return False | ||
|
||
def query_params(self, obj): | ||
return obj.query_params | ||
|
||
query_params.short_description = _("Query parameters") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.