adding warning message title and url to deployment page
MODIFY
deploy-board/deploy_board/settings.py
deploy-board/deploy_board/settings.py
@@ -234,6 +234,8 @@ TELETRAAN_CODE_FREEZE_URL = os.getenv("TELETRAAN_CODE_FREEZE_URL", None)
TELETRAAN_JIRA_SOURCE_URL = os.getenv("TELETRAAN_JIRA_SOURCE_URL", None)
TELETRAAN_TRANSFER_OWNERSHIP_URL = os.getenv("TELETRAAN_TRANSFER_OWNERSHIP_URL", None)
TELETRAAN_RESOURCE_OWNERSHIP_WIKI_URL = os.getenv("TELETRAAN_RESOURCE_OWNERSHIP_WIKI_URL", None)
+TELETRAAN_WARNING_MESSAGE_URL = os.getenv("TELETRAAN_WARNING_MESSAGE_URL", None)
+TELETRAAN_WARNING_MESSAGE_TITLE = os.getenv("TELETRAAN_WARNING_MESSAGE_TITLE", None)
# use Rodimus if present
RODIMUS_SERVICE_URL = os.getenv("RODIMUS_SERVICE_URL", None)

ADD
deploy-board/deploy_board/templates/deploys/deploy_warning_message.tmpl
+{% load utils %}
+{% load static %}
+
+ <div id="deployWarningAlert" class="alert alert-danger" role="alert" align="center">
+ <a href="#" class="close" data-dismiss="alert">&times;</a>
+ <p>{{warning_message_title}}</p>
+ <p>Visit <a href="{{warning_message_url}}" target="_blank" rel="noopener">here</a> for more info. Thank you!</p>
+ </div>
+
+<script>
+
+ function closeBanner() {
+ document.getElementById("deployWarningAlert").remove();
+ }
+</script>

MODIFY
deploy-board/deploy_board/templates/environs/env_landing.html
deploy-board/deploy_board/templates/environs/env_landing.html
{% endif %}
{% endif %}
+{% if pinterest %}
+ {% if warning_message_title %}
+ {% include "deploys/deploy_warning_message.tmpl" %}
+ {% endif %}
+{% endif %}
+
{% if project_name_is_default %}
{% include "deploys/warning_no_nimbus_project_no_deploy.tmpl" %}
{% endif %}

MODIFY
deploy-board/deploy_board/webapp/env_views.py
deploy-board/deploy_board/webapp/env_views.py
@@ -23,7 +23,7 @@ from django.http import HttpResponse
from django.contrib import messages
from deploy_board.settings import IS_PINTEREST
from deploy_board.settings import TELETRAAN_DISABLE_CREATE_ENV_PAGE, TELETRAAN_REDIRECT_CREATE_ENV_PAGE_URL,\
- IS_DURING_CODE_FREEZE, TELETRAAN_CODE_FREEZE_URL, TELETRAAN_JIRA_SOURCE_URL, TELETRAAN_TRANSFER_OWNERSHIP_URL,TELETRAAN_RESOURCE_OWNERSHIP_WIKI_URL
+ IS_DURING_CODE_FREEZE, TELETRAAN_CODE_FREEZE_URL, TELETRAAN_JIRA_SOURCE_URL, TELETRAAN_TRANSFER_OWNERSHIP_URL,TELETRAAN_RESOURCE_OWNERSHIP_WIKI_URL, TELETRAAN_WARNING_MESSAGE_URL, TELETRAAN_WARNING_MESSAGE_TITLE
from deploy_board.settings import DISPLAY_STOPPING_HOSTS
from deploy_board.settings import GUINEA_PIG_ENVS
from deploy_board.settings import KAFKA_LOGGING_ADD_ON_ENVS
@@ -374,6 +374,8 @@ class EnvLandingView(View):
"csrf_token": get_token(request),
"display_stopping_hosts": DISPLAY_STOPPING_HOSTS,
"project_name_is_default": project_name_is_default,
+ "warning_message_title": TELETRAAN_WARNING_MESSAGE_TITLE,
+ "warning_message_url": TELETRAAN_WARNING_MESSAGE_URL,
})
showMode = 'complete'
sortByStatus = 'true'
@@ -410,6 +412,8 @@ class EnvLandingView(View):
"pinterest": IS_PINTEREST,
"display_stopping_hosts": DISPLAY_STOPPING_HOSTS,
"project_name_is_default": project_name_is_default,
+ "warning_message_title": TELETRAAN_WARNING_MESSAGE_TITLE,
+ "warning_message_url": TELETRAAN_WARNING_MESSAGE_URL,
}
sortByTag = request.GET.get('sortByTag', None)
if sortByTag:

adding warning message title and url to deployment page (#664)