mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
switch off prod logs on ui
This commit is contained in:
parent
c2289afee8
commit
f9e6ac0542
15 changed files with 48 additions and 11 deletions
|
@ -91,7 +91,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
|
|||
>>(null);
|
||||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
const [baseUrl, setBaseUrl] = useState(
|
||||
|
|
|
@ -45,7 +45,7 @@ async function generateModelResponse(
|
|||
) {
|
||||
// base url should be the current base_url
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
console.log("isLocal:", isLocal);
|
||||
|
|
|
@ -43,7 +43,7 @@ const Createuser: React.FC<CreateuserProps> = ({
|
|||
useState<InvitationLink | null>(null);
|
||||
const router = useRouter();
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
const [baseUrl, setBaseUrl] = useState(
|
||||
|
|
|
@ -76,7 +76,7 @@ async function testFallbackModelResponse(
|
|||
) {
|
||||
// base url should be the current base_url
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
console.log("isLocal:", isLocal);
|
||||
|
|
|
@ -43,7 +43,7 @@ const Navbar: React.FC<NavbarProps> = ({
|
|||
|
||||
// const userColors = require('./ui_colors.json') || {};
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { message } from "antd";
|
|||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,11 @@ interface RequestAccessProps {
|
|||
accessToken: string;
|
||||
userID: string;
|
||||
}
|
||||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
function onRequestAccess(formData: Record<string, any>): void {
|
||||
// This function does nothing for now
|
||||
}
|
||||
|
|
|
@ -34,6 +34,11 @@ import {
|
|||
import { Modal, Typography, Form, Input, Select, Button as Button2, message } from "antd";
|
||||
|
||||
const { Title, Paragraph } = Typography;
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
import {
|
||||
getCallbacksCall,
|
||||
setCallbacksCall,
|
||||
|
|
|
@ -36,6 +36,11 @@ import {
|
|||
Grid,
|
||||
} from "@tremor/react";
|
||||
import { CogIcon } from "@heroicons/react/outline";
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
interface TeamProps {
|
||||
teams: any[] | null;
|
||||
searchParams: any;
|
||||
|
|
|
@ -37,6 +37,12 @@ import {
|
|||
adminGlobalActivityPerModel,
|
||||
} from "./networking";
|
||||
import { start } from "repl";
|
||||
console.log("process.env.NODE_ENV", process.env.NODE_ENV);
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal !== true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
interface UsagePageProps {
|
||||
accessToken: string | null;
|
||||
|
|
|
@ -17,7 +17,7 @@ import { useSearchParams, useRouter } from "next/navigation";
|
|||
import { jwtDecode } from "jwt-decode";
|
||||
import { Typography } from "antd";
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
if (isLocal === true) {
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
console.log("isLocal:", isLocal);
|
||||
|
|
|
@ -34,7 +34,11 @@ import {
|
|||
} from "antd";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
interface EditKeyModalProps {
|
||||
visible: boolean;
|
||||
|
|
|
@ -23,7 +23,11 @@ import {
|
|||
} from "@tremor/react";
|
||||
import { Statistic } from "antd"
|
||||
import { spendUsersCall, modelAvailableCall } from "./networking";
|
||||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
// Define the props type
|
||||
interface UserSpendData {
|
||||
|
|
|
@ -21,7 +21,11 @@ import {
|
|||
} from "@tremor/react";
|
||||
import { Statistic } from "antd"
|
||||
import { modelAvailableCall } from "./networking";
|
||||
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
interface ViewUserTeamProps {
|
||||
userID: string | null;
|
||||
|
|
|
@ -52,6 +52,11 @@ interface ViewUserDashboardProps {
|
|||
teams: any[] | null;
|
||||
setKeys: React.Dispatch<React.SetStateAction<Object[] | null>>;
|
||||
}
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||
if (isLocal != true) {
|
||||
console.log = function() {};
|
||||
}
|
||||
|
||||
const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({
|
||||
accessToken,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue