forked from phoenix/litellm-mirror
ui - set admin when setting up sso
This commit is contained in:
parent
a374e83d52
commit
05aefe18ce
1 changed files with 13 additions and 4 deletions
|
@ -61,6 +61,7 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
|
||||||
const [isInstructionsModalVisible, setIsInstructionsModalVisible] = useState(false);
|
const [isInstructionsModalVisible, setIsInstructionsModalVisible] = useState(false);
|
||||||
|
|
||||||
const handleAddSSOOk = () => {
|
const handleAddSSOOk = () => {
|
||||||
|
|
||||||
setIsAddSSOModalVisible(false);
|
setIsAddSSOModalVisible(false);
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
};
|
};
|
||||||
|
@ -71,10 +72,11 @@ const handleAddSSOCancel = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleShowInstructions = (formValues: Record<string, any>) => {
|
const handleShowInstructions = (formValues: Record<string, any>) => {
|
||||||
|
handleAdminCreate(formValues);
|
||||||
|
handleSSOUpdate(formValues);
|
||||||
setIsAddSSOModalVisible(false);
|
setIsAddSSOModalVisible(false);
|
||||||
setIsInstructionsModalVisible(true);
|
setIsInstructionsModalVisible(true);
|
||||||
// Optionally, you can call handleSSOUpdate here with the formValues
|
// Optionally, you can call handleSSOUpdate here with the formValues
|
||||||
// handleSSOUpdate(formValues);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleInstructionsOk = () => {
|
const handleInstructionsOk = () => {
|
||||||
|
@ -439,10 +441,17 @@ const handleInstructionsCancel = () => {
|
||||||
labelAlign="left"
|
labelAlign="left"
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
|
<Form.Item
|
||||||
|
label="Admin Email"
|
||||||
|
name="user_email"
|
||||||
|
rules={[{ required: true, message: "Please enter the email of the proxy admin" }]}
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="PROXY BASE URL"
|
label="PROXY BASE URL"
|
||||||
name="proxy_base_url"
|
name="proxy_base_url"
|
||||||
rules={[{ required: true, message: "Please enter the public key" }]}
|
rules={[{ required: true, message: "Please enter the proxy base url" }]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
@ -450,7 +459,7 @@ const handleInstructionsCancel = () => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="GOOGLE CLIENT ID"
|
label="GOOGLE CLIENT ID"
|
||||||
name="google_client_id"
|
name="google_client_id"
|
||||||
rules={[{ required: true, message: "Please enter the public key" }]}
|
rules={[{ required: true, message: "Please enter the google client id" }]}
|
||||||
>
|
>
|
||||||
<Input.Password />
|
<Input.Password />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
@ -458,7 +467,7 @@ const handleInstructionsCancel = () => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="GOOGLE CLIENT SECRET"
|
label="GOOGLE CLIENT SECRET"
|
||||||
name="google_client_secret"
|
name="google_client_secret"
|
||||||
rules={[{ required: true, message: "Please enter the private key" }]}
|
rules={[{ required: true, message: "Please enter the google client secret" }]}
|
||||||
>
|
>
|
||||||
<Input.Password />
|
<Input.Password />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue