diff --git a/serving/central/src/main/webapp/components/ModelNavigator.jsx b/serving/central/src/main/webapp/components/ModelNavigator.jsx index c4a26426343..f5b43078c8b 100644 --- a/serving/central/src/main/webapp/components/ModelNavigator.jsx +++ b/serving/central/src/main/webapp/components/ModelNavigator.jsx @@ -98,7 +98,7 @@ export default function ModelNavigator(props) { const modelZooData = useFetch(URL); const [model, setModel] = useState(null); - const [modelList, setModelList] = useState([]); + const [modelList, setModelList] = useState(modelZooData); const [nameValue, setNameValue] = useState(''); const [applicationValue, setApplicationValue] = useState(''); const [versionValue, setVersionValue] = useState(''); @@ -190,7 +190,7 @@ export default function ModelNavigator(props) { - + @@ -199,16 +199,26 @@ export default function ModelNavigator(props) { defaultCollapseIcon={} defaultExpandIcon={} > - -
- {modelList.map(application => ( - console.log(application), - application.map((model) => ( - setModel(model)}> - - )) - ))} -
+ {nameValue != '' || versionValue!='' || applicationValue!='' + ?
+ { + modelList.map(application => ( + application.map((model) => ( + setModel(model)}> + + )) + ))} +
+ : + modelZooData.map((application) => ( + + {application.models.map((model) => ( + setModel(model)}> + + ))} + + )) + }