From 47ca1ffcab2cb03247ed7a51616762fed5f813f7 Mon Sep 17 00:00:00 2001 From: baiziyu Date: Sat, 23 Oct 2021 16:16:45 +0800 Subject: [PATCH] Add venus menu. Add enabled directory to add menu. Change-Id: If339293bf804a0556bc2d6479af3114a4084ca07 --- .../enabled/_4050_admin_venus_panel_group.py | 8 ++++++++ .../enabled/_4060_admin_add_log_search_panel.py | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 venus_dashboard/enabled/_4050_admin_venus_panel_group.py create mode 100644 venus_dashboard/enabled/_4060_admin_add_log_search_panel.py diff --git a/venus_dashboard/enabled/_4050_admin_venus_panel_group.py b/venus_dashboard/enabled/_4050_admin_venus_panel_group.py new file mode 100644 index 0000000..1bf8055 --- /dev/null +++ b/venus_dashboard/enabled/_4050_admin_venus_panel_group.py @@ -0,0 +1,8 @@ +from django.utils.translation import ugettext_lazy as _ + +# The slug of the panel group to be added to HORIZON_CONFIG. Required. +PANEL_GROUP = 'venus' +# The display name of the PANEL_GROUP. Required. +PANEL_GROUP_NAME = _('Venus') +# The slug of the dashboard the PANEL_GROUP associated with. Required. +PANEL_GROUP_DASHBOARD = 'admin' diff --git a/venus_dashboard/enabled/_4060_admin_add_log_search_panel.py b/venus_dashboard/enabled/_4060_admin_add_log_search_panel.py new file mode 100644 index 0000000..14a736d --- /dev/null +++ b/venus_dashboard/enabled/_4060_admin_add_log_search_panel.py @@ -0,0 +1,17 @@ +# The slug of the panel to be added to HORIZON_CONFIG. Required. +PANEL = 'log_search' +# The slug of the dashboard the PANEL associated with. Required. +PANEL_DASHBOARD = 'admin' +# The slug of the panel group the PANEL is associated with. +PANEL_GROUP = 'venus' + +# Python panel class of the PANEL to be added. +ADD_PANEL = 'venus_dashboard.log_search.panel.LogSearch' + +ADD_INSTALLED_APPS = ['venus_dashboard', 'venus_dashboard.log_search'] + +ADD_ANGULAR_MODULES = ['horizon.dashboard.admin.venus'] + +# ADD_JS_FILES = ['dashboard/admin/venus.module.js'] + +AUTO_DISCOVER_STATIC_FILES = True \ No newline at end of file