diff --git a/ui/src/FeastUI.tsx b/ui/src/FeastUI.tsx index 210ff7a4aa7..12025e6d6e7 100644 --- a/ui/src/FeastUI.tsx +++ b/ui/src/FeastUI.tsx @@ -15,10 +15,14 @@ const defaultQueryClient = new QueryClient(); const FeastUI = ({ reactQueryClient, feastUIConfigs }: FeastUIProps) => { const queryClient = reactQueryClient || defaultQueryClient; + const basename = process.env.PUBLIC_URL ?? ''; return ( // Disable v7_relativeSplatPath: custom tab routes don't currently work with it - + diff --git a/ui/src/FeastUISansProviders.tsx b/ui/src/FeastUISansProviders.tsx index 8a12abdc39f..8a0e0b94db0 100644 --- a/ui/src/FeastUISansProviders.tsx +++ b/ui/src/FeastUISansProviders.tsx @@ -62,8 +62,6 @@ const FeastUISansProviders = ({ isCustom: true, } : { projectsListPromise: defaultProjectListPromise(), isCustom: false }; - - const BASE_URL = process.env.PUBLIC_URL || "" return ( @@ -76,9 +74,9 @@ const FeastUISansProviders = ({ > - }> + }> } /> - }> + }> } /> } /> { field: "featureViewName", render: (name: string) => { return ( - + {name} ); diff --git a/ui/src/components/FeaturesListDisplay.tsx b/ui/src/components/FeaturesListDisplay.tsx index b5c043e1148..61f57b478d6 100644 --- a/ui/src/components/FeaturesListDisplay.tsx +++ b/ui/src/components/FeaturesListDisplay.tsx @@ -21,7 +21,7 @@ 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/pages/RootProjectSelectionPage.tsx b/ui/src/pages/RootProjectSelectionPage.tsx index 5e19b6606b8..fb488e714bc 100644 --- a/ui/src/pages/RootProjectSelectionPage.tsx +++ b/ui/src/pages/RootProjectSelectionPage.tsx @@ -21,12 +21,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]); @@ -38,7 +38,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 de98b213242..44cde07e79d 100644 --- a/ui/src/pages/Sidebar.tsx +++ b/ui/src/pages/Sidebar.tsx @@ -53,7 +53,7 @@ const SideNav = () => { : "" }`; - const baseUrl = `${process.env.PUBLIC_URL || ""}/p/${projectName}`; + const baseUrl = `/p/${projectName}`; const sideNav: React.ComponentProps['items'] = [ { diff --git a/ui/src/pages/data-sources/DataSourcesListingTable.tsx b/ui/src/pages/data-sources/DataSourcesListingTable.tsx index 326582bc43d..fd1ff73deb7 100644 --- a/ui/src/pages/data-sources/DataSourcesListingTable.tsx +++ b/ui/src/pages/data-sources/DataSourcesListingTable.tsx @@ -20,9 +20,7 @@ const DatasourcesListingTable = ({ sortable: true, render: (name: string) => { return ( - + {name} ); diff --git a/ui/src/pages/entities/EntitiesListingTable.tsx b/ui/src/pages/entities/EntitiesListingTable.tsx index 74c2a78778e..06190409b04 100644 --- a/ui/src/pages/entities/EntitiesListingTable.tsx +++ b/ui/src/pages/entities/EntitiesListingTable.tsx @@ -20,9 +20,7 @@ const EntitiesListingTable = ({ entities }: EntitiesListingTableProps) => { sortable: true, render: (name: string) => { return ( - + {name} ); diff --git a/ui/src/pages/entities/FeatureViewEdgesList.tsx b/ui/src/pages/entities/FeatureViewEdgesList.tsx index 560ef454512..3419bfcb4b7 100644 --- a/ui/src/pages/entities/FeatureViewEdgesList.tsx +++ b/ui/src/pages/entities/FeatureViewEdgesList.tsx @@ -53,9 +53,7 @@ const FeatureViewEdgesList = ({ fvNames }: FeatureViewEdgesListInterace) => { field: "", render: ({ name }: { name: string }) => { return ( - + {name} ); diff --git a/ui/src/pages/feature-services/FeatureServiceListingTable.tsx b/ui/src/pages/feature-services/FeatureServiceListingTable.tsx index 709f9513688..69d4d1f969d 100644 --- a/ui/src/pages/feature-services/FeatureServiceListingTable.tsx +++ b/ui/src/pages/feature-services/FeatureServiceListingTable.tsx @@ -30,9 +30,7 @@ const FeatureServiceListingTable = ({ field: "spec.name", render: (name: string) => { return ( - + {name} ); diff --git a/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx b/ui/src/pages/feature-services/FeatureServiceOverviewTab.tsx index 4d3d350f084..fcb1dc018b3 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 3f775f8600d..603a4d96ba4 100644 --- a/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx +++ b/ui/src/pages/feature-views/ConsumingFeatureServicesList.tsx @@ -18,9 +18,7 @@ const ConsumingFeatureServicesList = ({ field: "", render: ({ name }: { name: string }) => { return ( - + {name} ); diff --git a/ui/src/pages/feature-views/FeatureViewListingTable.tsx b/ui/src/pages/feature-views/FeatureViewListingTable.tsx index 82bea90dd03..02756492c91 100644 --- a/ui/src/pages/feature-views/FeatureViewListingTable.tsx +++ b/ui/src/pages/feature-views/FeatureViewListingTable.tsx @@ -31,9 +31,7 @@ const FeatureViewListingTable = ({ sortable: true, 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 24aaf50ed15..9aff3d59f3f 100644 --- a/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx +++ b/ui/src/pages/feature-views/StreamFeatureViewOverviewTab.tsx @@ -96,7 +96,7 @@ 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 c046a146c82..104ef0f93be 100644 --- a/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx +++ b/ui/src/pages/feature-views/components/FeatureViewProjectionDisplayPanel.tsx @@ -31,7 +31,7 @@ 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 3bfabb3dcfc..6893dfd6a32 100644 --- a/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx +++ b/ui/src/pages/feature-views/components/RequestDataDisplayPanel.tsx @@ -39,7 +39,7 @@ const RequestDataDisplayPanel = ({ {requestDataSource?.name} diff --git a/ui/src/pages/features/FeatureOverviewTab.tsx b/ui/src/pages/features/FeatureOverviewTab.tsx index 771c1216261..eb101fe3955 100644 --- a/ui/src/pages/features/FeatureOverviewTab.tsx +++ b/ui/src/pages/features/FeatureOverviewTab.tsx @@ -63,7 +63,7 @@ const FeatureOverviewTab = () => { FeatureView {FeatureViewName} diff --git a/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx b/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx index 84e5e69f25c..7b73e9cd6dc 100644 --- a/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx +++ b/ui/src/pages/saved-data-sets/DatasetsListingTable.tsx @@ -19,9 +19,7 @@ const DatasetsListingTable = ({ datasets }: DatasetsListingTableProps) => { sortable: true, render: (name: string) => { return ( - + {name} );