@danikokonn/yarik-frontend-lib 2.0.2-test3
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/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/components/ActionDialog/ActionDialog.d.ts +23 -0
- package/dist/components/ActionDialog/ActionDialog.d.ts.map +1 -0
- package/dist/components/ActionDialog/ActionDialog.js +48 -0
- package/dist/components/ActionDialog/ActionDialogProps.d.ts +32 -0
- package/dist/components/ActionDialog/ActionDialogProps.d.ts.map +1 -0
- package/dist/components/ActionDialog/ActionDialogProps.js +1 -0
- package/dist/components/ActionDialog/index.d.ts +5 -0
- package/dist/components/ActionDialog/index.d.ts.map +1 -0
- package/dist/components/ActionDialog/index.js +3 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts +16 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInput.js +30 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.d.ts +18 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/ColumnSearchInputProps.js +1 -0
- package/dist/components/ColumnSearchInput/index.d.ts +5 -0
- package/dist/components/ColumnSearchInput/index.d.ts.map +1 -0
- package/dist/components/ColumnSearchInput/index.js +3 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +5 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +51 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.d.ts +11 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/DateTimeRangePickerProps.js +1 -0
- package/dist/components/DateTimeRangePicker/index.d.ts +5 -0
- package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -0
- package/dist/components/DateTimeRangePicker/index.js +3 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts +23 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.js +80 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.d.ts +43 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInputProps.js +1 -0
- package/dist/components/DatetimeRangeInput/index.d.ts +5 -0
- package/dist/components/DatetimeRangeInput/index.d.ts.map +1 -0
- package/dist/components/DatetimeRangeInput/index.js +3 -0
- package/dist/components/Footer/Footer.d.ts +7 -0
- package/dist/components/Footer/Footer.d.ts.map +1 -0
- package/dist/components/Footer/Footer.js +22 -0
- package/dist/components/Footer/index.d.ts +3 -0
- package/dist/components/Footer/index.d.ts.map +1 -0
- package/dist/components/Footer/index.js +2 -0
- package/dist/components/IpAddressInput/IpAddressInput.d.ts +5 -0
- package/dist/components/IpAddressInput/IpAddressInput.d.ts.map +1 -0
- package/dist/components/IpAddressInput/IpAddressInput.js +21 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.d.ts +13 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.d.ts.map +1 -0
- package/dist/components/IpAddressInput/IpAddressInputProps.js +1 -0
- package/dist/components/IpAddressInput/index.d.ts +5 -0
- package/dist/components/IpAddressInput/index.d.ts.map +1 -0
- package/dist/components/IpAddressInput/index.js +3 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts +5 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.js +11 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.d.ts +10 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInputProps.js +1 -0
- package/dist/components/IpAddressSwitchableInput/index.d.ts +5 -0
- package/dist/components/IpAddressSwitchableInput/index.d.ts.map +1 -0
- package/dist/components/IpAddressSwitchableInput/index.js +3 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts +5 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.js +29 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.d.ts +10 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePickerProps.js +1 -0
- package/dist/components/LocalizedDatetimePicker/index.d.ts +5 -0
- package/dist/components/LocalizedDatetimePicker/index.d.ts.map +1 -0
- package/dist/components/LocalizedDatetimePicker/index.js +3 -0
- package/dist/components/Navigation/NavMenu.d.ts +19 -0
- package/dist/components/Navigation/NavMenu.d.ts.map +1 -0
- package/dist/components/Navigation/NavMenu.js +44 -0
- package/dist/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Navigation/Navigation.d.ts.map +1 -0
- package/dist/components/Navigation/Navigation.js +188 -0
- package/dist/components/Navigation/NavigationProps.d.ts +30 -0
- package/dist/components/Navigation/NavigationProps.d.ts.map +1 -0
- package/dist/components/Navigation/NavigationProps.js +1 -0
- package/dist/components/Navigation/index.d.ts +5 -0
- package/dist/components/Navigation/index.d.ts.map +1 -0
- package/dist/components/Navigation/index.js +3 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts +5 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/NumberRangeInput.js +51 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.d.ts +11 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/NumberRangeInputProps.js +1 -0
- package/dist/components/NumberRangeInput/index.d.ts +5 -0
- package/dist/components/NumberRangeInput/index.d.ts.map +1 -0
- package/dist/components/NumberRangeInput/index.js +3 -0
- package/dist/components/PageWrapper/PageWrapper.d.ts +4 -0
- package/dist/components/PageWrapper/PageWrapper.d.ts.map +1 -0
- package/dist/components/PageWrapper/PageWrapper.js +16 -0
- package/dist/components/PageWrapper/PageWrapperProps.d.ts +10 -0
- package/dist/components/PageWrapper/PageWrapperProps.d.ts.map +1 -0
- package/dist/components/PageWrapper/PageWrapperProps.js +1 -0
- package/dist/components/PageWrapper/index.d.ts +5 -0
- package/dist/components/PageWrapper/index.d.ts.map +1 -0
- package/dist/components/PageWrapper/index.js +3 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts +8 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/FilterHistoryMenu.js +43 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts +12 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/HintOptionsMenu.js +50 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts +5 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/RichFilterTextField.js +177 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.d.ts +71 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/RichFilterTextFieldProps.js +1 -0
- package/dist/components/RichFilterTextField/index.d.ts +5 -0
- package/dist/components/RichFilterTextField/index.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/index.js +3 -0
- package/dist/components/RichFilterTextField/utils.d.ts +7 -0
- package/dist/components/RichFilterTextField/utils.d.ts.map +1 -0
- package/dist/components/RichFilterTextField/utils.js +131 -0
- package/dist/components/SmartTable/RowContent.d.ts +14 -0
- package/dist/components/SmartTable/RowContent.d.ts.map +1 -0
- package/dist/components/SmartTable/RowContent.js +29 -0
- package/dist/components/SmartTable/RuleRow.d.ts +22 -0
- package/dist/components/SmartTable/RuleRow.d.ts.map +1 -0
- package/dist/components/SmartTable/RuleRow.js +35 -0
- package/dist/components/SmartTable/SmartTable.d.ts +4 -0
- package/dist/components/SmartTable/SmartTable.d.ts.map +1 -0
- package/dist/components/SmartTable/SmartTable.js +175 -0
- package/dist/components/SmartTable/SmartTableProps.d.ts +40 -0
- package/dist/components/SmartTable/SmartTableProps.d.ts.map +1 -0
- package/dist/components/SmartTable/SmartTableProps.js +1 -0
- package/dist/components/SmartTable/TableHeader.d.ts +5 -0
- package/dist/components/SmartTable/TableHeader.d.ts.map +1 -0
- package/dist/components/SmartTable/TableHeader.js +13 -0
- package/dist/components/SmartTable/index.d.ts +5 -0
- package/dist/components/SmartTable/index.d.ts.map +1 -0
- package/dist/components/SmartTable/index.js +3 -0
- package/dist/components/SortBtn/SortBtn.d.ts +4 -0
- package/dist/components/SortBtn/SortBtn.d.ts.map +1 -0
- package/dist/components/SortBtn/SortBtn.js +23 -0
- package/dist/components/SortBtn/SortBtnProps.d.ts +7 -0
- package/dist/components/SortBtn/SortBtnProps.d.ts.map +1 -0
- package/dist/components/SortBtn/SortBtnProps.js +1 -0
- package/dist/components/SortBtn/index.d.ts +5 -0
- package/dist/components/SortBtn/index.d.ts.map +1 -0
- package/dist/components/SortBtn/index.js +3 -0
- package/dist/components/SubtaskItem/SubtaskItem.d.ts +4 -0
- package/dist/components/SubtaskItem/SubtaskItem.d.ts.map +1 -0
- package/dist/components/SubtaskItem/SubtaskItem.js +66 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts +10 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts.map +1 -0
- package/dist/components/SubtaskItem/SubtaskItemProps.js +1 -0
- package/dist/components/SubtaskItem/index.d.ts +5 -0
- package/dist/components/SubtaskItem/index.d.ts.map +1 -0
- package/dist/components/SubtaskItem/index.js +3 -0
- package/dist/components/TaskLoader/TaskLoader.d.ts +4 -0
- package/dist/components/TaskLoader/TaskLoader.d.ts.map +1 -0
- package/dist/components/TaskLoader/TaskLoader.js +333 -0
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts +5 -0
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts.map +1 -0
- package/dist/components/TaskLoader/TaskLoaderProps.js +1 -0
- package/dist/components/TaskLoader/index.d.ts +5 -0
- package/dist/components/TaskLoader/index.d.ts.map +1 -0
- package/dist/components/TaskLoader/index.js +3 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts +4 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/TaskStateDialog.js +106 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts +18 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/TaskStateDialogProps.js +1 -0
- package/dist/components/TaskStateDialog/index.d.ts +5 -0
- package/dist/components/TaskStateDialog/index.d.ts.map +1 -0
- package/dist/components/TaskStateDialog/index.js +3 -0
- package/dist/components/icons/GenerateAndRunIcon.d.ts +8 -0
- package/dist/components/icons/GenerateAndRunIcon.d.ts.map +1 -0
- package/dist/components/icons/GenerateAndRunIcon.js +29 -0
- package/dist/components/icons/GenerateIcon.d.ts +8 -0
- package/dist/components/icons/GenerateIcon.d.ts.map +1 -0
- package/dist/components/icons/GenerateIcon.js +27 -0
- package/dist/components/icons/IntegerIcon.d.ts +8 -0
- package/dist/components/icons/IntegerIcon.d.ts.map +1 -0
- package/dist/components/icons/IntegerIcon.js +15 -0
- package/dist/components/icons/ProcessingIcon.d.ts +3 -0
- package/dist/components/icons/ProcessingIcon.d.ts.map +1 -0
- package/dist/components/icons/ProcessingIcon.js +15 -0
- package/dist/components/icons/QueueIcon.d.ts +8 -0
- package/dist/components/icons/QueueIcon.d.ts.map +1 -0
- package/dist/components/icons/QueueIcon.js +15 -0
- package/dist/components/icons/RangeIcon.d.ts +8 -0
- package/dist/components/icons/RangeIcon.d.ts.map +1 -0
- package/dist/components/icons/RangeIcon.js +15 -0
- package/dist/components/icons/RunIcon.d.ts +8 -0
- package/dist/components/icons/RunIcon.d.ts.map +1 -0
- package/dist/components/icons/RunIcon.js +18 -0
- package/dist/components/icons/TextModeIcon.d.ts +5 -0
- package/dist/components/icons/TextModeIcon.d.ts.map +1 -0
- package/dist/components/icons/TextModeIcon.js +8 -0
- package/dist/components/icons/TreeModeIcon.d.ts +5 -0
- package/dist/components/icons/TreeModeIcon.d.ts.map +1 -0
- package/dist/components/icons/TreeModeIcon.js +8 -0
- package/dist/components/icons/index.d.ts +10 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/icons/index.js +9 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +35 -0
- package/dist/http.d.ts +25 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +101 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/providers/AirflowProvider.d.ts +14 -0
- package/dist/providers/AirflowProvider.d.ts.map +1 -0
- package/dist/providers/AirflowProvider.js +80 -0
- package/dist/providers/DagStateProvider.d.ts +25 -0
- package/dist/providers/DagStateProvider.d.ts.map +1 -0
- package/dist/providers/DagStateProvider.js +115 -0
- package/dist/providers/SessionProvider.d.ts +11 -0
- package/dist/providers/SessionProvider.d.ts.map +1 -0
- package/dist/providers/SessionProvider.js +37 -0
- package/dist/providers/SnackBarProvider.d.ts +10 -0
- package/dist/providers/SnackBarProvider.d.ts.map +1 -0
- package/dist/providers/SnackBarProvider.js +35 -0
- package/dist/providers/index.d.ts +9 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +8 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +26 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +193 -0
- package/package.json +94 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import CircularProgress from "@mui/material/CircularProgress";
|
|
3
|
+
import IconButton from "@mui/material/IconButton";
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
5
|
+
import SyncIcon from "@mui/icons-material/Sync";
|
|
6
|
+
import RestartAltIcon from "@mui/icons-material/RestartAlt";
|
|
7
|
+
import StopRoundedIcon from "@mui/icons-material/StopRounded";
|
|
8
|
+
import CheckCircleOutlineRoundedIcon from "@mui/icons-material/CheckCircleOutlineRounded";
|
|
9
|
+
import ErrorOutlineSharpIcon from "@mui/icons-material/ErrorOutlineSharp";
|
|
10
|
+
import AccessTimeSharpIcon from "@mui/icons-material/AccessTimeSharp";
|
|
11
|
+
import BlockSharpIcon from "@mui/icons-material/BlockSharp";
|
|
12
|
+
import { formatDate, formatDuration, taskStateText, useDebounce, } from "../../utils";
|
|
13
|
+
import SubtaskItem from "../SubtaskItem/SubtaskItem";
|
|
14
|
+
import { getRequest, postRequest } from "../../http";
|
|
15
|
+
import { getCSRFToken } from "../../utils";
|
|
16
|
+
import { useDagRunStateContext } from "../../providers/DagStateProvider";
|
|
17
|
+
import { useAirflowContext } from "../../providers/AirflowProvider";
|
|
18
|
+
import ProcessingIcon from "../icons/ProcessingIcon";
|
|
19
|
+
const taskStateIcon = (taskState) => {
|
|
20
|
+
switch (taskState) {
|
|
21
|
+
case "success":
|
|
22
|
+
return React.createElement(CheckCircleOutlineRoundedIcon, { fontSize: "large", color: "success" });
|
|
23
|
+
case "failed":
|
|
24
|
+
return React.createElement(ErrorOutlineSharpIcon, { fontSize: "large", color: "error" });
|
|
25
|
+
case "queued":
|
|
26
|
+
return React.createElement(AccessTimeSharpIcon, { fontSize: "large" });
|
|
27
|
+
case "running":
|
|
28
|
+
return React.createElement(CircularProgress, null);
|
|
29
|
+
default:
|
|
30
|
+
return React.createElement(BlockSharpIcon, { fontSize: "large" });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export default function TaskLoader({ style, subTitle }) {
|
|
34
|
+
const { airflowAvailable, onLostConnection } = useAirflowContext();
|
|
35
|
+
const { isActive, dagRun, taskInstances, onUpdateState, fetchState } = useDagRunStateContext();
|
|
36
|
+
const [activeTask, setActiveTask] = React.useState(taskInstances?.taskInstances.find((ti) => {
|
|
37
|
+
return ti.state === "running";
|
|
38
|
+
}) || null);
|
|
39
|
+
const [logs, setLogs] = React.useState([null, null, null]);
|
|
40
|
+
const [blockContols, setBlockControls] = useState(false);
|
|
41
|
+
const logContainerRef = React.useRef(null);
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (logContainerRef.current != null) {
|
|
44
|
+
logContainerRef.current.scrollTo({
|
|
45
|
+
left: 0,
|
|
46
|
+
top: logContainerRef.current.scrollHeight,
|
|
47
|
+
behavior: "smooth",
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, [activeTask, logs]);
|
|
51
|
+
const updateActiveTask = () => {
|
|
52
|
+
const newActiveTask = taskInstances?.taskInstances.find((ti) => {
|
|
53
|
+
return ti.state === "running";
|
|
54
|
+
});
|
|
55
|
+
if (newActiveTask == null) {
|
|
56
|
+
setActiveTask(null);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (activeTask == null || newActiveTask.taskId !== activeTask.taskId) {
|
|
60
|
+
setActiveTask(newActiveTask);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (isActive) {
|
|
65
|
+
setLogs([null, null, null]);
|
|
66
|
+
}
|
|
67
|
+
}, [isActive]);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
const interval = setInterval(() => {
|
|
70
|
+
if (!isActive)
|
|
71
|
+
return;
|
|
72
|
+
updateActiveTask();
|
|
73
|
+
}, 100);
|
|
74
|
+
return () => {
|
|
75
|
+
clearInterval(interval);
|
|
76
|
+
};
|
|
77
|
+
}, [isActive, taskInstances]);
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
const interval = setInterval(() => {
|
|
80
|
+
if (!airflowAvailable)
|
|
81
|
+
return;
|
|
82
|
+
if (!isActive)
|
|
83
|
+
return;
|
|
84
|
+
if (activeTask == null)
|
|
85
|
+
return;
|
|
86
|
+
const taskIndex = taskInstances != null
|
|
87
|
+
? taskInstances.taskInstances.findIndex((ti) => activeTask != null && ti.taskId === activeTask.taskId)
|
|
88
|
+
: -1;
|
|
89
|
+
const continuationToken = taskIndex >= 0
|
|
90
|
+
? logs[taskIndex] != null
|
|
91
|
+
? logs[taskIndex].continuationToken
|
|
92
|
+
: null
|
|
93
|
+
: null;
|
|
94
|
+
getRequest({
|
|
95
|
+
url: "airflow/ti_logs",
|
|
96
|
+
data: {
|
|
97
|
+
dag_id: dagRun?.dagId,
|
|
98
|
+
dag_run_id: dagRun?.dagRunId,
|
|
99
|
+
task_id: activeTask.taskId,
|
|
100
|
+
try_num: activeTask.tryNumber,
|
|
101
|
+
continuation_token: continuationToken,
|
|
102
|
+
},
|
|
103
|
+
successHandler: (resp) => {
|
|
104
|
+
const newLogs = logs.slice();
|
|
105
|
+
if (!resp)
|
|
106
|
+
return;
|
|
107
|
+
if (resp.logs.content.length === 0)
|
|
108
|
+
return;
|
|
109
|
+
if (newLogs[taskIndex] != null) {
|
|
110
|
+
newLogs[taskIndex].continuationToken = resp.logs.continuationToken;
|
|
111
|
+
newLogs[taskIndex].content += resp.logs.content;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
newLogs[taskIndex] = resp.logs;
|
|
115
|
+
}
|
|
116
|
+
setLogs(newLogs);
|
|
117
|
+
},
|
|
118
|
+
errorHandler: (resp) => {
|
|
119
|
+
console.log("Error while fetching logs");
|
|
120
|
+
if (resp && resp.status === 503) {
|
|
121
|
+
onLostConnection();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}, 500);
|
|
126
|
+
return () => {
|
|
127
|
+
clearInterval(interval);
|
|
128
|
+
};
|
|
129
|
+
}, [isActive, activeTask, dagRun, taskInstances, logs]);
|
|
130
|
+
function handleShowLogs(taskId, tryNum) {
|
|
131
|
+
if (!airflowAvailable)
|
|
132
|
+
return;
|
|
133
|
+
if (activeTask != null && taskId === activeTask.taskId) {
|
|
134
|
+
setActiveTask(null);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
getRequest({
|
|
138
|
+
url: "airflow/ti_logs",
|
|
139
|
+
data: {
|
|
140
|
+
dag_id: dagRun?.dagId,
|
|
141
|
+
dag_run_id: dagRun?.dagRunId,
|
|
142
|
+
task_id: taskId,
|
|
143
|
+
try_num: tryNum,
|
|
144
|
+
continuation_token: null,
|
|
145
|
+
},
|
|
146
|
+
successHandler: (resp) => {
|
|
147
|
+
if (!resp)
|
|
148
|
+
return;
|
|
149
|
+
const newActiveTaskIdx = taskInstances != null
|
|
150
|
+
? taskInstances.taskInstances.findIndex((ti) => ti.taskId === taskId)
|
|
151
|
+
: -1;
|
|
152
|
+
setActiveTask(taskInstances?.taskInstances[newActiveTaskIdx] || null);
|
|
153
|
+
const newLogs = logs.slice();
|
|
154
|
+
newLogs[newActiveTaskIdx] = resp.logs;
|
|
155
|
+
setLogs(newLogs);
|
|
156
|
+
},
|
|
157
|
+
errorHandler: (resp) => {
|
|
158
|
+
console.log("Error while getting logs for subtask!");
|
|
159
|
+
if (resp && resp.status === 503) {
|
|
160
|
+
onLostConnection();
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function handleRestartLoad() {
|
|
166
|
+
if (!airflowAvailable)
|
|
167
|
+
return;
|
|
168
|
+
postRequest({
|
|
169
|
+
url: "airflow/dag_run",
|
|
170
|
+
data: {
|
|
171
|
+
action: "restart",
|
|
172
|
+
dag_id: dagRun?.dagId,
|
|
173
|
+
dag_run_id: dagRun?.dagRunId,
|
|
174
|
+
},
|
|
175
|
+
headers: {
|
|
176
|
+
"X-CSRFToken": getCSRFToken(),
|
|
177
|
+
},
|
|
178
|
+
successHandler: (resp) => {
|
|
179
|
+
if (!resp)
|
|
180
|
+
return;
|
|
181
|
+
onUpdateState(true, resp.dagRun, resp.taskInstances);
|
|
182
|
+
setActiveTask(null);
|
|
183
|
+
setLogs([null, null, null]);
|
|
184
|
+
},
|
|
185
|
+
errorHandler: (resp) => {
|
|
186
|
+
console.log("Error restarting task!");
|
|
187
|
+
if (resp && resp.status === 503) {
|
|
188
|
+
onLostConnection();
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
const handleStopLoad = useDebounce(() => {
|
|
194
|
+
if (!airflowAvailable)
|
|
195
|
+
return;
|
|
196
|
+
postRequest({
|
|
197
|
+
url: "airflow/dag_run",
|
|
198
|
+
data: {
|
|
199
|
+
action: "stop",
|
|
200
|
+
dag_id: dagRun?.dagId,
|
|
201
|
+
dag_run_id: dagRun?.dagRunId,
|
|
202
|
+
},
|
|
203
|
+
headers: {
|
|
204
|
+
"X-CSRFToken": getCSRFToken(),
|
|
205
|
+
},
|
|
206
|
+
successHandler: (resp) => {
|
|
207
|
+
if (!resp)
|
|
208
|
+
return;
|
|
209
|
+
onUpdateState(true, resp.dagRun, resp.taskInstances);
|
|
210
|
+
setActiveTask(null);
|
|
211
|
+
setLogs([null, null, null]);
|
|
212
|
+
setBlockControls(false);
|
|
213
|
+
},
|
|
214
|
+
errorHandler: (resp) => {
|
|
215
|
+
console.log("Error aborting task!");
|
|
216
|
+
if (resp && resp.status === 503) {
|
|
217
|
+
onLostConnection();
|
|
218
|
+
}
|
|
219
|
+
setBlockControls(false);
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
}, 200);
|
|
223
|
+
const formatEndDate = formatDate(dagRun?.logicalDate || "");
|
|
224
|
+
const formatTaskDuration = formatDuration(taskInstances?.taskInstances.reduce((a, b) => a + (b.duration || 0), 0) || 0);
|
|
225
|
+
const activeTaskElem = taskInstances?.taskInstances.find((ti) => {
|
|
226
|
+
return activeTask && ti.taskId === activeTask.taskId;
|
|
227
|
+
});
|
|
228
|
+
const activeTaskNumber = activeTaskElem && taskInstances?.taskInstances.indexOf(activeTaskElem);
|
|
229
|
+
const handleClick = useDebounce((target, onClick, toggleClass) => {
|
|
230
|
+
if (target instanceof HTMLButtonElement &&
|
|
231
|
+
!target.classList.contains(toggleClass)) {
|
|
232
|
+
const id = target.id;
|
|
233
|
+
onClick();
|
|
234
|
+
target.classList.add(toggleClass);
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
document.getElementById(id)?.classList.remove(toggleClass);
|
|
237
|
+
setBlockControls(false);
|
|
238
|
+
}, 1550);
|
|
239
|
+
}
|
|
240
|
+
}, 200);
|
|
241
|
+
return (React.createElement("div", { style: style },
|
|
242
|
+
React.createElement(Typography, { variant: "h5", style: {
|
|
243
|
+
marginBottom: "1.5rem",
|
|
244
|
+
display: "flex",
|
|
245
|
+
alignItems: "center",
|
|
246
|
+
gap: "0.25rem",
|
|
247
|
+
} },
|
|
248
|
+
subTitle,
|
|
249
|
+
" ",
|
|
250
|
+
React.createElement(ProcessingIcon, null)),
|
|
251
|
+
React.createElement("div", { style: {
|
|
252
|
+
display: "flex",
|
|
253
|
+
flexDirection: "column",
|
|
254
|
+
justifyContent: "start",
|
|
255
|
+
} },
|
|
256
|
+
React.createElement("div", { style: { height: "10%", width: "auto", flex: "0 0 auto" } },
|
|
257
|
+
React.createElement("div", { style: {
|
|
258
|
+
display: "flex",
|
|
259
|
+
justifyContent: "space-between",
|
|
260
|
+
alignItems: "center",
|
|
261
|
+
height: "100%",
|
|
262
|
+
} },
|
|
263
|
+
React.createElement("div", { style: {
|
|
264
|
+
width: "auto",
|
|
265
|
+
whiteSpace: "nowrap",
|
|
266
|
+
overflow: "hidden",
|
|
267
|
+
} },
|
|
268
|
+
React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" } },
|
|
269
|
+
taskStateIcon(dagRun?.state),
|
|
270
|
+
" ",
|
|
271
|
+
React.createElement("span", null,
|
|
272
|
+
taskStateText(dagRun?.state),
|
|
273
|
+
dagRun?.state === "success"
|
|
274
|
+
? (formatEndDate.startsWith("вт") ? " во " : " в ") +
|
|
275
|
+
formatEndDate +
|
|
276
|
+
" за " +
|
|
277
|
+
formatTaskDuration
|
|
278
|
+
: ""))),
|
|
279
|
+
React.createElement("div", { style: { width: "auto", flex: "0 0 auto" } },
|
|
280
|
+
React.createElement("div", { style: {
|
|
281
|
+
display: "flex",
|
|
282
|
+
justifyContent: "space-between",
|
|
283
|
+
width: "auto",
|
|
284
|
+
flex: "0 0 auto",
|
|
285
|
+
gap: "0.25rem",
|
|
286
|
+
} },
|
|
287
|
+
React.createElement(IconButton, { id: "updateTaskStateBtn", color: "default", title: "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435", size: "small", onClick: (e) => {
|
|
288
|
+
setBlockControls(true);
|
|
289
|
+
handleClick(e.currentTarget, () => {
|
|
290
|
+
fetchState();
|
|
291
|
+
updateActiveTask();
|
|
292
|
+
}, "around");
|
|
293
|
+
}, disabled: !airflowAvailable || blockContols, sx: {
|
|
294
|
+
transition: "transform 0.5s linear",
|
|
295
|
+
"&.around": {
|
|
296
|
+
animation: "rotate-around 0.5s linear 0.1s 3 running",
|
|
297
|
+
},
|
|
298
|
+
} },
|
|
299
|
+
React.createElement(SyncIcon, { fontSize: "large" })),
|
|
300
|
+
React.createElement(IconButton, { id: "taskRestartBtn", color: "info", title: "\u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443", size: "small", disabled: !airflowAvailable ||
|
|
301
|
+
dagRun?.state !== "failed" ||
|
|
302
|
+
blockContols, onClick: (e) => {
|
|
303
|
+
setBlockControls(true);
|
|
304
|
+
handleClick(e.currentTarget, handleRestartLoad, "around");
|
|
305
|
+
}, sx: {
|
|
306
|
+
transition: "transform 0.5s linear",
|
|
307
|
+
"&.around": {
|
|
308
|
+
animation: "rotate-around 0.5s linear 0.1s 3 running",
|
|
309
|
+
},
|
|
310
|
+
} },
|
|
311
|
+
React.createElement(RestartAltIcon, { fontSize: "large" })),
|
|
312
|
+
React.createElement(IconButton, { color: "error", title: "\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443", size: "small", disabled: !airflowAvailable ||
|
|
313
|
+
dagRun?.state !== "running" ||
|
|
314
|
+
blockContols, onClick: () => {
|
|
315
|
+
setBlockControls(true);
|
|
316
|
+
handleStopLoad();
|
|
317
|
+
} },
|
|
318
|
+
React.createElement(StopRoundedIcon, { fontSize: "large" })))))),
|
|
319
|
+
React.createElement("div", { style: { height: "90%", width: "auto", flex: "0 0 auto" } },
|
|
320
|
+
React.createElement("div", { style: { maxHeight: "100%", overflow: "auto" } }, taskInstances?.taskInstances.map((ti, idx) => {
|
|
321
|
+
return (React.createElement(SubtaskItem, { key: idx, taskInstance: ti, expanded: idx === activeTaskNumber, expandedLogContainerRef: idx === activeTaskNumber ? logContainerRef : undefined, onShowLogs: handleShowLogs, logs: logs[idx] != null ? logs[idx].content : "" }));
|
|
322
|
+
})))),
|
|
323
|
+
React.createElement("style", null, `
|
|
324
|
+
@keyframes rotate-around {
|
|
325
|
+
from {
|
|
326
|
+
transform: rotate(0deg);
|
|
327
|
+
}
|
|
328
|
+
to {
|
|
329
|
+
transform: rotate(-360deg);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
`)));
|
|
333
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskLoaderProps.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/TaskLoaderProps.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,eAAe;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TaskStateDialogProps from "./TaskStateDialogProps";
|
|
3
|
+
export default function TaskStateDialog({ taskTitle, subTitle, appendedTitle, visible, mousePos, disableClosing, additionalControls, disableTransition, onClose, }: TaskStateDialogProps): React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=TaskStateDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskStateDialog.d.ts","sourceRoot":"","sources":["../../../src/components/TaskStateDialog/TaskStateDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAa1D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,SAAS,EACT,QAAQ,EACR,aAAa,EACb,OAAO,EACP,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,GACR,EAAE,oBAAoB,qBAyLtB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Dialog from "@mui/material/Dialog";
|
|
3
|
+
import { useTheme } from "@mui/material";
|
|
4
|
+
import Zoom from "@mui/material/Zoom";
|
|
5
|
+
const AppBar = React.lazy(() => import("@mui/material/AppBar"));
|
|
6
|
+
const Stack = React.lazy(() => import("@mui/material/Stack"));
|
|
7
|
+
const Toolbar = React.lazy(() => import("@mui/material/Toolbar"));
|
|
8
|
+
const IconButton = React.lazy(() => import("@mui/material/IconButton"));
|
|
9
|
+
const Typography = React.lazy(() => import("@mui/material/Typography"));
|
|
10
|
+
const Tooltip = React.lazy(() => import("@mui/material/Tooltip"));
|
|
11
|
+
const Badge = React.lazy(() => import("@mui/material/Badge"));
|
|
12
|
+
const CloseIcon = React.lazy(() => import("@mui/icons-material/Close"));
|
|
13
|
+
const CircularProgress = React.lazy(() => import("@mui/material/CircularProgress"));
|
|
14
|
+
const TaskLoader = React.lazy(() => import("../TaskLoader/TaskLoader"));
|
|
15
|
+
import { useDagRunStateContext } from "../../providers/DagStateProvider";
|
|
16
|
+
import { useAirflowContext } from "../../providers/AirflowProvider";
|
|
17
|
+
const Transition = React.forwardRef(function Transition(props, ref) {
|
|
18
|
+
return React.createElement(Zoom, { ref: ref, ...props });
|
|
19
|
+
});
|
|
20
|
+
export default function TaskStateDialog({ taskTitle, subTitle, appendedTitle, visible, mousePos, disableClosing, additionalControls, disableTransition, onClose, }) {
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const [loading, setLoading] = React.useState(true);
|
|
23
|
+
const { airflowAvailable } = useAirflowContext();
|
|
24
|
+
const { dagRun, taskInstances, isActive } = useDagRunStateContext();
|
|
25
|
+
let color = "secondary";
|
|
26
|
+
let dagStateText = "Нет состояния";
|
|
27
|
+
if (dagRun) {
|
|
28
|
+
switch (dagRun.state) {
|
|
29
|
+
case "success":
|
|
30
|
+
color = "success";
|
|
31
|
+
dagStateText = "Выполнено";
|
|
32
|
+
break;
|
|
33
|
+
case "failed":
|
|
34
|
+
color = "error";
|
|
35
|
+
dagStateText = "Ошибка";
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
color = "info";
|
|
39
|
+
dagStateText = "Запущена";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const currentTabControls = dagRun &&
|
|
43
|
+
additionalControls &&
|
|
44
|
+
additionalControls.find((v) => v.dagId === dagRun.dagId);
|
|
45
|
+
const DialogLoadingProgress = () => (React.createElement(CircularProgress, { sx: {
|
|
46
|
+
position: "absolute",
|
|
47
|
+
top: "50%",
|
|
48
|
+
left: "50%",
|
|
49
|
+
transform: "translate(-50%, -50%)",
|
|
50
|
+
}, color: "inherit" }));
|
|
51
|
+
return (React.createElement(Dialog, { fullScreen: true, open: visible, onClose: () => onClose(), transitionDuration: 500, slots: {
|
|
52
|
+
transition: disableTransition ? undefined : Transition,
|
|
53
|
+
}, slotProps: {
|
|
54
|
+
paper: {
|
|
55
|
+
sx: { backgroundColor: theme.palette.background.default },
|
|
56
|
+
},
|
|
57
|
+
transition: {
|
|
58
|
+
sx: {
|
|
59
|
+
transformOrigin: mousePos || "center",
|
|
60
|
+
},
|
|
61
|
+
onEntered: () => {
|
|
62
|
+
setLoading(false);
|
|
63
|
+
},
|
|
64
|
+
onExited: () => {
|
|
65
|
+
setLoading(true);
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
} },
|
|
69
|
+
React.createElement(React.Suspense, { fallback: React.createElement(React.Fragment, null) },
|
|
70
|
+
React.createElement(AppBar, { sx: { position: "relative" }, color: color },
|
|
71
|
+
React.createElement(Toolbar, null,
|
|
72
|
+
React.createElement(IconButton, { disabled: disableClosing, edge: "start", color: "inherit", onClick: () => onClose(), "aria-label": "close" },
|
|
73
|
+
React.createElement(CloseIcon, null)),
|
|
74
|
+
React.createElement(Stack, { sx: {
|
|
75
|
+
ml: 2,
|
|
76
|
+
flex: 1,
|
|
77
|
+
flexWrap: "nowrap",
|
|
78
|
+
whiteSpace: "nowrap",
|
|
79
|
+
textOverflow: "ellipsis",
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
}, direction: "row", gap: 1 }, airflowAvailable ? (React.createElement(React.Fragment, null,
|
|
82
|
+
React.createElement(Typography, { variant: "h6" }, taskTitle),
|
|
83
|
+
appendedTitle && (React.createElement(Tooltip, { title: appendedTitle },
|
|
84
|
+
React.createElement(Typography, { color: "orange", variant: "h6" }, appendedTitle))),
|
|
85
|
+
React.createElement(Typography, { variant: "h6" }, "\u2014"),
|
|
86
|
+
React.createElement(Typography, { variant: "h6" }, dagStateText))) : (React.createElement(Typography, { variant: "h6" },
|
|
87
|
+
React.createElement(Tooltip, { title: "Airflow \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D - \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u043E \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438" },
|
|
88
|
+
React.createElement(Badge, { color: "warning", variant: "dot" }, `${taskTitle} - ${dagStateText}`))))))),
|
|
89
|
+
loading ? (React.createElement(DialogLoadingProgress, null)) : (React.createElement(React.Fragment, null, dagRun && taskInstances ? (React.createElement(Stack, { direction: "column", sx: {
|
|
90
|
+
justifyContent: "space-between",
|
|
91
|
+
height: "-webkit-fill-available",
|
|
92
|
+
} },
|
|
93
|
+
React.createElement(TaskLoader, { subTitle: subTitle, style: {
|
|
94
|
+
margin: "3rem",
|
|
95
|
+
height: "-webkit-fill-available",
|
|
96
|
+
} }),
|
|
97
|
+
React.createElement(Stack, { spacing: 1, direction: "row", sx: {
|
|
98
|
+
justifyContent: "end",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
margin: "1.5rem 3rem",
|
|
101
|
+
} },
|
|
102
|
+
dagRun.state === "success" ? ((currentTabControls?.onSuccess &&
|
|
103
|
+
currentTabControls.onSuccess(dagRun.conf?.table_name || "")) || React.createElement(React.Fragment, null)) : (React.createElement(React.Fragment, null)),
|
|
104
|
+
dagRun.state === "failed" ? ((currentTabControls?.onFailure &&
|
|
105
|
+
currentTabControls.onFailure(dagRun.conf?.rule_uuid || "", dagRun.dagId, dagRun.conf?.start_date || "", dagRun.conf?.end_date || "", dagRun.conf?.table_name || "")) || React.createElement(React.Fragment, null)) : (React.createElement(React.Fragment, null))))) : (React.createElement("span", { style: { margin: "3rem" } }, airflowAvailable && isActive ? (React.createElement(DialogLoadingProgress, null)) : airflowAvailable ? (React.createElement(Typography, null, "\u041D\u0435\u0442 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F")) : (React.createElement(Typography, null, "Airflow \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D")))))))));
|
|
106
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import TaskLoaderProps from "../TaskLoader/TaskLoaderProps";
|
|
3
|
+
export default interface TaskStateModalProps extends TaskLoaderProps {
|
|
4
|
+
taskTitle: string;
|
|
5
|
+
appendedTitle?: string;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
onClose(): void;
|
|
8
|
+
mousePos?: string;
|
|
9
|
+
disableClosing?: boolean;
|
|
10
|
+
additionalControls?: AdditionalTaskControl[];
|
|
11
|
+
disableTransition?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface AdditionalTaskControl {
|
|
14
|
+
dagId: string;
|
|
15
|
+
onSuccess?(dagId: string): React.ReactNode;
|
|
16
|
+
onFailure?(ruleUuid: string, dagId: string, start_date: string, end_date: string, table_name: string): React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=TaskStateDialogProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskStateDialogProps.d.ts","sourceRoot":"","sources":["../../../src/components/TaskStateDialog/TaskStateDialogProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,OAAO,WAAW,mBAAoB,SAAQ,eAAe;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,IAAI,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC3C,SAAS,CAAC,CACR,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TaskStateDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SvgIconOwnProps } from "@mui/material";
|
|
3
|
+
interface GenerateAndRunIconProps extends SvgIconOwnProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const GenerateAndRunIcon: ({ disabled, ...props }: GenerateAndRunIconProps) => React.JSX.Element;
|
|
7
|
+
export default GenerateAndRunIcon;
|
|
8
|
+
//# sourceMappingURL=GenerateAndRunIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenerateAndRunIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/GenerateAndRunIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,eAAe,EAAY,MAAM,eAAe,CAAC;AAoHzE,UAAU,uBAAwB,SAAQ,eAAe;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,GAAI,wBAGzB,uBAAuB,sBAWzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createSvgIcon, useTheme } from "@mui/material";
|
|
3
|
+
const GenerateAndRunSvgIcon = createSvgIcon(React.createElement("svg", { width: "38", height: "38", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 38 38", preserveAspectRatio: "xMidYMid", version: "1.1" },
|
|
4
|
+
React.createElement("g", { className: "layer", display: "inline" },
|
|
5
|
+
React.createElement("g", { id: "s", transform: "translate(-0.02 -0.02) matrix(1.63693 0 0 1.63225 -3.38016 7.32488)" },
|
|
6
|
+
React.createElement("g", { id: "svg_1", transform: "translate(-4.12903 0.709677) matrix(0.6025 0 0 0.666969 4.40055 -6.10281)" },
|
|
7
|
+
React.createElement("g", { id: "svg_2" },
|
|
8
|
+
React.createElement("path", { d: "m4.38,30.62l0,0c-0.66,0 -1.38,-0.51 -1.38,-1.62l0,-26c0,-1.11 0.72,-1.62 1.38,-1.62c0.29,0 0.57,0.08 0.86,0.25l22.73,13.01c0.54,0.3 0.85,0.79 0.85,1.34c0,0.56 -0.32,1.07 -0.88,1.38l-22.7,13.01c-0.29,0.17 -0.57,0.25 -0.86,0.25zm0.62,-26.82l0,24.4l21.31,-12.21l-21.31,-12.19z", fill: "var(--disabled, #2e7d32)", id: "svg_4", stroke: "#ce5858", strokeWidth: "0", transform: "matrix(1 0 0 1 0 0)" }),
|
|
9
|
+
React.createElement("path", { d: "m4.74,2.5c-0.47,-0.28 -0.74,-0.05 -0.74,0.5l0,26c0,0.55 0.27,0.78 0.74,0.5l22.7,-13c0.48,-0.28 0.51,-0.72 0.04,-1l-22.74,-13z", fill: "var(--disabled, #2e7d32)", id: "svg_3", stroke: "#ce5858", strokeWidth: "0", transform: "matrix(1 0 0 1 0 0)" }),
|
|
10
|
+
React.createElement("g", { id: "svg_55", transform: "translate(0.0430663 0) matrix(1 0 0 1 6.4897 3.12924e-7)" },
|
|
11
|
+
React.createElement("g", { id: "svg_56" },
|
|
12
|
+
React.createElement("g", { id: "svg_57" },
|
|
13
|
+
React.createElement("path", { d: "m4.41,2.5c-0.47,-0.28 -0.74,-0.05 -0.74,0.5l0,26c0,0.55 0.27,0.78 0.74,0.5l22.7,-13c0.48,-0.28 0.51,-0.72 0.04,-1l-22.74,-13z", fill: "var(--disabled, currentColor)", id: "svg_58", stroke: "#ce5858", strokeWidth: "0", transform: "matrix(1 0 0 1 0 0)" }),
|
|
14
|
+
React.createElement("path", { d: "m4.38,30.62l0,0c-0.66,0 -1.38,-0.51 -1.38,-1.62l0,-26c0,-1.11 0.72,-1.62 1.38,-1.62c0.29,0 0.57,0.08 0.86,0.25l22.73,13.01c0.54,0.3 0.85,0.79 0.85,1.34c0,0.56 -0.32,1.07 -0.88,1.38l-22.7,13.01c-0.29,0.17 -0.57,0.25 -0.86,0.25zm0.62,-26.82l0,24.4l21.31,-12.21l-21.31,-12.19z", fill: "var(--disabled, currentColor)", id: "svg_59", stroke: "#ce5858", strokeWidth: "0" }))))),
|
|
15
|
+
React.createElement("g", { id: "svg_67", transform: "matrix(1 0 0 1 -0.559006 -0.621116)" },
|
|
16
|
+
React.createElement("g", { id: "svg_11", transform: "translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0 -0.0421585) matrix(1.62212 0 0 1.46081 -6.57878 -8.38586)" },
|
|
17
|
+
React.createElement("g", { id: "svg_12" },
|
|
18
|
+
React.createElement("g", { id: "svg_5" },
|
|
19
|
+
React.createElement("line", { fill: "var(--disabled, #2e7d32)", id: "svg_6", stroke: "#ce5858", strokeWidth: "0", x1: "28", x2: "20", y1: "26", y2: "26" }),
|
|
20
|
+
React.createElement("path", { d: "m28,27l-8,0c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1l8,0c0.55,0 1,0.45 1,1s-0.45,1 -1,1z", fill: "var(--disabled, #2e7d32)", id: "svg_7", stroke: "#ce5858", strokeWidth: "0" })),
|
|
21
|
+
React.createElement("g", { id: "svg_8" },
|
|
22
|
+
React.createElement("line", { fill: "var(--disabled, #2e7d32)", id: "svg_9", stroke: "#ce5858", strokeWidth: "0", x1: "24", x2: "24", y1: "22", y2: "30" }),
|
|
23
|
+
React.createElement("path", { d: "m24,31c-0.55,0 -1,-0.45 -1,-1l0,-8c0,-0.55 0.45,-1 1,-1s1,0.45 1,1l0,8c0,0.55 -0.45,1 -1,1z", fill: "var(--disabled, #2e7d32)", id: "svg_10", stroke: "#ce5858", strokeWidth: "0" }))))))))), "GenerateAndRunSvgIcon");
|
|
24
|
+
// todo: Обобщить, создать хук
|
|
25
|
+
const GenerateAndRunIcon = ({ disabled, ...props }) => {
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
return disabled ? (React.createElement(GenerateAndRunSvgIcon, { sx: { "--disabled": theme.palette.action.disabled, ...props.sx }, ...props })) : (React.createElement(GenerateAndRunSvgIcon, { ...props }));
|
|
28
|
+
};
|
|
29
|
+
export default GenerateAndRunIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SvgIconOwnProps } from "@mui/material";
|
|
3
|
+
interface GenerateIconProps extends SvgIconOwnProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const GenerateIcon: ({ disabled, ...props }: GenerateIconProps) => React.JSX.Element;
|
|
7
|
+
export default GenerateIcon;
|
|
8
|
+
//# sourceMappingURL=GenerateIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenerateIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/GenerateIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,eAAe,EAAY,MAAM,eAAe,CAAC;AAoGzE,UAAU,iBAAkB,SAAQ,eAAe;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,GAAI,wBAAwB,iBAAiB,sBAW9D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createSvgIcon, useTheme } from "@mui/material";
|
|
3
|
+
const GenerateSvgIcon = createSvgIcon(React.createElement("svg", { width: "38", height: "38", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 38 38", preserveAspectRatio: "xMidYMid", version: "1.1" },
|
|
4
|
+
React.createElement("g", { className: "layer", display: "inline" },
|
|
5
|
+
React.createElement("g", { id: "s", transform: "translate(-0.02 -0.02) matrix(1.63693 0 0 1.63225 -3.38016 7.32488)" },
|
|
6
|
+
React.createElement("g", { id: "svg_1", transform: "translate(-4.12903 0.709677) matrix(0.6025 0 0 0.666969 4.40055 -6.10281)" },
|
|
7
|
+
React.createElement("g", { id: "svg_2" },
|
|
8
|
+
React.createElement("g", { id: "svg_55", transform: "translate(0.0430663 0) matrix(1 0 0 1 6.4897 3.12924e-7)" },
|
|
9
|
+
React.createElement("g", { id: "svg_56" },
|
|
10
|
+
React.createElement("g", { id: "svg_57" },
|
|
11
|
+
React.createElement("path", { d: "m4.41,2.5c-0.47,-0.28 -0.74,-0.05 -0.74,0.5l0,26c0,0.55 0.27,0.78 0.74,0.5l22.7,-13c0.48,-0.28 0.51,-0.72 0.04,-1l-22.74,-13z", fill: "var(--disabled, currentColor)", id: "svg_58", stroke: "#ce5858", strokeWidth: "0", transform: "matrix(1 0 0 1 0 0)" }),
|
|
12
|
+
React.createElement("path", { d: "m4.38,30.62l0,0c-0.66,0 -1.38,-0.51 -1.38,-1.62l0,-26c0,-1.11 0.72,-1.62 1.38,-1.62c0.29,0 0.57,0.08 0.86,0.25l22.73,13.01c0.54,0.3 0.85,0.79 0.85,1.34c0,0.56 -0.32,1.07 -0.88,1.38l-22.7,13.01c-0.29,0.17 -0.57,0.25 -0.86,0.25zm0.62,-26.82l0,24.4l21.31,-12.21l-21.31,-12.19z", fill: "var(--disabled, currentColor)", id: "svg_59", stroke: "#ce5858", strokeWidth: "0" }))))),
|
|
13
|
+
React.createElement("g", { id: "svg_67", transform: "matrix(1 0 0 1 -0.559006 -0.621116)" },
|
|
14
|
+
React.createElement("g", { id: "svg_11", transform: "translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0.0421585 0) translate(0 -0.0421585) matrix(1.62212 0 0 1.46081 -6.57878 -8.38586)" },
|
|
15
|
+
React.createElement("g", { id: "svg_12" },
|
|
16
|
+
React.createElement("g", { id: "svg_5" },
|
|
17
|
+
React.createElement("line", { fill: "var(--disabled, #2e7d32)", id: "svg_6", stroke: "#ce5858", strokeWidth: "0", x1: "28", x2: "20", y1: "26", y2: "26" }),
|
|
18
|
+
React.createElement("path", { d: "m28,27l-8,0c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1l8,0c0.55,0 1,0.45 1,1s-0.45,1 -1,1z", fill: "var(--disabled, #2e7d32)", id: "svg_7", stroke: "#ce5858", strokeWidth: "0" })),
|
|
19
|
+
React.createElement("g", { id: "svg_8" },
|
|
20
|
+
React.createElement("line", { fill: "var(--disabled, #2e7d32)", id: "svg_9", stroke: "#ce5858", strokeWidth: "0", x1: "24", x2: "24", y1: "22", y2: "30" }),
|
|
21
|
+
React.createElement("path", { d: "m24,31c-0.55,0 -1,-0.45 -1,-1l0,-8c0,-0.55 0.45,-1 1,-1s1,0.45 1,1l0,8c0,0.55 -0.45,1 -1,1z", fill: "var(--disabled, #2e7d32)", id: "svg_10", stroke: "#ce5858", strokeWidth: "0" }))))))))), "GenerateSvgIcon");
|
|
22
|
+
// todo: Обобщить, создать хук
|
|
23
|
+
const GenerateIcon = ({ disabled, ...props }) => {
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
return disabled ? (React.createElement(GenerateSvgIcon, { sx: { "--disabled": theme.palette.action.disabled, ...props.sx }, ...props })) : (React.createElement(GenerateSvgIcon, { ...props }));
|
|
26
|
+
};
|
|
27
|
+
export default GenerateIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SvgIconOwnProps } from "@mui/material";
|
|
3
|
+
interface IntegerIconProps extends SvgIconOwnProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const IntegerIcon: ({ disabled, ...props }: IntegerIconProps) => React.JSX.Element;
|
|
7
|
+
export default IntegerIcon;
|
|
8
|
+
//# sourceMappingURL=IntegerIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegerIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/IntegerIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,eAAe,EAAY,MAAM,eAAe,CAAC;AAyBzE,UAAU,gBAAiB,SAAQ,eAAe;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,GAAI,wBAAwB,gBAAgB,sBAW5D,CAAC;AAEF,eAAe,WAAW,CAAC"}
|