Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Add Notebooks as Report Source Option #349

Prev Previous commit
Next Next commit
saving progress, add API method to access notebooks
davidcui1225 committed Apr 21, 2021
commit 930fbca2b8d8a17e2ce18659111276e2c232d0b8
Original file line number Diff line number Diff line change
@@ -597,10 +597,22 @@ export function ReportSettings(props: ReportSettingProps) {
.catch((error) => {
console.log('error when fetching saved searches:', error);
});

/**
* fetchNotebooks = () => {
return this.props.http
.get(`${API_PREFIX}/`)
.then((res) => this.setState(res))
.catch((err) => {
console.error('Issue in fetching the notebooks', err.body.message);
});
};
*/

await httpClientProps
.get('../api/reporting/getReportSource/notebooks')
.then(async (response: { [x: string]: { [x: string]: string | any[]; }; }) => {
.get('/api/notebooks/')
.then(async (response: any) => {
console.log('response is', response);
let notebooksOptions = getNotebooksOptions(response['hits']['hits']);
reportSourceOptions.notebooks = notebooksOptions;
await handleNotebooks(notebooksOptions);