From 5ce6e1f356629a12b0d770f5b604222a22544347 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sat, 2 Mar 2024 17:45:00 +0100 Subject: [PATCH] frontend: opt-in the log-detective.com button --- frontend/coprs_frontend/config/copr.conf | 4 ++++ frontend/coprs_frontend/coprs/config.py | 1 + .../coprs_frontend/coprs/templates/coprs/detail/build.html | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/coprs_frontend/config/copr.conf b/frontend/coprs_frontend/config/copr.conf index c51130360..625ed0050 100644 --- a/frontend/coprs_frontend/config/copr.conf +++ b/frontend/coprs_frontend/config/copr.conf @@ -203,6 +203,10 @@ HIDE_IMPORT_LOG_AFTER_DAYS = 14 # builds in database, otherwise implying rather expensive SQL queries). #RECENT_BUILDS_ON_FRONTPAGE = False +# Whether we want to show the green "Feed Log-detective.com" button for +# failed builds. Currently only integrated with the Fedora Copr instance. +#LOG_DETECTIVE_BUTTON = False + ############################# ##### DEBUGGING Section ##### diff --git a/frontend/coprs_frontend/coprs/config.py b/frontend/coprs_frontend/coprs/config.py index 88c7f0957..296ad081c 100644 --- a/frontend/coprs_frontend/coprs/config.py +++ b/frontend/coprs_frontend/coprs/config.py @@ -196,6 +196,7 @@ class Config(object): RECENT_BUILDS_ON_FRONTPAGE = False + LOG_DETECTIVE_BUTTON = False class ProductionConfig(Config): DEBUG = False diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html index f39c82923..1cf712251 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html @@ -35,7 +35,7 @@

Build {{ build.id }} doesn't belong to this project. < {% endif %} {% endif %} -{% if build.state == "failed" %} +{% if config.LOG_DETECTIVE_BUTTON and build.state == "failed" %} {{ copr_build_feed_log_detective(build, class="pull-right button-build-action") }} {% endif %}