Skip to content

Commit 2000552

Browse files
committed
Get it working
1 parent b1c3da0 commit 2000552

File tree

9 files changed

+28
-33
lines changed

9 files changed

+28
-33
lines changed

src/main/frontend/pipeline-console-view/app.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { lazy } from "react";
22

3-
import { I18NProvider } from "../common/i18n/i18n-provider";
4-
import { FilterProvider } from "./pipeline-console/main/providers/filter-provider";
5-
import { ResourceBundleName } from "../common/i18n/translations";
6-
import { LayoutPreferencesProvider } from "./pipeline-console/main/providers/user-preference-provider";
3+
import { I18NProvider } from "../common/i18n/i18n-provider.tsx";
4+
import { FilterProvider } from "./pipeline-console/main/providers/filter-provider.tsx";
5+
import { ResourceBundleName } from "../common/i18n/translations.ts";
6+
import { LayoutPreferencesProvider } from "./pipeline-console/main/providers/user-preference-provider.tsx";
77

88
const PipelineConsole = lazy(
99
() => import("./pipeline-console/main/PipelineConsole"),
@@ -14,10 +14,7 @@ export default function App() {
1414
document.getElementById("console-pipeline-root")?.dataset.userLocale ??
1515
"en";
1616
return (
17-
<I18NProvider
18-
bundles={[ResourceBundleName.messages, ResourceBundleName.run]}
19-
locale={locale}
20-
>
17+
<I18NProvider bundles={[ResourceBundleName.messages]} locale={locale}>
2118
<FilterProvider>
2219
<LayoutPreferencesProvider>
2320
<PipelineConsole />

src/main/frontend/pipeline-console-view/pipeline-console/main/PipelineConsole.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default function PipelineConsole() {
2626
expandedSteps,
2727
stages,
2828
handleStageSelect,
29-
handleStepToggle,
30-
handleMoreConsoleClick,
29+
onStepToggle,
30+
onMoreConsoleClick,
3131
} = useStepsPoller({ currentRunPath, previousRunPath });
3232

3333
return (
@@ -60,7 +60,7 @@ export default function PipelineConsole() {
6060
<div className={"pgv-graph-view-thing"}>
6161
<PipelineGraph
6262
stages={stages}
63-
handleStageSelect={handleStageSelect}
63+
onStageSelect={handleStageSelect}
6464
/>
6565
</div>
6666
)}
@@ -87,8 +87,8 @@ export default function PipelineConsole() {
8787
steps={openStageSteps}
8888
stepBuffers={openStageStepBuffers}
8989
expandedSteps={expandedSteps}
90-
handleStepToggle={handleStepToggle}
91-
handleMoreConsoleClick={handleMoreConsoleClick}
90+
onStepToggle={onStepToggle}
91+
onMoreConsoleClick={onMoreConsoleClick}
9292
/>
9393
</div>
9494
</SplitView>

src/main/frontend/pipeline-console-view/pipeline-console/main/components/checkboxes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
MainViewVisibility,
44
StageViewPosition,
55
useLayoutPreferences,
6-
} from "../providers/user-preference-provider";
6+
} from "../providers/user-preference-provider.tsx";
77
import "./checkboxes.scss";
88

99
export default function VisibilitySelect() {

src/main/frontend/pipeline-console-view/pipeline-console/main/split-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState, useRef, useEffect } from "react";
22
import "./split-view.scss";
3-
import { useLayoutPreferences } from "./providers/user-preference-provider";
3+
import { useLayoutPreferences } from "./providers/user-preference-provider.tsx";
44

55
export default function SplitView(props: SplitViewNewProps) {
66
const {

src/main/frontend/pipeline-console-view/pipeline-console/main/stage-details.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from "react";
2-
import { StageInfo } from "../../../pipeline-graph-view/pipeline-graph/main";
32
import "./stage-details.scss";
4-
import StageNodeLink from "./StageNodeLink";
3+
import StageNodeLink from "./StageNodeLink.tsx";
54
import StatusIcon, {
65
resultToColor,
7-
} from "../../../common/components/status-icon";
8-
import { exact, Paused, Started, Total } from "../../../common/utils/timings";
9-
import Dropdown from "../../../common/components/dropdown";
10-
import Tooltip from "../../../common/components/tooltip";
11-
import { DOCUMENT } from "./symbols";
6+
} from "../../../common/components/status-icon.tsx";
7+
import { exact, Paused, Started, Total } from "../../../common/utils/timings.tsx";
8+
import Dropdown from "../../../common/components/dropdown.tsx";
9+
import Tooltip from "../../../common/components/tooltip.tsx";
10+
import { DOCUMENT } from "./symbols.tsx";
11+
import { StageInfo } from "../../../pipeline-graph-view/pipeline-graph/main";
1212

1313
export default function StageDetails({ stage }: StageDetailsProps) {
1414
if (!stage) {

src/main/frontend/pipeline-graph-view/app.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { PipelineGraph } from "./pipeline-graph/main/PipelineGraph.tsx";
2-
31
import "./app.scss";
42
import "./pipeline-graph/styles/main.scss";
53
import React from "react";
64

75
export default function App() {
8-
const rootElement = document.getElementById("graph");
9-
const currentRunPath = rootElement?.dataset.currentRunPath!;
10-
const previousRunPath = rootElement?.dataset.previousRunPath;
6+
// const rootElement = document.getElementById("graph");
7+
// const currentRunPath = rootElement?.dataset.currentRunPath!;
8+
// const previousRunPath = rootElement?.dataset.previousRunPath;
119

1210
return (
1311
<div>

src/main/frontend/pipeline-graph-view/pipeline-graph/main/PipelineGraph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export function PipelineGraph(props: Props) {
137137
key={node.id}
138138
node={node}
139139
collapsed={collapsed}
140-
handleStageSelect={props.handleStageSelect}
140+
onStageSelect={props.onStageSelect}
141141
/>
142142
))}
143143

@@ -249,5 +249,5 @@ interface Props {
249249
setStages?: (stages: Array<StageInfo>) => void;
250250
selectedStage?: StageInfo;
251251
collapsed?: boolean;
252-
handleStageSelect: (nodeId: string) => void;
252+
onStageSelect: (nodeId: string) => void;
253253
}

src/main/frontend/pipeline-graph-view/pipeline-graph/main/support/labels.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from "react";
22

33
import { nodeStrokeWidth } from "./StatusIcons.tsx";
44
import { TooltipLabel } from "./convertLabelToTooltip.tsx";
5-
import { TruncatingLabel } from "./TruncatingLabel";
5+
import { TruncatingLabel } from "./TruncatingLabel.tsx";
66
import { CSSProperties } from "react";
77
import { sequentialStagesLabelOffset } from "../PipelineGraphLayout.ts";
88
import { LayoutInfo, NodeLabelInfo, StageInfo } from "../PipelineGraphModel.tsx";

src/main/frontend/pipeline-graph-view/pipeline-graph/main/support/nodes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ type SVGChildren = Array<any>; // Fixme: Maybe refine this? Not sure what should
1919
interface NodeProps {
2020
node: NodeInfo;
2121
collapsed?: boolean;
22-
handleStageSelect: (nodeId: string) => void;
22+
onStageSelect: (nodeId: string) => void;
2323
}
2424

2525
/**
2626
* Generate the SVG elements to represent a node.
2727
*/
28-
export function Node({ node, collapsed, handleStageSelect }: NodeProps) {
28+
export function Node({ node, collapsed, onStageSelect }: NodeProps) {
2929
const key = node.key;
3030

3131
if (node.isPlaceholder) {
@@ -144,7 +144,7 @@ export function Node({ node, collapsed, handleStageSelect }: NodeProps) {
144144
href={document.head.dataset.rooturl + url}
145145
onClick={(e) => {
146146
e.preventDefault();
147-
handleStageSelect(String(node.stage.id));
147+
onStageSelect(String(node.stage.id));
148148
}}
149149
>
150150
<span className="jenkins-visually-hidden">{title}</span>

0 commit comments

Comments
 (0)