+
+ {isError &&
{data?.error || 'Something went wrong'}}
+
+ {isDataPresent && filters.items.length === 0 && (
+
+ )}
+
+ {!isFetching &&
+ !isLoading &&
+ formattedHostMetricsData.length === 0 &&
+ filters.items.length > 0 && (
+
No hosts match the applied filters.
+ )}
+
+ {!isError && (
+
} />,
+ }}
+ tableLayout="fixed"
+ rowKey={(record): string => record.hostName}
+ onChange={handleTableChange}
+ onRow={(record): { onClick: () => void; className: string } => ({
+ onClick: (): void => handleRowClick(record),
+ className: 'clickable-row',
+ })}
+ />
+ )}
+
+
+
+ );
+}
+
+export default HostsList;
diff --git a/frontend/src/container/InfraMonitoringHosts/HostsListControls.tsx b/frontend/src/container/InfraMonitoringHosts/HostsListControls.tsx
new file mode 100644
index 0000000000..359248bb2a
--- /dev/null
+++ b/frontend/src/container/InfraMonitoringHosts/HostsListControls.tsx
@@ -0,0 +1,64 @@
+import './InfraMonitoring.styles.scss';
+
+import QueryBuilderSearch from 'container/QueryBuilder/filters/QueryBuilderSearch';
+import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';
+import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
+import { useCallback, useMemo } from 'react';
+import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';
+
+function HostsListControls({
+ handleFiltersChange,
+}: {
+ handleFiltersChange: (value: IBuilderQuery['filters']) => void;
+}): JSX.Element {
+ const { currentQuery } = useQueryBuilder();
+ const updatedCurrentQuery = useMemo(
+ () => ({
+ ...currentQuery,
+ builder: {
+ ...currentQuery.builder,
+ queryData: [
+ {
+ ...currentQuery.builder.queryData[0],
+ aggregateOperator: 'noop',
+ aggregateAttribute: {
+ ...currentQuery.builder.queryData[0].aggregateAttribute,
+ },
+ },
+ ],
+ },
+ }),
+ [currentQuery],
+ );
+ const query = updatedCurrentQuery?.builder?.queryData[0] || null;
+
+ const handleChangeTagFilters = useCallback(
+ (value: IBuilderQuery['filters']) => {
+ handleFiltersChange(value);
+ },
+ [handleFiltersChange],
+ );
+
+ return (
+