diff --git a/uhepp-js/src/common.scss b/uhepp-js/src/common.scss index c5668a12d8bacb11daac38b44a2a7fe49915d63f..7e232960254cc72b6ef23247523de6994f1f2804 100644 --- a/uhepp-js/src/common.scss +++ b/uhepp-js/src/common.scss @@ -131,3 +131,17 @@ body { background-size: contain; } } + +.alert { + border-bottom: none; + border-left: none; + border-right: none; + border-top-width: 0.25rem; +} + +.alert-danger { + border-color: theme-color("danger"); +} +.alert-success { + border-color: theme-color("success"); +} diff --git a/uhepp-js/src/components/UheppHist.jsx b/uhepp-js/src/components/UheppHist.jsx index 23dd5dab18a725abca67bcc6a5d9ae5bf9afafa4..644b9c1297ce4a0c09f5521ef9c9acf16d2e559b 100644 --- a/uhepp-js/src/components/UheppHist.jsx +++ b/uhepp-js/src/components/UheppHist.jsx @@ -667,8 +667,8 @@ const UheppHistPost = ({width, height, uhepp}) => { }) const maxBinMain = getMaxBin(post_uhepp) const isScaleLin = !(uhepp.y_axis && uhepp.y_axis.log) - const yScaleMin = (uhepp.y_axis && uhepp.y_axis.min) || (isScaleLin ? 0 : 1); - const yScaleMax = (uhepp.y_axis && uhepp.y_axis.max) || (isScaleLin ? maxBinMain * 1.5 : maxBinMain * 10**1.5 ); + const yScaleMin = (uhepp.y_axis && uhepp.y_axis.min) ?? (isScaleLin ? 0 : 1); + const yScaleMax = (uhepp.y_axis && uhepp.y_axis.max) ?? (isScaleLin ? maxBinMain * 1.5 : maxBinMain * 10**1.5 ); const yScale = isScaleLin ? ( @@ -689,14 +689,12 @@ const UheppHistPost = ({width, height, uhepp}) => { const ratioScale = ratioScaleMaker({ range: [ratioMax, 0], domain: [ - (uhepp.ratio_axis && uhepp.ratio_axis.min) || 0.5, - (uhepp.ratio_axis && uhepp.ratio_axis.max) || 1.5, + (uhepp.ratio_axis && uhepp.ratio_axis.min) ?? 0.5, + (uhepp.ratio_axis && uhepp.ratio_axis.max) ?? 1.5, ], clamp: !isRatioScaleLin, }) - - const equidistent = computeEquidistent(uhepp.bins.rebin || uhepp.bins.edges, uhepp.bins.density_width) return ( diff --git a/uhepp_org/uhepp_vault/templates/404.html b/uhepp_org/uhepp_vault/templates/404.html index 654949b4e145c557fbe280af322049eef39e3a9e..d9260fe17dea82e72012f6c97d694f52fe356b5d 100644 --- a/uhepp_org/uhepp_vault/templates/404.html +++ b/uhepp_org/uhepp_vault/templates/404.html @@ -14,6 +14,7 @@ {% block content %} +<div class="alert alert-danger"> <h2 class="mt-2">Oops, something went wrong</h2> <p> We couldn't find the resource you were looking for. @@ -23,4 +24,5 @@ Please make sure that</p> <li>you have permission to view the resource.</li> </ul> The owner of the resource might have not made it visible to you. +</div> {% endblock %} diff --git a/uhepp_org/uhepp_vault/templates/500.html b/uhepp_org/uhepp_vault/templates/500.html index 3650a984be8386acae0de49a5dd45a19e335abd7..d9a9831991ccc9fb18878780a3c9190d96bf9ea5 100644 --- a/uhepp_org/uhepp_vault/templates/500.html +++ b/uhepp_org/uhepp_vault/templates/500.html @@ -13,8 +13,10 @@ {% block content %} +<div class="alert alert-danger"> <h2 class="mt-2">Oops, this is embarrassing</h2> <p> Something wend wrong at our end. This might be a temporary issue. Please try again. If the issue persists, please contact an administrator. +</div> {% endblock %}