Skip to content

Commit

Permalink
feat: Wrap the paramter values in a quote if the data type is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Jun 14, 2024
1 parent 55d72fd commit b310c94
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
6 changes: 4 additions & 2 deletions src/components/NodeDetails/NodeDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,13 @@ function getCommand(
if (
instanceParameters[i].data.param_name === pluginParameters[j].data.name
) {
const boolean = instanceParameters[i].data.type === "boolean";
const isBoolean = instanceParameters[i].data.type === "boolean";
const isString = instanceParameters[i].data.type === "string";
const value = instanceParameters[i].data.value;

modifiedParams.push({
name: pluginParameters[j].data.flag,
value: boolean ? "" : instanceParameters[i].data.value,
value: isBoolean ? " " : isString ? `'${value}'` : value,
});
}
}
Expand Down
40 changes: 19 additions & 21 deletions src/components/Store/index.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
import WrapperConnect from "../Wrapper";
import { useEffect, useState, Ref } from "react";
import { useMutation, useQuery } from "@tanstack/react-query";
import Client, { Plugin } from "@fnndsc/chrisapi";
import { SpinContainer } from "../Common";
import { Alert, Spin, Typography, notification } from "antd";
import {
ActionGroup,
Badge,
Button,
Card,
CardBody,
Form,
FormGroup,
Grid,
GridItem,
Button,
CardBody,
Split,
SplitItem,
MenuToggle,
MenuToggleElement,
Modal,
PageSection,
Badge,
Select,
SelectOption,
MenuToggleElement,
MenuToggle,
Modal,
Form,
FormGroup,
Split,
SplitItem,
TextInput,
ActionGroup,
} from "@patternfly/react-core";
import "../SinglePlugin/singlePlugin.css";
import { useMutation, useQuery } from "@tanstack/react-query";
import { Alert, Spin, Typography, notification } from "antd";
import { format } from "date-fns";
import { setSidebarActive } from "../../store/ui/actions";
import { useDispatch } from "react-redux";
import { InfoIcon } from "../Common";
import { isEmpty } from "lodash";
import { Ref, useEffect, useState } from "react";
import { useDispatch } from "react-redux";
import { setSidebarActive } from "../../store/ui/actions";
import { InfoIcon, SpinContainer } from "../Common";
import "../SinglePlugin/singlePlugin.css";
import WrapperConnect from "../Wrapper";

const { Paragraph } = Typography;

Expand Down Expand Up @@ -139,7 +138,6 @@ const Store = () => {

return data;
} catch (error) {
console.log("Error", error);
// biome-ignore lint/complexity/noUselessCatch: <explanation>
throw error;
}
Expand Down

0 comments on commit b310c94

Please sign in to comment.