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);
|
>>(null);
|
||||||
|
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
const [baseUrl, setBaseUrl] = useState(
|
const [baseUrl, setBaseUrl] = useState(
|
||||||
|
|
|
@ -45,7 +45,7 @@ async function generateModelResponse(
|
||||||
) {
|
) {
|
||||||
// base url should be the current base_url
|
// base url should be the current base_url
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
console.log("isLocal:", isLocal);
|
console.log("isLocal:", isLocal);
|
||||||
|
|
|
@ -43,7 +43,7 @@ const Createuser: React.FC<CreateuserProps> = ({
|
||||||
useState<InvitationLink | null>(null);
|
useState<InvitationLink | null>(null);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
const [baseUrl, setBaseUrl] = useState(
|
const [baseUrl, setBaseUrl] = useState(
|
||||||
|
|
|
@ -76,7 +76,7 @@ async function testFallbackModelResponse(
|
||||||
) {
|
) {
|
||||||
// base url should be the current base_url
|
// base url should be the current base_url
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
console.log("isLocal:", isLocal);
|
console.log("isLocal:", isLocal);
|
||||||
|
|
|
@ -43,7 +43,7 @@ const Navbar: React.FC<NavbarProps> = ({
|
||||||
|
|
||||||
// const userColors = require('./ui_colors.json') || {};
|
// const userColors = require('./ui_colors.json') || {};
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { message } from "antd";
|
||||||
|
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,11 @@ interface RequestAccessProps {
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
userID: 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 {
|
function onRequestAccess(formData: Record<string, any>): void {
|
||||||
// This function does nothing for now
|
// This function does nothing for now
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,11 @@ import {
|
||||||
import { Modal, Typography, Form, Input, Select, Button as Button2, message } from "antd";
|
import { Modal, Typography, Form, Input, Select, Button as Button2, message } from "antd";
|
||||||
|
|
||||||
const { Title, Paragraph } = Typography;
|
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 {
|
import {
|
||||||
getCallbacksCall,
|
getCallbacksCall,
|
||||||
setCallbacksCall,
|
setCallbacksCall,
|
||||||
|
|
|
@ -36,6 +36,11 @@ import {
|
||||||
Grid,
|
Grid,
|
||||||
} from "@tremor/react";
|
} from "@tremor/react";
|
||||||
import { CogIcon } from "@heroicons/react/outline";
|
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 {
|
interface TeamProps {
|
||||||
teams: any[] | null;
|
teams: any[] | null;
|
||||||
searchParams: any;
|
searchParams: any;
|
||||||
|
|
|
@ -37,6 +37,12 @@ import {
|
||||||
adminGlobalActivityPerModel,
|
adminGlobalActivityPerModel,
|
||||||
} from "./networking";
|
} from "./networking";
|
||||||
import { start } from "repl";
|
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 {
|
interface UsagePageProps {
|
||||||
accessToken: string | null;
|
accessToken: string | null;
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { useSearchParams, useRouter } from "next/navigation";
|
||||||
import { jwtDecode } from "jwt-decode";
|
import { jwtDecode } from "jwt-decode";
|
||||||
import { Typography } from "antd";
|
import { Typography } from "antd";
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
const isLocal = process.env.NODE_ENV === "development";
|
||||||
if (isLocal === true) {
|
if (isLocal != true) {
|
||||||
console.log = function() {};
|
console.log = function() {};
|
||||||
}
|
}
|
||||||
console.log("isLocal:", isLocal);
|
console.log("isLocal:", isLocal);
|
||||||
|
|
|
@ -34,7 +34,11 @@ import {
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
|
||||||
const { Option } = Select;
|
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 {
|
interface EditKeyModalProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -23,7 +23,11 @@ import {
|
||||||
} from "@tremor/react";
|
} from "@tremor/react";
|
||||||
import { Statistic } from "antd"
|
import { Statistic } from "antd"
|
||||||
import { spendUsersCall, modelAvailableCall } from "./networking";
|
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
|
// Define the props type
|
||||||
interface UserSpendData {
|
interface UserSpendData {
|
||||||
|
|
|
@ -21,7 +21,11 @@ import {
|
||||||
} from "@tremor/react";
|
} from "@tremor/react";
|
||||||
import { Statistic } from "antd"
|
import { Statistic } from "antd"
|
||||||
import { modelAvailableCall } from "./networking";
|
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 {
|
interface ViewUserTeamProps {
|
||||||
userID: string | null;
|
userID: string | null;
|
||||||
|
|
|
@ -52,6 +52,11 @@ interface ViewUserDashboardProps {
|
||||||
teams: any[] | null;
|
teams: any[] | null;
|
||||||
setKeys: React.Dispatch<React.SetStateAction<Object[] | 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> = ({
|
const ViewUserDashboard: React.FC<ViewUserDashboardProps> = ({
|
||||||
accessToken,
|
accessToken,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue