-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into fix310
- Loading branch information
Showing
93 changed files
with
2,077 additions
and
5,726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl --request GET \ | ||
--url http://localhost:23822/admin/node/current \ | ||
--header 'accept: application/json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright(C) 2024 InfiniFlow, Inc. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# show buffer | ||
echo -e '\n-- show buffer' | ||
curl --request GET \ | ||
--url http://localhost:23820/instance/buffer \ | ||
--header 'accept: application/json' | ||
|
||
# show profiles | ||
echo -e '\n\n-- show profiles' | ||
curl --request GET \ | ||
--url http://localhost:23820/instance/profiles \ | ||
--header 'accept: application/json' | ||
|
||
# show memindex | ||
echo -e '\n\n-- show memindex' | ||
curl --request GET \ | ||
--url http://localhost:23820/instance/memindex \ | ||
--header 'accept: application/json' | ||
|
||
# show queries | ||
echo -e '\n\n-- show queries' | ||
curl --request GET \ | ||
--url http://localhost:23820/instance/queries \ | ||
--header 'accept: application/json' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default async function DatabasePage() { | ||
return <div>DatabasePage id</div>; | ||
} |
3 changes: 3 additions & 0 deletions
3
gui/app/(dashboard)/database/[dabataseId]/table/[tableId]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default async function DatabasePage() { | ||
return <div>table id</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default async function TablePage() { | ||
return <div>table</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import SideMenu, { MenuItem } from '@/components/ui/side-menu'; | ||
import { | ||
Table, | ||
TableBody, | ||
TableCell, | ||
TableHead, | ||
TableHeader, | ||
TableRow | ||
} from '@/components/ui/table'; | ||
import { listDatabase, listTable } from '../actions'; | ||
import { InfinityContextMenuContent } from '../tables/context-menu'; | ||
|
||
async function InfinityTable() { | ||
const tables = await listTable('default_db'); | ||
return ( | ||
<Table> | ||
<TableHeader> | ||
<TableRow> | ||
<TableHead className="text-center">Name</TableHead> | ||
</TableRow> | ||
</TableHeader> | ||
<TableBody> | ||
{tables.tables.map((table: string) => ( | ||
<TableRow key={table}> | ||
<TableCell className="font-medium">{table}</TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
); | ||
} | ||
|
||
export default async function DatabaseLayout({ | ||
searchParams, | ||
children | ||
}: { | ||
searchParams: { q: string; offset: string }; | ||
children: React.ReactNode; | ||
}) { | ||
const search = searchParams?.q ?? ''; | ||
const offset = searchParams?.offset ?? 0; | ||
|
||
const items: MenuItem[] = [ | ||
{ | ||
key: 'sub1', | ||
label: 'Navigation', | ||
children: [ | ||
{ | ||
key: 'g1', | ||
label: 'Item 1' | ||
}, | ||
{ | ||
key: 'g2', | ||
label: 'Item 2' | ||
} | ||
] | ||
} | ||
]; | ||
|
||
const ret = await listDatabase(); | ||
if (ret.databases.length > 1) { | ||
const latestDatabase = ret.databases.at(-1); | ||
const tables = await listTable(latestDatabase); | ||
console.log('🚀 ~ ret:', tables); | ||
items.push({ | ||
key: latestDatabase, | ||
label: latestDatabase, | ||
children: tables.tables | ||
}); | ||
} | ||
|
||
return ( | ||
<div className="flex divide-x "> | ||
<section className="w-40"> | ||
<SideMenu | ||
items={items} | ||
contextMenuContent={(key: string) => ( | ||
<InfinityContextMenuContent | ||
databaseName={key} | ||
></InfinityContextMenuContent> | ||
)} | ||
></SideMenu> | ||
</section> | ||
<section className="flex-1 text-center">{children}</section> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.