Skip to content

Commit

Permalink
Merge branch 'main' into aimon
Browse files Browse the repository at this point in the history
  • Loading branch information
devvratbhardwaj authored Feb 27, 2025
2 parents cfbc8c2 + b17de2e commit 4eda1ef
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
20 changes: 10 additions & 10 deletions frontends/dashboard/src/analytics/pages/AnalyticsOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import { DateRangePicker } from "shared/ui";
import { Granularity } from "trieve-ts-sdk";
import { SearchMetrics } from "../components/charts/SearchMetrics";
import { RagMetrics } from "../components/charts/RagMetrics";
import { subMonths } from "date-fns";

export const AnalyticsOverviewPage = () => {
const [rpsDateRange, setRpsDateRange] = createSignal<DateRangeFilter>({
gt: subHours(new Date(), 1),
const [rtpDateRange, setRtpDateRange] = createSignal<DateRangeFilter>({
gt: subMonths(new Date(), 1),
});

const [rpsGranularity, setRpsGranularity] =
createSignal<Granularity>("minute");
const [rtpGranularity, setRtpGranularity] = createSignal<Granularity>("day");

const [headQueriesDate, setHeadQueriesDate] = createSignal<DateRangeFilter>({
gt: subHours(new Date(), 1),
Expand All @@ -39,22 +39,22 @@ export const AnalyticsOverviewPage = () => {
<RagMetrics />
</Card>
<Card
title="Requests Per Second"
title="Requests Per Time Period"
controller={
<DateRangePicker
onChange={(e) => setRpsDateRange(e)}
value={rpsDateRange()}
onChange={(e) => setRtpDateRange(e)}
value={rtpDateRange()}
initialSelectedPresetId={3}
onGranularitySuggestion={(e) => setRpsGranularity(e)}
onGranularitySuggestion={(e) => setRtpGranularity(e)}
/>
}
class="flex flex-col justify-between px-4"
width={1}
>
<SearchUsageGraph
params={{
filter: { date_range: rpsDateRange() },
granularity: rpsGranularity(),
filter: { date_range: rtpDateRange() },
granularity: rtpGranularity(),
}}
/>
</Card>
Expand Down
6 changes: 6 additions & 0 deletions frontends/dashboard/src/components/EditUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const EditUserModal = (props: InviteUserModalProps) => {
credentials: "include",
headers: {
"Content-Type": "application/json",
"TR-Organization": userContext.selectedOrg().id,
},
body: JSON.stringify({
organization_id: userContext.selectedOrg().id,
Expand All @@ -50,6 +51,11 @@ export const EditUserModal = (props: InviteUserModalProps) => {
createEffect(() => {
if (res.ok) {
props.closeModal();
createToast({
title: "Success",
type: "success",
message: "User invited or role updated successfully!",
});
} else {
void res.json().then((data) => {
createToast({
Expand Down
4 changes: 3 additions & 1 deletion frontends/dashboard/src/pages/orgs/OrgUserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ export const OrgUserPage = () => {
editingUser={editingUser()}
closeModal={() => {
setEditingUser(null);
void userQuery.refetch();
setTimeout(() => {
void userQuery.refetch();
}, 250);
}}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion server/Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update -y; \
unzip \
;

RUN curl -fsSLO https://github.com/subtrace/subtrace/releases/download/b204/subtrace-linux-amd64 \
RUN curl -fsSLO https://github.com/subtrace/subtrace/releases/download/b267/subtrace-linux-amd64 \
&& chmod +x ./subtrace-linux-amd64

RUN curl -L -o libtorch-cxx11-abi-shared-with-deps-2.4.0+cpu.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcpu.zip \
Expand Down

0 comments on commit 4eda1ef

Please sign in to comment.