Initial commit: rdgen with GitHub/Gitea dual build backend
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import ApiToken, GithubRun
|
||||
|
||||
|
||||
@admin.register(GithubRun)
|
||||
class GithubRunAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'filename', 'platform', 'status_label', 'created_by', 'github_run_id', 'created_at')
|
||||
list_filter = ('status', 'platform', 'created_at')
|
||||
search_fields = ('uuid', 'filename', 'created_by__username')
|
||||
readonly_fields = ('uuid', 'github_run_id', 'created_at', 'updated_at')
|
||||
list_per_page = 30
|
||||
|
||||
|
||||
@admin.register(ApiToken)
|
||||
class ApiTokenAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'user', 'is_active', 'created_at', 'last_used_at')
|
||||
list_filter = ('is_active',)
|
||||
search_fields = ('name', 'user__username', 'key')
|
||||
readonly_fields = ('key', 'created_at', 'last_used_at')
|
||||
list_per_page = 30
|
||||
|
||||
|
||||
admin.site.site_header = 'RustDesk 客户端定制平台 · 后台管理'
|
||||
admin.site.site_title = '平台管理后台'
|
||||
admin.site.index_title = '管理首页'
|
||||
Reference in New Issue
Block a user