Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): remove expandColumns with get_calls #3471

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ export const ExportSelector = ({
};

const pythonText = makeCodeText(
callQueryParams.entity,
callQueryParams.project,
selectionState === 'selected' ? selectedCalls : undefined,
lowLevelFilter,
filterBy,
refColumnsToExpand,
sortBy,
includeFeedback
);
Expand Down Expand Up @@ -521,12 +519,10 @@ function makeLeafColumns(visibleColumns: string[]) {
}

function makeCodeText(
entity: string,
project: string,
callIds: string[] | undefined,
filter: CallFilter,
query: Query | undefined,
expandColumns: string[],
sortBy: Array<{field: string; direction: 'asc' | 'desc'}>,
includeFeedback: boolean
) {
Expand All @@ -535,15 +531,11 @@ function makeCodeText(
const filteredCallIds = callIds ?? filter.callIds;
if (filteredCallIds && filteredCallIds.length > 0) {
codeStr += ` filter={"call_ids": ["${filteredCallIds.join('", "')}"]},\n`;
if (expandColumns.length > 0) {
const expandColumnsStr = JSON.stringify(expandColumns, null, 0);
codeStr += ` expand_columns=${expandColumnsStr},\n`;
}
if (includeFeedback) {
codeStr += ` include_feedback=True,\n`;
}
// specifying call_ids ignores other filters, return early
codeStr += `})`;
codeStr += `)`;
return codeStr;
}
if (Object.values(filter).some(value => value !== undefined)) {
Expand Down Expand Up @@ -572,10 +564,6 @@ function makeCodeText(
if (query) {
codeStr += ` query=${JSON.stringify(query, null, 0)},\n`;
}
if (expandColumns.length > 0) {
const expandColumnsStr = JSON.stringify(expandColumns, null, 0);
codeStr += ` expand_columns=${expandColumnsStr},\n`;
}

if (sortBy.length > 0) {
codeStr += ` sort_by=${JSON.stringify(sortBy, null, 0)},\n`;
Expand Down
Loading