Add support for env var DEBSHOTS_ALERT_MESSAGE
If that environment variable is set then it will display on every page.
This commit is contained in:
parent
1a21007068
commit
c6296b882d
3 changed files with 11 additions and 0 deletions
|
|
@ -14,7 +14,10 @@ html
|
||||||
|
|
||||||
body
|
body
|
||||||
= render 'layouts/topbar'
|
= render 'layouts/topbar'
|
||||||
|
|
||||||
#content.grid-container
|
#content.grid-container
|
||||||
|
- if Rails.configuration.alert_message
|
||||||
|
.callout.warning.alert-callout-subtle.radius =Rails.configuration.alert_message
|
||||||
#messages
|
#messages
|
||||||
= render 'layouts/messages'
|
= render 'layouts/messages'
|
||||||
= yield
|
= yield
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ Rails.application.configure do
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Show a message on the front page.
|
||||||
|
# TODO: put it into the database and make it configurable online
|
||||||
|
config.alert_message = ENV['DEBSHOTS_ALERT_MESSAGE']
|
||||||
|
|
||||||
# URL to fetch reviews from the Ubuntu JSON API
|
# URL to fetch reviews from the Ubuntu JSON API
|
||||||
# config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s'
|
# config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,10 @@ Rails.application.configure do
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Show a message on the front page.
|
||||||
|
# TODO: put it into the database and make it configurable online
|
||||||
|
config.alert_message = ENV['DEBSHOTS_ALERT_MESSAGE']
|
||||||
|
|
||||||
# URL to fetch reviews from the Ubuntu JSON API
|
# URL to fetch reviews from the Ubuntu JSON API
|
||||||
# config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s'
|
# config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/en/any/any/any/%s'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue