Skip to content

Commit

Permalink
Merge pull request from GHSA-xmj6-g32r-fc5q
Browse files Browse the repository at this point in the history
* remove support for import export anythingllm data

* remove unused imports
remove unused dep
update lockfile

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
  • Loading branch information
shatfield4 and timothycarambat committed Jan 18, 2024
1 parent 56fa17c commit 08d33cf
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 584 deletions.
7 changes: 0 additions & 7 deletions frontend/src/App.jsx
Expand Up @@ -34,9 +34,6 @@ const GeneralEmbeddingPreference = lazy(
const GeneralVectorDatabase = lazy(
() => import("@/pages/GeneralSettings/VectorDatabase")
);
const GeneralExportImport = lazy(
() => import("@/pages/GeneralSettings/ExportImport")
);
const GeneralSecurity = lazy(() => import("@/pages/GeneralSettings/Security"));
const DataConnectors = lazy(
() => import("@/pages/GeneralSettings/DataConnectors")
Expand Down Expand Up @@ -74,10 +71,6 @@ export default function App() {
element={<AdminRoute Component={GeneralVectorDatabase} />}
/>
{/* Manager */}
<Route
path="/settings/export-import"
element={<ManagerRoute Component={GeneralExportImport} />}
/>
<Route
path="/settings/security"
element={<ManagerRoute Component={GeneralSecurity} />}
Expand Down
15 changes: 0 additions & 15 deletions frontend/src/components/SettingsSidebar/index.jsx
@@ -1,6 +1,4 @@
import React, { useEffect, useRef, useState } from "react";
// import IndexCount from "../Sidebar/IndexCount";
// import LLMStatus from "../Sidebar/LLMStatus";
import paths from "@/utils/paths";
import useLogo from "@/hooks/useLogo";
import {
Expand All @@ -14,10 +12,8 @@ import {
Key,
ChatText,
Database,
DownloadSimple,
Lock,
GithubLogo,
DotsThree,
House,
X,
List,
Expand Down Expand Up @@ -135,12 +131,6 @@ export default function SettingsSidebar() {
/>
</>
)}

<Option
href={paths.settings.exportImport()}
btnText="Export or Import"
icon={<DownloadSimple className="h-5 w-5 flex-shrink-0" />}
/>
<Option
href={paths.settings.security()}
btnText="Security"
Expand Down Expand Up @@ -328,11 +318,6 @@ export function SidebarMobileHeader() {
/>
</>
)}
<Option
href={paths.settings.exportImport()}
btnText="Export or Import"
icon={<DownloadSimple className="h-5 w-5 flex-shrink-0" />}
/>
<Option
href={paths.settings.security()}
btnText="Security"
Expand Down
25 changes: 0 additions & 25 deletions frontend/src/models/system.js
Expand Up @@ -160,31 +160,6 @@ const System = {
return false;
});
},
dataExport: async () => {
return await fetch(`${API_BASE}/system/data-export`, {
method: "GET",
headers: baseHeaders(),
})
.then((res) => res.json())
.then((res) => res)
.catch((e) => {
console.error(e);
return { filename: null, error: e.message };
});
},
importData: async (formData) => {
return await fetch(`${API_BASE}/system/data-import`, {
method: "POST",
body: formData,
headers: baseHeaders(),
})
.then((res) => res.json())
.then((res) => res)
.catch((e) => {
console.error(e);
return { success: false, error: e.message };
});
},
uploadPfp: async function (formData) {
return await fetch(`${API_BASE}/system/upload-pfp`, {
method: "POST",
Expand Down
226 changes: 0 additions & 226 deletions frontend/src/pages/GeneralSettings/ExportImport/index.jsx

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/src/utils/paths.js
Expand Up @@ -56,9 +56,6 @@ export default {
return `/workspace/${slug}`;
},
},
exports: () => {
return `${API_BASE.replace("/api", "")}/system/data-exports`;
},
apiDocs: () => {
return `${API_BASE}/docs`;
},
Expand Down Expand Up @@ -87,9 +84,6 @@ export default {
vectorDatabase: () => {
return "/settings/vector-database";
},
exportImport: () => {
return "/settings/export-import";
},
security: () => {
return "/settings/security";
},
Expand Down

0 comments on commit 08d33cf

Please sign in to comment.