|
|
|
@ -7,7 +7,7 @@ import Environment from "./Environment";
|
|
|
|
import Volumes from "./Volumes";
|
|
|
|
import Volumes from "./Volumes";
|
|
|
|
import Labels from "./Labels";
|
|
|
|
import Labels from "./Labels";
|
|
|
|
import { serviceConfigCanvasInitialValues } from "../../../utils";
|
|
|
|
import { serviceConfigCanvasInitialValues } from "../../../utils";
|
|
|
|
import { CallbackFunction, ICanvasConfig, IService } from "../../../types";
|
|
|
|
import { CallbackFunction } from "../../../types";
|
|
|
|
|
|
|
|
|
|
|
|
interface IModalServiceProps {
|
|
|
|
interface IModalServiceProps {
|
|
|
|
onHide: CallbackFunction;
|
|
|
|
onHide: CallbackFunction;
|
|
|
|
@ -18,7 +18,6 @@ const ModalServiceCreate = (props: IModalServiceProps) => {
|
|
|
|
const { onHide, onAddEndpoint } = props;
|
|
|
|
const { onHide, onAddEndpoint } = props;
|
|
|
|
const [openTab, setOpenTab] = useState("General");
|
|
|
|
const [openTab, setOpenTab] = useState("General");
|
|
|
|
const handleCreate = (values: any, formik: any) => {
|
|
|
|
const handleCreate = (values: any, formik: any) => {
|
|
|
|
console.log(values);
|
|
|
|
|
|
|
|
onAddEndpoint(values);
|
|
|
|
onAddEndpoint(values);
|
|
|
|
formik.resetForm();
|
|
|
|
formik.resetForm();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -103,7 +102,6 @@ const ModalServiceCreate = (props: IModalServiceProps) => {
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
enableReinitialize={true}
|
|
|
|
enableReinitialize={true}
|
|
|
|
onSubmit={(values, formik) => {
|
|
|
|
onSubmit={(values, formik) => {
|
|
|
|
console.log(values);
|
|
|
|
|
|
|
|
handleCreate(values, formik);
|
|
|
|
handleCreate(values, formik);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
validationSchema={validationSchema}
|
|
|
|
validationSchema={validationSchema}
|
|
|
|
@ -148,9 +146,7 @@ const ModalServiceCreate = (props: IModalServiceProps) => {
|
|
|
|
<button
|
|
|
|
<button
|
|
|
|
className="btn-util"
|
|
|
|
className="btn-util"
|
|
|
|
type="button"
|
|
|
|
type="button"
|
|
|
|
onClick={() => {
|
|
|
|
onClick={formik.submitForm}
|
|
|
|
formik.submitForm();
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Add
|
|
|
|
Add
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|