forked from guohongze/archer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.py
21 lines (16 loc) · 1.16 KB
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#coding=utf-8
from django.contrib import admin
# Register your models here.
from .models import users, master_config, workflow
class usersAdmin(admin.ModelAdmin):
list_display = ('id', 'username', 'display', 'role')
search_fields = ['id', 'username', 'display', 'role']
class master_configAdmin(admin.ModelAdmin):
list_display = ('id', 'cluster_name', 'master_host', 'master_port', 'master_user', 'master_password', 'create_time', 'update_time')
search_fields = ['id', 'cluster_name', 'master_host', 'master_port', 'master_user', 'master_password', 'create_time', 'update_time']
class workflowAdmin(admin.ModelAdmin):
list_display = ('id','workflow_name', 'engineer', 'review_man', 'create_time', 'finish_time', 'status', 'is_backup', 'review_content', 'cluster_name', 'reviewok_time', 'sql_content', 'execute_result')
search_fields = ['id','workflow_name', 'engineer', 'review_man', 'create_time', 'finish_time', 'status', 'is_backup', 'review_content', 'cluster_name', 'reviewok_time', 'sql_content', 'execute_result']
admin.site.register(users, usersAdmin)
admin.site.register(master_config, master_configAdmin)
admin.site.register(workflow, workflowAdmin)