feat(settings): add variable hints for webhook body template
This commit is contained in:
@@ -108,6 +108,13 @@
|
||||
<div class="form-group">
|
||||
<label>Body Template</label>
|
||||
<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 class="form-actions">
|
||||
@@ -385,4 +392,11 @@ textarea:focus {
|
||||
.webhook-modal {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
margin: 6px 0 0;
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user