feat(settings): add variable hints for webhook body template

This commit is contained in:
2026-05-10 18:26:19 +08:00
parent 566e63e13a
commit 434acabf47
+14
View File
@@ -108,6 +108,13 @@
<div class="form-group"> <div class="form-group">
<label>Body Template</label> <label>Body Template</label>
<textarea v-model="webhookSettings.body" rows="4" placeholder='{"subject":"Alert","text":"Message"}'></textarea> <textarea v-model="webhookSettings.body" rows="4" placeholder='{"subject":"Alert","text":"Message"}'></textarea>
<p v-pre class="field-hint">
Available variables in Body: {{ exceptionMsg }}, {{ serviceName }}, {{ exceptionType }}
<br>
- {{ exceptionMsg }}: The exception message, e.g. "Process superfrpc_test_test is dead"<br>
- {{ serviceName }}: The service name, e.g. "superfrpc_test_test"<br>
- {{ exceptionType }}: The type of exception, e.g. "Process Dead"
</p>
</div> </div>
</div> </div>
<div class="form-actions"> <div class="form-actions">
@@ -385,4 +392,11 @@ textarea:focus {
.webhook-modal { .webhook-modal {
width: 600px; width: 600px;
} }
.field-hint {
margin: 6px 0 0;
color: var(--text-secondary);
font-size: 13px;
line-height: 1.4;
}
</style> </style>