Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netvs-middleware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-middleware
Commits
f18f35f3
Verified
Commit
f18f35f3
authored
2 months ago
by
!! Julian Keck (old Account; do not use) !!
Browse files
Options
Downloads
Patches
Plain Diff
UPD: print JSON-Object for patch-request in email
parent
dcd51142
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/patch_request.py
+6
-2
6 additions, 2 deletions
api/patch_request.py
templates/patch_request_template.j2
+6
-0
6 additions, 0 deletions
templates/patch_request_template.j2
with
12 additions
and
2 deletions
api/patch_request.py
+
6
−
2
View file @
f18f35f3
import
html
import
json
import
pathlib
from
typing
import
Optional
...
...
@@ -342,7 +343,7 @@ def send_informal_petch_request(message: str, mgr: Mgr, receiver=settings.patch_
raise
e
def
send_patch_request
(
actions
,
mgr
:
Mgr
,
receiver
=
settings
.
patch_request_email_receivers
,
def
send_patch_request
(
actions
:
list
[
PatchRequestAction
]
,
mgr
:
Mgr
,
receiver
=
settings
.
patch_request_email_receivers
,
reply_to
:
Optional
[
str
]
=
None
)
->
bool
:
try
:
host_mode
=
db
.
host_omdl
.
OP_ENV_MODE
.
upper
()
...
...
@@ -350,10 +351,13 @@ def send_patch_request(actions, mgr: Mgr, receiver=settings.patch_request_email_
path
=
pathlib
.
Path
(
__file__
).
parent
.
parent
.
resolve
()
TEMPLATE
=
'
templates/patch_request_template.j2
'
raw_action_json
=
json
.
dumps
(
actions
)
body
=
render_jinja_template
(
path
,
TEMPLATE
,
actions
=
actions
,
mgr
=
mgr
,
host_mode
=
host_mode
host_mode
=
host_mode
,
raw_action_json
=
raw_action_json
,
)
building_numbers
=
"
,
"
.
join
(
set
([
action
.
building
.
number
for
action
in
actions
]))
...
...
This diff is collapsed.
Click to expand it.
templates/patch_request_template.j2
+
6
−
0
View file @
f18f35f3
...
...
@@ -90,4 +90,10 @@
{% endfor %}
<p>Have a nice day!</p>
<br><br>
Raw request
<pre>
{{ raw_action_json | default('[]') }}
</pre>
</body>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment