Skip to content

Commit 6a127a9

Browse files
committed
adjust kql and rename to kuery
1 parent 7960990 commit 6a127a9

21 files changed

Lines changed: 38 additions & 39 deletions

File tree

x-pack/plugins/osquery/common/api/live_query/find_live_query_route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as t from 'io-ts';
99
import { toNumberRt } from '@kbn/io-ts-utils';
1010

1111
export const findLiveQueryRequestQuerySchema = t.type({
12-
filterQuery: t.union([t.string, t.undefined]),
12+
kuery: t.union([t.string, t.undefined]),
1313
page: t.union([toNumberRt, t.undefined]),
1414
pageSize: t.union([toNumberRt, t.undefined]),
1515
sort: t.union([t.string, t.undefined]),

x-pack/plugins/osquery/common/api/live_query/get_live_query_results_route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as t from 'io-ts';
99
import { toNumberRt } from '@kbn/io-ts-utils';
1010

1111
export const getLiveQueryResultsRequestQuerySchema = t.type({
12-
filterQuery: t.union([t.string, t.undefined]),
12+
kuery: t.union([t.string, t.undefined]),
1313
page: t.union([toNumberRt, t.undefined]),
1414
pageSize: t.union([toNumberRt, t.undefined]),
1515
sort: t.union([t.string, t.undefined]),

x-pack/plugins/osquery/common/search_strategy/osquery/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export enum OsqueryQueries {
3434
export type FactoryQueryTypes = OsqueryQueries;
3535

3636
export interface RequestBasicOptions extends IEsSearchRequest {
37-
kql?: string;
37+
kuery?: string;
3838
factoryQueryType?: FactoryQueryTypes;
3939
componentTemplateExists?: boolean;
4040
}

x-pack/plugins/osquery/cypress/e2e/all/cases.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Add to Cases', () => {
2222
loadLiveQuery({
2323
agent_all: true,
2424
query: "SELECT * FROM os_version where name='Ubuntu';",
25-
kql: '',
25+
kuery: '',
2626
}).then((liveQuery) => {
2727
liveQueryId = liveQuery.action_id;
2828
liveQueryQuery = liveQuery.queries[0].query;

x-pack/plugins/osquery/cypress/tasks/api_fixtures.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const loadLiveQuery = (
121121
payload = {
122122
agent_all: true,
123123
query: 'select * from uptime;',
124-
kql: '',
124+
kuery: '',
125125
}
126126
) =>
127127
request<{

x-pack/plugins/osquery/public/action_results/use_action_results.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface UseActionResults {
3838
direction: Direction;
3939
limit: number;
4040
sortField: string;
41-
kql?: string;
41+
kuery?: string;
4242
skip?: boolean;
4343
isLive?: boolean;
4444
}
@@ -50,7 +50,7 @@ export const useActionResults = ({
5050
direction,
5151
limit,
5252
sortField,
53-
kql,
53+
kuery,
5454
skip = false,
5555
isLive = false,
5656
}: UseActionResults) => {
@@ -65,7 +65,7 @@ export const useActionResults = ({
6565
{
6666
actionId,
6767
factoryQueryType: OsqueryQueries.actionResults,
68-
kql,
68+
kuery,
6969
pagination: generateTablePaginationOptions(activePage, limit),
7070
sort: {
7171
direction,

x-pack/plugins/osquery/public/actions/actions_table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const ActionsTableComponent = () => {
6262
const { data: actionsData } = useAllLiveQueries({
6363
activePage: pageIndex,
6464
limit: pageSize,
65-
kql: 'user_id: *',
65+
kuery: 'user_id: *',
6666
});
6767

6868
const onTableChange = useCallback(({ page = {} }) => {

x-pack/plugins/osquery/public/actions/use_all_live_queries.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface UseAllLiveQueriesConfig {
2020
direction?: Direction;
2121
limit?: number;
2222
sortField?: string;
23-
kql?: string;
23+
kuery?: string;
2424
skip?: boolean;
2525
alertId?: string;
2626
}
@@ -33,7 +33,7 @@ export const useAllLiveQueries = ({
3333
direction = Direction.desc,
3434
limit = 100,
3535
sortField = '@timestamp',
36-
kql,
36+
kuery,
3737
skip = false,
3838
alertId,
3939
}: UseAllLiveQueriesConfig) => {
@@ -51,7 +51,7 @@ export const useAllLiveQueries = ({
5151
{
5252
version: API_VERSIONS.public.v1,
5353
query: {
54-
kql,
54+
kuery,
5555
page: activePage,
5656
pageSize: limit,
5757
sort: sortField,

x-pack/plugins/osquery/public/actions/use_live_query_details.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { useErrorToast } from '../common/hooks/use_error_toast';
1717
interface UseLiveQueryDetails {
1818
actionId?: string;
1919
isLive?: boolean;
20-
kql?: string;
20+
kuery?: string;
2121
skip?: boolean;
2222
queryIds?: string[];
2323
}
@@ -53,7 +53,7 @@ export interface LiveQueryDetailsItem {
5353

5454
export const useLiveQueryDetails = ({
5555
actionId,
56-
kql,
56+
kuery,
5757
isLive = false,
5858
skip = false,
5959
queryIds, // enable finding out specific queries only, eg. in cases
@@ -62,7 +62,7 @@ export const useLiveQueryDetails = ({
6262
const setErrorToast = useErrorToast();
6363

6464
return useQuery<{ data: LiveQueryDetailsItem }, Error, LiveQueryDetailsItem>(
65-
['liveQueries', { actionId, kql, queryIds }],
65+
['liveQueries', { actionId, kuery, queryIds }],
6666
() => http.get(`/api/osquery/live_queries/${actionId}`, { version: API_VERSIONS.public.v1 }),
6767
{
6868
enabled: !skip && !!actionId,

x-pack/plugins/osquery/public/agents/use_agent_groups.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const useAgentGroups = () => {
4040
const responseData = await lastValueFrom(
4141
data.search.search<AgentsRequestOptions, AgentsStrategyResponse>(
4242
{
43-
kql: `policy_id: ( ${policiesQuery} )`,
43+
kuery: `policy_id: ( ${policiesQuery} )`,
4444
factoryQueryType: OsqueryQueries.agents,
4545
pagination: generateTablePaginationOptions(0, 9000),
4646
sort: {

0 commit comments

Comments
 (0)