diff --git a/ui/src/FeastUI.tsx b/ui/src/FeastUI.tsx index 628b916f2d8..e8c8a7bdc13 100644 --- a/ui/src/FeastUI.tsx +++ b/ui/src/FeastUI.tsx @@ -9,15 +9,16 @@ import FeastUISansProviders, { FeastUIConfigs } from "./FeastUISansProviders"; interface FeastUIProps { reactQueryClient?: QueryClient; feastUIConfigs?: FeastUIConfigs; + basename?: string; } const defaultQueryClient = new QueryClient(); -const FeastUI = ({ reactQueryClient, feastUIConfigs }: FeastUIProps) => { +const FeastUI = ({ reactQueryClient, feastUIConfigs, basename }: FeastUIProps) => { const queryClient = reactQueryClient || defaultQueryClient; return ( - + @@ -76,9 +74,9 @@ const FeastUISansProviders = ({ > - }> + }> } /> - }> + }> } /> } /> { render: (name: string) => { return ( {name} diff --git a/ui/src/components/FeaturesListDisplay.tsx b/ui/src/components/FeaturesListDisplay.tsx index 2a0628b0f56..a40730c6873 100644 --- a/ui/src/components/FeaturesListDisplay.tsx +++ b/ui/src/components/FeaturesListDisplay.tsx @@ -21,8 +21,8 @@ const FeaturesList = ({ field: "name", render: (item: string) => ( {item} diff --git a/ui/src/components/ObjectsCountStats.tsx b/ui/src/components/ObjectsCountStats.tsx index eff3f8a2ca7..bf1dd2dc9dd 100644 --- a/ui/src/components/ObjectsCountStats.tsx +++ b/ui/src/components/ObjectsCountStats.tsx @@ -55,7 +55,7 @@ const ObjectsCountStats = () => { navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-service`)} + onClick={() => navigate(`/p/${projectName}/feature-service`)} description="Feature Services→" title={data.featureServices} reverse @@ -65,7 +65,7 @@ const ObjectsCountStats = () => { navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-view`)} + onClick={() => navigate(`/p/${projectName}/feature-view`)} title={data.featureViews} reverse /> @@ -74,7 +74,7 @@ const ObjectsCountStats = () => { navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/entity`)} + onClick={() => navigate(`/p/${projectName}/entity`)} title={data.entities} reverse /> @@ -83,7 +83,7 @@ const ObjectsCountStats = () => { navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/data-source`)} + onClick={() => navigate(`/p/${projectName}/data-source`)} title={data.dataSources} reverse /> diff --git a/ui/src/components/ProjectSelector.tsx b/ui/src/components/ProjectSelector.tsx index edbcf9d98fe..1bb7ebf85a7 100644 --- a/ui/src/components/ProjectSelector.tsx +++ b/ui/src/components/ProjectSelector.tsx @@ -22,7 +22,7 @@ const ProjectSelector = () => { const basicSelectId = useGeneratedHtmlId({ prefix: "basicSelect" }); const onChange = (e: React.ChangeEvent) => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${e.target.value}`); + navigate(`/p/${e.target.value}`); }; return ( diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 82c709d5d39..97815291e9a 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -97,7 +97,7 @@ ReactDOM.render( reactQueryClient={queryClient} feastUIConfigs={{ tabsRegistry: tabsRegistry, - projectListPromise: fetch(process.env.PUBLIC_URL || "" + "/projects-list.json", { + projectListPromise: fetch("/projects-list.json", { headers: { "Content-Type": "application/json", }, diff --git a/ui/src/pages/RootProjectSelectionPage.tsx b/ui/src/pages/RootProjectSelectionPage.tsx index d287342055f..424e93c85d9 100644 --- a/ui/src/pages/RootProjectSelectionPage.tsx +++ b/ui/src/pages/RootProjectSelectionPage.tsx @@ -22,12 +22,12 @@ const RootProjectSelectionPage = () => { useEffect(() => { if (data && data.default) { // If a default is set, redirect there. - navigate(`${process.env.PUBLIC_URL || ""}/p/${data.default}`); + navigate(`/p/${data.default}`); } if (data && data.projects.length === 1) { // If there is only one project, redirect there. - navigate(`${process.env.PUBLIC_URL || ""}/p/${data.projects[0].id}`); + navigate(`/p/${data.projects[0].id}`); } }, [data, navigate]); @@ -39,7 +39,7 @@ const RootProjectSelectionPage = () => { title={`${item.name}`} description={item?.description || ""} onClick={() => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${item.id}`); + navigate(`/p/${item.id}`); }} /> diff --git a/ui/src/pages/Sidebar.tsx b/ui/src/pages/Sidebar.tsx index 2b652fc08dd..9fc1a532f21 100644 --- a/ui/src/pages/Sidebar.tsx +++ b/ui/src/pages/Sidebar.tsx @@ -60,7 +60,7 @@ const SideNav = () => { name: "Home", id: htmlIdGenerator("basicExample")(), onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/`); + navigate(`/p/${projectName}/`); }, items: [ { @@ -68,7 +68,7 @@ const SideNav = () => { id: htmlIdGenerator("dataSources")(), icon: , onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/data-source`); + navigate(`/p/${projectName}/data-source`); }, isSelected: useMatchSubpath("data-source"), }, @@ -77,7 +77,7 @@ const SideNav = () => { id: htmlIdGenerator("entities")(), icon: , onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/entity`); + navigate(`/p/${projectName}/entity`); }, isSelected: useMatchSubpath("entity"), }, @@ -86,7 +86,7 @@ const SideNav = () => { id: htmlIdGenerator("featureView")(), icon: , onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-view`); + navigate(`/p/${projectName}/feature-view`); }, isSelected: useMatchSubpath("feature-view"), }, @@ -95,7 +95,7 @@ const SideNav = () => { id: htmlIdGenerator("featureService")(), icon: , onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-service`); + navigate(`/p/${projectName}/feature-service`); }, isSelected: useMatchSubpath("feature-service"), }, @@ -104,7 +104,7 @@ const SideNav = () => { id: htmlIdGenerator("savedDatasets")(), icon: , onClick: () => { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/data-set`); + navigate(`/p/${projectName}/data-set`); }, isSelected: useMatchSubpath("data-set"), }, diff --git a/ui/src/pages/data-sources/DataSourcesListingTable.tsx b/ui/src/pages/data-sources/DataSourcesListingTable.tsx index e4f06d6bd0a..ad549f991e0 100644 --- a/ui/src/pages/data-sources/DataSourcesListingTable.tsx +++ b/ui/src/pages/data-sources/DataSourcesListingTable.tsx @@ -21,8 +21,8 @@ const DatasourcesListingTable = ({ render: (name: string) => { return ( {name} diff --git a/ui/src/pages/entities/EntitiesListingTable.tsx b/ui/src/pages/entities/EntitiesListingTable.tsx index baf4ddb8e47..2a017b18aac 100644 --- a/ui/src/pages/entities/EntitiesListingTable.tsx +++ b/ui/src/pages/entities/EntitiesListingTable.tsx @@ -21,8 +21,8 @@ const EntitiesListingTable = ({ entities }: EntitiesListingTableProps) => { render: (name: string) => { return ( {name} diff --git a/ui/src/pages/entities/FeatureViewEdgesList.tsx b/ui/src/pages/entities/FeatureViewEdgesList.tsx index ab1fbfb6df6..95bc51c56d7 100644 --- a/ui/src/pages/entities/FeatureViewEdgesList.tsx +++ b/ui/src/pages/entities/FeatureViewEdgesList.tsx @@ -54,8 +54,8 @@ const FeatureViewEdgesList = ({ fvNames }: FeatureViewEdgesListInterace) => { render: (name: string) => { return ( {name} diff --git a/ui/src/pages/feature-services/FeatureServiceListingTable.tsx b/ui/src/pages/feature-services/FeatureServiceListingTable.tsx index 13ffa764092..c81edeaeb58 100644 --- a/ui/src/pages/feature-services/FeatureServiceListingTable.tsx +++ b/ui/src/pages/feature-services/FeatureServiceListingTable.tsx @@ -31,8 +31,8 @@ const FeatureServiceListingTable = ({ render: (name: string) => { return ( {name} diff --git a/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx b/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx index f43a0cb68fa..387320778ff 100644 --- a/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx +++ b/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx @@ -109,7 +109,7 @@ const FeatureServiceOverviewTab = () => { tags={data.spec.tags} createLink={(key, value) => { return ( - `${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-service?` + + `/p/${projectName}/feature-service?` + encodeSearchQueryString(`${key}:${value}`) ); }} @@ -133,7 +133,7 @@ const FeatureServiceOverviewTab = () => { color="primary" onClick={() => { navigate( - `${process.env.PUBLIC_URL || ""}/p/${projectName}/entity/${entity.name}` + `/p/${projectName}/entity/${entity.name}` ); }} onClickAriaLabel={entity.name} diff --git a/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx b/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx index 44df7b5111a..fc98fe8e5ea 100644 --- a/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx +++ b/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx @@ -19,8 +19,8 @@ const ConsumingFeatureServicesList = ({ render: (name: string) => { return ( {name} diff --git a/ui/src/pages/feature-views/FeatureViewListingTable.tsx b/ui/src/pages/feature-views/FeatureViewListingTable.tsx index ff1a31c4162..e4eccecc975 100644 --- a/ui/src/pages/feature-views/FeatureViewListingTable.tsx +++ b/ui/src/pages/feature-views/FeatureViewListingTable.tsx @@ -32,8 +32,8 @@ const FeatureViewListingTable = ({ render: (name: string, item: genericFVType) => { return ( {name} {(item.type === "ondemand" && ondemand) || (item.type === "stream" && stream)} diff --git a/ui/src/pages/feature-views/RegularFeatureViewOverviewTab.tsx b/ui/src/pages/feature-views/RegularFeatureViewOverviewTab.tsx index cde4f46d4ed..3bbb906e05b 100644 --- a/ui/src/pages/feature-views/RegularFeatureViewOverviewTab.tsx +++ b/ui/src/pages/feature-views/RegularFeatureViewOverviewTab.tsx @@ -96,7 +96,7 @@ const RegularFeatureViewOverviewTab = ({ { - navigate(`${process.env.PUBLIC_URL || ""}/p/${projectName}/entity/${entity}`); + navigate(`/p/${projectName}/entity/${entity}`); }} onClickAriaLabel={entity} data-test-sub="testExample1" @@ -134,7 +134,7 @@ const RegularFeatureViewOverviewTab = ({ tags={data.spec.tags} createLink={(key, value) => { return ( - `${process.env.PUBLIC_URL || ""}/p/${projectName}/feature-view?` + + `/p/${projectName}/feature-view?` + encodeSearchQueryString(`${key}:${value}`) ); }} diff --git a/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx b/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx index 99f82d3e74e..3584cccdd82 100644 --- a/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx +++ b/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx @@ -96,8 +96,8 @@ const StreamFeatureViewOverviewTab = ({ {inputGroup?.name} diff --git a/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx b/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx index f6856471e0a..156f6db1ec6 100644 --- a/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx +++ b/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx @@ -31,8 +31,8 @@ const FeatureViewProjectionDisplayPanel = (featureViewProjection: RequestDataDis {featureViewProjection?.featureViewName} diff --git a/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx b/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx index f3adaa28f02..e8e6854389a 100644 --- a/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx +++ b/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx @@ -38,8 +38,8 @@ const RequestDataDisplayPanel = ({ {requestDataSource?.name} diff --git a/ui/src/pages/features/FeatureOverviewTab.tsx b/ui/src/pages/features/FeatureOverviewTab.tsx index cc7879b0383..e339c30fc97 100644 --- a/ui/src/pages/features/FeatureOverviewTab.tsx +++ b/ui/src/pages/features/FeatureOverviewTab.tsx @@ -63,8 +63,8 @@ const FeatureOverviewTab = () => { FeatureView + href={`/p/${projectName}/feature-view/${FeatureViewName}`} + to={`/p/${projectName}/feature-view/${FeatureViewName}`}> {FeatureViewName} diff --git a/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx b/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx index af794a35f98..a1a97084171 100644 --- a/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx +++ b/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx @@ -20,8 +20,8 @@ const DatasetsListingTable = ({ datasets }: DatasetsListingTableProps) => { render: (name: string) => { return ( {name}