Skip to content

Commit

Permalink
frontend: opt-in the log-detective.com button
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Mar 4, 2024
1 parent a39fd37 commit 5ce6e1f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions frontend/coprs_frontend/config/copr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
1 change: 1 addition & 0 deletions frontend/coprs_frontend/coprs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class Config(object):

RECENT_BUILDS_ON_FRONTPAGE = False

LOG_DETECTIVE_BUTTON = False

class ProductionConfig(Config):
DEBUG = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 class="build-detail"> 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 %}

Expand Down

0 comments on commit 5ce6e1f

Please sign in to comment.