-
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.
Browse files
Browse the repository at this point in the history
* feat: added the host list view and filters (#6210) * feat: added the host list view and filters * feat: removed group by filter and added autocomplete for where clause * feat: updated the table view and added the pagination * feat: pass updated filters to api to get filtered data in the list * feat: added global time range and order by for cpu,memory,iowait,load * feat: added order by and color codes for cpu and memory usage progress bar * refactor: removed inline styles * Host lists improvement (#6366) * style: added new style changes for date time selection in host lists view * style: added padding to date time selector * style: removed unnecessary styles for host tabs * style: removed unused css * feat: added the host detail view (#6267) * Host containers (#6297) * feat: added the host detail view * feat: completed containers and processes details view * Show host metrics panels in metrics tab. (#6306) * feat: added the host detail view * feat: completed containers and processes details view * feat: added host metrics panels in metrics tabs * refactor: removed inline styles from host containers and processes tabs * style: added top and bottom margin to containers and processes tab * Metrics time selection (#6360) * feat: added the host detail view * feat: completed containers and processes details view * feat: added host metrics panels in metrics tabs * refactor: removed inline styles from host containers and processes tabs * feat: added logs and traces tab in host metrics detail view * chore: removed console statements * feat: added DateTimeSelection component in metrics tab * style: added top and bottom margin to containers and processes tab * style: removed inline styles * feat: added logs and traces tab in host metrics detail view (#6359) * feat: added the host detail view * feat: completed containers and processes details view * feat: added host metrics panels in metrics tabs * refactor: removed inline styles from host containers and processes tabs * feat: added logs and traces tab in host metrics detail view * chore: removed console statements * feat: added filters and time selection in traces tab * fix: resolved metrics,logs and traces tab issues * feat: added navigation for logs and traces to respective explorer pages * fix: added the code for logs tab and navigation to respective explorer page * fix: added fixes for date time selection custom issue * style: added styles for light mode * refactor: removed unused code and added comments * refactor: added new code for host metric attribute keys * feat: reset query data once we are on infra monitoring page * chore: remove optional parameter from get attributes and groupby interfaces * feat: update ui as per the designs * fix: logs list, time select and other ui issues * feat: update title for infra monitoring page * feat: update copies * feat: update styles for light mode * fix: reset page size on filter, open explorers in new tab, enable horizontal scroll * feat: traces tab updates * feat: move infra monitoring behind ff * fix: remove sorting from host listing page --------- Co-authored-by: Yunus M <[email protected]> * chore: fix lint errors --------- Co-authored-by: rahulkeswani101 <[email protected]>
- Loading branch information
1 parent
2dad9a3
commit e450569
Showing
66 changed files
with
3,681 additions
and
60 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
{ | ||
"containers_visualization_message": "The ability to visualise containers is in active development and should be available to you soon.", | ||
"processes_visualization_message": "The ability to visualise processes is in active development and should be available to you soon.", | ||
"working_message": "We're working to extend infrastructure monitoring to take care of a bunch of different cases. Thank you for your patience.", | ||
"waitlist_message": "Join the waitlist for early access or contact support.", | ||
"contact_support": "Contact Support" | ||
} |
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,7 @@ | ||
{ | ||
"containers_visualization_message": "The ability to visualise containers is in active development and should be available to you soon.", | ||
"processes_visualization_message": "The ability to visualise processes is in active development and should be available to you soon.", | ||
"working_message": "We're working to extend infrastructure monitoring to take care of a bunch of different cases. Thank you for your patience.", | ||
"waitlist_message": "Join the waitlist for early access or contact support.", | ||
"contact_support": "Contact Support" | ||
} |
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
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,37 @@ | ||
import { ApiBaseInstance } from 'api'; | ||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler'; | ||
import { AxiosError, AxiosResponse } from 'axios'; | ||
import { baseAutoCompleteIdKeysOrder } from 'constants/queryBuilder'; | ||
import { createIdFromObjectFields } from 'lib/createIdFromObjectFields'; | ||
import { ErrorResponse, SuccessResponse } from 'types/api'; | ||
import { | ||
BaseAutocompleteData, | ||
IQueryAutocompleteResponse, | ||
} from 'types/api/queryBuilder/queryAutocompleteResponse'; | ||
|
||
export const getHostAttributeKeys = async ( | ||
searchText = '', | ||
): Promise<SuccessResponse<IQueryAutocompleteResponse> | ErrorResponse> => { | ||
try { | ||
const response: AxiosResponse<{ | ||
data: IQueryAutocompleteResponse; | ||
}> = await ApiBaseInstance.get( | ||
`/hosts/attribute_keys?dataSource=metrics&searchText=${searchText}`, | ||
); | ||
|
||
const payload: BaseAutocompleteData[] = | ||
response.data.data.attributeKeys?.map(({ id: _, ...item }) => ({ | ||
...item, | ||
id: createIdFromObjectFields(item, baseAutoCompleteIdKeysOrder), | ||
})) || []; | ||
|
||
return { | ||
statusCode: 200, | ||
error: null, | ||
message: response.statusText, | ||
payload: { attributeKeys: payload }, | ||
}; | ||
} catch (e) { | ||
return ErrorResponseHandler(e 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
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 HostListPayload { | ||
filters: TagFilter; | ||
groupBy: BaseAutocompleteData[]; | ||
offset?: number; | ||
limit?: number; | ||
orderBy?: { | ||
columnName: string; | ||
order: 'asc' | 'desc'; | ||
}; | ||
} | ||
|
||
export interface TimeSeriesValue { | ||
timestamp: number; | ||
value: string; | ||
} | ||
|
||
export interface TimeSeries { | ||
labels: Record<string, string>; | ||
labelsArray: Array<Record<string, string>>; | ||
values: TimeSeriesValue[]; | ||
} | ||
|
||
export interface HostData { | ||
hostName: string; | ||
active: boolean; | ||
os: string; | ||
cpu: number; | ||
cpuTimeSeries: TimeSeries; | ||
memory: number; | ||
memoryTimeSeries: TimeSeries; | ||
wait: number; | ||
waitTimeSeries: TimeSeries; | ||
load15: number; | ||
load15TimeSeries: TimeSeries; | ||
} | ||
|
||
export interface HostListResponse { | ||
status: string; | ||
data: { | ||
type: string; | ||
records: HostData[]; | ||
groups: null; | ||
total: number; | ||
}; | ||
} | ||
|
||
export const getHostLists = async ( | ||
props: HostListPayload, | ||
signal?: AbortSignal, | ||
headers?: Record<string, string>, | ||
): Promise<SuccessResponse<HostListResponse> | ErrorResponse> => { | ||
try { | ||
const response = await ApiBaseInstance.post('/hosts/list', props, { | ||
signal, | ||
headers, | ||
}); | ||
|
||
return { | ||
statusCode: 200, | ||
error: null, | ||
message: 'Success', | ||
payload: response.data, | ||
params: props, | ||
}; | ||
} catch (error) { | ||
return ErrorResponseHandler(error as AxiosError); | ||
} | ||
}; |
38 changes: 38 additions & 0 deletions
38
frontend/src/api/infraMonitoring/getInfraAttributeValues.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,38 @@ | ||
import { ApiBaseInstance } from 'api'; | ||
import { ErrorResponseHandler } from 'api/ErrorResponseHandler'; | ||
import { AxiosError } from 'axios'; | ||
import createQueryParams from 'lib/createQueryParams'; | ||
import { ErrorResponse, SuccessResponse } from 'types/api'; | ||
import { | ||
IAttributeValuesResponse, | ||
IGetAttributeValuesPayload, | ||
} from 'types/api/queryBuilder/getAttributesValues'; | ||
|
||
export const getInfraAttributesValues = async ({ | ||
dataSource, | ||
attributeKey, | ||
filterAttributeKeyDataType, | ||
tagType, | ||
searchText, | ||
}: IGetAttributeValuesPayload): Promise< | ||
SuccessResponse<IAttributeValuesResponse> | ErrorResponse | ||
> => { | ||
try { | ||
const response = await ApiBaseInstance.get( | ||
`/hosts/attribute_values?${createQueryParams({ | ||
dataSource, | ||
attributeKey, | ||
searchText, | ||
})}&filterAttributeKeyDataType=${filterAttributeKeyDataType}&tagType=${tagType}`, | ||
); | ||
|
||
return { | ||
statusCode: 200, | ||
error: null, | ||
message: response.data.status, | ||
payload: response.data.data, | ||
}; | ||
} 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
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
48 changes: 48 additions & 0 deletions
48
frontend/src/components/HostMetricsDetail/Containers/Containers.styles.scss
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,48 @@ | ||
.host-containers { | ||
max-width: 600px; | ||
margin: 150px auto; | ||
padding: 0 16px; | ||
|
||
.infra-container-card { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
|
||
.infra-container-card-text { | ||
font-size: var(--font-size-sm); | ||
color: var(--text-vanilla-400); | ||
line-height: 20px; | ||
letter-spacing: -0.07px; | ||
width: 400px; | ||
font-family: 'Inter'; | ||
margin-top: 12px; | ||
} | ||
|
||
.infra-container-working-msg { | ||
display: flex; | ||
width: 400px; | ||
padding: 12px; | ||
align-items: flex-start; | ||
gap: 12px; | ||
border-radius: 4px; | ||
background: rgba(171, 189, 255, 0.04); | ||
|
||
.ant-space { | ||
align-items: flex-start; | ||
} | ||
} | ||
|
||
.infra-container-contact-support-btn { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: auto; | ||
} | ||
} | ||
|
||
.lightMode { | ||
.infra-container-card-text { | ||
color: var(--text-ink-200); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
frontend/src/components/HostMetricsDetail/Containers/Containers.tsx
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,36 @@ | ||
import './Containers.styles.scss'; | ||
|
||
import { Space, Typography } from 'antd'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const { Text } = Typography; | ||
|
||
function Containers(): JSX.Element { | ||
const { t } = useTranslation(['infraMonitoring']); | ||
|
||
return ( | ||
<Space direction="vertical" className="host-containers" size={24}> | ||
<div className="infra-container-card"> | ||
<img | ||
src="/Icons/infraContainers.svg" | ||
alt="infra-container" | ||
width={32} | ||
height={32} | ||
/> | ||
|
||
<Text className="infra-container-card-text"> | ||
{t('containers_visualization_message')} | ||
</Text> | ||
</div> | ||
|
||
<div className="infra-container-working-msg"> | ||
<Space> | ||
<img src="/Icons/broom.svg" alt="broom" width={16} height={16} /> | ||
<Text className="infra-container-card-text">{t('working_message')}</Text> | ||
</Space> | ||
</div> | ||
</Space> | ||
); | ||
} | ||
|
||
export default Containers; |
7 changes: 7 additions & 0 deletions
7
frontend/src/components/HostMetricsDetail/HostMetricDetail.interfaces.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,7 @@ | ||
import { HostData } from 'api/infraMonitoring/getHostLists'; | ||
|
||
export type HostDetailProps = { | ||
host: HostData | null; | ||
isModalTimeSelection: boolean; | ||
onClose: () => void; | ||
}; |
Oops, something went wrong.