Skip to content

Commit

Permalink
set query string for export
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio vincenzi committed Jan 26, 2024
1 parent bb4aac0 commit e90e15f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/src/services/models/explorer/createAppModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2271,14 +2271,14 @@ function createAppModel(appConfig: IAppInitialConfig) {
onRunsTagsChange({ runHash, tags, model, updateModelData });
}

function getRunsDataToExport(): {
function getRunsDataToExport(queryString?: string): {
call: (exceptionHandler: (detail: any) => void) => Promise<any>;
abort: () => void;
} {
if (runsRequestRef) {
runsRequestRef.abort();
}
runsRequestRef = runsService.getRunsData();
runsRequestRef = runsService.getRunsData(queryString);
return {
call: async () => {
try {
Expand Down Expand Up @@ -2938,7 +2938,9 @@ function createAppModel(appConfig: IAppInitialConfig) {

function onExportTableData(): void {
// @TODO need to get data and params from state not from processData
const runsDataToExport = getRunsDataToExport();
const runsDataToExport = getRunsDataToExport(
model.getState()?.config?.select?.query,
);
const exceptionHandler = (detail: any) => {
console.error('An error occurred:', detail);
};
Expand Down Expand Up @@ -3420,9 +3422,6 @@ function createAppModel(appConfig: IAppInitialConfig) {
runsRequestRef.abort();
}
const configData = { ...model.getState()?.config };
if (queryString) {
configData.select.query = queryString;
}
runsRequestRef = runsService.getRunsData(configData?.select?.query);
setRequestProgress(model);
return {
Expand Down

0 comments on commit e90e15f

Please sign in to comment.