Skip to content

Commit

Permalink
feat: few admin UI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vklimontovich committed Dec 5, 2023
1 parent 925964c commit 2e7c5ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
13 changes: 9 additions & 4 deletions webapps/console/pages/admin/overage-billing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ColumnOption, JsonAsTable } from "../../components/JsonAsTable/JsonAsTa
import { z } from "zod";
import { WorkspaceDbModel } from "../../prisma/schema";
import Link from "next/link";
import { Progress } from "antd";
import { Button, Progress } from "antd";
import { useEffect, useState } from "react";

function Reference(props: { children: React.ReactNode; href: string }) {
Expand Down Expand Up @@ -53,9 +53,14 @@ const View = ({ data, workspaces }) => {
<div className="p-12">
<div className="flex justify-between mb-12">
<div className="flex space-x-2 items-center"></div>
<JitsuButton icon={<FaArrowLeft />} size="large" type="primary" onClick={() => router.back()}>
Go back
</JitsuButton>
<div>
<Button size="large" type="link" href={"/admin/workspaces"}>
Go to Workspace Admin
</Button>
<Button size="large" type="primary" href={"/"}>
Back
</Button>
</div>{" "}
</div>
<JsonAsTable
rows={data.sort((a, b) => {
Expand Down
17 changes: 11 additions & 6 deletions webapps/console/pages/admin/workspaces.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { get } from "../../lib/useApi";
import { useRouter } from "next/router";
import { useQueryStringState } from "../../lib/useQueryStringState";
import { CircleDollarSign, Loader2, UserCircle2 } from "lucide-react";
import { CircleDollarSign, DollarSign, Loader2, UserCircle2 } from "lucide-react";
import { ErrorCard } from "../../components/GlobalError/GlobalError";
import { Switch } from "antd";
import { Button, Switch } from "antd";
import omit from "lodash/omit";
import { JitsuButton } from "../../components/JitsuButton/JitsuButton";
import { FaArrowLeft } from "react-icons/fa";
Expand All @@ -12,19 +12,24 @@ import hash from "stable-hash";
import { JsonAsTable } from "../../components/JsonAsTable/JsonAsTable";
import { useQuery } from "@tanstack/react-query";
import Link from "next/link";

const View = ({ data }) => {
const [rollup, setRollup] = useState(false);
const router = useRouter();
const [loadingGoBack, setLoadingGoBack] = useState(false);
return (
<div className="p-12">
<div className="flex justify-between mb-12">
<div className="flex space-x-2 items-center">
<Switch onClick={val => setRollup(val)} /> <label>Rollup</label>
</div>
<JitsuButton icon={<FaArrowLeft />} size="large" type="primary" onClick={() => router.back()}>
Go back
</JitsuButton>
<div>
<Button size="large" type="link" href={"/admin/overage-billing"}>
Go to Billing Admin
</Button>
<Button size="large" type="primary" href={"/"}>
Back
</Button>
</div>
</div>
<JsonAsTable
rows={(rollup
Expand Down
2 changes: 0 additions & 2 deletions webapps/ee-api/pages/api/report/workspace-stat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ async function extend(reportResult: WorkspaceReportRow[]): Promise<ExtendedWorks
acc[w.workspaceId] = w;
return acc;
}, {});
log.atInfo().log(`Got workspace info: ${JSON.stringify(workspaceInfoMap)}`);

return reportResult.map(r => ({ ...r, ...workspaceInfoMap[r.workspaceId] }));
}

Expand Down

1 comment on commit 2e7c5ea

@vercel
Copy link

@vercel vercel bot commented on 2e7c5ea Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

new-jitsu-ee-api – ./webapps/ee-api

onetag-ee-api.vercel.app
new-jitsu-ee-api-jitsu.vercel.app
new-jitsu-ee-api-git-newjitsu-jitsu.vercel.app
ee.jitsu.dev

Please sign in to comment.