mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fixes for SCIM settings on ui
This commit is contained in:
parent
d3e2949e7c
commit
3971a9e6ff
3 changed files with 15 additions and 4 deletions
|
@ -300,6 +300,7 @@ export default function CreateKeyPage() {
|
|||
accessToken={accessToken}
|
||||
showSSOBanner={showSSOBanner}
|
||||
premiumUser={premiumUser}
|
||||
proxySettings={proxySettings}
|
||||
/>
|
||||
) : page == "api_ref" ? (
|
||||
<APIRef proxySettings={proxySettings} />
|
||||
|
|
|
@ -16,15 +16,23 @@ import { CopyToClipboard } from "react-copy-to-clipboard";
|
|||
interface SCIMConfigProps {
|
||||
accessToken: string | null;
|
||||
userID: string | null;
|
||||
baseUrl: string;
|
||||
proxySettings: any;
|
||||
}
|
||||
|
||||
const SCIMConfig: React.FC<SCIMConfigProps> = ({ accessToken, userID, baseUrl }) => {
|
||||
const SCIMConfig: React.FC<SCIMConfigProps> = ({ accessToken, userID, proxySettings }) => {
|
||||
const [form] = Form.useForm();
|
||||
const [isCreatingToken, setIsCreatingToken] = useState(false);
|
||||
const [tokenData, setTokenData] = useState<any>(null);
|
||||
|
||||
const scimBaseUrl = `${baseUrl}/scim`;
|
||||
let base_url = "<your_proxy_base_url>";
|
||||
|
||||
if (proxySettings) {
|
||||
if (proxySettings.PROXY_BASE_URL && proxySettings.PROXY_BASE_URL !== undefined) {
|
||||
base_url = proxySettings.PROXY_BASE_URL;
|
||||
}
|
||||
}
|
||||
|
||||
const scimBaseUrl = `${base_url}/scim`;
|
||||
|
||||
const handleCreateSCIMToken = async (values: any) => {
|
||||
if (!accessToken || !userID) {
|
||||
|
|
|
@ -51,6 +51,7 @@ interface AdminPanelProps {
|
|||
setTeams: React.Dispatch<React.SetStateAction<Team[] | null>>;
|
||||
showSSOBanner: boolean;
|
||||
premiumUser: boolean;
|
||||
proxySettings?: any;
|
||||
}
|
||||
import { useBaseUrl } from "./constants";
|
||||
|
||||
|
@ -73,6 +74,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
|
|||
accessToken,
|
||||
showSSOBanner,
|
||||
premiumUser,
|
||||
proxySettings,
|
||||
}) => {
|
||||
const [form] = Form.useForm();
|
||||
const [memberForm] = Form.useForm();
|
||||
|
@ -638,7 +640,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
|
|||
<SCIMConfig
|
||||
accessToken={accessToken}
|
||||
userID={admins && admins.length > 0 ? admins[0].user_id : null}
|
||||
baseUrl={baseUrl}
|
||||
proxySettings={proxySettings}
|
||||
/>
|
||||
</TabPanel>
|
||||
</TabPanels>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue