diff --git a/openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java b/openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java index cfbbec03d2..e0f88feba8 100644 --- a/openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java +++ b/openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java @@ -88,7 +88,6 @@ public class InjectApi extends RestBehavior { private final InjectService injectService; private final AtomicTestingService atomicTestingService; private final InjectDuplicateService injectDuplicateService; - private final InjectDependenciesRepository injectDependenciesRepository; // -- INJECTS -- diff --git a/openbas-front/src/admin/components/common/injects/InjectChainsForm.js b/openbas-front/src/admin/components/common/injects/InjectChainsForm.js index d7c411a4bf..04b2760a57 100644 --- a/openbas-front/src/admin/components/common/injects/InjectChainsForm.js +++ b/openbas-front/src/admin/components/common/injects/InjectChainsForm.js @@ -5,6 +5,7 @@ import { Add, DeleteOutlined, ExpandMore } from '@mui/icons-material'; import { useFormatter } from '../../../../components/i18n'; import ClickableModeChip from '../../../../components/common/chips/ClickableModeChip'; import ClickableChip from '../../../../components/common/chips/ClickableChip'; +import { capitalize } from '../../../../utils/String'; const useStyles = makeStyles(() => ({ container: { @@ -33,10 +34,6 @@ const InjectForm = ({ const breakpointValue = /==/gm; const typeFromName = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-(.*)-Success/mg; - const capitalize = (text) => { - return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase(); - }; - const [parents, setParents] = useState( injects.filter((currentInject) => values.inject_depends_on !== null && values.inject_depends_on[currentInject.inject_id] !== undefined) @@ -570,20 +567,22 @@ const InjectForm = ({ > {getClickableParentChip(parent)} - +
+ +
@@ -661,20 +660,22 @@ const InjectForm = ({ > {getClickableChildrenChip(children)} - +
+ +
diff --git a/openbas-front/src/admin/components/common/injects/Injects.tsx b/openbas-front/src/admin/components/common/injects/Injects.tsx index 88444e7ca8..f4ef47ee53 100644 --- a/openbas-front/src/admin/components/common/injects/Injects.tsx +++ b/openbas-front/src/admin/components/common/injects/Injects.tsx @@ -392,7 +392,7 @@ const Injects: FunctionComponent = ({ 'inject_description', 'inject_injector_contract', 'inject_content', - 'inject_depends_from_another', + 'inject_depends_on', 'inject_depends_duration', 'inject_teams', 'inject_assets', diff --git a/openbas-front/src/utils/String.js b/openbas-front/src/utils/String.js index f1a589b5c5..a9ad73a527 100644 --- a/openbas-front/src/utils/String.js +++ b/openbas-front/src/utils/String.js @@ -68,6 +68,10 @@ export const computeLabel = (status) => { return 'Failed'; }; +export const capitalize = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1).toLowerCase(); +}; + // compute color for status export const computeColorStyle = (status) => { if (status === 'PENDING') {