locust-ui 1.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +169 -0
  3. package/lib/assets/favicon.png +0 -0
  4. package/lib/types/App.d.ts +2 -0
  5. package/lib/types/HtmlReport.d.ts +1 -0
  6. package/lib/types/assets/Logo.d.ts +4 -0
  7. package/lib/types/components/DataTable/DataTable.d.ts +13 -0
  8. package/lib/types/components/ExceptionsTable/ExceptionsTable.d.ts +10 -0
  9. package/lib/types/components/FailuresTable/FailuresTable.d.ts +10 -0
  10. package/lib/types/components/FallbackRender/FallbackRender.d.ts +6 -0
  11. package/lib/types/components/Form/Form.d.ts +9 -0
  12. package/lib/types/components/Form/Select.d.ts +13 -0
  13. package/lib/types/components/Layout/Footer/About.d.ts +2 -0
  14. package/lib/types/components/Layout/Footer/Footer.d.ts +2 -0
  15. package/lib/types/components/Layout/Layout.d.ts +7 -0
  16. package/lib/types/components/Layout/Navbar/DarkLightToggle.d.ts +2 -0
  17. package/lib/types/components/Layout/Navbar/Navbar.d.ts +2 -0
  18. package/lib/types/components/Layout/Navbar/SwarmMonitor.d.ts +11 -0
  19. package/lib/types/components/LineChart/LineChart.constants.d.ts +14 -0
  20. package/lib/types/components/LineChart/LineChart.d.ts +7 -0
  21. package/lib/types/components/LineChart/LineChart.types.d.ts +37 -0
  22. package/lib/types/components/LineChart/LineChart.utils.d.ts +69 -0
  23. package/lib/types/components/LogViewer/LogDisplay.d.ts +4 -0
  24. package/lib/types/components/LogViewer/LogViewer.d.ts +2 -0
  25. package/lib/types/components/LogViewer/LogViewer.utils.d.ts +1 -0
  26. package/lib/types/components/LogViewer/WorkerLogs.d.ts +5 -0
  27. package/lib/types/components/LogViewer/useLogViewer.d.ts +4 -0
  28. package/lib/types/components/Modal/Modal.d.ts +8 -0
  29. package/lib/types/components/Reports/Reports.d.ts +8 -0
  30. package/lib/types/components/ResponseTimeTable/ResponseTimeTable.d.ts +7 -0
  31. package/lib/types/components/StateButtons/EditButton.d.ts +2 -0
  32. package/lib/types/components/StateButtons/NewTestButton.d.ts +2 -0
  33. package/lib/types/components/StateButtons/ResetButton.d.ts +2 -0
  34. package/lib/types/components/StateButtons/StateButtons.d.ts +2 -0
  35. package/lib/types/components/StateButtons/StopButton.d.ts +2 -0
  36. package/lib/types/components/StatsTable/StatsTable.d.ts +23 -0
  37. package/lib/types/components/SwarmCharts/SwarmCharts.d.ts +10 -0
  38. package/lib/types/components/SwarmForm/SwarmCustomParameters.d.ts +7 -0
  39. package/lib/types/components/SwarmForm/SwarmEditForm.d.ts +14 -0
  40. package/lib/types/components/SwarmForm/SwarmForm.d.ts +13 -0
  41. package/lib/types/components/SwarmForm/SwarmUserClassPicker.d.ts +18 -0
  42. package/lib/types/components/SwarmRatios/SwarmRatios.d.ts +10 -0
  43. package/lib/types/components/Table/Table.d.ts +23 -0
  44. package/lib/types/components/Tabs/Tabs.constants.d.ts +72 -0
  45. package/lib/types/components/Tabs/Tabs.d.ts +23 -0
  46. package/lib/types/components/ViewColumnSelector/ViewColumnSelector.d.ts +10 -0
  47. package/lib/types/components/WorkersTable/WorkersTable.d.ts +10 -0
  48. package/lib/types/constants/auth.d.ts +3 -0
  49. package/lib/types/constants/logs.d.ts +1 -0
  50. package/lib/types/constants/swarm.d.ts +14 -0
  51. package/lib/types/constants/theme.d.ts +6 -0
  52. package/lib/types/hooks/useCreateTheme.d.ts +1 -0
  53. package/lib/types/hooks/useFetchExceptions.d.ts +1 -0
  54. package/lib/types/hooks/useFetchStats.d.ts +1 -0
  55. package/lib/types/hooks/useFetchTasks.d.ts +1 -0
  56. package/lib/types/hooks/useInterval.d.ts +4 -0
  57. package/lib/types/hooks/useNotifications.d.ts +4 -0
  58. package/lib/types/hooks/useSelectViewColumns.d.ts +8 -0
  59. package/lib/types/hooks/useSortByField.d.ts +9 -0
  60. package/lib/types/index.d.ts +1 -0
  61. package/lib/types/lib.d.ts +51 -0
  62. package/lib/types/pages/Auth.d.ts +3 -0
  63. package/lib/types/pages/Dashboard.d.ts +18 -0
  64. package/lib/types/pages/HtmlReport.d.ts +3 -0
  65. package/lib/types/redux/api/swarm.d.ts +11 -0
  66. package/lib/types/redux/hooks.d.ts +7 -0
  67. package/lib/types/redux/slice/logViewer.slice.d.ts +17 -0
  68. package/lib/types/redux/slice/notification.slice.d.ts +14 -0
  69. package/lib/types/redux/slice/root.slice.d.ts +87 -0
  70. package/lib/types/redux/slice/swarm.slice.d.ts +52 -0
  71. package/lib/types/redux/slice/theme.slice.d.ts +18 -0
  72. package/lib/types/redux/slice/ui.slice.d.ts +90 -0
  73. package/lib/types/redux/slice/url.slice.d.ts +20 -0
  74. package/lib/types/redux/store.d.ts +75 -0
  75. package/lib/types/redux/utils.d.ts +3 -0
  76. package/lib/types/styles/theme.d.ts +4 -0
  77. package/lib/types/types/auth.types.d.ts +10 -0
  78. package/lib/types/types/swarm.types.d.ts +46 -0
  79. package/lib/types/types/tab.types.d.ts +9 -0
  80. package/lib/types/types/table.types.d.ts +6 -0
  81. package/lib/types/types/ui.types.d.ts +96 -0
  82. package/lib/types/utils/array.d.ts +1 -0
  83. package/lib/types/utils/date.d.ts +1 -0
  84. package/lib/types/utils/number.d.ts +2 -0
  85. package/lib/types/utils/object.d.ts +6 -0
  86. package/lib/types/utils/string.d.ts +8 -0
  87. package/lib/types/utils/url.d.ts +6 -0
  88. package/lib/webui.js +60304 -0
  89. package/package.json +85 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2024, Andrew Baldwin, Lars Holmberg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # Locust UI
2
+
3
+ The Locust UI is used for viewing stats, reports, and information on your current Locust test from the browser.
4
+
5
+ ## Locust UI as a Library
6
+
7
+ **Using the Locust UI as a library should be considered an experimental feature**
8
+
9
+ The Locust UI may be extended to fit your needs. If you only need limited extensibility, you may do so in your Locustfile, see the [extend_web_ui example](https://github.com/locustio/locust/blob/master/examples/extend_web_ui.py).
10
+
11
+ However, you may want to further extend certain functionalities. To do so, you may replace the default Locust UI with your own React application. Start by installing the locust-ui in your React application:
12
+ ```sh
13
+ npm install locust-ui
14
+ ```
15
+ or
16
+ ```sh
17
+ yarn add locust-ui
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```js
23
+ import LocustUi from "locust-ui";
24
+
25
+ function App() {
26
+ return (
27
+ <LocustUi<"content-length", "content_length">
28
+ extendedTabs={[
29
+ {
30
+ title: "Content Length",
31
+ key: "content-length",
32
+ },
33
+ ]}
34
+ extendedTables={[
35
+ {
36
+ key: "content-length",
37
+ structure: [
38
+ { key: "name", title: "Name" },
39
+ { key: "content_length", title: "Total content length" },
40
+ ],
41
+ },
42
+ ]}
43
+ extendedReports={[
44
+ {
45
+ href: "/content-length/csv",
46
+ title: "Download content length statistics CSV",
47
+ },
48
+ ]}
49
+ extendedStats={[
50
+ {
51
+ key: "content-length",
52
+ data: [{ name: "/", safeName: "/", content_length: "123" }],
53
+ },
54
+ ]}
55
+ />
56
+ )
57
+ }
58
+ ```
59
+
60
+ For Locust to be able to pass data to your React frontend, place the following script tag in your html template file:
61
+ ```html
62
+ <script>
63
+ window.templateArgs = {{ template_args|tojson }}
64
+ </script>
65
+ ```
66
+
67
+ To load the favicon, place the link in your head:
68
+ ```html
69
+ <link rel="icon" href="./assets/favicon.png" />
70
+ ```
71
+
72
+ Lastly, you must configure Locust to point to your own React build output. To achieve this, you can use the flag `--build-path` and provide the **absolute** path to your build directory.
73
+
74
+ ```sh
75
+ locust -f locust.py --build-path /home/user/custom-webui/dist
76
+ ```
77
+
78
+ For more on configuring Locust see [the Locust docs](https://docs.locust.io/en/stable/configuration.html).
79
+
80
+ ### Customizing Tabs
81
+ By default, the extended tabs will display the provided data in a table. However you may choose to render any React component in the tab:
82
+ ```js
83
+ import { IRootState } from "locust-webui";
84
+ import { useSelector } from "react-redux";
85
+
86
+ function MyCustomTab() {
87
+ const extendedStats = useSelector(
88
+ ({ ui: { extendedStats } }: IRootState) => extendedStats
89
+ );
90
+
91
+ return <div>{JSON.stringify(extendedStats)}</div>;
92
+ }
93
+
94
+ const extendedTabs = {[
95
+ {
96
+ title: "Content Length",
97
+ key: "content-length",
98
+ component: MyCustomTab
99
+ },
100
+ ]};
101
+
102
+ function App() {
103
+ return (
104
+ <LocustUi extendedTabs={extendedTabs} />
105
+ )
106
+ }
107
+ ```
108
+
109
+ The `tabs` prop allows for complete control of which tabs are rendered. You can then customize which base tabs are shown or where your new tab should be placed:
110
+ ```js
111
+ import LocustUi, { tabConfig } from "locust-ui";
112
+
113
+ const tabs = [
114
+ tabConfig.stats,
115
+ tabConfig.charts,
116
+ {
117
+ title: "Custom Tab",
118
+ key: "custom-tab",
119
+ component: MyCustomTab,
120
+ },
121
+ ]
122
+
123
+ function App() {
124
+ return (
125
+ <LocustUi tabs={tabs} />
126
+ )
127
+ }
128
+ ```
129
+
130
+ ### API
131
+ **Tab**
132
+ ```js
133
+ {
134
+ title: string; // **Required** Any string for display purposes
135
+ key: string; // **Required** Programatic key used in extendedTabs to find corresponding stats and tables
136
+ component: // **Optional** React component to render
137
+ shouldDisplayTab: // **Optional** Function provided with Locust redux state to output boolean
138
+ }
139
+ ```
140
+ **Extended Stat**
141
+ ```js
142
+ {
143
+ key: string; // **Required** Programatic key that must correspond to a tab key
144
+ data: {
145
+ [key: string]: string; // The key must have a corresponding entry in the extended table structure. The value corresponds to the data to be displayed
146
+ }[];
147
+ }
148
+ ```
149
+ **Extended Table**
150
+ ```js
151
+ {
152
+ key: string; // **Required** Programatic key that must correspond to a tab key
153
+ structure: {
154
+ key: string; // **Required** key that must correspond to a key in the extended stat data object
155
+ title: string; // **Required** Corresponds to the title of the column in the table
156
+ }[]
157
+ }
158
+ ```
159
+ **Locust UI**
160
+ ```js
161
+ // Provide the types for your extended tab and stat keys to get helpful type hints
162
+ <LocustUI<ExtendedTabType, StatKey>
163
+ extendedTabs={/* Optional array of extended tabs */}
164
+ extendedTables={/* Optional array of extended tables */}
165
+ extendedReports={/* Optional array of extended reports */}
166
+ extendedStats={/* Optional array of extended stats */}
167
+ tabs={/* Optional array of tabs that will take precedence over extendedTabs */}
168
+ />
169
+ ```
Binary file
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function App(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export default function Logo({ lightModeBackgroundColor }: {
3
+ lightModeBackgroundColor?: string;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { ITableStructure } from '../../types/table.types';
2
+ import { IExtendedStatData } from '../../types/ui.types';
3
+
4
+ interface IDataTable {
5
+ rows: IExtendedStatData[] | never[];
6
+ tableStructure: ITableStructure[] | null;
7
+ }
8
+ declare function DataTable({ rows, tableStructure }: IDataTable): import("react").JSX.Element | null;
9
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof DataTable, {
10
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
11
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
12
+ }>;
13
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ISwarmException } from '../../types/ui.types';
2
+
3
+ export declare function ExceptionsTable({ exceptions }: {
4
+ exceptions: ISwarmException[];
5
+ }): import("react").JSX.Element;
6
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof ExceptionsTable, {
7
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
8
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
9
+ }>;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ISwarmError } from '../../types/ui.types';
2
+
3
+ export declare function FailuresTable({ errors }: {
4
+ errors: ISwarmError[];
5
+ }): import("react").JSX.Element;
6
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof FailuresTable, {
7
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
8
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
9
+ }>;
10
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export default function FallbackRender({ error }: {
3
+ error: {
4
+ message?: string;
5
+ };
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export type BaseInputData = Record<string, any>;
3
+ interface IForm<IInputData extends BaseInputData> {
4
+ children: React.ReactElement | React.ReactElement[];
5
+ className?: string;
6
+ onSubmit: (inputData: IInputData) => void;
7
+ }
8
+ export default function Form<IInputData extends BaseInputData>({ children, onSubmit, }: IForm<IInputData>): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import { SxProps, SelectProps } from '../../@mui/material';
2
+
3
+ interface ISelect extends SelectProps {
4
+ label: string;
5
+ name: string;
6
+ options: string[];
7
+ multiple?: boolean;
8
+ defaultValue?: string | string[];
9
+ sx?: SxProps;
10
+ onChange?: SelectProps['onChange'];
11
+ }
12
+ export default function Select({ label, name, options, multiple, defaultValue, sx, ...inputProps }: ISelect): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function About(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function Footer(): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from '../../react';
2
+
3
+ interface ILayout {
4
+ children: ReactNode;
5
+ }
6
+ export default function Layout({ children }: ILayout): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function DarkLightToggle(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function Navbar(): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ISwarmState } from '../../../redux/slice/swarm.slice';
2
+ import { IUiState } from '../../../redux/slice/ui.slice';
3
+
4
+ interface ISwarmMonitor extends Pick<ISwarmState, 'isDistributed' | 'host' | 'state' | 'workerCount'>, Pick<IUiState, 'totalRps' | 'failRatio' | 'userCount'> {
5
+ }
6
+ declare function SwarmMonitor({ isDistributed, state, host, totalRps, failRatio, userCount, workerCount, }: ISwarmMonitor): import("react").JSX.Element;
7
+ declare const _default: import('../../../react-redux').ConnectedComponent<typeof SwarmMonitor, {
8
+ context?: import('../../../react').Context<import('../../../react-redux').ReactReduxContextValue<any, import('../../../redux').UnknownAction> | null> | undefined;
9
+ store?: import('../../../redux').Store<any, import('../../../redux').UnknownAction, unknown> | undefined;
10
+ }>;
11
+ export default _default;
@@ -0,0 +1,14 @@
1
+ export declare const CHART_THEME: {
2
+ DARK: {
3
+ textColor: string;
4
+ axisColor: string;
5
+ backgroundColor: string;
6
+ splitLine: string;
7
+ };
8
+ LIGHT: {
9
+ textColor: string;
10
+ axisColor: string;
11
+ backgroundColor: string;
12
+ splitLine: string;
13
+ };
14
+ };
@@ -0,0 +1,7 @@
1
+ import { ILineChart, ILineChartMarkers, ILineChartTimeAxis } from './LineChart.types';
2
+
3
+ interface IBaseChartType extends ILineChartMarkers, ILineChartTimeAxis {
4
+ [key: string]: any;
5
+ }
6
+ export default function LineChart<ChartType extends IBaseChartType>({ charts, title, lines, colors, chartValueFormatter, splitAxis, yAxisLabels, scatterplot, }: ILineChart<ChartType>): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,37 @@
1
+ export interface ILine<ChartType> {
2
+ name: string;
3
+ key: keyof ChartType;
4
+ stack?: string;
5
+ areaStyle?: {
6
+ [key: string]: any;
7
+ };
8
+ yAxisIndex?: number;
9
+ }
10
+ export interface ILineChart<ChartType> {
11
+ charts: ChartType;
12
+ title: string;
13
+ lines: ILine<ChartType>[];
14
+ colors?: string[];
15
+ chartValueFormatter?: (value?: any) => string | number;
16
+ splitAxis?: boolean;
17
+ yAxisLabels?: string | [string, string];
18
+ scatterplot?: boolean;
19
+ }
20
+ export interface ILineChartZoomEvent {
21
+ batch?: {
22
+ start: number;
23
+ end: number;
24
+ }[];
25
+ }
26
+ export interface ILineChartMarkers {
27
+ markers?: string[];
28
+ }
29
+ export interface ILineChartTimeAxis {
30
+ time: string[];
31
+ }
32
+ export interface ILineChartTooltipFormatterParams {
33
+ axisValue: string;
34
+ color: string;
35
+ seriesName: string;
36
+ value: string | number | [string, number];
37
+ }
@@ -0,0 +1,69 @@
1
+ import { ECharts, DefaultLabelFormatterCallbackParams, LineSeriesOption, YAXisComponentOption, ScatterSeriesOption } from '../../echarts';
2
+ import { ILineChart, ILineChartTooltipFormatterParams } from './LineChart.types';
3
+ import { ICharts } from '../../types/ui.types';
4
+
5
+ export declare const getSeriesData: <ChartType>({ charts, lines, scatterplot, }: Pick<ILineChart<ChartType>, "charts" | "lines" | "scatterplot">) => LineSeriesOption[] | ScatterSeriesOption[];
6
+ export declare const createOptions: <ChartType extends Pick<ICharts, "time">>({ charts, title, lines, colors, chartValueFormatter, splitAxis, yAxisLabels, scatterplot, }: ILineChart<ChartType>) => {
7
+ title: {
8
+ text: string;
9
+ };
10
+ dataZoom: {
11
+ type: string;
12
+ start: number;
13
+ end: number;
14
+ }[];
15
+ tooltip: {
16
+ trigger: string;
17
+ formatter: (params?: ILineChartTooltipFormatterParams[] | null) => string;
18
+ borderWidth: number;
19
+ };
20
+ xAxis: {
21
+ type: string;
22
+ startValue: string;
23
+ axisLabel: {
24
+ formatter: (value: string) => string;
25
+ };
26
+ };
27
+ grid: {
28
+ left: number;
29
+ right: number;
30
+ };
31
+ yAxis: YAXisComponentOption | YAXisComponentOption[];
32
+ series: LineSeriesOption[] | ScatterSeriesOption[];
33
+ color: string[] | undefined;
34
+ toolbox: {
35
+ right: number;
36
+ feature: {
37
+ dataZoom: {
38
+ show: boolean;
39
+ title: {
40
+ zoom: string;
41
+ back: string;
42
+ };
43
+ };
44
+ saveAsImage: {
45
+ name: string;
46
+ title: string;
47
+ emphasis: {
48
+ iconStyle: {
49
+ textPosition: string;
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ };
56
+ export declare const createMarkLine: <ChartType extends Pick<ICharts, "markers">>(charts: ChartType, isDarkMode: boolean) => {
57
+ symbol: string;
58
+ label: {
59
+ formatter: (params: DefaultLabelFormatterCallbackParams) => string;
60
+ padding: number[];
61
+ };
62
+ lineStyle: {
63
+ color: string;
64
+ };
65
+ data: {
66
+ xAxis: string;
67
+ }[];
68
+ };
69
+ export declare const onChartZoom: (chart: ECharts) => (datazoom: unknown) => void;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export default function LogDisplay({ log }: {
3
+ log: string;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function LogViewer(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const isImportantLog: (log: string) => boolean;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export default function WorkerLogs({ workerId, logs }: {
3
+ workerId: string;
4
+ logs: string[];
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function useLogViewer(): import('../../../../types/ui.types').ILogsResponse | {
2
+ master: never[];
3
+ workers: {};
4
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface IModal {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ children?: React.ReactElement | React.ReactElement[];
6
+ }
7
+ export default function Modal({ open, onClose, children }: IModal): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ISwarmState } from '../../redux/slice/swarm.slice';
2
+
3
+ declare function Reports({ extendedCsvFiles, statsHistoryEnabled, }: Pick<ISwarmState, 'extendedCsvFiles' | 'statsHistoryEnabled'>): import("react").JSX.Element;
4
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof Reports, {
5
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
6
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
7
+ }>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { IResponseTime } from '../../types/ui.types';
2
+
3
+ interface IResponseTimeTable {
4
+ responseTimes: IResponseTime[];
5
+ }
6
+ export default function ResponseTimeTable({ responseTimes }: IResponseTimeTable): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function EditButton(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function NewTestButton(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function ResetButton(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function StateButtons(): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function StopButton(): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { ITableStructure } from '../../types/table.types';
2
+ import { ISwarmStat } from '../../types/ui.types';
3
+
4
+ export declare const baseTableStructure: ({
5
+ key: string;
6
+ title: string;
7
+ round?: undefined;
8
+ } | {
9
+ key: string;
10
+ title: string;
11
+ round: number;
12
+ })[];
13
+ interface IStatsTable {
14
+ stats: ISwarmStat[];
15
+ tableStructure?: ITableStructure[];
16
+ }
17
+ export declare function StatsTable({ stats, tableStructure }: IStatsTable): import("react").JSX.Element;
18
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof StatsTable, {
19
+ tableStructure?: ITableStructure[] | undefined;
20
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
21
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
22
+ }>;
23
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ICharts } from '../../types/ui.types';
2
+
3
+ export declare function SwarmCharts({ charts }: {
4
+ charts: ICharts;
5
+ }): import("react").JSX.Element;
6
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof SwarmCharts, {
7
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
8
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
9
+ }>;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { IExtraOptions } from '../../types/swarm.types';
2
+
3
+ interface ICustomParameters {
4
+ extraOptions: IExtraOptions;
5
+ }
6
+ export default function CustomParameters({ extraOptions }: ICustomParameters): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ISwarmState } from '../../redux/slice/swarm.slice';
2
+
3
+ type ISwarmFormInput = Pick<ISwarmState, 'spawnRate' | 'userCount'>;
4
+ interface ISwarmForm extends ISwarmFormInput {
5
+ onSubmit: () => void;
6
+ setSwarm: (swarmPayload: Partial<ISwarmState>) => void;
7
+ }
8
+ declare function SwarmEditForm({ onSubmit, userCount, spawnRate, setSwarm }: ISwarmForm): import("react").JSX.Element;
9
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof SwarmEditForm, {
10
+ onSubmit: () => void;
11
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
12
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
13
+ }>;
14
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { ISwarmState } from '../../redux/slice/swarm.slice';
2
+
3
+ interface IDispatchProps {
4
+ setSwarm: (swarmPayload: Partial<ISwarmState>) => void;
5
+ }
6
+ interface ISwarmForm extends IDispatchProps, Pick<ISwarmState, 'availableShapeClasses' | 'availableUserClasses' | 'extraOptions' | 'isShape' | 'host' | 'overrideHostWarning' | 'runTime' | 'showUserclassPicker' | 'spawnRate' | 'numUsers'> {
7
+ }
8
+ declare function SwarmForm({ availableShapeClasses, availableUserClasses, host, extraOptions, isShape, numUsers, overrideHostWarning, runTime, setSwarm, showUserclassPicker, spawnRate, }: ISwarmForm): import("react").JSX.Element;
9
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof SwarmForm, {
10
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
11
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
12
+ }>;
13
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { ISwarmState } from '../../redux/slice/swarm.slice';
2
+
3
+ interface IDispatchProps {
4
+ setSwarm: (swarmPayload: Partial<ISwarmState>) => void;
5
+ }
6
+ interface IUserClassPicker extends IDispatchProps, Pick<ISwarmState, 'availableUserClasses' | 'availableUserTasks' | 'users'> {
7
+ selectedUserClasses: string[];
8
+ setSelectedUserClasses: (userClasses: string[]) => void;
9
+ }
10
+ declare function SwarmUserClassPicker({ availableUserClasses, availableUserTasks, selectedUserClasses, setSelectedUserClasses, setSwarm, users, }: IUserClassPicker): import("react").JSX.Element;
11
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof SwarmUserClassPicker, {
12
+ availableUserClasses: string[];
13
+ selectedUserClasses: string[];
14
+ setSelectedUserClasses: (userClasses: string[]) => void;
15
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
16
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
17
+ }>;
18
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { IUiState } from '../../redux/slice/ui.slice';
2
+
3
+ export declare function SwarmRatios({ ratios: { perClass, total } }: {
4
+ ratios: IUiState['ratios'];
5
+ }): import("react").JSX.Element | null;
6
+ declare const _default: import('../../react-redux').ConnectedComponent<typeof SwarmRatios, {
7
+ context?: import('../../react').Context<import('../../react-redux').ReactReduxContextValue<any, import('../../redux').UnknownAction> | null> | undefined;
8
+ store?: import('../../redux').Store<any, import('../../redux').UnknownAction, unknown> | undefined;
9
+ }>;
10
+ export default _default;