@oneuptime/common 7.0.2990 → 7.0.2994
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.
- package/Server/Infrastructure/Queue.ts +36 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +4 -17
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +1005 -0
- package/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.ts +3 -0
- package/UI/Components/Charts/ChartLibrary/Utils/ChartColors.ts +117 -0
- package/UI/Components/Charts/ChartLibrary/Utils/Cx.ts +8 -0
- package/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.ts +15 -0
- package/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.ts +19 -0
- package/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.ts +17 -0
- package/UI/Components/Charts/Line/LineChart.tsx +58 -225
- package/UI/Components/Charts/Types/ChartCurve.ts +7 -0
- package/UI/Components/Charts/Types/DataPoint.ts +7 -0
- package/UI/Components/Charts/Types/SeriesPoint.ts +7 -0
- package/UI/Components/Charts/Types/SeriesPoints.ts +6 -0
- package/UI/Components/Charts/Types/XAxis/XAxis.ts +21 -0
- package/UI/Components/Charts/Types/XAxis/XAxisMaxMin.ts +3 -0
- package/UI/Components/Charts/Types/XAxis/XAxisPrecision.ts +26 -0
- package/UI/Components/Charts/Types/XAxis/XAxisType.ts +6 -0
- package/UI/Components/Charts/Types/XValue.ts +3 -0
- package/UI/Components/Charts/Types/YAxis/YAxis.ts +22 -0
- package/UI/Components/Charts/Types/YAxis/YAxisMaxMin.ts +3 -0
- package/UI/Components/Charts/Types/YAxis/YAxisType.ts +5 -0
- package/UI/Components/Charts/Types/YValue.ts +3 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +188 -0
- package/UI/Components/Charts/Utils/XAxis.ts +267 -0
- package/build/dist/Server/Infrastructure/Queue.js +20 -1
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +4 -9
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +388 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/ChartColors.js +88 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/ChartColors.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/Cx.js +7 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/Cx.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.js +7 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.js +14 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.js +14 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +30 -136
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ChartCurve.js +8 -0
- package/build/dist/UI/Components/Charts/Types/ChartCurve.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/DataPoint.js +2 -0
- package/build/dist/UI/Components/Charts/Types/DataPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/SeriesPoint.js +2 -0
- package/build/dist/UI/Components/Charts/Types/SeriesPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/SeriesPoints.js +2 -0
- package/build/dist/UI/Components/Charts/Types/SeriesPoints.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxis.js +8 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxis.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisMaxMin.js +2 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisMaxMin.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js +27 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisType.js +7 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisType.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XValue.js +2 -0
- package/build/dist/UI/Components/Charts/Types/XValue.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxis.js +8 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxis.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxisMaxMin.js +2 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxisMaxMin.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxisType.js +6 -0
- package/build/dist/UI/Components/Charts/Types/YAxis/YAxisType.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/YValue.js +2 -0
- package/build/dist/UI/Components/Charts/Types/YValue.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +109 -0
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +241 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -0
- package/package.json +6 -4
- package/UI/Components/Charts/Bar/Bar.tsx +0 -0
- package/UI/Components/Charts/Base/BaseChart.tsx +0 -0
- package/UI/Components/Charts/Tooltip/Tooltip.tsx +0 -84
- package/build/dist/UI/Components/Charts/Bar/Bar.js +0 -2
- package/build/dist/UI/Components/Charts/Bar/Bar.js.map +0 -1
- package/build/dist/UI/Components/Charts/Base/BaseChart.js +0 -2
- package/build/dist/UI/Components/Charts/Base/BaseChart.js.map +0 -1
- package/build/dist/UI/Components/Charts/Tooltip/Tooltip.js +0 -34
- package/build/dist/UI/Components/Charts/Tooltip/Tooltip.js.map +0 -1
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ClusterKey,
|
|
3
|
+
RedisHostname,
|
|
4
|
+
RedisPassword,
|
|
5
|
+
RedisPort,
|
|
6
|
+
} from "../EnvironmentConfig";
|
|
2
7
|
import Dictionary from "Common/Types/Dictionary";
|
|
3
8
|
import { JSONObject } from "Common/Types/JSON";
|
|
4
9
|
import { Queue as BullQueue, Job, JobsOptions } from "bullmq";
|
|
10
|
+
import { ExpressAdapter } from "@bull-board/express";
|
|
11
|
+
import { createBullBoard } from "@bull-board/api";
|
|
12
|
+
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
|
|
13
|
+
import { ExpressRouter } from "../Utils/Express";
|
|
5
14
|
|
|
6
15
|
export enum QueueName {
|
|
7
16
|
Workflow = "Workflow",
|
|
@@ -51,6 +60,32 @@ export default class Queue {
|
|
|
51
60
|
await this.getQueue(queueName).removeRepeatableByKey(jobId);
|
|
52
61
|
}
|
|
53
62
|
|
|
63
|
+
public static getInspectorRoute(): string {
|
|
64
|
+
return "/api/inspect/queue/:clusterKey";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public static getQueueInspectorRouter(): ExpressRouter {
|
|
68
|
+
const serverAdapter: ExpressAdapter = new ExpressAdapter();
|
|
69
|
+
|
|
70
|
+
createBullBoard({
|
|
71
|
+
queues: [
|
|
72
|
+
...Object.values(QueueName).map((queueName: QueueName) => {
|
|
73
|
+
return new BullMQAdapter(this.getQueue(queueName));
|
|
74
|
+
}),
|
|
75
|
+
],
|
|
76
|
+
serverAdapter: serverAdapter,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
serverAdapter.setBasePath(
|
|
80
|
+
this.getInspectorRoute().replace(
|
|
81
|
+
"/:clusterKey",
|
|
82
|
+
"/" + ClusterKey.toString(),
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
return serverAdapter.getRouter();
|
|
87
|
+
}
|
|
88
|
+
|
|
54
89
|
public static async addJob(
|
|
55
90
|
queueName: QueueName,
|
|
56
91
|
jobId: string,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import Text from "../../../../Types/Text";
|
|
1
2
|
import LineChart, { ComponentProps as LineChartProps } from "../Line/LineChart";
|
|
2
|
-
import React, { FunctionComponent, ReactElement
|
|
3
|
+
import React, { FunctionComponent, ReactElement } from "react";
|
|
3
4
|
|
|
4
5
|
export enum ChartType {
|
|
5
6
|
LINE = "line",
|
|
@@ -13,7 +14,6 @@ export interface Chart {
|
|
|
13
14
|
description?: string | undefined;
|
|
14
15
|
type: ChartType;
|
|
15
16
|
props: LineChartProps;
|
|
16
|
-
sync: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface ComponentProps {
|
|
@@ -23,9 +23,7 @@ export interface ComponentProps {
|
|
|
23
23
|
const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
24
24
|
props: ComponentProps,
|
|
25
25
|
): ReactElement => {
|
|
26
|
-
const
|
|
27
|
-
number | string | Date | undefined
|
|
28
|
-
>(undefined);
|
|
26
|
+
const syncId: string = Text.generateRandomText(10);
|
|
29
27
|
|
|
30
28
|
return (
|
|
31
29
|
<div className="lg:grid grid-cols-1 gap-5">
|
|
@@ -49,18 +47,7 @@ const ChartGroup: FunctionComponent<ComponentProps> = (
|
|
|
49
47
|
{chart.description}
|
|
50
48
|
</p>
|
|
51
49
|
)}
|
|
52
|
-
<LineChart
|
|
53
|
-
key={index}
|
|
54
|
-
{...chart.props}
|
|
55
|
-
xAxisMarker={{
|
|
56
|
-
value: chart.sync ? syncValue : undefined,
|
|
57
|
-
}}
|
|
58
|
-
onHoverXAxis={(value: string | number | Date) => {
|
|
59
|
-
if (chart.sync) {
|
|
60
|
-
setSyncValue(value);
|
|
61
|
-
}
|
|
62
|
-
}}
|
|
63
|
-
/>
|
|
50
|
+
<LineChart key={index} {...chart.props} syncId={syncId} />
|
|
64
51
|
</div>
|
|
65
52
|
);
|
|
66
53
|
default:
|