Api v1.13.0 (#1323)

* style(chalice): enhanced reset-password email

* fix(chalice): fixed mandatory AZURE_ACCOUNT_NAME issue
This commit is contained in:
Kraiem Taha Yassine 2023-06-09 11:48:41 +02:00 committed by GitHub
parent 14fa37af9d
commit 810e24dc71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 289 additions and 273 deletions

View file

@ -20,218 +20,303 @@
<!--[if !mso]><!-->
<!--<![endif]-->
<style type="text/css">
body {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
table,
td,
tr {
vertical-align: top;
border-collapse: collapse;
}
table,
td,
tr {
vertical-align: top;
border-collapse: collapse;
}
* {
line-height: inherit;
}
* {
line-height: inherit;
}
a[x-apple-data-detectors=true] {
color: inherit !important;
text-decoration: none !important;
}
a[x-apple-data-detectors=true] {
color: inherit !important;
text-decoration: none !important;
}
.ie-browser table {
table-layout: fixed;
}
.ie-browser table {
table-layout: fixed;
}
[owa] .img-container div,
[owa] .img-container button {
display: block !important;
}
[owa] .img-container div,
[owa] .img-container button {
display: block !important;
}
[owa] .fullwidth button {
width: 100% !important;
}
[owa] .fullwidth button {
width: 100% !important;
}
[owa] .block-grid .col {
display: table-cell;
float: none !important;
vertical-align: top;
}
[owa] .block-grid .col {
display: table-cell;
float: none !important;
vertical-align: top;
}
.ie-browser .block-grid,
.ie-browser .num12,
[owa] .num12,
[owa] .block-grid {
width: 500px !important;
}
.ie-browser .block-grid,
.ie-browser .num12,
[owa] .num12,
[owa] .block-grid {
width: 500px !important;
}
.ie-browser .mixed-two-up .num4,
[owa] .mixed-two-up .num4 {
width: 164px !important;
}
.ie-browser .mixed-two-up .num4,
[owa] .mixed-two-up .num4 {
width: 164px !important;
}
.ie-browser .mixed-two-up .num8,
[owa] .mixed-two-up .num8 {
width: 328px !important;
}
.ie-browser .mixed-two-up .num8,
[owa] .mixed-two-up .num8 {
width: 328px !important;
}
.ie-browser .block-grid.two-up .col,
[owa] .block-grid.two-up .col {
width: 246px !important;
}
.ie-browser .block-grid.two-up .col,
[owa] .block-grid.two-up .col {
width: 246px !important;
}
.ie-browser .block-grid.three-up .col,
[owa] .block-grid.three-up .col {
width: 246px !important;
}
.ie-browser .block-grid.three-up .col,
[owa] .block-grid.three-up .col {
width: 246px !important;
}
.ie-browser .block-grid.four-up .col [owa] .block-grid.four-up .col {
width: 123px !important;
}
.ie-browser .block-grid.four-up .col [owa] .block-grid.four-up .col {
width: 123px !important;
}
.ie-browser .block-grid.five-up .col [owa] .block-grid.five-up .col {
width: 100px !important;
}
.ie-browser .block-grid.five-up .col [owa] .block-grid.five-up .col {
width: 100px !important;
}
.ie-browser .block-grid.six-up .col,
[owa] .block-grid.six-up .col {
width: 83px !important;
}
.ie-browser .block-grid.six-up .col,
[owa] .block-grid.six-up .col {
width: 83px !important;
}
.ie-browser .block-grid.seven-up .col,
[owa] .block-grid.seven-up .col {
width: 71px !important;
}
.ie-browser .block-grid.seven-up .col,
[owa] .block-grid.seven-up .col {
width: 71px !important;
}
.ie-browser .block-grid.eight-up .col,
[owa] .block-grid.eight-up .col {
width: 62px !important;
}
.ie-browser .block-grid.eight-up .col,
[owa] .block-grid.eight-up .col {
width: 62px !important;
}
.ie-browser .block-grid.nine-up .col,
[owa] .block-grid.nine-up .col {
width: 55px !important;
}
.ie-browser .block-grid.nine-up .col,
[owa] .block-grid.nine-up .col {
width: 55px !important;
}
.ie-browser .block-grid.ten-up .col,
[owa] .block-grid.ten-up .col {
width: 60px !important;
}
.ie-browser .block-grid.ten-up .col,
[owa] .block-grid.ten-up .col {
width: 60px !important;
}
.ie-browser .block-grid.eleven-up .col,
[owa] .block-grid.eleven-up .col {
width: 54px !important;
}
.ie-browser .block-grid.twelve-up .col,
[owa] .block-grid.twelve-up .col {
width: 50px !important;
}
.ie-browser .block-grid.eleven-up .col,
[owa] .block-grid.eleven-up .col {
width: 54px !important;
}
.ie-browser .block-grid.twelve-up .col,
[owa] .block-grid.twelve-up .col {
width: 50px !important;
}
</style>
<style id="media-query" type="text/css">
@media only screen and (min-width: 520px) {
.block-grid {
width: 500px !important;
@media only screen and (min-width: 520px) {
.block-grid {
width: 500px !important;
}
.block-grid .col {
vertical-align: top;
}
.block-grid .col.num12 {
width: 500px !important;
}
.block-grid.mixed-two-up .col.num3 {
width: 123px !important;
}
.block-grid.mixed-two-up .col.num4 {
width: 164px !important;
}
.block-grid.mixed-two-up .col.num8 {
width: 328px !important;
}
.block-grid.mixed-two-up .col.num9 {
width: 369px !important;
}
.block-grid.two-up .col {
width: 250px !important;
}
.block-grid.three-up .col {
width: 166px !important;
}
.block-grid.four-up .col {
width: 125px !important;
}
.block-grid.five-up .col {
width: 100px !important;
}
.block-grid.six-up .col {
width: 83px !important;
}
.block-grid.seven-up .col {
width: 71px !important;
}
.block-grid.eight-up .col {
width: 62px !important;
}
.block-grid.nine-up .col {
width: 55px !important;
}
.block-grid.ten-up .col {
width: 50px !important;
}
.block-grid.eleven-up .col {
width: 45px !important;
}
.block-grid.twelve-up .col {
width: 41px !important;
}
}
.block-grid .col {
vertical-align: top;
@media (max-width: 520px) {
.block-grid,
.col {
min-width: 320px !important;
max-width: 100% !important;
display: block !important;
}
.block-grid {
width: 100% !important;
}
.col {
width: 100% !important;
}
.col > div {
margin: 0 auto;
}
img.fullwidth,
img.fullwidthOnMobile {
max-width: 100% !important;
}
.no-stack .col {
min-width: 0 !important;
display: table-cell !important;
}
.no-stack.two-up .col {
width: 50% !important;
}
.no-stack .col.num4 {
width: 33% !important;
}
.no-stack .col.num8 {
width: 66% !important;
}
.no-stack .col.num4 {
width: 33% !important;
}
.no-stack .col.num3 {
width: 25% !important;
}
.no-stack .col.num6 {
width: 50% !important;
}
.no-stack .col.num9 {
width: 75% !important;
}
.video-block {
max-width: none !important;
}
.mobile_hide {
min-height: 0px;
max-height: 0px;
max-width: 0px;
display: none;
overflow: hidden;
font-size: 0px;
}
.desktop_hide {
display: block !important;
max-height: none !important;
}
}
.block-grid .col.num12 {
width: 500px !important;
}
.block-grid.mixed-two-up .col.num3 {
width: 123px !important;
}
.block-grid.mixed-two-up .col.num4 {
width: 164px !important;
}
.block-grid.mixed-two-up .col.num8 {
width: 328px !important;
}
.block-grid.mixed-two-up .col.num9 {
width: 369px !important;
}
.block-grid.two-up .col {
width: 250px !important;
}
.block-grid.three-up .col {
width: 166px !important;
}
.block-grid.four-up .col {
width: 125px !important;
}
.block-grid.five-up .col {
width: 100px !important;
}
.block-grid.six-up .col {
width: 83px !important;
}
.block-grid.seven-up .col {
width: 71px !important;
}
.block-grid.eight-up .col {
width: 62px !important;
}
.block-grid.nine-up .col {
width: 55px !important;
}
.block-grid.ten-up .col {
width: 50px !important;
}
.block-grid.eleven-up .col {
width: 45px !important;
}
.block-grid.twelve-up .col {
width: 41px !important;
}
}
</style>
</head>
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #FFFFFF;">
<style id="media-query-bodytag" type="text/css">
@media (max-width: 520px) {
.block-grid,
.col {
.block-grid {
min-width: 320px !important;
max-width: 100% !important;
width: 100% !important;
display: block !important;
}
.block-grid {
width: 100% !important;
}
.col {
min-width: 320px !important;
max-width: 100% !important;
width: 100% !important;
display: block !important;
}
.col>div {
.col > div {
margin: 0 auto;
}
img.fullwidth,
img.fullwidth {
max-width: 100% !important;
height: auto !important;
}
img.fullwidthOnMobile {
max-width: 100% !important;
height: auto !important;
}
.no-stack .col {
@ -243,102 +328,24 @@
width: 50% !important;
}
.no-stack .col.num4 {
.no-stack.mixed-two-up .col.num4 {
width: 33% !important;
}
.no-stack .col.num8 {
.no-stack.mixed-two-up .col.num8 {
width: 66% !important;
}
.no-stack .col.num4 {
width: 33% !important;
.no-stack.three-up .col.num4 {
width: 33% !important
}
.no-stack .col.num3 {
width: 25% !important;
}
.no-stack .col.num6 {
width: 50% !important;
}
.no-stack .col.num9 {
width: 75% !important;
}
.video-block {
max-width: none !important;
}
.mobile_hide {
min-height: 0px;
max-height: 0px;
max-width: 0px;
display: none;
overflow: hidden;
font-size: 0px;
}
.desktop_hide {
display: block !important;
max-height: none !important;
.no-stack.four-up .col.num3 {
width: 25% !important
}
}
</style>
</head>
<body class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #FFFFFF;">
<style id="media-query-bodytag" type="text/css">
@media (max-width: 520px) {
.block-grid {
min-width: 320px!important;
max-width: 100%!important;
width: 100%!important;
display: block!important;
}
.col {
min-width: 320px!important;
max-width: 100%!important;
width: 100%!important;
display: block!important;
}
.col > div {
margin: 0 auto;
}
img.fullwidth {
max-width: 100%!important;
height: auto!important;
}
img.fullwidthOnMobile {
max-width: 100%!important;
height: auto!important;
}
.no-stack .col {
min-width: 0!important;
display: table-cell!important;
}
.no-stack.two-up .col {
width: 50%!important;
}
.no-stack.mixed-two-up .col.num4 {
width: 33%!important;
}
.no-stack.mixed-two-up .col.num8 {
width: 66%!important;
}
.no-stack.three-up .col.num4 {
width: 33%!important
}
.no-stack.four-up .col.num3 {
width: 25%!important
}
}
</style>
<!--[if IE]>
<div class="ie-browser"><![endif]-->
@ -449,13 +456,24 @@ width: 25%!important
<tr>
<td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Arial, sans-serif">
<![endif]-->
<p style="font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif; color: #6c757d; text-align: center;">
Please click the button below to reset your password (valid for 24 hours
only).</p>
<br/>
<p style="font-size: 14px; line-height: 21px; text-align: center; margin: 0; margin-bottom: 10px">
<span style="font-size: 18px;"><a href="%(invitationLink)s"
rel="noopener"
style="text-decoration: none; color: #ffffff; background-color: #394EFF; border-radius: 3px; padding: 10px 30px;"
target="_blank" title="Reset password">Reset Password</a></span><span
style="font-size: 18px; line-height: 21px;"></span></p>
<div style="color:#555555;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;line-height:120%;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;">
<div style="font-size: 12px; line-height: 14px; color: #555555; font-family: -apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;">
<p style="font-size: 14px; line-height: 16px; text-align: center; margin: 0;">
Use the link below to reset your password (valid for 24 hours only):</p>
If the button above doesn't work, please copy and paste the URL into
your browser:</p>
<p style="font-size: 14px; line-height: 21px; text-align: center; margin: 0;">
<br/>
<span style="font-size: 18px;"><a href="%(invitationLink)s"><b>%(invitationLink)s</b></a></span><span
<span style="font-size: 13px;"><b>%(invitationLink)s</b></span><span
style="font-size: 18px; line-height: 21px;"></span></p>
</div>
</div>
@ -516,16 +534,16 @@ width: 25%!important
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Arial, sans-serif">
<![endif]-->
<div style="color:#555555;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;line-height:120%;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;">
<div style="font-size: 12px; line-height: 14px; color: #555555; font-family: -apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;">
<p style="font-size: 14px; line-height: 13px; text-align: center; margin: 0;">
<span style="font-size: 11px;">If you no longer wish to make this change or did not initiate this request, plrease ignore this e-mail.</span>
</p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
<![endif]-->
<div style="color:#555555;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;line-height:120%;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;">
<div style="font-size: 12px; line-height: 14px; color: #555555; font-family: -apple-system,BlinkMacSystemFont,'Helvetica Neue','Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,sans-serif;">
<p style="font-size: 14px; line-height: 13px; text-align: center; margin: 0;">
<span style="font-size: 11px;">If you no longer wish to make this change or did not initiate this request, plrease ignore this e-mail.</span>
</p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>

View file

@ -1,9 +1,6 @@
FROM python:3.11-alpine3.17
#revert to this image when this issue is fixed https://github.com/xmlsec/python-xmlsec/issues/252
#FROM python:3.11-slim
LABEL Maintainer="KRAIEM Taha Yassine<tahayk2@gmail.com>"
RUN apk add --no-cache build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec tini
#RUN apt-get update && apt-get install -y pkg-config libxmlsec1-dev gcc tini && rm -rf /var/lib/apt/lists/*
ARG envarg
ENV SOURCE_MAP_VERSION=0.7.4 \
@ -20,9 +17,7 @@ COPY . .
RUN mv env.default .env
RUN adduser -u 1001 openreplay -D
#RUN useradd -mu 1001 openreplay
USER 1001
ENTRYPOINT ["/sbin/tini", "--"]
#ENTRYPOINT ["tini", "--"]
CMD ./entrypoint.sh

View file

@ -5,11 +5,14 @@ from azure.storage.blob import BlobServiceClient, BlobSasPermissions, generate_b
class AzureBlobStorage(ObjectStorage):
# Prepare blob storage client
client = BlobServiceClient(
account_url=f"https://{config('AZURE_ACCOUNT_NAME')}.blob.core.windows.net",
credential=config("AZURE_ACCOUNT_KEY"),
)
client = None
def __init__(self):
# Prepare blob storage client
self.client = BlobServiceClient(
account_url=f"https://{config('AZURE_ACCOUNT_NAME')}.blob.core.windows.net",
credential=config("AZURE_ACCOUNT_KEY"),
)
def exists(self, bucket, key):
return self.client.get_blob_client(bucket, key).exists()