Skip to content

Commit

Permalink
Merge pull request #1079 from PintoGideon/Archive-Feed-Fix
Browse files Browse the repository at this point in the history
Hotfix to the compute node in a pipeline tree.
  • Loading branch information
PintoGideon authored Feb 27, 2024
2 parents 93a07b1 + 11734bc commit caae85d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 36 deletions.
7 changes: 5 additions & 2 deletions src/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,14 @@ export async function fetchComputeInfo(
plugin_id: `${plugin_id}`,
});

const length = computeEnvs.data.length;
const currentlySelected = computeEnvs.data[length - 1].name as string;

if (computeEnvs.getItems()) {
const computeEnvData = {
[dictionary_id]: {
computeEnvs: computeEnvs.getItems() as ComputeResource[],
currentlySelected: computeEnvs.data[0].name as string,
currentlySelected,
},
};
return computeEnvData;
Expand Down Expand Up @@ -367,7 +370,7 @@ export const uploadFile = async (
formData.append("fname", file, name);

const config = {
headers: { Authorization: "Token " + token },
headers: { Authorization: `Token ${token}` },
onUploadProgress,
};

Expand Down
64 changes: 30 additions & 34 deletions src/components/AddTsNode/ConfigureJoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,40 +68,36 @@ const ConfigureJoin = ({
marginTop: "1em",
}}
>
{tsParams &&
tsParams.map((param) => {
if (param.data.name !== "plugininstances") {
if (param.data.name === "groupByInstance") {
return (
<Checkbox
key={param.data.id}
checked={joinInput[param.data.name] as boolean}
onChange={(event: any) => {
handleCheckboxChange(
event.target.checked,
param.data.name,
);
}}
>
{param.data.name}
</Checkbox>
);
} else
return (
<Form.Item key={param.data.id} label={param.data.name}>
<Input
className="input"
value={joinInput[param.data.name] as string}
onChange={(
event: React.ChangeEvent<HTMLInputElement>,
) => {
handleValueChange(event.target.value, param.data.name);
}}
/>
</Form.Item>
);
} else return null;
})}
{tsParams?.map((param) => {
if (param.data.name !== "plugininstances") {
if (param.data.name === "groupByInstance") {
return (
<Checkbox
key={param.data.id}
checked={joinInput[param.data.name] as boolean}
onChange={(event: any) => {
handleCheckboxChange(event.target.checked, param.data.name);
}}
>
{param.data.name}
</Checkbox>
);
}
return (
<Form.Item key={param.data.id} label={param.data.name}>
<Input
className="input"
value={joinInput[param.data.name] as string}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
handleValueChange(event.target.value, param.data.name);
}}
/>
</Form.Item>
);
}

return null;
})}
</Form>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/PipelinesCopy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const PipelinesCopy = () => {
<SpinContainer title="Fetching the Pipelines" />
) : data?.registeredPipelines && data.registeredPipelines.length > 0 ? (
<Collapse
style={{ marginTop: "1em" }}
onChange={handleChange}
items={data.registeredPipelines.map((pipeline) => {
const { name, id } = pipeline.data;
Expand Down
3 changes: 3 additions & 0 deletions tests/pipelines.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from "./fixtures/notLoggedIn.ts";

test.describe("Pipelines Page", () => {});

0 comments on commit caae85d

Please sign in to comment.