-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement nodes list table in infra monitoring (#6615)
* feat: implement nodes list table in infra-monitoring * chore: update header props * chore: update columns * chore: add cluster name column * chore: update props * feat: implement group-by and quick select in node list table * feat: implement nested view * chore: styling changes * chore: fix expand issues * chore: fix bugs in node listing * feat: implement node details page (#6641) feat: implement node details page * chore: fix issues in pods * chore: fix issues in nodes * chore: fix table alignment issues * chore: fix filters issue * feat: update query for nodes section * chore: fix column alignment issues and show event expand data * chore: remove comments * chore: update node events logic --------- Co-authored-by: Yunus M <[email protected]>
- Loading branch information
1 parent
aad4cb1
commit 79cae2d
Showing
46 changed files
with
6,064 additions
and
372 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { ApiBaseInstance } from 'api'; | ||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler'; | ||
import { AxiosError } from 'axios'; | ||
import { ErrorResponse, SuccessResponse } from 'types/api'; | ||
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse'; | ||
import { TagFilter } from 'types/api/queryBuilder/queryBuilderData'; | ||
|
||
export interface K8sNodesListPayload { | ||
filters: TagFilter; | ||
groupBy?: BaseAutocompleteData[]; | ||
offset?: number; | ||
limit?: number; | ||
orderBy?: { | ||
columnName: string; | ||
order: 'asc' | 'desc'; | ||
}; | ||
} | ||
|
||
export interface K8sNodesData { | ||
nodeUID: string; | ||
nodeCPUUsage: number; | ||
nodeCPUAllocatable: number; | ||
nodeMemoryUsage: number; | ||
nodeMemoryAllocatable: number; | ||
meta: { | ||
k8s_node_name: string; | ||
k8s_node_uid: string; | ||
k8s_cluster_name: string; | ||
}; | ||
} | ||
|
||
export interface K8sNodesListResponse { | ||
status: string; | ||
data: { | ||
type: string; | ||
records: K8sNodesData[]; | ||
groups: null; | ||
total: number; | ||
sentAnyHostMetricsData: boolean; | ||
isSendingK8SAgentMetrics: boolean; | ||
}; | ||
} | ||
|
||
export const getK8sNodesList = async ( | ||
props: K8sNodesListPayload, | ||
signal?: AbortSignal, | ||
headers?: Record<string, string>, | ||
): Promise<SuccessResponse<K8sNodesListResponse> | ErrorResponse> => { | ||
try { | ||
const response = await ApiBaseInstance.post('/nodes/list', props, { | ||
signal, | ||
headers, | ||
}); | ||
|
||
return { | ||
statusCode: 200, | ||
error: null, | ||
message: 'Success', | ||
payload: response.data, | ||
params: props, | ||
}; | ||
} catch (error) { | ||
return ErrorResponseHandler(error as AxiosError); | ||
} | ||
}; |
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.