Skip to content

Commit f19bdee

Browse files
Merge pull request #64 from alanconway/coo-299-query-newline
fix: COO-299 - Extra newline breaks query for Network Observability.
2 parents 240c3fc + 9df158d commit f19bdee

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

web/src/korrel8r-client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cancellableFetch } from './cancellable-fetch';
2-
import { Korrel8rResponse, Korrel8rGraphResponse } from './korrel8r/query.types';
2+
import { Korrel8rGraphResponse, Korrel8rResponse } from './korrel8r/query.types';
33

44
const KORREL8R_ENDPOINT = '/api/proxy/plugin/troubleshooting-panel-console-plugin/korrel8r';
55

@@ -13,6 +13,7 @@ export const listDomains = () => {
1313
};
1414

1515
export const getNeighborsGraph = ({ query }: { query?: string }, depth: number) => {
16+
query = query.trim();
1617
const requestData = {
1718
method: 'POST',
1819
body: JSON.stringify({
@@ -30,6 +31,7 @@ export const getNeighborsGraph = ({ query }: { query?: string }, depth: number)
3031
};
3132

3233
export const getGoalsGraph = ({ query }: { query?: string }, goal: string) => {
34+
query = query.trim();
3335
const requestData = {
3436
method: 'POST',
3537
body: JSON.stringify({

0 commit comments

Comments
 (0)