Skip to content

Commit 7215a2f

Browse files
authored
app/vmui: replace GET with POST for field_names and stream_field_names (#819)
1 parent 7d4bd5f commit 7215a2f

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

app/vmui/packages/vmui/src/components/Configurators/QueryEditor/LogsQL/useFetchLogsQLOptions.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ export const useFetchLogsQLOptions = (contextData?: ContextData) => {
7878
return;
7979
}
8080

81-
const response = await fetch(`${serverUrl}/select/logsql/${urlSuffix}?${params}`, {
81+
const response = await fetch(`${serverUrl}/select/logsql/${urlSuffix}`, {
8282
signal,
83-
headers: { ...tenant }
83+
method: "POST",
84+
headers: { ...tenant },
85+
body: params,
8486
});
8587

8688
if (response.ok) {

app/vmui/packages/vmui/src/pages/OverviewPage/hooks/useFetchFieldNames.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ export const useFetchFieldNames = () => {
5858
return;
5959
}
6060

61-
const url = `${serverUrl}/select/logsql/field_names?${queryParams}`;
62-
const response = await fetch(url, { headers });
61+
const url = `${serverUrl}/select/logsql/field_names`;
62+
const response = await fetch(url, {
63+
method: "POST",
64+
headers,
65+
body: params,
66+
});
6367

6468
if (!response.ok) {
6569
const errorResponse = await response.text();

app/vmui/packages/vmui/src/pages/OverviewPage/hooks/useFetchStreamNames.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ interface FetchOptions {
88
start: number;
99
end: number;
1010
query?: string;
11-
limit?: number;
1211
extraParams?: URLSearchParams;
1312
}
1413

@@ -51,8 +50,12 @@ export const useFetchStreamFieldNames = () => {
5150
return;
5251
}
5352

54-
const url = `${serverUrl}/select/logsql/stream_field_names?${queryParams}`;
55-
const response = await fetch(url, { headers });
53+
const url = `${serverUrl}/select/logsql/stream_field_names`;
54+
const response = await fetch(url, {
55+
method: "POST",
56+
headers,
57+
body: params,
58+
});
5659

5760
if (!response.ok) {
5861
const errorResponse = await response.text();

docs/victorialogs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta
2929
* BUGFIX: [Loki data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/): fix handling of `Content-Type` HTTP header in `/insert/loki/api/v1/push` endpoint to allow support Clients that send charset or additional information in header. See [#813](https://github.com/VictoriaMetrics/VictoriaLogs/pull/813).
3030
* BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix `/hits` graph showing the first point outside the selected time range. See [#737](https://github.com/VictoriaMetrics/VictoriaLogs/issues/737).
3131
* BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix `hits` chart not updating when changing the `group by` field. See [#788](https://github.com/VictoriaMetrics/VictoriaLogs/issues/788).
32+
* BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): replace GET with POST for `field_names` and `stream_field_names` requests. See [#818](https://github.com/VictoriaMetrics/VictoriaLogs/issues/818).
3233

3334
## [v1.37.2](https://github.com/VictoriaMetrics/VictoriaLogs/releases/tag/v1.37.2)
3435

0 commit comments

Comments
 (0)