@cloudtower/eagle 4100.0.10 → 4100.0.12
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/cjs/core/AccordionCard/index.js +1 -1
- package/dist/cjs/core/Alert/alert.style.js +2 -2
- package/dist/cjs/core/Avatar/index.js +1 -1
- package/dist/cjs/core/Banner/banner.style.js +4 -4
- package/dist/cjs/core/BasicCTError/BasicCTError.style.js +1 -1
- package/dist/cjs/core/BlankState/style.js +1 -1
- package/dist/cjs/core/Breadcrumb/index.js +1 -1
- package/dist/cjs/core/Button/index.js +1 -1
- package/dist/cjs/core/ButtonGroup/index.js +2 -2
- package/dist/cjs/core/Card/CardBody.js +1 -1
- package/dist/cjs/core/Card/CardTitle.js +1 -1
- package/dist/cjs/core/Card/CardWrapper.js +2 -2
- package/dist/cjs/core/Cascader/cascader.style.js +11 -11
- package/dist/cjs/core/Checkbox/checkbox.style.js +1 -1
- package/dist/cjs/core/ConfigProvider/index.js +28 -5
- package/dist/cjs/core/DetailCard/index.js +1 -1
- package/dist/cjs/core/DonutChart/index.js +2 -2
- package/dist/cjs/core/DropdownMenu/index.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandIcon.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandableContainer.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandableItem.js +2 -2
- package/dist/cjs/core/ExpandableList/RoundOrder.js +1 -1
- package/dist/cjs/core/FailedLoad/index.js +1 -1
- package/dist/cjs/core/FormItem/index.js +1 -1
- package/dist/cjs/core/Icon/index.js +1 -1
- package/dist/cjs/core/ImmersiveDialog/styles.js +14 -14
- package/dist/cjs/core/Input/index.js +1 -1
- package/dist/cjs/core/InputGroup/index.js +1 -1
- package/dist/cjs/core/InputInteger/index.js +1 -1
- package/dist/cjs/core/InputNumber/index.js +1 -1
- package/dist/cjs/core/InputPassword/index.js +1 -1
- package/dist/cjs/core/InputTagItem/index.js +1 -1
- package/dist/cjs/core/LegacySelect/select.style.js +1 -1
- package/dist/cjs/core/Legend/index.js +5 -5
- package/dist/cjs/core/LineChart/LineChartActions.js +2 -2
- package/dist/cjs/core/LineChart/TooltipFormatter.js +1 -1
- package/dist/cjs/core/LineChart/styled.js +9 -9
- package/dist/cjs/core/Link/index.js +1 -1
- package/dist/cjs/core/Loading/style.js +4 -4
- package/dist/cjs/core/LocalUpload/LocalUpload.style.js +2 -2
- package/dist/cjs/core/LogView/LogView.eventSourceLoader.js +14 -0
- package/dist/cjs/core/LogView/LogView.js +90 -75
- package/dist/cjs/core/LogView/LogView.style.js +5 -5
- package/dist/cjs/core/LogView/LogView.utils.js +18 -7
- package/dist/cjs/core/LogView/LogView.xtermLoader.js +22 -0
- package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/cjs/core/Metric/styled.js +8 -8
- package/dist/cjs/core/Nav/index.js +1 -1
- package/dist/cjs/core/Nav/style.js +2 -2
- package/dist/cjs/core/Overflow/index.js +2 -2
- package/dist/cjs/core/Pagination/index.js +2 -2
- package/dist/cjs/core/Progress/components.js +2 -2
- package/dist/cjs/core/Progress/index.js +2 -2
- package/dist/cjs/core/Progress/progress.style.js +4 -4
- package/dist/cjs/core/Progress/progress.widgets.js +2 -2
- package/dist/cjs/core/Radio/index.js +3 -3
- package/dist/cjs/core/SearchInput/SearchInput.style.js +5 -5
- package/dist/cjs/core/SegmentControl/index.js +4 -4
- package/dist/cjs/core/Select/select.style.js +4 -4
- package/dist/cjs/core/Select/select.widgets.js +3 -3
- package/dist/cjs/core/SimplePagination/index.js +2 -2
- package/dist/cjs/core/Skeleton/Content.js +1 -1
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +7 -7
- package/dist/cjs/core/StatusCapsule/index.js +2 -2
- package/dist/cjs/core/StepProgress/index.js +1 -1
- package/dist/cjs/core/Steps/style.js +5 -5
- package/dist/cjs/core/Styled/index.js +40 -40
- package/dist/cjs/core/Switch/index.js +2 -2
- package/dist/cjs/core/Tab/Tab.js +1 -1
- package/dist/cjs/core/Tab/Tab.style.js +4 -4
- package/dist/cjs/core/Table/TableSkeleton.js +1 -1
- package/dist/cjs/core/Table/TableWidget.js +1 -1
- package/dist/cjs/core/Table/index.js +3 -3
- package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
- package/dist/cjs/core/TableForm/style.js +7 -7
- package/dist/cjs/core/Tag/SplitTag.js +1 -1
- package/dist/cjs/core/Tag/style.js +5 -5
- package/dist/cjs/core/Time/index.js +1 -1
- package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
- package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
- package/dist/cjs/core/Token/index.js +4 -4
- package/dist/cjs/core/Token/style.js +1 -1
- package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
- package/dist/cjs/core/Tooltip/index.js +1 -1
- package/dist/cjs/core/Truncate/index.js +1 -1
- package/dist/cjs/core/Typo/index.js +58 -58
- package/dist/cjs/core/WizardDialog/styles.js +4 -4
- package/dist/cjs/coreX/BarChart/index.js +1 -1
- package/dist/cjs/coreX/BatchOperation/index.js +2 -2
- package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
- package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
- package/dist/cjs/coreX/CircleLoading/index.js +1 -1
- package/dist/cjs/coreX/CronCalendar/index.js +4 -4
- package/dist/cjs/coreX/CronPlan/index.js +8 -8
- package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
- package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +1 -1
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
- package/dist/cjs/coreX/GoBackButton/index.js +1 -1
- package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
- package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
- package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
- package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
- package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
- package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
- package/dist/cjs/coreX/Sider/index.js +3 -3
- package/dist/cjs/coreX/SummaryTable/index.js +5 -5
- package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
- package/dist/cjs/coreX/TabMenu/index.js +2 -2
- package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
- package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
- package/dist/cjs/coreX/common/getCalendarTitle.js +5 -0
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3253 -3253
- package/dist/esm/core/AccordionCard/index.js +1 -1
- package/dist/esm/core/Alert/alert.style.js +2 -2
- package/dist/esm/core/Avatar/index.js +1 -1
- package/dist/esm/core/Banner/banner.style.js +4 -4
- package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
- package/dist/esm/core/BlankState/style.js +1 -1
- package/dist/esm/core/Breadcrumb/index.js +1 -1
- package/dist/esm/core/Button/index.js +1 -1
- package/dist/esm/core/ButtonGroup/index.js +2 -2
- package/dist/esm/core/Card/CardBody.js +1 -1
- package/dist/esm/core/Card/CardTitle.js +1 -1
- package/dist/esm/core/Card/CardWrapper.js +2 -2
- package/dist/esm/core/Cascader/cascader.style.js +11 -11
- package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
- package/dist/esm/core/ConfigProvider/index.js +26 -5
- package/dist/esm/core/DetailCard/index.js +1 -1
- package/dist/esm/core/DonutChart/index.js +2 -2
- package/dist/esm/core/DropdownMenu/index.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
- package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
- package/dist/esm/core/FailedLoad/index.js +1 -1
- package/dist/esm/core/FormItem/index.js +1 -1
- package/dist/esm/core/Icon/index.js +1 -1
- package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
- package/dist/esm/core/Input/index.js +1 -1
- package/dist/esm/core/InputGroup/index.js +1 -1
- package/dist/esm/core/InputInteger/index.js +1 -1
- package/dist/esm/core/InputNumber/index.js +1 -1
- package/dist/esm/core/InputPassword/index.js +1 -1
- package/dist/esm/core/InputTagItem/index.js +1 -1
- package/dist/esm/core/LegacySelect/select.style.js +1 -1
- package/dist/esm/core/Legend/index.js +5 -5
- package/dist/esm/core/LineChart/LineChartActions.js +2 -2
- package/dist/esm/core/LineChart/TooltipFormatter.js +1 -1
- package/dist/esm/core/LineChart/styled.js +9 -9
- package/dist/esm/core/Link/index.js +1 -1
- package/dist/esm/core/Loading/style.js +4 -4
- package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
- package/dist/esm/core/LogView/LogView.eventSourceLoader.js +12 -0
- package/dist/esm/core/LogView/LogView.js +90 -75
- package/dist/esm/core/LogView/LogView.style.js +5 -5
- package/dist/esm/core/LogView/LogView.utils.js +18 -7
- package/dist/esm/core/LogView/LogView.xtermLoader.js +20 -0
- package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/esm/core/Metric/styled.js +8 -8
- package/dist/esm/core/Nav/index.js +1 -1
- package/dist/esm/core/Nav/style.js +2 -2
- package/dist/esm/core/Overflow/index.js +2 -2
- package/dist/esm/core/Pagination/index.js +2 -2
- package/dist/esm/core/Progress/components.js +2 -2
- package/dist/esm/core/Progress/index.js +2 -2
- package/dist/esm/core/Progress/progress.style.js +4 -4
- package/dist/esm/core/Progress/progress.widgets.js +2 -2
- package/dist/esm/core/Radio/index.js +3 -3
- package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
- package/dist/esm/core/SegmentControl/index.js +4 -4
- package/dist/esm/core/Select/select.style.js +4 -4
- package/dist/esm/core/Select/select.widgets.js +3 -3
- package/dist/esm/core/SimplePagination/index.js +2 -2
- package/dist/esm/core/Skeleton/Content.js +1 -1
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
- package/dist/esm/core/StatusCapsule/index.js +2 -2
- package/dist/esm/core/StepProgress/index.js +1 -1
- package/dist/esm/core/Steps/style.js +5 -5
- package/dist/esm/core/Styled/index.js +40 -40
- package/dist/esm/core/Switch/index.js +2 -2
- package/dist/esm/core/Tab/Tab.js +1 -1
- package/dist/esm/core/Tab/Tab.style.js +4 -4
- package/dist/esm/core/Table/TableSkeleton.js +1 -1
- package/dist/esm/core/Table/TableWidget.js +1 -1
- package/dist/esm/core/Table/index.js +3 -3
- package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
- package/dist/esm/core/TableForm/style.js +7 -7
- package/dist/esm/core/Tag/SplitTag.js +1 -1
- package/dist/esm/core/Tag/style.js +5 -5
- package/dist/esm/core/Time/index.js +1 -1
- package/dist/esm/core/TimeZoneSelect/index.js +7 -7
- package/dist/esm/core/Timeline/Timeline.style.js +5 -5
- package/dist/esm/core/Token/index.js +4 -4
- package/dist/esm/core/Token/style.js +1 -1
- package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
- package/dist/esm/core/Tooltip/index.js +1 -1
- package/dist/esm/core/Truncate/index.js +1 -1
- package/dist/esm/core/Typo/index.js +58 -58
- package/dist/esm/core/WizardDialog/styles.js +4 -4
- package/dist/esm/coreX/BarChart/index.js +1 -1
- package/dist/esm/coreX/BatchOperation/index.js +2 -2
- package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
- package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
- package/dist/esm/coreX/CircleLoading/index.js +1 -1
- package/dist/esm/coreX/CronCalendar/index.js +4 -4
- package/dist/esm/coreX/CronPlan/index.js +8 -8
- package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
- package/dist/esm/coreX/DateRangePicker/RelativeTime.js +1 -1
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
- package/dist/esm/coreX/GoBackButton/index.js +1 -1
- package/dist/esm/coreX/I18nNameTag/index.js +1 -1
- package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
- package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
- package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
- package/dist/esm/coreX/NamesTooltip/index.js +3 -3
- package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
- package/dist/esm/coreX/Sider/index.js +3 -3
- package/dist/esm/coreX/SummaryTable/index.js +5 -5
- package/dist/esm/coreX/SwitchWithText/index.js +1 -1
- package/dist/esm/coreX/TabMenu/index.js +2 -2
- package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
- package/dist/esm/coreX/UnitWithChart/index.js +3 -3
- package/dist/esm/coreX/common/getCalendarTitle.js +5 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +2675 -2675
- package/dist/src/core/ConfigProvider/index.d.ts +2 -0
- package/dist/src/core/LogView/LogView.eventSourceLoader.d.ts +1 -0
- package/dist/src/core/LogView/LogView.utils.d.ts +2 -2
- package/dist/src/core/LogView/LogView.xtermLoader.d.ts +1 -0
- package/dist/src/coreX/common/__tests__/getCalendarTitle.test.d.ts +1 -0
- package/dist/style.css +3253 -3253
- package/package.json +3 -3
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
2
|
import { cx } from '@linaria/core';
|
|
3
|
-
import { Terminal } from '@xterm/xterm';
|
|
4
|
-
import { SearchAddon } from '@xterm/addon-search';
|
|
5
|
-
import { FitAddon } from '@xterm/addon-fit';
|
|
6
3
|
import { Search16OntintIcon, ArrowChevronUp16OntintIcon, ArrowChevronUp16BlueIcon, ArrowChevronDown16OntintIcon, ArrowChevronDown16BlueIcon, XmarkCloseCircleFill16OntintIcon, XmarkCloseCircleFill16OntintLightIcon } from '@cloudtower/icons-react';
|
|
7
4
|
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
8
5
|
import { LogViewContainer, LogViewInnerContaier, SearchInputStyle, LogTerminal, CustomContentOverlay } from './LogView.style.js';
|
|
6
|
+
import { loadXtermModules as loadXtermModules$1 } from './LogView.xtermLoader.js';
|
|
9
7
|
import { isMacOS, customShortcutsForMac, customShortcutsForWin, isCustomKeyboardAction, scrollLines, scrollPages, copySelectLines, selectAll, eventsource } from './LogView.utils.js';
|
|
10
8
|
import { Color } from '../../styles/token/color.js';
|
|
11
9
|
import { Show } from '../../coreX/Show/index.js';
|
|
@@ -30,6 +28,7 @@ var __spreadValues = (a, b) => {
|
|
|
30
28
|
return a;
|
|
31
29
|
};
|
|
32
30
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
31
|
+
const loadXtermModules = loadXtermModules$1;
|
|
33
32
|
const useLogViewEventSource = ({
|
|
34
33
|
enabled,
|
|
35
34
|
terminal,
|
|
@@ -147,84 +146,100 @@ const LogView = ({
|
|
|
147
146
|
const [current, setCurrent] = useState(1);
|
|
148
147
|
const [eventSourceError, setEventSourceError] = useState(null);
|
|
149
148
|
useEffect(() => {
|
|
150
|
-
var _a;
|
|
151
149
|
if (!terminalContainerRef.current)
|
|
152
150
|
return;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
151
|
+
let disposed = false;
|
|
152
|
+
let terminal = null;
|
|
153
|
+
setReadyTerminal(null);
|
|
154
|
+
const initializeTerminal = async () => {
|
|
155
|
+
var _a;
|
|
156
|
+
try {
|
|
157
|
+
const { Terminal, SearchAddon, FitAddon } = await loadXtermModules();
|
|
158
|
+
if (disposed || !terminalContainerRef.current)
|
|
159
|
+
return;
|
|
160
|
+
terminal = new Terminal({
|
|
161
|
+
fontFamily: "Roboto Mono, monospace",
|
|
162
|
+
fontSize: 12,
|
|
163
|
+
scrollOnUserInput: false,
|
|
164
|
+
lineHeight: 1.5,
|
|
165
|
+
theme: {
|
|
166
|
+
background: "#00122E",
|
|
167
|
+
foreground: "#FFFFFF",
|
|
168
|
+
cursor: "#FFFFFF"
|
|
169
|
+
},
|
|
170
|
+
rows,
|
|
171
|
+
convertEol: true,
|
|
172
|
+
cursorBlink: false,
|
|
173
|
+
disableStdin: true,
|
|
174
|
+
allowProposedApi: true,
|
|
175
|
+
scrollback
|
|
176
|
+
});
|
|
177
|
+
terminal.attachCustomKeyEventHandler((event) => {
|
|
178
|
+
if (!terminalRef.current.enableKeyboardShortcuts)
|
|
179
|
+
return true;
|
|
180
|
+
const target = event.target;
|
|
181
|
+
const isXtermEvent = target instanceof HTMLElement && target.closest(".xterm");
|
|
182
|
+
if (!isXtermEvent)
|
|
183
|
+
return true;
|
|
184
|
+
const shortcuts = isMacOS() ? customShortcutsForMac : customShortcutsForWin;
|
|
185
|
+
if (event.type === "keydown" && isCustomKeyboardAction(event, shortcuts)) {
|
|
186
|
+
event.stopPropagation();
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
const keyActions = {
|
|
189
|
+
arrowup: () => scrollLines("up", terminal),
|
|
190
|
+
arrowdown: () => scrollLines("down", terminal),
|
|
191
|
+
pageup: () => scrollPages("up", terminal),
|
|
192
|
+
pagedown: () => scrollPages("down", terminal),
|
|
193
|
+
c: () => copySelectLines(terminal),
|
|
194
|
+
a: () => selectAll(terminal)
|
|
195
|
+
};
|
|
196
|
+
const action = keyActions[event.key.toLowerCase()];
|
|
197
|
+
if (action)
|
|
198
|
+
action();
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
return true;
|
|
202
|
+
});
|
|
203
|
+
const search = new SearchAddon({
|
|
204
|
+
highlightLimit: searchHighlightLimit
|
|
205
|
+
});
|
|
206
|
+
terminal.loadAddon(search);
|
|
207
|
+
const fit = new FitAddon();
|
|
208
|
+
terminal.loadAddon(fit);
|
|
209
|
+
terminalRef.current = {
|
|
210
|
+
searchAddon: search,
|
|
211
|
+
fitAddon: fit,
|
|
212
|
+
enableKeyboardShortcuts: terminalRef.current.enableKeyboardShortcuts
|
|
188
213
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
214
|
+
terminal.open(terminalContainerRef.current);
|
|
215
|
+
try {
|
|
216
|
+
fit.fit();
|
|
217
|
+
} catch (e) {
|
|
218
|
+
console.error("Error fitting terminal:", e);
|
|
219
|
+
}
|
|
220
|
+
if (content) {
|
|
221
|
+
terminal.write(content);
|
|
222
|
+
terminalRef.current.previousContent = content;
|
|
223
|
+
setHasData(true);
|
|
224
|
+
} else {
|
|
225
|
+
setHasData(false);
|
|
226
|
+
}
|
|
227
|
+
(_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
|
|
228
|
+
({ resultCount, resultIndex }) => {
|
|
229
|
+
setSearchCount(resultCount);
|
|
230
|
+
setCurrent(resultIndex + 1);
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
setReadyTerminal(terminal);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
if (!disposed)
|
|
236
|
+
console.error("Error initializing terminal:", e);
|
|
193
237
|
}
|
|
194
|
-
return true;
|
|
195
|
-
});
|
|
196
|
-
const search = new SearchAddon({
|
|
197
|
-
highlightLimit: searchHighlightLimit
|
|
198
|
-
});
|
|
199
|
-
terminal.loadAddon(search);
|
|
200
|
-
const fit = new FitAddon();
|
|
201
|
-
terminal.loadAddon(fit);
|
|
202
|
-
terminalRef.current = {
|
|
203
|
-
searchAddon: search,
|
|
204
|
-
fitAddon: fit
|
|
205
238
|
};
|
|
206
|
-
|
|
207
|
-
setReadyTerminal(terminal);
|
|
208
|
-
try {
|
|
209
|
-
fit.fit();
|
|
210
|
-
} catch (e) {
|
|
211
|
-
console.error("Error fitting terminal:", e);
|
|
212
|
-
}
|
|
213
|
-
if (content) {
|
|
214
|
-
terminal.write(content);
|
|
215
|
-
terminalRef.current.previousContent = content;
|
|
216
|
-
setHasData(true);
|
|
217
|
-
} else {
|
|
218
|
-
setHasData(false);
|
|
219
|
-
}
|
|
220
|
-
(_a = terminalRef.current.searchAddon) == null ? void 0 : _a.onDidChangeResults(
|
|
221
|
-
({ resultCount, resultIndex }) => {
|
|
222
|
-
setSearchCount(resultCount);
|
|
223
|
-
setCurrent(resultIndex + 1);
|
|
224
|
-
}
|
|
225
|
-
);
|
|
239
|
+
initializeTerminal();
|
|
226
240
|
return () => {
|
|
227
|
-
|
|
241
|
+
disposed = true;
|
|
242
|
+
terminal == null ? void 0 : terminal.dispose();
|
|
228
243
|
};
|
|
229
244
|
}, [rows, scrollback, searchHighlightLimit]);
|
|
230
245
|
useEffect(() => {
|
|
@@ -2,24 +2,24 @@ import { styled } from '@linaria/react';
|
|
|
2
2
|
|
|
3
3
|
const LogViewContainer = /*#__PURE__*/styled('div')({
|
|
4
4
|
name: "LogViewContainer",
|
|
5
|
-
class: "
|
|
5
|
+
class: "E_4100_0_12_l1v1luhz",
|
|
6
6
|
propsAsIs: false
|
|
7
7
|
});
|
|
8
8
|
const LogViewInnerContaier = /*#__PURE__*/styled('div')({
|
|
9
9
|
name: "LogViewInnerContaier",
|
|
10
|
-
class: "
|
|
10
|
+
class: "E_4100_0_12_lranxiw",
|
|
11
11
|
propsAsIs: false
|
|
12
12
|
});
|
|
13
13
|
const LogTerminal = /*#__PURE__*/styled('div')({
|
|
14
14
|
name: "LogTerminal",
|
|
15
|
-
class: "
|
|
15
|
+
class: "E_4100_0_12_l1y3zqy5",
|
|
16
16
|
propsAsIs: false
|
|
17
17
|
});
|
|
18
18
|
const CustomContentOverlay = /*#__PURE__*/styled('div')({
|
|
19
19
|
name: "CustomContentOverlay",
|
|
20
|
-
class: "
|
|
20
|
+
class: "E_4100_0_12_c1x4mn5u",
|
|
21
21
|
propsAsIs: false
|
|
22
22
|
});
|
|
23
|
-
const SearchInputStyle = "
|
|
23
|
+
const SearchInputStyle = "E_4100_0_12_s4pilip";
|
|
24
24
|
|
|
25
25
|
export { CustomContentOverlay, LogTerminal, LogViewContainer, LogViewInnerContaier, SearchInputStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadEventSourceModule as loadEventSourceModule$1 } from './LogView.eventSourceLoader.js';
|
|
2
2
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __defProps = Object.defineProperties;
|
|
@@ -19,6 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
21
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
const loadEventSourceModule = loadEventSourceModule$1;
|
|
22
23
|
const eventsource = (url, options, terminal) => {
|
|
23
24
|
const {
|
|
24
25
|
initOptions,
|
|
@@ -33,6 +34,7 @@ const eventsource = (url, options, terminal) => {
|
|
|
33
34
|
onMessage
|
|
34
35
|
} = options;
|
|
35
36
|
let aborted = false;
|
|
37
|
+
let EventSourceConstructor = null;
|
|
36
38
|
let eventSource = null;
|
|
37
39
|
const close = () => {
|
|
38
40
|
aborted = true;
|
|
@@ -41,19 +43,28 @@ const eventsource = (url, options, terminal) => {
|
|
|
41
43
|
eventSource = null;
|
|
42
44
|
}
|
|
43
45
|
};
|
|
44
|
-
const start = () => {
|
|
46
|
+
const start = async () => {
|
|
45
47
|
var _a;
|
|
46
48
|
try {
|
|
47
|
-
|
|
49
|
+
if (!EventSourceConstructor) {
|
|
50
|
+
EventSourceConstructor = (await loadEventSourceModule()).EventSource;
|
|
51
|
+
}
|
|
52
|
+
if (aborted)
|
|
53
|
+
return;
|
|
54
|
+
eventSource = new EventSourceConstructor(url, initOptions);
|
|
48
55
|
eventSource.addEventListener(openEventName, (e) => {
|
|
49
|
-
onOpen && onOpen(
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
onOpen && onOpen(
|
|
57
|
+
e,
|
|
58
|
+
eventSource,
|
|
59
|
+
{
|
|
60
|
+
terminal
|
|
61
|
+
}
|
|
62
|
+
);
|
|
52
63
|
});
|
|
53
64
|
eventSource.addEventListener(errorEventName, (err) => {
|
|
54
65
|
var _a2;
|
|
55
66
|
onError && onError(err);
|
|
56
|
-
if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) ===
|
|
67
|
+
if (!aborted && options.reconnect && (eventSource == null ? void 0 : eventSource.readyState) === (EventSourceConstructor == null ? void 0 : EventSourceConstructor.CLOSED)) {
|
|
57
68
|
const timeout = (_a2 = options.reconnectWait) != null ? _a2 : 1;
|
|
58
69
|
setTimeout(start, timeout * 1e3);
|
|
59
70
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
let xtermModulesPromise = null;
|
|
2
|
+
const loadXtermModules = () => {
|
|
3
|
+
if (!xtermModulesPromise) {
|
|
4
|
+
xtermModulesPromise = Promise.all([
|
|
5
|
+
import('@xterm/xterm'),
|
|
6
|
+
import('@xterm/addon-search'),
|
|
7
|
+
import('@xterm/addon-fit')
|
|
8
|
+
]).then(([xterm, addonSearch, addonFit]) => ({
|
|
9
|
+
Terminal: xterm.Terminal,
|
|
10
|
+
SearchAddon: addonSearch.SearchAddon,
|
|
11
|
+
FitAddon: addonFit.FitAddon
|
|
12
|
+
})).catch((error) => {
|
|
13
|
+
xtermModulesPromise = null;
|
|
14
|
+
throw error;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return xtermModulesPromise;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { loadXtermModules };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { styled } from '@linaria/react';
|
|
2
2
|
|
|
3
|
-
const MetricLegendTabStyle = "
|
|
4
|
-
const LegendStyle = "
|
|
5
|
-
const LegendItemStyle = "
|
|
6
|
-
const ColorBlockStyle = "
|
|
7
|
-
const ExtraResource = "
|
|
3
|
+
const MetricLegendTabStyle = "E_4100_0_12_mp64wfi";
|
|
4
|
+
const LegendStyle = "E_4100_0_12_l1oyigan";
|
|
5
|
+
const LegendItemStyle = "E_4100_0_12_l1noi4n1";
|
|
6
|
+
const ColorBlockStyle = "E_4100_0_12_cz19rz6";
|
|
7
|
+
const ExtraResource = "E_4100_0_12_e17r5r9c";
|
|
8
8
|
const MetricWrapper = /*#__PURE__*/styled('div')({
|
|
9
9
|
name: "MetricWrapper",
|
|
10
|
-
class: "
|
|
10
|
+
class: "E_4100_0_12_m1y1hhnr",
|
|
11
11
|
propsAsIs: false
|
|
12
12
|
});
|
|
13
13
|
const TooltipWrapper = /*#__PURE__*/styled('div')({
|
|
14
14
|
name: "TooltipWrapper",
|
|
15
|
-
class: "
|
|
15
|
+
class: "E_4100_0_12_tnvijvs",
|
|
16
16
|
propsAsIs: false
|
|
17
17
|
});
|
|
18
18
|
const TooltipColumn = /*#__PURE__*/styled('div')({
|
|
19
19
|
name: "TooltipColumn",
|
|
20
|
-
class: "
|
|
20
|
+
class: "E_4100_0_12_t1ub2aex",
|
|
21
21
|
propsAsIs: false
|
|
22
22
|
});
|
|
23
23
|
|
|
@@ -2,9 +2,9 @@ import { styled } from '@linaria/react';
|
|
|
2
2
|
|
|
3
3
|
const Header = /*#__PURE__*/styled('header')({
|
|
4
4
|
name: "Header",
|
|
5
|
-
class: "
|
|
5
|
+
class: "E_4100_0_12_h12yihis",
|
|
6
6
|
propsAsIs: false
|
|
7
7
|
});
|
|
8
|
-
const NavCenterStyle = "
|
|
8
|
+
const NavCenterStyle = "E_4100_0_12_ncaepor";
|
|
9
9
|
|
|
10
10
|
export { Header, NavCenterStyle };
|
|
@@ -2,8 +2,8 @@ import cs from 'classnames';
|
|
|
2
2
|
import React__default, { useRef, useState, useCallback, useLayoutEffect } from 'react';
|
|
3
3
|
import useElementResize from '../../hooks/useElementResize.js';
|
|
4
4
|
|
|
5
|
-
const OverflowWrapper = "
|
|
6
|
-
const HiddenStyle = "
|
|
5
|
+
const OverflowWrapper = "E_4100_0_12_owd0kml";
|
|
6
|
+
const HiddenStyle = "E_4100_0_12_h1jsgezc";
|
|
7
7
|
const Overflow = props => {
|
|
8
8
|
const {
|
|
9
9
|
children,
|
|
@@ -6,8 +6,8 @@ import { Dropdown, Menu } from 'antd';
|
|
|
6
6
|
import cs from 'classnames';
|
|
7
7
|
import React__default, { useRef, useEffect, useMemo } from 'react';
|
|
8
8
|
|
|
9
|
-
const PaginationStyle = "
|
|
10
|
-
const DropdownOverlayStyle = "
|
|
9
|
+
const PaginationStyle = "E_4100_0_12_phljevk";
|
|
10
|
+
const DropdownOverlayStyle = "E_4100_0_12_d12rtyeg";
|
|
11
11
|
const Pagination = props => {
|
|
12
12
|
const {
|
|
13
13
|
current,
|
|
@@ -42,7 +42,7 @@ const _exp = /*#__PURE__*/() => ({
|
|
|
42
42
|
}) => color || "";
|
|
43
43
|
const IconFieldText = /*#__PURE__*/styled('div')({
|
|
44
44
|
name: "IconFieldText",
|
|
45
|
-
class: "
|
|
45
|
+
class: "E_4100_0_12_i14c7jc8",
|
|
46
46
|
propsAsIs: false,
|
|
47
47
|
vars: {
|
|
48
48
|
"i14c7jc8-0": [_exp()]
|
|
@@ -59,7 +59,7 @@ const StatusIconMap = {
|
|
|
59
59
|
};
|
|
60
60
|
const IconFieldWrapper = /*#__PURE__*/styled('div')({
|
|
61
61
|
name: "IconFieldWrapper",
|
|
62
|
-
class: "
|
|
62
|
+
class: "E_4100_0_12_i1ibuolf",
|
|
63
63
|
propsAsIs: false
|
|
64
64
|
});
|
|
65
65
|
const IconField = _a => {
|
|
@@ -39,7 +39,7 @@ var __objRest = (source, exclude) => {
|
|
|
39
39
|
};
|
|
40
40
|
const Row = /*#__PURE__*/styled('div')({
|
|
41
41
|
name: "Row",
|
|
42
|
-
class: "
|
|
42
|
+
class: "E_4100_0_12_r77hffu",
|
|
43
43
|
propsAsIs: false
|
|
44
44
|
});
|
|
45
45
|
const _exp = /*#__PURE__*/() => ({
|
|
@@ -47,7 +47,7 @@ const _exp = /*#__PURE__*/() => ({
|
|
|
47
47
|
}) => type === "rich" ? "6px" : "4px";
|
|
48
48
|
const ProgressContainer = /*#__PURE__*/styled('div')({
|
|
49
49
|
name: "ProgressContainer",
|
|
50
|
-
class: "
|
|
50
|
+
class: "E_4100_0_12_p1cmxsf7",
|
|
51
51
|
propsAsIs: false,
|
|
52
52
|
vars: {
|
|
53
53
|
"p1cmxsf7-0": [_exp()]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const DescriptionStyle = "
|
|
2
|
-
const FlexFullContentStyle = "
|
|
3
|
-
const BaseProgressStyle = "
|
|
4
|
-
const ProgressStyle = "
|
|
1
|
+
const DescriptionStyle = "E_4100_0_12_d1u4ndxc";
|
|
2
|
+
const FlexFullContentStyle = "E_4100_0_12_f6xb0iv";
|
|
3
|
+
const BaseProgressStyle = "E_4100_0_12_b1dhu7ov";
|
|
4
|
+
const ProgressStyle = "E_4100_0_12_p1as1j2z";
|
|
5
5
|
|
|
6
6
|
export { BaseProgressStyle, DescriptionStyle, FlexFullContentStyle, ProgressStyle };
|
|
@@ -33,11 +33,11 @@ var __objRest = (source, exclude) => {
|
|
|
33
33
|
}
|
|
34
34
|
return target;
|
|
35
35
|
};
|
|
36
|
-
const titleAreaStyle = "
|
|
36
|
+
const titleAreaStyle = "E_4100_0_12_t1gvlxt5";
|
|
37
37
|
const _exp2 = /*#__PURE__*/() => props => props.gap;
|
|
38
38
|
const AreaWrapper = /*#__PURE__*/styled('div')({
|
|
39
39
|
name: "AreaWrapper",
|
|
40
|
-
class: "
|
|
40
|
+
class: "E_4100_0_12_a1ji6r68",
|
|
41
41
|
propsAsIs: false,
|
|
42
42
|
vars: {
|
|
43
43
|
"a1ji6r68-0": [_exp2(), "px"]
|
|
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
|
-
const RadioStyle = "
|
|
34
|
-
const RadioGroupStyle = "
|
|
35
|
-
const RadioButtonStyle = "
|
|
33
|
+
const RadioStyle = "E_4100_0_12_rapgekc";
|
|
34
|
+
const RadioGroupStyle = "E_4100_0_12_rp906go";
|
|
35
|
+
const RadioButtonStyle = "E_4100_0_12_rcc63c8";
|
|
36
36
|
const KitRadioGroupContext = React__default.createContext({});
|
|
37
37
|
const Radio = _a => {
|
|
38
38
|
var _b = _a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const SearchInputStyles = "
|
|
2
|
-
const CountTextStyles = "
|
|
3
|
-
const IconContainerStyles = "
|
|
4
|
-
const DisabledIconStyles = "
|
|
5
|
-
const SearchInputDropdownStyles = "
|
|
1
|
+
const SearchInputStyles = "E_4100_0_12_s1n7hav7";
|
|
2
|
+
const CountTextStyles = "E_4100_0_12_c1tgpyn0";
|
|
3
|
+
const IconContainerStyles = "E_4100_0_12_i1cmbu8m";
|
|
4
|
+
const DisabledIconStyles = "E_4100_0_12_dxmfsc9";
|
|
5
|
+
const SearchInputDropdownStyles = "E_4100_0_12_slbf45q";
|
|
6
6
|
|
|
7
7
|
export { CountTextStyles, DisabledIconStyles, IconContainerStyles, SearchInputDropdownStyles, SearchInputStyles };
|
|
@@ -20,10 +20,10 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
}
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
|
-
const Segment = "
|
|
24
|
-
const SmallSegment = "
|
|
25
|
-
const MediumSegment = "
|
|
26
|
-
const ColorSegment = "
|
|
23
|
+
const Segment = "E_4100_0_12_s11wux3h";
|
|
24
|
+
const SmallSegment = "E_4100_0_12_s1t2an3z";
|
|
25
|
+
const MediumSegment = "E_4100_0_12_ma64lna";
|
|
26
|
+
const ColorSegment = "E_4100_0_12_ckld275";
|
|
27
27
|
const SegmentControl = props => {
|
|
28
28
|
const {
|
|
29
29
|
size = "middle",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const SelectStyle = "
|
|
2
|
-
const SelectIconStyle = "
|
|
3
|
-
const SelectSizeStyle = "
|
|
4
|
-
const PlaceholderTextStyle = "
|
|
1
|
+
const SelectStyle = "E_4100_0_12_s4ivdfu";
|
|
2
|
+
const SelectIconStyle = "E_4100_0_12_sks9xr8";
|
|
3
|
+
const SelectSizeStyle = "E_4100_0_12_swwhohx";
|
|
4
|
+
const PlaceholderTextStyle = "E_4100_0_12_p2sxmsl";
|
|
5
5
|
|
|
6
6
|
export { PlaceholderTextStyle, SelectIconStyle, SelectSizeStyle, SelectStyle };
|
|
@@ -27,9 +27,9 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
}
|
|
28
28
|
return target;
|
|
29
29
|
};
|
|
30
|
-
const OptionStyle = "
|
|
31
|
-
const LeftStyle = "
|
|
32
|
-
const SlotStyle = "
|
|
30
|
+
const OptionStyle = "E_4100_0_12_oa99sl3";
|
|
31
|
+
const LeftStyle = "E_4100_0_12_lvp5pj7";
|
|
32
|
+
const SlotStyle = "E_4100_0_12_s1io1lws";
|
|
33
33
|
const AntdOption = Select.Option;
|
|
34
34
|
function getOptions(options) {
|
|
35
35
|
return options.map(option => {
|
|
@@ -8,7 +8,7 @@ import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
|
8
8
|
import cs from 'classnames';
|
|
9
9
|
import React__default, { useCallback } from 'react';
|
|
10
10
|
|
|
11
|
-
const inputStyle = "
|
|
11
|
+
const inputStyle = "E_4100_0_12_ivqqkzv";
|
|
12
12
|
const SimplePagination = props => {
|
|
13
13
|
const {
|
|
14
14
|
className,
|
|
@@ -71,7 +71,7 @@ const SimplePagination = props => {
|
|
|
71
71
|
changeValue(event.target.value);
|
|
72
72
|
}
|
|
73
73
|
}), /* @__PURE__ */React__default.createElement("span", {
|
|
74
|
-
className: cs("
|
|
74
|
+
className: cs("E_4100_0_12_c1wk4q29", Typo.Label.l3_regular_upper)
|
|
75
75
|
}, `/ ${pageLength}`), showNext && /* @__PURE__ */React__default.createElement(Button, {
|
|
76
76
|
className: "next-btn",
|
|
77
77
|
type: "quiet",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const DialogStyle = "
|
|
2
|
-
const FooterStyle = "
|
|
3
|
-
const ErrorTextStyle = "
|
|
4
|
-
const CloseIconStyle = "
|
|
5
|
-
const ModelTitleSkeletonStyle = "
|
|
6
|
-
const ModelContentSkeletonStyle = "
|
|
7
|
-
const ModelInitializingErrorStyle = "
|
|
1
|
+
const DialogStyle = "E_4100_0_12_dxyv8bv";
|
|
2
|
+
const FooterStyle = "E_4100_0_12_fbgo4wr";
|
|
3
|
+
const ErrorTextStyle = "E_4100_0_12_ekxnz54";
|
|
4
|
+
const CloseIconStyle = "E_4100_0_12_ct1041x";
|
|
5
|
+
const ModelTitleSkeletonStyle = "E_4100_0_12_m1k84ymw";
|
|
6
|
+
const ModelContentSkeletonStyle = "E_4100_0_12_m15ds5xe";
|
|
7
|
+
const ModelInitializingErrorStyle = "E_4100_0_12_ma56n19";
|
|
8
8
|
|
|
9
9
|
export { CloseIconStyle, DialogStyle, ErrorTextStyle, FooterStyle, ModelContentSkeletonStyle, ModelInitializingErrorStyle, ModelTitleSkeletonStyle };
|
|
@@ -35,10 +35,10 @@ var __objRest = (source, exclude) => {
|
|
|
35
35
|
return target;
|
|
36
36
|
};
|
|
37
37
|
const StatusPresetColors = ["blue", "red", "yellow", "green", "gray"];
|
|
38
|
-
const StatusCapsuleStyle = "
|
|
38
|
+
const StatusCapsuleStyle = "E_4100_0_12_sddwhm6";
|
|
39
39
|
const StatusCode = /*#__PURE__*/styled('i')({
|
|
40
40
|
name: "StatusCode",
|
|
41
|
-
class: "
|
|
41
|
+
class: "E_4100_0_12_satwmqm",
|
|
42
42
|
propsAsIs: false
|
|
43
43
|
});
|
|
44
44
|
const StatusIcon = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const StepsStyle = "
|
|
2
|
-
const HorizontalStyle = "
|
|
3
|
-
const VerticalStyle = "
|
|
4
|
-
const HorizontalStepContentStyle = "
|
|
5
|
-
const VerticalStepContentStyle = "
|
|
1
|
+
const StepsStyle = "E_4100_0_12_sjob3jg";
|
|
2
|
+
const HorizontalStyle = "E_4100_0_12_hjvj6s6";
|
|
3
|
+
const VerticalStyle = "E_4100_0_12_v4tv3mf";
|
|
4
|
+
const HorizontalStepContentStyle = "E_4100_0_12_h6l1tj4";
|
|
5
|
+
const VerticalStepContentStyle = "E_4100_0_12_v18frne8";
|
|
6
6
|
|
|
7
7
|
export { HorizontalStepContentStyle, HorizontalStyle, StepsStyle, VerticalStepContentStyle, VerticalStyle };
|