mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Org UI Improvements (#8436)
* feat(team_endpoints.py): support returning teams filtered by organization_id allows user to just get teams they belong to, within the org Enables org admin to see filtered list of teams on UI * fix(teams.tsx): simple filter for team on ui - just filter team based on selected org id * feat(ui/organizations): show 'default org' in switcher, filter teams based on selected org * feat(user_dashboard.tsx): update team in switcher when org changes * feat(schema.prisma): add new 'organization_id' value to key table allow org admin to directly issue keys to a user within their org * fix(view_key_table.tsx): fix regression where admin couldn't see keys caused by bad console log statement * fix(team_endpoints.py): handle default org value in /team/list * fix(key_management_endpoints.py): allow proxy admin to create keys for team they're not in * fix(team_endpoints.py): fix team endpoint to handle org id not being passed in * build(config.yml): investigate what pkg is installing posthog in ci/cd * ci(config.yml): uninstall posthog prevent it from being added in ci/cd * ci: auto-install ci
This commit is contained in:
parent
e26d7df91b
commit
13a3e8630e
15 changed files with 195 additions and 127 deletions
|
@ -9,6 +9,8 @@ if (isLocal != true) {
|
|||
console.log = function() {};
|
||||
}
|
||||
|
||||
export const DEFAULT_ORGANIZATION = "default_organization";
|
||||
|
||||
export interface Model {
|
||||
model_name: string;
|
||||
litellm_params: Object;
|
||||
|
@ -16,7 +18,7 @@ export interface Model {
|
|||
}
|
||||
|
||||
export interface Organization {
|
||||
organization_id: string;
|
||||
organization_id: string | null;
|
||||
organization_alias: string;
|
||||
budget_id: string;
|
||||
metadata: Record<string, any>;
|
||||
|
@ -724,7 +726,8 @@ export const teamInfoCall = async (
|
|||
|
||||
export const teamListCall = async (
|
||||
accessToken: String,
|
||||
userID: String | null = null
|
||||
organizationID: string | null,
|
||||
userID: String | null = null,
|
||||
) => {
|
||||
/**
|
||||
* Get all available teams on proxy
|
||||
|
@ -732,9 +735,21 @@ export const teamListCall = async (
|
|||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/team/list` : `/team/list`;
|
||||
console.log("in teamInfoCall");
|
||||
const queryParams = new URLSearchParams();
|
||||
|
||||
if (userID) {
|
||||
url += `?user_id=${userID}`;
|
||||
queryParams.append('user_id', userID.toString());
|
||||
}
|
||||
|
||||
if (organizationID) {
|
||||
queryParams.append('organization_id', organizationID.toString());
|
||||
}
|
||||
|
||||
const queryString = queryParams.toString();
|
||||
if (queryString) {
|
||||
url += `?${queryString}`;
|
||||
}
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue