Share

Managing banners

Warning:

Local installations of Flow Production Tracking are no longer offered. This documentation is intended only for those with existing instances of Flow Production Tracking Enterprise Docker. Click here for a list of our current offerings.

The banners are useful to display information to your Flow Production Tracking users, like an upcoming maintenance. Below is an example banner with an embedded link.

As a Flow Production Tracking Administrator, it’s possible to add banners to display for your users like we do for our hosted sites.

Add or update an existing banner

Below is the list of properties you can set on a banner.

Property Description
code Unique code, like welcome_to_6_1. Can only contain alphanums + underscore.
expiry_date Optional date/time at which the banner should be considered expired and not shown to any users. This will not remove the banner from the database but it will hide it.

Valid formats (in UTC)

* 2015-06-15 18:02

* 2025-06-15
restrict_to_role If set, only users with this role will see the banner. Admin is the only supported value.
title Title
message Message
link_title Link title
link_url Link URL
level - information (orange)

- standard (blue)

- urgent (red)
template generic_banner or generic_link_banner
dismissable A string, which if set to "true" (default), enables the dismiss (X) button that hides the banner. Only valid from Shotgun v8.7 onwards.

Add a banner:

# First, start a shell in the container to do banner operations.  
docker-compose run --rm app bash  
# Create a temporary json file. See examples below.  
vi tmp/banner.json  
rake sg:banner:add[tmp/banner.json]  
  

Example banner JSON file:

 {
    "code": "new_banner",
    "expiry_date": "2019-08-30",
    "restrict_to_role": "",
    "banner": {
        "title": "TITLE",
        "message": "message",
        "template": "generic_banner",
        "level": "standard",  
        "dismissable": "true"
    }
}

Example banner with link JSON file:

 {
    "code": "new_banner_with_link",
    "expiry_date": "2019-08-30",
    "restrict_to_role": "",
    "banner": {
        "title": "TITLE",
        "message": "message",
        "link_title": "LINK TITLE",
        "link_url": "https://www.youtube.com/",
        "template": "generic_link_banner",
        "level": "urgent",  
        "dismissable": "false"
    }
} 

List existing banners

 docker-compose run --rm app rake sg:banner:list 

Remove a banner

Remove an existing banner. The banner_code can be found by listing existing banners.

 docker-compose run --rm app rake sg:banner:remove:code[<banner_code>] 

Was this information helpful?