Skip to content

Commit

Permalink
Merge pull request #913 from PintoGideon/master
Browse files Browse the repository at this point in the history
Fix the rendering of joins in the feed tree
  • Loading branch information
PintoGideon committed Apr 20, 2023
2 parents 9dca09b + a36051d commit cbd3a44
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/feed/AddPipeline/AddPipeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const AddPipeline = () => {
]}
>
<PipelineContainer />
{Object.keys(error).length > 0 && <ReactJson src={error} />}
{Object.keys(error).length > 0 && <ReactJson theme='grayscale' src={error} />}
</Modal>
</React.Fragment>
);
Expand Down
7 changes: 5 additions & 2 deletions src/components/feed/FeedTree/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ export const getTsNodes = async (items: PluginInstance[]) => {
params,
boundFn
);
if (parameters[0]) {
parentIds[instance.data.id] = parameters[0].data.value
const filteredParameters = parameters.filter(
(param) => param.data.param_name === "plugininstances"
);
if (filteredParameters[0]) {
parentIds[instance.data.id] = filteredParameters[0].data.value
.split(",")
.map(Number);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/feed/Pipelines/CreatePipeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const CreatingPipeline = ({
{creatingPipeline.loading && <Spin tip="Saving a new pipeline" />}
{Object.keys(creatingPipeline.error).length > 0 && (
<span>
<ReactJson src={creatingPipeline.error} />
<ReactJson theme="grayscale" src={creatingPipeline.error} />
</span>
)}
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/components/feed/Pipelines/UploadJson.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export const UploadJson = ({

const alertStyle = {
marginTop: "1em",
background: "inherit",
color: "white",
};

return (
Expand All @@ -99,7 +101,9 @@ export const UploadJson = ({
<Button onClick={showOpenFile} icon={<AiOutlineUpload />}>
Upload a JSON spec{" "}
</Button>
<span style={{ marginLeft: "1em", fontWeight: 700 }}>{fileName}</span>
<span style={{ marginLeft: "1em", fontWeight: 700, color: "white" }}>
{fileName}
</span>
{showSuccessIcon && (
<Alert
style={alertStyle}
Expand All @@ -118,6 +122,7 @@ export const UploadJson = ({
}}
>
<ReactJSON
theme="grayscale"
name={false}
displayDataTypes={false}
src={error}
Expand Down
1 change: 1 addition & 0 deletions src/components/feed/Preview/displays/JsonDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const JsonDisplay: React.FunctionComponent<AllProps> = (props: AllProps) => {
<>
{blobText ? (
<ReactJSON
theme="grayscale"
style={{ background: "inherit" }}
name={false}
displayDataTypes={false}
Expand Down

0 comments on commit cbd3a44

Please sign in to comment.