@danikokonn/yarik-frontend-lib 2.0.55-test → 2.0.55
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/dist/components/ActionDialog/ActionDialog.d.ts +1 -2
- package/dist/components/ActionDialog/ActionDialog.d.ts.map +1 -1
- package/dist/components/ActionDialog/ActionDialog.js +7 -18
- package/dist/components/ActionDialog/ActionDialogProps.d.ts +1 -1
- package/dist/components/ActionDialog/ActionDialogProps.d.ts.map +1 -1
- package/dist/components/ActionDialog/index.d.ts +2 -2
- package/dist/components/ActionDialog/index.d.ts.map +1 -1
- package/dist/components/ActionDialog/index.js +1 -1
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts +1 -2
- package/dist/components/ColumnSearchInput/ColumnSearchInput.d.ts.map +1 -1
- package/dist/components/ColumnSearchInput/ColumnSearchInput.js +5 -5
- package/dist/components/ColumnSearchInput/index.d.ts +2 -2
- package/dist/components/ColumnSearchInput/index.d.ts.map +1 -1
- package/dist/components/ColumnSearchInput/index.js +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -3
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.js +39 -41
- package/dist/components/DateTimeRangePicker/index.d.ts +2 -2
- package/dist/components/DateTimeRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateTimeRangePicker/index.js +1 -1
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts +1 -0
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.d.ts.map +1 -1
- package/dist/components/DatetimeRangeInput/DatetimeRangeInput.js +38 -44
- package/dist/components/DatetimeRangeInput/index.d.ts +2 -2
- package/dist/components/DatetimeRangeInput/index.d.ts.map +1 -1
- package/dist/components/DatetimeRangeInput/index.js +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -2
- package/dist/components/Footer/Footer.d.ts.map +1 -1
- package/dist/components/Footer/Footer.js +5 -13
- package/dist/components/Footer/index.d.ts +1 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/IpAddressInput/IpAddressInput.d.ts +1 -2
- package/dist/components/IpAddressInput/IpAddressInput.d.ts.map +1 -1
- package/dist/components/IpAddressInput/IpAddressInput.js +5 -6
- package/dist/components/IpAddressInput/index.d.ts +2 -2
- package/dist/components/IpAddressInput/index.d.ts.map +1 -1
- package/dist/components/IpAddressInput/index.js +1 -1
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts +1 -2
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.d.ts.map +1 -1
- package/dist/components/IpAddressSwitchableInput/IpAddressSwitchableInput.js +3 -2
- package/dist/components/IpAddressSwitchableInput/index.d.ts +2 -2
- package/dist/components/IpAddressSwitchableInput/index.d.ts.map +1 -1
- package/dist/components/IpAddressSwitchableInput/index.js +1 -1
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts +1 -2
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.d.ts.map +1 -1
- package/dist/components/LocalizedDatetimePicker/LocalizedDatetimePicker.js +6 -6
- package/dist/components/LocalizedDatetimePicker/index.d.ts +2 -2
- package/dist/components/LocalizedDatetimePicker/index.d.ts.map +1 -1
- package/dist/components/LocalizedDatetimePicker/index.js +1 -1
- package/dist/components/Navigation/NavMenu.d.ts +4 -3
- package/dist/components/Navigation/NavMenu.d.ts.map +1 -1
- package/dist/components/Navigation/NavMenu.js +23 -27
- package/dist/components/Navigation/Navigation.d.ts +1 -2
- package/dist/components/Navigation/Navigation.d.ts.map +1 -1
- package/dist/components/Navigation/Navigation.js +122 -147
- package/dist/components/Navigation/NavigationProps.d.ts +2 -1
- package/dist/components/Navigation/NavigationProps.d.ts.map +1 -1
- package/dist/components/Navigation/index.d.ts +2 -2
- package/dist/components/Navigation/index.d.ts.map +1 -1
- package/dist/components/Navigation/index.js +1 -1
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts +1 -2
- package/dist/components/NumberRangeInput/NumberRangeInput.d.ts.map +1 -1
- package/dist/components/NumberRangeInput/NumberRangeInput.js +34 -39
- package/dist/components/NumberRangeInput/index.d.ts +2 -2
- package/dist/components/NumberRangeInput/index.d.ts.map +1 -1
- package/dist/components/NumberRangeInput/index.js +1 -1
- package/dist/components/PageWrapper/PageWrapper.d.ts +2 -2
- package/dist/components/PageWrapper/PageWrapper.d.ts.map +1 -1
- package/dist/components/PageWrapper/PageWrapper.js +11 -14
- package/dist/components/PageWrapper/index.d.ts +2 -2
- package/dist/components/PageWrapper/index.d.ts.map +1 -1
- package/dist/components/PageWrapper/index.js +1 -1
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts +1 -2
- package/dist/components/RichFilterTextField/FilterHistoryMenu.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/FilterHistoryMenu.js +17 -31
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts +4 -4
- package/dist/components/RichFilterTextField/HintOptionsMenu.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/HintOptionsMenu.js +8 -10
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts +1 -2
- package/dist/components/RichFilterTextField/RichFilterTextField.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/RichFilterTextField.js +106 -79
- package/dist/components/RichFilterTextField/index.d.ts +2 -2
- package/dist/components/RichFilterTextField/index.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/index.js +1 -1
- package/dist/components/RichFilterTextField/utils.d.ts.map +1 -1
- package/dist/components/RichFilterTextField/utils.js +13 -5
- package/dist/components/SmartTable/RowContent.d.ts +29 -9
- package/dist/components/SmartTable/RowContent.d.ts.map +1 -1
- package/dist/components/SmartTable/RowContent.js +59 -20
- package/dist/components/SmartTable/SmartTable.d.ts +9 -2
- package/dist/components/SmartTable/SmartTable.d.ts.map +1 -1
- package/dist/components/SmartTable/SmartTable.js +97 -109
- package/dist/components/SmartTable/SmartTableProps.d.ts +20 -10
- package/dist/components/SmartTable/SmartTableProps.d.ts.map +1 -1
- package/dist/components/SmartTable/TableHeader.d.ts +1 -2
- package/dist/components/SmartTable/TableHeader.d.ts.map +1 -1
- package/dist/components/SmartTable/TableHeader.js +5 -4
- package/dist/components/SmartTable/index.d.ts +2 -2
- package/dist/components/SmartTable/index.d.ts.map +1 -1
- package/dist/components/SmartTable/index.js +1 -1
- package/dist/components/SortBtn/SortBtn.d.ts +1 -2
- package/dist/components/SortBtn/SortBtn.d.ts.map +1 -1
- package/dist/components/SortBtn/SortBtn.js +3 -2
- package/dist/components/SortBtn/index.d.ts +2 -2
- package/dist/components/SortBtn/index.d.ts.map +1 -1
- package/dist/components/SortBtn/index.js +1 -1
- package/dist/components/SubtaskItem/SubtaskItem.d.ts +1 -2
- package/dist/components/SubtaskItem/SubtaskItem.d.ts.map +1 -1
- package/dist/components/SubtaskItem/SubtaskItem.js +79 -43
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts +1 -1
- package/dist/components/SubtaskItem/SubtaskItemProps.d.ts.map +1 -1
- package/dist/components/SubtaskItem/index.d.ts +2 -2
- package/dist/components/SubtaskItem/index.d.ts.map +1 -1
- package/dist/components/SubtaskItem/index.js +1 -1
- package/dist/components/TaskLoader/TaskLoader.d.ts +2 -2
- package/dist/components/TaskLoader/TaskLoader.d.ts.map +1 -1
- package/dist/components/TaskLoader/TaskLoader.js +112 -117
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts +1 -0
- package/dist/components/TaskLoader/TaskLoaderProps.d.ts.map +1 -1
- package/dist/components/TaskLoader/index.d.ts +2 -2
- package/dist/components/TaskLoader/index.d.ts.map +1 -1
- package/dist/components/TaskLoader/index.js +1 -1
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts +1 -2
- package/dist/components/TaskStateDialog/TaskStateDialog.d.ts.map +1 -1
- package/dist/components/TaskStateDialog/TaskStateDialog.js +33 -47
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts +2 -1
- package/dist/components/TaskStateDialog/TaskStateDialogProps.d.ts.map +1 -1
- package/dist/components/TaskStateDialog/index.d.ts +2 -2
- package/dist/components/TaskStateDialog/index.d.ts.map +1 -1
- package/dist/components/TaskStateDialog/index.js +1 -1
- package/dist/components/icons/GenerateAndRunIcon.d.ts +1 -2
- package/dist/components/icons/GenerateAndRunIcon.d.ts.map +1 -1
- package/dist/components/icons/GenerateAndRunIcon.js +6 -23
- package/dist/components/icons/GenerateIcon.d.ts +1 -2
- package/dist/components/icons/GenerateIcon.d.ts.map +1 -1
- package/dist/components/icons/GenerateIcon.js +6 -21
- package/dist/components/icons/IntegerIcon.d.ts +1 -2
- package/dist/components/icons/IntegerIcon.d.ts.map +1 -1
- package/dist/components/icons/IntegerIcon.js +6 -9
- package/dist/components/icons/ProcessingIcon.d.ts +1 -2
- package/dist/components/icons/ProcessingIcon.d.ts.map +1 -1
- package/dist/components/icons/ProcessingIcon.js +2 -12
- package/dist/components/icons/QueueIcon.d.ts +1 -2
- package/dist/components/icons/QueueIcon.d.ts.map +1 -1
- package/dist/components/icons/QueueIcon.js +6 -9
- package/dist/components/icons/RangeIcon.d.ts +1 -2
- package/dist/components/icons/RangeIcon.d.ts.map +1 -1
- package/dist/components/icons/RangeIcon.js +6 -9
- package/dist/components/icons/RunIcon.d.ts +1 -2
- package/dist/components/icons/RunIcon.d.ts.map +1 -1
- package/dist/components/icons/RunIcon.js +6 -12
- package/dist/components/icons/TextModeIcon.d.ts.map +1 -1
- package/dist/components/icons/TextModeIcon.js +2 -6
- package/dist/components/icons/TreeModeIcon.d.ts.map +1 -1
- package/dist/components/icons/TreeModeIcon.js +2 -6
- package/dist/components/icons/index.d.ts +1 -1
- package/dist/components/icons/index.js +1 -1
- package/dist/http.d.ts +2 -2
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +4 -29
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/providers/AirflowProvider.d.ts +5 -4
- package/dist/providers/AirflowProvider.d.ts.map +1 -1
- package/dist/providers/AirflowProvider.js +44 -58
- package/dist/providers/DagStateProvider.d.ts +6 -5
- package/dist/providers/DagStateProvider.d.ts.map +1 -1
- package/dist/providers/DagStateProvider.js +39 -13
- package/dist/providers/SessionProvider.d.ts +3 -1
- package/dist/providers/SessionProvider.d.ts.map +1 -1
- package/dist/providers/SessionProvider.js +14 -7
- package/dist/providers/SnackBarProvider.d.ts +2 -2
- package/dist/providers/SnackBarProvider.d.ts.map +1 -1
- package/dist/providers/SnackBarProvider.js +8 -9
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +4 -4
- package/dist/types.d.ts +17 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -2
- package/package.json +30 -21
- package/dist/components/SmartTable/RuleRow.d.ts +0 -22
- package/dist/components/SmartTable/RuleRow.d.ts.map +0 -1
- package/dist/components/SmartTable/RuleRow.js +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortBtn.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/SortBtn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SortBtn.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/SortBtn.tsx"],"names":[],"mappings":"AAEA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,KAAK,EAAE,MAAM,EACb,YAAY,GACb,EAAE,YAAY,2CAgCd"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TableSortLabel } from "@mui/material";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
3
4
|
export default function SortBtn({ children, field, order: _order, onToggleSort, }) {
|
|
4
5
|
const [order, setOrder] = useState(_order || "none");
|
|
5
6
|
useEffect(() => setOrder(_order), [_order]);
|
|
@@ -19,5 +20,5 @@ export default function SortBtn({ children, field, order: _order, onToggleSort,
|
|
|
19
20
|
onToggleSort(field, newOrder);
|
|
20
21
|
setOrder(newOrder);
|
|
21
22
|
}
|
|
22
|
-
return (
|
|
23
|
+
return (_jsx(TableSortLabel, { active: order !== "none", direction: order !== "none" ? order : undefined, id: "toggleSortBtn", onClick: handleToggleSort, children: children }));
|
|
23
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./SortBtn";
|
|
2
1
|
export * from "./SortBtn";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./SortBtn";
|
|
4
3
|
export * from "./SortBtnProps";
|
|
4
|
+
export { type default as SortBtnProps } from "./SortBtnProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SortBtn/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import SubtaskItemProps from "./SubtaskItemProps";
|
|
3
|
-
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }: SubtaskItemProps):
|
|
2
|
+
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }: SubtaskItemProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=SubtaskItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubtaskItem.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SubtaskItem.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItem.tsx"],"names":[],"mappings":"AAgBA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAiBlD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,uBAAuB,GACxB,EAAE,gBAAgB,2CAwIlB"}
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import AccessTimeSharpIcon from "@mui/icons-material/AccessTimeSharp";
|
|
3
|
+
import BlockSharpIcon from "@mui/icons-material/BlockSharp";
|
|
4
|
+
import CheckCircleOutlineRoundedIcon from "@mui/icons-material/CheckCircleOutlineRounded";
|
|
5
|
+
import DoneIcon from "@mui/icons-material/Done";
|
|
6
|
+
import ErrorOutlineSharpIcon from "@mui/icons-material/ErrorOutlineSharp";
|
|
7
|
+
import ExpandMore from "@mui/icons-material/ExpandMore";
|
|
8
|
+
import { Chip, useTheme } from "@mui/material";
|
|
3
9
|
import Accordion from "@mui/material/Accordion";
|
|
4
10
|
import AccordionDetails from "@mui/material/AccordionDetails";
|
|
5
11
|
import AccordionSummary from "@mui/material/AccordionSummary";
|
|
6
12
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
7
|
-
import CheckCircleOutlineRoundedIcon from "@mui/icons-material/CheckCircleOutlineRounded";
|
|
8
|
-
import ErrorOutlineSharpIcon from "@mui/icons-material/ErrorOutlineSharp";
|
|
9
|
-
import AccessTimeSharpIcon from "@mui/icons-material/AccessTimeSharp";
|
|
10
|
-
import BlockSharpIcon from "@mui/icons-material/BlockSharp";
|
|
11
|
-
import ExpandMore from "@mui/icons-material/ExpandMore";
|
|
12
|
-
import { useTheme } from "@mui/material";
|
|
13
13
|
import { taskStateText } from "../../utils";
|
|
14
|
+
import moment from "moment";
|
|
15
|
+
import { useState } from "react";
|
|
16
|
+
const SubtaskState = ({ state }) => {
|
|
17
|
+
switch (state) {
|
|
18
|
+
case "success":
|
|
19
|
+
return _jsx(CheckCircleOutlineRoundedIcon, { color: "success" });
|
|
20
|
+
case "failed":
|
|
21
|
+
return _jsx(ErrorOutlineSharpIcon, { color: "error" });
|
|
22
|
+
case "queued":
|
|
23
|
+
return _jsx(AccessTimeSharpIcon, {});
|
|
24
|
+
case "running":
|
|
25
|
+
return _jsx(CircularProgress, { size: 20 });
|
|
26
|
+
default:
|
|
27
|
+
return _jsx(BlockSharpIcon, {});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
14
30
|
export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs, expandedLogContainerRef, }) {
|
|
31
|
+
const [copyVisible, setCopyVisible] = useState(false);
|
|
32
|
+
const [copyText, setCopyText] = useState("Копировать");
|
|
15
33
|
const theme = useTheme();
|
|
16
|
-
const subtaskState = (state) => {
|
|
17
|
-
switch (state) {
|
|
18
|
-
case "success":
|
|
19
|
-
return React.createElement(CheckCircleOutlineRoundedIcon, { color: "success" });
|
|
20
|
-
case "failed":
|
|
21
|
-
return React.createElement(ErrorOutlineSharpIcon, { color: "error" });
|
|
22
|
-
case "queued":
|
|
23
|
-
return React.createElement(AccessTimeSharpIcon, null);
|
|
24
|
-
case "running":
|
|
25
|
-
return React.createElement(CircularProgress, { size: 20 });
|
|
26
|
-
default:
|
|
27
|
-
return React.createElement(BlockSharpIcon, null);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
34
|
const formatEndDate = new Date(taskInstance.executionDate).toLocaleString("ru", {
|
|
31
35
|
weekday: "short",
|
|
32
36
|
month: "short",
|
|
@@ -42,25 +46,57 @@ export default function SubtaskItem({ taskInstance, logs, expanded, onShowLogs,
|
|
|
42
46
|
precision: 1,
|
|
43
47
|
template: "h [ч], m [мин], s [сек]",
|
|
44
48
|
});
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
return (_jsxs(Accordion, { disableGutters: true, expanded: expanded, onChange: () => onShowLogs(taskInstance.taskId, taskInstance.tryNumber), disabled: !["running", "success", "failed"].includes(taskInstance.state || ""), sx: {
|
|
50
|
+
position: "relative",
|
|
51
|
+
}, slotProps: {
|
|
52
|
+
transition: {
|
|
53
|
+
onEntered: () => {
|
|
54
|
+
setCopyVisible(true);
|
|
55
|
+
setCopyText("Копировать");
|
|
56
|
+
},
|
|
57
|
+
onExit: () => {
|
|
58
|
+
setCopyVisible(false);
|
|
59
|
+
setCopyText("Копировать");
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}, children: [_jsx(AccordionSummary, { expandIcon: _jsx(ExpandMore, {}), children: _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [_jsx(SubtaskState, { state: taskInstance.state }), _jsxs("span", { children: [taskInstance.taskId, " - ", taskStateText(taskInstance.state), taskInstance.state === "success"
|
|
63
|
+
? (formatEndDate.startsWith("вт") ? " во " : " в ") +
|
|
64
|
+
formatEndDate +
|
|
65
|
+
" за " +
|
|
66
|
+
formatTaskDuration
|
|
67
|
+
: ""] })] }) }), copyVisible && (_jsx(Chip, { label: copyText, size: "small", variant: "outlined", icon: copyText === "Скопировано" ? (_jsx(DoneIcon, { color: "success" })) : undefined, onClick: () => {
|
|
68
|
+
navigator.clipboard.writeText(logs);
|
|
69
|
+
setCopyText("Скопировано");
|
|
70
|
+
}, sx: {
|
|
71
|
+
position: "absolute",
|
|
72
|
+
bottom: "8%",
|
|
73
|
+
right: "3%",
|
|
74
|
+
opacity: "0.5",
|
|
75
|
+
} })), _jsx(AccordionDetails, { ref: expandedLogContainerRef, contentEditable: true, onKeyDown: (e) => {
|
|
76
|
+
if (e.ctrlKey && e.key.toLowerCase() === "a") {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
if (e.currentTarget) {
|
|
79
|
+
const range = document.createRange();
|
|
80
|
+
range.selectNodeContents(e.currentTarget);
|
|
81
|
+
const selection = window.getSelection();
|
|
82
|
+
if (selection != null) {
|
|
83
|
+
selection.removeAllRanges();
|
|
84
|
+
selection.addRange(range);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (e.key.toLowerCase() === "backspace") {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
}
|
|
91
|
+
}, suppressContentEditableWarning: true, onBeforeInput: (e) => e.preventDefault(), onPaste: (e) => e.preventDefault(), onDrop: (e) => e.preventDefault(), sx: {
|
|
92
|
+
maxHeight: "32vh",
|
|
93
|
+
overflow: "auto",
|
|
94
|
+
}, children: _jsx("article", { style: {
|
|
95
|
+
padding: "1.5rem",
|
|
96
|
+
backgroundColor: theme.vars?.palette.background.paper ||
|
|
97
|
+
theme.palette.background.paper,
|
|
98
|
+
borderRadius: "0.5rem",
|
|
99
|
+
fontSize: "smaller",
|
|
100
|
+
fontFamily: "consolas",
|
|
101
|
+
}, children: logs.split("\n").map((line, idx) => (_jsx("p", { style: { margin: 0 }, children: line }, idx))) }) })] }));
|
|
66
102
|
}
|
|
@@ -4,7 +4,7 @@ export default interface SubtaskItemProps {
|
|
|
4
4
|
taskInstance: TaskInstance;
|
|
5
5
|
logs: string;
|
|
6
6
|
expanded: boolean;
|
|
7
|
-
expandedLogContainerRef?: RefObject<HTMLDivElement>;
|
|
7
|
+
expandedLogContainerRef?: RefObject<HTMLDivElement | null>;
|
|
8
8
|
onShowLogs(taskId: string, tryNum: number): void;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=SubtaskItemProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubtaskItemProps.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItemProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SubtaskItemProps.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/SubtaskItemProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,gBAAgB;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./SubtaskItem";
|
|
2
1
|
export * from "./SubtaskItem";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./SubtaskItem";
|
|
4
3
|
export * from "./SubtaskItemProps";
|
|
4
|
+
export { type default as SubtaskItemProps } from "./SubtaskItemProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SubtaskItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,KAAK,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import TaskLoaderProps from "./TaskLoaderProps";
|
|
3
|
-
|
|
2
|
+
declare const TaskLoader: ({ style, subTitle, onUnauthorized }: TaskLoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default TaskLoader;
|
|
4
4
|
//# sourceMappingURL=TaskLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskLoader.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/TaskLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TaskLoader.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/TaskLoader.tsx"],"names":[],"mappings":"AAgCA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAqBhD,QAAA,MAAM,UAAU,GAAI,qCAAqC,eAAe,4CA2avE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,53 +1,57 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import AccessTimeSharpIcon from "@mui/icons-material/AccessTimeSharp";
|
|
3
|
+
import BlockSharpIcon from "@mui/icons-material/BlockSharp";
|
|
4
|
+
import CheckCircleOutlineRoundedIcon from "@mui/icons-material/CheckCircleOutlineRounded";
|
|
5
|
+
import ErrorOutlineSharpIcon from "@mui/icons-material/ErrorOutlineSharp";
|
|
6
|
+
import RestartAltIcon from "@mui/icons-material/RestartAlt";
|
|
7
|
+
import StopRoundedIcon from "@mui/icons-material/StopRounded";
|
|
8
|
+
import SyncIcon from "@mui/icons-material/Sync";
|
|
2
9
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
10
|
+
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
3
11
|
import IconButton from "@mui/material/IconButton";
|
|
12
|
+
import Switch from "@mui/material/Switch";
|
|
4
13
|
import Typography from "@mui/material/Typography";
|
|
5
|
-
import
|
|
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 { useEffect, useEffectEvent, useRef, useState } from "react";
|
|
14
15
|
import { getRequest, postRequest } from "../../http";
|
|
15
|
-
import { getCSRFToken } from "../../utils";
|
|
16
|
-
import { useDagRunStateContext } from "../../providers/DagStateProvider";
|
|
17
16
|
import { useAirflowContext } from "../../providers/AirflowProvider";
|
|
17
|
+
import { useDagRunStateContext } from "../../providers/DagStateProvider";
|
|
18
|
+
import { formatDate, formatDuration, getCSRFToken, taskStateText, useDebounce, } from "../../utils";
|
|
18
19
|
import ProcessingIcon from "../icons/ProcessingIcon";
|
|
19
|
-
|
|
20
|
+
import SubtaskItem from "../SubtaskItem/SubtaskItem";
|
|
21
|
+
const TaskStateIcon = ({ taskState, }) => {
|
|
20
22
|
switch (taskState) {
|
|
21
23
|
case "success":
|
|
22
|
-
return
|
|
24
|
+
return _jsx(CheckCircleOutlineRoundedIcon, { fontSize: "large", color: "success" });
|
|
23
25
|
case "failed":
|
|
24
|
-
return
|
|
26
|
+
return _jsx(ErrorOutlineSharpIcon, { fontSize: "large", color: "error" });
|
|
25
27
|
case "queued":
|
|
26
|
-
return
|
|
28
|
+
return _jsx(AccessTimeSharpIcon, { fontSize: "large" });
|
|
27
29
|
case "running":
|
|
28
|
-
return
|
|
30
|
+
return _jsx(CircularProgress, {});
|
|
29
31
|
default:
|
|
30
|
-
return
|
|
32
|
+
return _jsx(BlockSharpIcon, { fontSize: "large" });
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
const TaskLoader = ({ style, subTitle, onUnauthorized }) => {
|
|
34
36
|
const { airflowAvailable, onLostConnection } = useAirflowContext();
|
|
35
37
|
const { isActive, dagRun, taskInstances, onUpdateState, fetchState } = useDagRunStateContext();
|
|
36
|
-
const [activeTask, setActiveTask] =
|
|
38
|
+
const [activeTask, setActiveTask] = useState(taskInstances?.taskInstances.find((ti) => {
|
|
37
39
|
return ti.state === "running";
|
|
38
40
|
}) || null);
|
|
39
|
-
const [logs, setLogs] =
|
|
41
|
+
const [logs, setLogs] = useState([null, null, null]);
|
|
40
42
|
const [blockContols, setBlockControls] = useState(false);
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
const [followLogs, setFollowLogs] = useState(true);
|
|
44
|
+
const logContainerRef = useRef(null);
|
|
45
|
+
const scrollDown = useEffectEvent(() => {
|
|
46
|
+
if (logContainerRef.current != null && followLogs) {
|
|
44
47
|
logContainerRef.current.scrollTo({
|
|
45
48
|
left: 0,
|
|
46
49
|
top: logContainerRef.current.scrollHeight,
|
|
47
50
|
behavior: "smooth",
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
|
-
}
|
|
53
|
+
});
|
|
54
|
+
useEffect(() => scrollDown(), [activeTask, logs]);
|
|
51
55
|
const updateActiveTask = () => {
|
|
52
56
|
const newActiveTask = taskInstances?.taskInstances.find((ti) => {
|
|
53
57
|
return ti.state === "running";
|
|
@@ -60,22 +64,24 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
60
64
|
setActiveTask(newActiveTask);
|
|
61
65
|
}
|
|
62
66
|
};
|
|
63
|
-
|
|
67
|
+
useEffect(() => {
|
|
64
68
|
if (isActive) {
|
|
69
|
+
setFollowLogs(true);
|
|
65
70
|
setLogs([null, null, null]);
|
|
66
71
|
}
|
|
67
72
|
}, [isActive]);
|
|
68
|
-
|
|
73
|
+
useEffect(() => {
|
|
69
74
|
const interval = setInterval(() => {
|
|
70
75
|
if (!isActive)
|
|
71
76
|
return;
|
|
72
|
-
|
|
77
|
+
if (followLogs)
|
|
78
|
+
updateActiveTask();
|
|
73
79
|
}, 100);
|
|
74
80
|
return () => {
|
|
75
81
|
clearInterval(interval);
|
|
76
82
|
};
|
|
77
83
|
}, [isActive, taskInstances]);
|
|
78
|
-
|
|
84
|
+
useEffect(() => {
|
|
79
85
|
const interval = setInterval(() => {
|
|
80
86
|
if (!airflowAvailable)
|
|
81
87
|
return;
|
|
@@ -116,6 +122,9 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
116
122
|
setLogs(newLogs);
|
|
117
123
|
},
|
|
118
124
|
errorHandler: (resp) => {
|
|
125
|
+
if (resp?.status == 401) {
|
|
126
|
+
onUnauthorized();
|
|
127
|
+
}
|
|
119
128
|
console.log("Error while fetching logs");
|
|
120
129
|
if (resp && resp.status === 503) {
|
|
121
130
|
onLostConnection();
|
|
@@ -127,7 +136,7 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
127
136
|
clearInterval(interval);
|
|
128
137
|
};
|
|
129
138
|
}, [isActive, activeTask, dagRun, taskInstances, logs]);
|
|
130
|
-
|
|
139
|
+
const handleShowLogs = (taskId, tryNum) => {
|
|
131
140
|
if (!airflowAvailable)
|
|
132
141
|
return;
|
|
133
142
|
if (activeTask != null && taskId === activeTask.taskId) {
|
|
@@ -155,14 +164,17 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
155
164
|
setLogs(newLogs);
|
|
156
165
|
},
|
|
157
166
|
errorHandler: (resp) => {
|
|
167
|
+
if (resp?.status == 401) {
|
|
168
|
+
onUnauthorized();
|
|
169
|
+
}
|
|
158
170
|
console.log("Error while getting logs for subtask!");
|
|
159
171
|
if (resp && resp.status === 503) {
|
|
160
172
|
onLostConnection();
|
|
161
173
|
}
|
|
162
174
|
},
|
|
163
175
|
});
|
|
164
|
-
}
|
|
165
|
-
|
|
176
|
+
};
|
|
177
|
+
const handleRestartLoad = () => {
|
|
166
178
|
if (!airflowAvailable)
|
|
167
179
|
return;
|
|
168
180
|
postRequest({
|
|
@@ -183,13 +195,16 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
183
195
|
setLogs([null, null, null]);
|
|
184
196
|
},
|
|
185
197
|
errorHandler: (resp) => {
|
|
198
|
+
if (resp?.status == 401) {
|
|
199
|
+
onUnauthorized();
|
|
200
|
+
}
|
|
186
201
|
console.log("Error restarting task!");
|
|
187
202
|
if (resp && resp.status === 503) {
|
|
188
203
|
onLostConnection();
|
|
189
204
|
}
|
|
190
205
|
},
|
|
191
206
|
});
|
|
192
|
-
}
|
|
207
|
+
};
|
|
193
208
|
const handleStopLoad = useDebounce(() => {
|
|
194
209
|
if (!airflowAvailable)
|
|
195
210
|
return;
|
|
@@ -212,6 +227,9 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
212
227
|
setBlockControls(false);
|
|
213
228
|
},
|
|
214
229
|
errorHandler: (resp) => {
|
|
230
|
+
if (resp?.status == 401) {
|
|
231
|
+
onUnauthorized();
|
|
232
|
+
}
|
|
215
233
|
console.log("Error aborting task!");
|
|
216
234
|
if (resp && resp.status === 503) {
|
|
217
235
|
onLostConnection();
|
|
@@ -221,7 +239,8 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
221
239
|
});
|
|
222
240
|
}, 200);
|
|
223
241
|
const formatEndDate = formatDate(dagRun?.logicalDate || "");
|
|
224
|
-
const formatTaskDuration = formatDuration(taskInstances?.taskInstances.reduce((a, b) => a + (b.duration || 0), 0) ||
|
|
242
|
+
const formatTaskDuration = formatDuration(taskInstances?.taskInstances.reduce((a, b) => a + (b.duration || 0), 0) ||
|
|
243
|
+
0);
|
|
225
244
|
const activeTaskElem = taskInstances?.taskInstances.find((ti) => {
|
|
226
245
|
return activeTask && ti.taskId === activeTask.taskId;
|
|
227
246
|
});
|
|
@@ -238,89 +257,64 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
238
257
|
}, 1550);
|
|
239
258
|
}
|
|
240
259
|
}, 200);
|
|
241
|
-
return (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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: {
|
|
260
|
+
return (_jsxs("div", { style: style, children: [_jsxs(Typography, { variant: "h5", style: {
|
|
261
|
+
marginBottom: "1.5rem",
|
|
262
|
+
display: "flex",
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
gap: "0.25rem",
|
|
265
|
+
}, children: [subTitle, " ", _jsx(ProcessingIcon, {})] }), _jsxs("div", { style: {
|
|
266
|
+
display: "flex",
|
|
267
|
+
flexDirection: "column",
|
|
268
|
+
justifyContent: "start",
|
|
269
|
+
}, children: [_jsx("div", { style: { height: "10%", width: "auto", flex: "0 0 auto" }, children: _jsxs("div", { style: {
|
|
281
270
|
display: "flex",
|
|
282
271
|
justifyContent: "space-between",
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
272
|
+
alignItems: "center",
|
|
273
|
+
height: "100%",
|
|
274
|
+
}, children: [_jsx("div", { style: {
|
|
275
|
+
width: "auto",
|
|
276
|
+
whiteSpace: "nowrap",
|
|
277
|
+
overflow: "hidden",
|
|
278
|
+
}, children: _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [_jsx(TaskStateIcon, { taskState: dagRun?.state }), _jsxs("span", { children: [taskStateText(dagRun?.state), dagRun?.state === "success"
|
|
279
|
+
? (formatEndDate.startsWith("вт") ? " во " : " в ") +
|
|
280
|
+
formatEndDate +
|
|
281
|
+
" за " +
|
|
282
|
+
formatTaskDuration
|
|
283
|
+
: ""] })] }) }), _jsx("div", { style: { width: "auto", flex: "0 0 auto" }, children: _jsxs("div", { style: {
|
|
284
|
+
display: "flex",
|
|
285
|
+
justifyContent: "space-between",
|
|
286
|
+
width: "auto",
|
|
287
|
+
flex: "0 0 auto",
|
|
288
|
+
gap: "0.25rem",
|
|
289
|
+
}, children: [_jsx(FormControlLabel, { control: _jsx(Switch, { checked: followLogs, onChange: (_, c) => setFollowLogs(c) }), label: "\u0421\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u044C" }), _jsx(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) => {
|
|
290
|
+
setBlockControls(true);
|
|
291
|
+
handleClick(e.currentTarget, () => {
|
|
292
|
+
fetchState();
|
|
293
|
+
updateActiveTask();
|
|
294
|
+
}, "around");
|
|
295
|
+
}, disabled: !airflowAvailable || blockContols, sx: {
|
|
296
|
+
transition: "transform 0.5s linear",
|
|
297
|
+
"&.around": {
|
|
298
|
+
animation: "rotate-around 0.5s linear 0.1s 3 running",
|
|
299
|
+
},
|
|
300
|
+
}, children: _jsx(SyncIcon, { fontSize: "large" }) }), _jsx(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
|
+
}, children: _jsx(RestartAltIcon, { fontSize: "large" }) }), _jsx(IconButton, { color: "error", title: "\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443", size: "small", disabled: !airflowAvailable ||
|
|
311
|
+
dagRun?.state !== "running" ||
|
|
312
|
+
blockContols, onClick: () => {
|
|
313
|
+
setBlockControls(true);
|
|
314
|
+
handleStopLoad();
|
|
315
|
+
}, children: _jsx(StopRoundedIcon, { fontSize: "large" }) })] }) })] }) }), _jsx("div", { style: { height: "90%", width: "auto", flex: "0 0 auto" }, children: _jsx("div", { style: { maxHeight: "100%", overflow: "auto" }, children: taskInstances?.taskInstances.map((ti, idx) => {
|
|
316
|
+
return (_jsx(SubtaskItem, { taskInstance: ti, expanded: idx === activeTaskNumber, expandedLogContainerRef: idx === activeTaskNumber ? logContainerRef : undefined, onShowLogs: handleShowLogs, logs: logs[idx] != null ? logs[idx].content : "" }, idx));
|
|
317
|
+
}) }) })] }), _jsx("style", { children: `
|
|
324
318
|
@keyframes rotate-around {
|
|
325
319
|
from {
|
|
326
320
|
transform: rotate(0deg);
|
|
@@ -329,5 +323,6 @@ export default function TaskLoader({ style, subTitle }) {
|
|
|
329
323
|
transform: rotate(-360deg);
|
|
330
324
|
}
|
|
331
325
|
}
|
|
332
|
-
`)));
|
|
333
|
-
}
|
|
326
|
+
` })] }));
|
|
327
|
+
};
|
|
328
|
+
export default TaskLoader;
|
|
@@ -1 +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;
|
|
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;IACjB,cAAc,IAAI,IAAI,CAAC;CACxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from "./TaskLoader";
|
|
2
1
|
export * from "./TaskLoader";
|
|
3
|
-
export { default
|
|
2
|
+
export { default } from "./TaskLoader";
|
|
4
3
|
export * from "./TaskLoaderProps";
|
|
4
|
+
export { type default as TaskLoaderProps } from "./TaskLoaderProps";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TaskLoader/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,KAAK,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|