db test
This commit is contained in:
@@ -174,12 +174,12 @@ export const clearPackets = async (): Promise<any> => {
|
||||
};
|
||||
|
||||
export const fetchInterfaceHostAnalysis = async (
|
||||
sinceMinutes = 60,
|
||||
sinceMinutes: number | null = null,
|
||||
limitPerInterface = 100,
|
||||
): Promise<InterfaceHostAnalysisResponse> => {
|
||||
const res = await api.get<InterfaceHostAnalysisResponse>('/analysis/interface-hosts', {
|
||||
params: {
|
||||
since_minutes: sinceMinutes,
|
||||
since_minutes: sinceMinutes ?? undefined,
|
||||
limit_per_interface: limitPerInterface,
|
||||
},
|
||||
});
|
||||
@@ -187,13 +187,13 @@ export const fetchInterfaceHostAnalysis = async (
|
||||
};
|
||||
|
||||
export const fetchInterfaceHostProtocolAnalysis = async (
|
||||
sinceMinutes = 60,
|
||||
sinceMinutes: number | null = null,
|
||||
limitPerInterface = 50,
|
||||
limitProtocolsPerHost = 12,
|
||||
): Promise<InterfaceHostProtocolAnalysisResponse> => {
|
||||
const res = await api.get<InterfaceHostProtocolAnalysisResponse>('/analysis/interface-host-protocols', {
|
||||
params: {
|
||||
since_minutes: sinceMinutes,
|
||||
since_minutes: sinceMinutes ?? undefined,
|
||||
limit_per_interface: limitPerInterface,
|
||||
limit_protocols_per_host: limitProtocolsPerHost,
|
||||
},
|
||||
|
||||
@@ -544,7 +544,7 @@ function ProtocolHeatmap({ data }: { data: TopologyData }) {
|
||||
}
|
||||
|
||||
export default function Analysis(): ReactElement {
|
||||
const [sinceMinutes, setSinceMinutes] = useState(60);
|
||||
const [sinceMinutes, setSinceMinutes] = useState<number | null>(null);
|
||||
const [limitPerInterface, setLimitPerInterface] = useState(50);
|
||||
const [limitProtocolsPerHost, setLimitProtocolsPerHost] = useState(12);
|
||||
const [data, setData] = useState<InterfaceHostProtocolAnalysisResponse | null>(null);
|
||||
@@ -628,8 +628,14 @@ export default function Analysis(): ReactElement {
|
||||
<Space wrap size={[12, 12]}>
|
||||
<Space>
|
||||
<Text>Look back</Text>
|
||||
<InputNumber min={1} max={60 * 24 * 30} value={sinceMinutes} onChange={(value) => setSinceMinutes(value ?? 60)} />
|
||||
<Text type="secondary">minutes</Text>
|
||||
<InputNumber
|
||||
min={1}
|
||||
max={60 * 24 * 30}
|
||||
value={sinceMinutes}
|
||||
placeholder="All history"
|
||||
onChange={(value) => setSinceMinutes(value == null ? null : Number(value))}
|
||||
/>
|
||||
<Text type="secondary">minutes, blank = all history</Text>
|
||||
</Space>
|
||||
<Space>
|
||||
<Text>Max hosts per interface</Text>
|
||||
|
||||
Reference in New Issue
Block a user