From 0722af2424eeb6c52f4fae57838c62148fa4cc20 Mon Sep 17 00:00:00 2001 From: homholueng Date: Fri, 3 Dec 2021 15:58:08 +0800 Subject: [PATCH] bugfix: pipeline runtime admin page search error fix --- runtime/bamboo-pipeline/pipeline/eri/admin.py | 23 ++++++++++++++----- runtime/bamboo-pipeline/pyproject.toml | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/runtime/bamboo-pipeline/pipeline/eri/admin.py b/runtime/bamboo-pipeline/pipeline/eri/admin.py index f93d93a8..e2fac9c1 100644 --- a/runtime/bamboo-pipeline/pipeline/eri/admin.py +++ b/runtime/bamboo-pipeline/pipeline/eri/admin.py @@ -18,13 +18,24 @@ @admin.register(models.Process) class ProcessAdmin(admin.ModelAdmin): - list_display = ["id", "parent_id", "ack_num", "need_ack", "asleep", "suspended", "frozen", "dead"] - search_fields = ["id___exact", "parent_id____exact", "current_node_id____exact", "suspended_by____exact"] + list_display = [ + "id", + "parent_id", + "ack_num", + "need_ack", + "asleep", + "suspended", + "frozen", + "dead", + "root_pipeline_id", + "current_node_id", + ] + search_fields = ["root_pipeline_id__exact", "current_node_id__exact", "suspended_by__exact"] @admin.register(models.Node) class NodeAdmin(admin.ModelAdmin): - list_display = ["id", "node_id"] + list_display = ["id", "node_id", "detail"] search_fields = ["node_id__exact"] @@ -48,18 +59,18 @@ class StateAdmin(admin.ModelAdmin): @admin.register(models.Schedule) class ScheduleAdmin(admin.ModelAdmin): list_display = ["id", "type", "process_id", "node_id", "finished", "expired", "version", "schedule_times"] - search_fields = ["id__exact", "node_id__exact"] + search_fields = ["node_id__exact"] @admin.register(models.Data) class DataAdmin(admin.ModelAdmin): - list_display = ["id", "node_id"] + list_display = ["id", "node_id", "inputs", "outputs"] search_fields = ["node_id__exact"] @admin.register(models.ExecutionData) class ExecutionDataAdmin(admin.ModelAdmin): - list_display = ["id", "node_id"] + list_display = ["id", "node_id", "inputs", "outputs"] search_fields = ["node_id__exact"] diff --git a/runtime/bamboo-pipeline/pyproject.toml b/runtime/bamboo-pipeline/pyproject.toml index 6c947d52..aca89555 100644 --- a/runtime/bamboo-pipeline/pyproject.toml +++ b/runtime/bamboo-pipeline/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bamboo-pipeline" -version = "3.9.0" +version = "3.9.1" description = "runtime for bamboo-engine base on Django and Celery" authors = ["homholueng "] license = "MIT"