Skip to content

Commit

Permalink
enhancement: upload file button in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanpunia authored and skeptrunedev committed Jul 22, 2024
1 parent 37f4b77 commit 7bee94d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontends/dashboard/src/pages/Dashboard/Dataset/DatasetStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from "solid-icons/ai";
import { TbReload } from "solid-icons/tb";
import { BiRegularInfoCircle, BiRegularLinkExternal } from "solid-icons/bi";
import { BsMagic } from "solid-icons/bs";
import { BsMagic, BsUpload } from "solid-icons/bs";
import { AddSampleDataModal } from "../../../components/DatasetExampleModal";
import { Tooltip } from "shared/ui";
import { Codeblock } from "../../../components/Codeblock";
Expand Down Expand Up @@ -293,6 +293,16 @@ export const DatasetStart = () => {
<BiRegularLinkExternal class="h-4 w-4" />
</a>
<Show when={usage() && usage()?.chunk_count === 0}>
<a
class="flex cursor-pointer items-center space-x-2 rounded-md border bg-magenta-500 px-2 py-1 text-sm text-white"
href={`${searchUiURL}/upload${orgDatasetParams(
curDataset()?.id ?? "",
)}`}
target="_blank"
>
<p>Upload file</p>
<BsUpload class="h-4 w-4" />
</a>
<button
class="flex items-center space-x-2 rounded-md border bg-magenta-500 px-2 py-1 text-sm text-white"
onClick={() => setOpenSampleDataModal(true)}
Expand Down

0 comments on commit 7bee94d

Please sign in to comment.