fix: didn't work

This commit is contained in:
nate 2026-04-08 13:42:49 +04:00
parent 74aa5c8376
commit 67559e164c
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,9 @@ class QueryBuilder {
this.consider = 'up'; // 'up' | 'down' this.consider = 'up'; // 'up' | 'down'
this.rules = this._defaultRules(); this.rules = this._defaultRules();
this.render(); this.render();
// Notify the form that the default query is already populated, so submitting
// without edits sends the default explicitly instead of leaving it null.
if (this.onChange) this.onChange(this.getQuery());
} }
_emptyRule() { _emptyRule() {

View File

@ -174,7 +174,7 @@
<div> <div>
<label class="block text-sm text-gray-400 mb-1.5"><%= isEdit ? 'Conditions' : 'Query Conditions' %> <span class="text-gray-600">(optional)</span></label> <label class="block text-sm text-gray-400 mb-1.5"><%= isEdit ? 'Conditions' : 'Query Conditions' %> <span class="text-gray-600">(optional)</span></label>
<p class="text-xs text-gray-600 mb-3">Define <% if (isEdit) { %>up/down conditions<% } else { %>when this monitor should be considered "up"<% } %>. Defaults to a 2xx status (shown below — edit to customise).</p> <p class="text-xs text-gray-600 mb-3">Define <% if (isEdit) { %>up/down conditions<% } else { %>when this monitor should be considered "up"<% } %>.</p>
<div id="<%= prefix %>query-builder"></div> <div id="<%= prefix %>query-builder"></div>
</div> </div>