2020-03-11 13:59:46 +00:00
|
|
|
import React, { useEffect } from "react";
|
2019-12-16 08:49:10 +00:00
|
|
|
import { Route } from "react-router-dom";
|
2020-03-11 13:59:46 +00:00
|
|
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
2019-12-23 12:16:33 +00:00
|
|
|
|
2020-03-11 13:59:46 +00:00
|
|
|
const AppRoute = ({
|
2019-09-09 10:30:22 +00:00
|
|
|
component: Component,
|
|
|
|
|
...rest
|
|
|
|
|
}: {
|
2020-03-11 13:59:46 +00:00
|
|
|
path?: string;
|
2019-09-09 10:30:22 +00:00
|
|
|
component: React.ReactType;
|
2019-11-22 14:02:55 +00:00
|
|
|
exact?: boolean;
|
2020-03-11 13:59:46 +00:00
|
|
|
logDisable?: boolean;
|
|
|
|
|
name: string;
|
|
|
|
|
location?: any;
|
2019-09-09 10:30:22 +00:00
|
|
|
}) => {
|
2020-03-11 13:59:46 +00:00
|
|
|
useEffect(() => {
|
|
|
|
|
if (!rest.logDisable) {
|
|
|
|
|
AnalyticsUtil.logEvent("NAVIGATE_EDITOR", {
|
|
|
|
|
page: rest.name,
|
|
|
|
|
path: rest.location.pathname,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, [rest.name, rest.logDisable, rest.location.pathname]);
|
2019-12-23 12:16:33 +00:00
|
|
|
return (
|
|
|
|
|
<Route
|
|
|
|
|
{...rest}
|
2020-03-11 13:59:46 +00:00
|
|
|
render={props => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
return <Component {...props}></Component>;
|
2020-03-11 13:59:46 +00:00
|
|
|
}}
|
2019-12-23 12:16:33 +00:00
|
|
|
/>
|
|
|
|
|
);
|
2019-09-09 10:30:22 +00:00
|
|
|
};
|
2019-09-02 14:50:01 +00:00
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
AppRoute.whyDidYouRender = {
|
|
|
|
|
logOnDifferentValues: false,
|
|
|
|
|
};
|
|
|
|
|
|
2020-03-11 13:59:46 +00:00
|
|
|
export default AppRoute;
|