Skip to content

Commit

Permalink
JAG-77 Fix non-operational website banner logic/appearance (#72)
Browse files Browse the repository at this point in the history
* Move non-operational banner to service bar template. Adjust banner styling.
* Fix the logic to use server name not URL
* Ad hoc fix to ensure login page redirects to a HTTPS page not HTTP identified while investigating protocol difference.
  • Loading branch information
mike-gormley authored May 28, 2024
1 parent b4a458b commit efff747
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ldregistry/config/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ registry.bootSpec = /opt/ldregistry/config/root-register.ttl|{webapp}/WEB-INF
registry.systemBoot = /opt/ldregistry/boot
registry.facetService = $facetService
registry.backupDir = /var/opt/ldregistry/backup
registry.redirectToHttpsOnLogin = false
registry.redirectToHttpsOnLogin = true
registry.configExtensions = $config
registry.requestLogger = $requestLogger
5 changes: 1 addition & 4 deletions ldregistry/templates/nav/_navbar.vm
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,9 @@
</div>
</div>
</div>
#if(!$request.getRequestURL().toString().equals("https://codes.wmo.int/"))
<div class="non-operational-banner">This is a test website – some features and links may not work, and data may be incorrect.</div>
#end

</nav>

#if($subject.isAuthenticated())
#parse( "actions/_logout-dialog.vm" )
#end

5 changes: 5 additions & 0 deletions ldregistry/templates/structure/_service-bar.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
## </span>
## $msg.get('service.beta.description', 'TBD')
## </div>
#if(!$request.getServerName().equals("codes.wmo.int"))
<div class="row">
<div class="non-operational-banner">This is a test website – some features and links may not work, and data may be incorrect.</div>
</div>
#end
12 changes: 7 additions & 5 deletions ldregistry/ui/assets/css/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ td.align-right {
}

.non-operational-banner {
width: 100%;
background-color: #ff7e00;
font-size:28px;
text-align:center;
font-family: Arial, Helvetica, sans-serif;
background-color: #ff7e00;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
margin-bottom: 10px;
padding: 10px;
text-align: center;
width: 100%;
}

0 comments on commit efff747

Please sign in to comment.