Skip to content

Commit 97cc480

Browse files
change format
1 parent 0017ace commit 97cc480

3 files changed

Lines changed: 62 additions & 42 deletions

File tree

infra/main.parameters.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
5-
"solutionName": {
6-
"value": "${AZURE_ENV_NAME}"
5+
"solutionName32": {
6+
"value": "${AZURE_ENV_NAMEsfsd}"
77
},
88
"location": {
9-
"value": "${AZURE_LOCATION}"
9+
"value": "${AZURE_LOCATION45}"
1010
},
11-
"azureAiServiceLocation": {
11+
"azureAiServiceLocation54": {
1212
"value": "${AZURE_ENV_AI_SERVICE_LOCATION}"
1313
},
14-
"deploymentType": {
15-
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE}"
14+
"deploymentType34": {
15+
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE2232}"
1616
},
1717
"gptModelName": {
1818
"value": "${AZURE_ENV_GPT_MODEL_NAME}"

infra/main.waf.parameters.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"value": "${AZURE_ENV_NAME}"
77
},
88
"location": {
9-
"value": "${AZURE_LOCATION}"
9+
"value": "${AZURE_LOCATION12}"
1010
},
1111
"azureAiServiceLocation": {
1212
"value": "${AZURE_ENV_AI_SERVICE_LOCATION}"
1313
},
1414
"deploymentType": {
1515
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE}"
1616
},
17-
"gptModelName": {
17+
"gptModelName32d": {
1818
"value": "${AZURE_ENV_GPT_MODEL_NAME}"
1919
},
2020
"gptModelVersion": {

infra/scripts/validate_bicep_params.py

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -485,43 +485,63 @@ def generate_html_report(
485485
)
486486

487487
if r.issues:
488-
parts.append(
489-
'<tr><td style="padding:0;">'
490-
'<table role="presentation" width="100%" cellpadding="0"'
491-
' cellspacing="0" style="font-size:12px;">'
492-
'<tr style="background-color:#f5f5f5;">'
493-
'<th style="text-align:left;padding:6px 10px;'
494-
'border-bottom:1px solid #e0e0e0;width:65px;">Severity</th>'
495-
'<th style="text-align:left;padding:6px 10px;'
496-
'border-bottom:1px solid #e0e0e0;width:180px;">Parameter</th>'
497-
'<th style="text-align:left;padding:6px 10px;'
498-
'border-bottom:1px solid #e0e0e0;">Details</th></tr>'
499-
)
500-
for idx, issue in enumerate(r.issues):
501-
bg = "#ffffff" if idx % 2 == 0 else "#fafafa"
502-
if issue.severity == "ERROR":
503-
sev_html = (
504-
'<span style="color:#D32F2F;font-weight:600;">'
505-
'&#9679; ERROR</span>'
506-
)
507-
else:
508-
sev_html = (
509-
'<span style="color:#F57C00;font-weight:600;">'
510-
'&#9679; WARN</span>'
488+
# --- Errors section ---
489+
if errors:
490+
parts.append(
491+
'<tr><td style="padding:8px 12px 4px 12px;">'
492+
'<strong style="font-size:12px;color:#D32F2F;">'
493+
'&#9679; Errors</strong></td></tr>'
494+
'<tr><td style="padding:0 12px;">'
495+
'<table role="presentation" width="100%" cellpadding="0"'
496+
' cellspacing="0" style="font-size:12px;border:1px solid #f5c6cb;">'
497+
'<tr style="background-color:#FFEBEE;">'
498+
'<th style="text-align:left;padding:6px 10px;'
499+
'border-bottom:1px solid #f5c6cb;width:180px;">Parameter</th>'
500+
'<th style="text-align:left;padding:6px 10px;'
501+
'border-bottom:1px solid #f5c6cb;">Details</th></tr>'
502+
)
503+
for idx, issue in enumerate(errors):
504+
bg = "#ffffff" if idx % 2 == 0 else "#fff5f5"
505+
parts.append(
506+
f'<tr style="background-color:{bg};">'
507+
f'<td style="padding:5px 10px;border-bottom:1px solid #f5c6cb;'
508+
f'vertical-align:top;font-family:Consolas,monospace;'
509+
f'font-size:11px;word-break:break-all;">'
510+
f'{_html_escape(issue.param_name)}</td>'
511+
f'<td style="padding:5px 10px;border-bottom:1px solid #f5c6cb;'
512+
f'vertical-align:top;">{_html_escape(issue.message)}</td>'
513+
f'</tr>'
511514
)
515+
parts.append("</table></td></tr>")
516+
517+
# --- Warnings section ---
518+
if warnings:
512519
parts.append(
513-
f'<tr style="background-color:{bg};">'
514-
f'<td style="padding:5px 10px;border-bottom:1px solid #eee;'
515-
f'vertical-align:top;">{sev_html}</td>'
516-
f'<td style="padding:5px 10px;border-bottom:1px solid #eee;'
517-
f'vertical-align:top;font-family:Consolas,monospace;'
518-
f'font-size:11px;word-break:break-all;">'
519-
f'{_html_escape(issue.param_name)}</td>'
520-
f'<td style="padding:5px 10px;border-bottom:1px solid #eee;'
521-
f'vertical-align:top;">{_html_escape(issue.message)}</td>'
522-
f'</tr>'
520+
'<tr><td style="padding:8px 12px 4px 12px;">'
521+
'<strong style="font-size:12px;color:#F57C00;">'
522+
'&#9679; Warnings</strong></td></tr>'
523+
'<tr><td style="padding:0 12px 8px 12px;">'
524+
'<table role="presentation" width="100%" cellpadding="0"'
525+
' cellspacing="0" style="font-size:12px;border:1px solid #ffe0b2;">'
526+
'<tr style="background-color:#FFF3E0;">'
527+
'<th style="text-align:left;padding:6px 10px;'
528+
'border-bottom:1px solid #ffe0b2;width:180px;">Parameter</th>'
529+
'<th style="text-align:left;padding:6px 10px;'
530+
'border-bottom:1px solid #ffe0b2;">Details</th></tr>'
523531
)
524-
parts.append("</table></td></tr>")
532+
for idx, issue in enumerate(warnings):
533+
bg = "#ffffff" if idx % 2 == 0 else "#fffaf0"
534+
parts.append(
535+
f'<tr style="background-color:{bg};">'
536+
f'<td style="padding:5px 10px;border-bottom:1px solid #ffe0b2;'
537+
f'vertical-align:top;font-family:Consolas,monospace;'
538+
f'font-size:11px;word-break:break-all;">'
539+
f'{_html_escape(issue.param_name)}</td>'
540+
f'<td style="padding:5px 10px;border-bottom:1px solid #ffe0b2;'
541+
f'vertical-align:top;">{_html_escape(issue.message)}</td>'
542+
f'</tr>'
543+
)
544+
parts.append("</table></td></tr>")
525545
else:
526546
parts.append(
527547
'<tr><td style="padding:10px 12px;color:#2E7D32;'

0 commit comments

Comments
 (0)