-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Stack Monitoring] Converts logstash api routes to typescript (#131946)
* converts logstash api routes to typescript * fixes register routes function names * fixes cluster and node pipelines routes * fixes types
- Loading branch information
1 parent
178773f
commit fa607d1
Showing
24 changed files
with
457 additions
and
339 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
x-pack/plugins/monitoring/common/http_api/logstash/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export * from './post_logstash_node'; | ||
export * from './post_logstash_nodes'; | ||
export * from './post_logstash_overview'; | ||
export * from './post_logstash_pipeline'; | ||
export * from './post_logstash_pipeline_cluster_ids'; | ||
export * from './post_logstash_cluster_pipelines'; | ||
export * from './post_logstash_node_pipelines'; |
25 changes: 25 additions & 0 deletions
25
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_cluster_pipelines.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT, paginationRT, sortingRT } from '../shared'; | ||
|
||
export const postLogstashClusterPipelinesRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
}); | ||
|
||
export const postLogstashClusterPipelinesRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
sort: sortingRT, | ||
queryText: rt.string, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
pagination: paginationRT, | ||
}), | ||
]); |
24 changes: 24 additions & 0 deletions
24
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_node.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT } from '../shared'; | ||
|
||
export const postLogstashNodeRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
logstashUuid: rt.string, | ||
}); | ||
|
||
export const postLogstashNodeRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
is_advanced: rt.boolean, | ||
}), | ||
]); |
26 changes: 26 additions & 0 deletions
26
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_node_pipelines.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT, paginationRT, sortingRT } from '../shared'; | ||
|
||
export const postLogstashNodePipelinesRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
logstashUuid: rt.string, | ||
}); | ||
|
||
export const postLogstashNodePipelinesRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
sort: sortingRT, | ||
queryText: rt.string, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
pagination: paginationRT, | ||
}), | ||
]); |
22 changes: 22 additions & 0 deletions
22
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_nodes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT } from '../shared'; | ||
|
||
export const postLogstashNodesRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
}); | ||
|
||
export const postLogstashNodesRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
}), | ||
]); |
22 changes: 22 additions & 0 deletions
22
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_overview.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT } from '../shared'; | ||
|
||
export const postLogstashOverviewRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
}); | ||
|
||
export const postLogstashOverviewRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
}), | ||
]); |
24 changes: 24 additions & 0 deletions
24
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_pipeline.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT } from '../shared'; | ||
|
||
export const postLogstashPipelineRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
pipelineId: rt.string, | ||
pipelineHash: rt.union([rt.string, rt.undefined]), | ||
}); | ||
|
||
export const postLogstashPipelineRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
}), | ||
rt.partial({ | ||
detailVertexId: rt.string, | ||
}), | ||
]); |
22 changes: 22 additions & 0 deletions
22
x-pack/plugins/monitoring/common/http_api/logstash/post_logstash_pipeline_cluster_ids.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import * as rt from 'io-ts'; | ||
import { clusterUuidRT, ccsRT, timeRangeRT } from '../shared'; | ||
|
||
export const postLogstashPipelineClusterIdsRequestParamsRT = rt.type({ | ||
clusterUuid: clusterUuidRT, | ||
}); | ||
|
||
export const postLogstashPipelineClusterIdsRequestPayloadRT = rt.intersection([ | ||
rt.partial({ | ||
ccs: ccsRT, | ||
}), | ||
rt.type({ | ||
timeRange: timeRangeRT, | ||
}), | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.