Skip to content

Commit b8ac0f0

Browse files
committed
Remove endpoint access
1 parent d8ac095 commit b8ac0f0

File tree

4 files changed

+13
-409
lines changed

4 files changed

+13
-409
lines changed

client/src/App.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ const menuItems = [
2727
label: "Discover",
2828
link: "/hub",
2929
},
30-
{
31-
key: "2",
32-
label: "Endpoints",
33-
link: "/endpoint",
34-
},
3530
{
3631
key: "7",
3732
label: "Data",

client/src/components/apps/AppRunHistoryTimeline.jsx

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import AceEditor from "react-ace";
2727
import UAParser from "ua-parser-js";
2828
import MarkdownRenderer from "./MarkdownRenderer";
2929
import { useRecoilValue } from "recoil";
30-
import { appsState, endpointsState } from "../../data/atoms";
30+
import { appsState } from "../../data/atoms";
3131
import { axios } from "../../data/axios";
3232
import { ReactComponent as DiscordIcon } from "../../assets/images/icons/discord.svg";
3333
import { ReactComponent as SlackIcon } from "../../assets/images/icons/slack.svg";
@@ -155,11 +155,10 @@ const ExpandedRowItem = ({ label, value, content_type = null }) => {
155155
);
156156
};
157157

158-
const FilterBar = ({ apps, sessions, endpoints, users, onFilter }) => {
158+
const FilterBar = ({ apps, sessions, users, onFilter }) => {
159159
const [selectedApp, setSelectedApp] = useState(null);
160160
const [selectedSession, setSelectedSession] = useState(null);
161161
const [selectedUser, setSelectedUser] = useState(null);
162-
const [selectedEndpoint, setSelectedEndpoint] = useState(null);
163162

164163
return (
165164
<Stack
@@ -279,57 +278,6 @@ const FilterBar = ({ apps, sessions, endpoints, users, onFilter }) => {
279278
setSelectedUser(value);
280279
}}
281280
/>
282-
<Autocomplete
283-
id="endpoint-selector"
284-
sx={{ width: 250 }}
285-
options={endpoints.filter((ep) => !ep.is_app && ep.version > 0)}
286-
autoHighlight
287-
getOptionLabel={(option) => option.name || ""}
288-
renderInput={(params) => (
289-
<TextField
290-
{...params}
291-
size="small"
292-
label="Endpoint"
293-
inputProps={{
294-
...params.inputProps,
295-
autoComplete: "new-password",
296-
}}
297-
/>
298-
)}
299-
groupBy={(option) => option.parent_uuid}
300-
renderGroup={(params) => [
301-
<Typography
302-
key={params.key}
303-
sx={{
304-
fontWeight: 600,
305-
fontSize: "0.8rem",
306-
color: "#666",
307-
padding: "10px",
308-
}}
309-
>
310-
{endpoints.find((ep) => ep.uuid === params.group)?.name}
311-
</Typography>,
312-
params.children,
313-
]}
314-
renderOption={(props, option) => (
315-
<Box
316-
component="li"
317-
sx={{
318-
fontSize: 14,
319-
"& > span": {
320-
marginRight: 2,
321-
fontSize: 18,
322-
},
323-
}}
324-
{...props}
325-
>
326-
{option.version}: {option.description}
327-
</Box>
328-
)}
329-
onChange={(event, value) => {
330-
setSelectedEndpoint(value);
331-
}}
332-
/>
333281
<Button
334282
type="primary"
335283
style={{
@@ -341,7 +289,7 @@ const FilterBar = ({ apps, sessions, endpoints, users, onFilter }) => {
341289
app_uuid: selectedApp?.uuid || null,
342290
session_key: selectedSession?.name || null,
343291
request_user_email: selectedUser?.name || null,
344-
endpoint_uuid: selectedEndpoint?.uuid || null,
292+
endpoint_uuid: null,
345293
});
346294
}}
347295
>
@@ -354,7 +302,6 @@ const FilterBar = ({ apps, sessions, endpoints, users, onFilter }) => {
354302
export function AppRunHistoryTimeline(props) {
355303
const { filter, filteredColumns, showFilterBar } = props;
356304
const apps = useRecoilValue(appsState);
357-
const endpoints = useRecoilValue(endpointsState);
358305
const [rows, setRows] = useState([]);
359306
const [expandedRows, setExpandedRows] = useState({});
360307
const [loading, setLoading] = useState(false);
@@ -375,10 +322,7 @@ export function AppRunHistoryTimeline(props) {
375322
apps.find((app) => app.uuid === row.app_uuid)?.name || "Deleted App"
376323
);
377324
}
378-
return (
379-
endpoints.find((ep) => ep.uuid === row.endpoint_uuid)?.name ||
380-
"Playground"
381-
);
325+
return "Playground";
382326
} else if (column.id === "type") {
383327
return (
384328
<Tooltip title={row.app_uuid !== null ? "App" : "Endpoint"}>
@@ -534,7 +478,6 @@ export function AppRunHistoryTimeline(props) {
534478
.map((row) => row.request_user_email),
535479
),
536480
).map((request_user_email) => ({ name: request_user_email }))}
537-
endpoints={endpoints}
538481
onFilter={(filters) => setFilters({ ...filters, ...{ page: 1 } })}
539482
/>
540483
<Divider />

client/src/components/sidebar.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
ListItemText,
2323
} from "@mui/material";
2424
import {
25-
ApiOutlined,
2625
AppstoreAddOutlined,
2726
BankOutlined,
2827
HistoryOutlined,
@@ -67,7 +66,6 @@ function getNavItemIcon(itemLabel) {
6766
const iconMap = {
6867
Playground: <PlaySquareOutlined />,
6968
Home: <HomeOutlined />,
70-
Endpoints: <ApiOutlined />,
7169
History: <HistoryOutlined />,
7270
Settings: <SettingOutlined />,
7371
Discover: <AppstoreOutlined />,

0 commit comments

Comments
 (0)