diff --git a/ui/components/Filters.js b/ui/components/Filters.js
index ec634f8de59..9da1d5a3340 100644
--- a/ui/components/Filters.js
+++ b/ui/components/Filters.js
@@ -25,7 +25,6 @@ import { toggleCatalogContent, updateProgress } from "../lib/store";
import TableSortLabel from "@material-ui/core/TableSortLabel";
import dataFetch from "../lib/data-fetch";
import PromptComponent from "./PromptComponent";
-import UploadImport from "./Modals/ImportModal";
import FullscreenIcon from '@material-ui/icons/Fullscreen';
import FullscreenExitIcon from '@material-ui/icons/FullscreenExit';
import { FILE_OPS, MesheryFiltersCatalog, VISIBILITY } from "../utils/Enum";
@@ -739,16 +738,6 @@ function MesheryFilters({ updateProgress, user, classes, selectedK8sContexts, ca
reader.readAsArrayBuffer(file);
}
- function urlUploadHandler(link, _, metadata,) {
-
- handleSubmit({
- data : link,
- name : "meshery_" + Math.floor(trueRandom() * 100),
- type : FILE_OPS.URL_UPLOAD,
- metadata : metadata
- });
- }
-
const columns = [
{
name : "name",
@@ -1162,9 +1151,9 @@ function MesheryFilters({ updateProgress, user, classes, selectedK8sContexts, ca
canPublishFilter={canPublishFilter}
handlePublish={handlePublish}
handleUnpublishModal={handleUnpublishModal}
+ handleUploadImport={handleUploadImport}
handleClone={handleClone}
handleDownload={handleDownload}
- urlUploadHandler={urlUploadHandler}
uploadHandler={uploadHandler}
setSelectedFilter={setSelectedFilter}
selectedFilter={selectedFilter}
@@ -1172,8 +1161,6 @@ function MesheryFilters({ updateProgress, user, classes, selectedK8sContexts, ca
importSchema={importSchema}
setPage={setPage}
selectedPage={page}
- UploadImport={UploadImport}
- handleImportFilter={handleImportFilter}
publishModal={publishModal}
setPublishModal={setPublishModal}
publishSchema={publishSchema}
@@ -1191,9 +1178,9 @@ function MesheryFilters({ updateProgress, user, classes, selectedK8sContexts, ca
componentCount={modalOpen.count}
tab={modalOpen.deploy ? 2 : 1}
/>
- {canPublishFilter &&
+ {(canPublishFilter && publishModal.open) &&
}
- }
- submitBtnIcon={}
- />
- {/* REMOVE this with its deps fetchFilters(page, pageSize, search, sortOrder) } configuration="Filter" /> */}
+ {importModal.open &&
+ }
+ submitBtnIcon={}
+ />
+ }
>
);
diff --git a/ui/components/MesheryFilters/FiltersGrid.js b/ui/components/MesheryFilters/FiltersGrid.js
index 5785117562b..ecb09142fcb 100644
--- a/ui/components/MesheryFilters/FiltersGrid.js
+++ b/ui/components/MesheryFilters/FiltersGrid.js
@@ -9,7 +9,6 @@ import { getComponentsinFile } from "../../utils/utils";
import PublishIcon from "@material-ui/icons/Publish";
import useStyles from "../MesheryPatterns/Grid.styles";
import Modal from "../Modal";
-import Filter from "../../public/static/img/drawer-icons/filter_svg.js";
import PublicIcon from '@material-ui/icons/Public';
const INITIAL_GRID_SIZE = { xl : 4, md : 6, xs : 12 };
@@ -102,21 +101,16 @@ function FiltersGrid({
pages = 1,
setPage,
selectedPage,
- importSchema,
canPublishFilter,
+ handleUploadImport,
handlePublish,
handleUnpublishModal,
- handleImportFilter,
publishModal,
setPublishModal,
publishSchema
}) {
const classes = useStyles();
- const [importModal, setImportModal] = useState({
- open : false,
- });
-
const handlePublishModal = (filter) => {
if (canPublishFilter) {
setPublishModal({
@@ -135,18 +129,6 @@ function FiltersGrid({
});
};
- const handleUploadImport = () => {
- setImportModal({
- open : true,
- });
- };
-
- const handleUploadImportClose = () => {
- setImportModal({
- open : false,
- });
- };
-
const [modalOpen, setModalOpen] = useState({
open : false,
deploy : false,
@@ -244,9 +226,9 @@ function FiltersGrid({
componentCount={modalOpen.count}
tab={modalOpen.deploy ? 2 : 1}
/>
- {canPublishFilter && (
+ {(canPublishFilter && publishModal.open)&& (
}
/>
)}
- }
- submitBtnIcon={}
- />
);
}
diff --git a/ui/components/MesheryMeshInterface/PatternService/RJSFCustomComponents/CustomBaseInput.js b/ui/components/MesheryMeshInterface/PatternService/RJSFCustomComponents/CustomBaseInput.js
index e9e52485032..5302ce093f1 100644
--- a/ui/components/MesheryMeshInterface/PatternService/RJSFCustomComponents/CustomBaseInput.js
+++ b/ui/components/MesheryMeshInterface/PatternService/RJSFCustomComponents/CustomBaseInput.js
@@ -43,6 +43,7 @@ const BaseInput = (props) => {
focused={focused}
type={props.options?.inputType}
key={props.id}
+ disabled={props?.disabled || props?.readonly}
value={
props.options?.inputType === "file"
? null
diff --git a/ui/components/MesheryPatterns.js b/ui/components/MesheryPatterns.js
index 6a3116e8bc0..d755c911373 100644
--- a/ui/components/MesheryPatterns.js
+++ b/ui/components/MesheryPatterns.js
@@ -1419,9 +1419,9 @@ function MesheryPatterns({
dryRunComponent={modalOpen.dryRunComponent}
errors={modalOpen.errors}
/>
- {canPublishPattern &&
+ {(canPublishPattern && publishModal.open) &&
}
/>
}
- }
- submitBtnIcon={}
- />
- {/* fetchPatterns(page, pageSize, search, sortOrder)} configuration="Design" /> */}
+ { importModal.open &&
+ }
+ submitBtnIcon={}
+ />
+ }
>
diff --git a/ui/components/MesheryPatterns/MesheryPatternGridView.js b/ui/components/MesheryPatterns/MesheryPatternGridView.js
index f3ca7f932ca..29eec58abfb 100644
--- a/ui/components/MesheryPatterns/MesheryPatternGridView.js
+++ b/ui/components/MesheryPatterns/MesheryPatternGridView.js
@@ -208,9 +208,9 @@ function MesheryPatternGrid({ patterns=[], handleVerify, handlePublish, handleUn
dryRunComponent={modalOpen.dryRunComponent}
validationBody={modalOpen.validationBody}
/>
- {canPublishPattern &&
+ {(canPublishPattern && publishModal.open) &&
(
@@ -207,7 +207,7 @@ function Modal(props) {
}, [title]);
const handleFormChange = (data) => {
- setFormState(data.formData);
+ formStateRef.current = data;
};
return (
@@ -230,7 +230,7 @@ function Modal(props) {