Fix case for setting httpBodyEncoding to null - does work for http, b… (#3498)

* Fix case for setting httpBodyEncoding to null - does work for http, but not for keyword if anything else but json.

* Updating case.

* Update src/pages/EditMonitor.vue

Added suggestion from @CommanderStorm

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* Update src/pages/EditMonitor.vue

Co-authored-by: Frank Elsinga <frank@elsinga.de>

---------

Co-authored-by: Anders Kvist <ak@cego.dk>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
pull/3525/head
Anders Kvist 1 year ago committed by GitHub
parent 23fdd32de0
commit ceb5708bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1348,7 +1348,8 @@ message HealthCheckResponse {
this.monitor.body = JSON.stringify(JSON.parse(this.monitor.body), null, 4);
}
if (this.monitor.type && this.monitor.type !== "http" && (this.monitor.type !== "keyword" || this.monitor.type !== "json-query")) {
const monitorTypesWithEncodingAllowed = [ "http", "keyword", "json-query" ];
if (this.monitor.type && !monitorTypesWithEncodingAllowed.includes(this.monitor.type)) {
this.monitor.httpBodyEncoding = null;
}

Loading…
Cancel
Save