-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RootDBApp/api#10 - wip - report data view dynamic modules imports.
- Loading branch information
PORQUET Sébastien
committed
Oct 11, 2024
1 parent
8d21820
commit 6f2d1ac
Showing
8 changed files
with
123 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/components/report/data-view/ReportDataViewFormModuleImports.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* This file is part of RootDB. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* AUTHORS | ||
* PORQUET Sébastien <[email protected]> | ||
* ROBIN Brice <[email protected]> | ||
*/ | ||
|
||
import * as React from 'react'; | ||
import TJSModuleImport from "../../../types/TJSmoduleImport"; | ||
import TReportDataViewState from "../../../types/TReportDataViewState"; | ||
|
||
const ReportDataViewFormModuleImports: React.FC<{ reportDataViewState: TReportDataViewState }> = ({reportDataViewState}) => { | ||
|
||
const [jsModuleImports, setJsModuleImports] = React.useState<Array<TJSModuleImport>>([]); | ||
|
||
React.useEffect(() => { | ||
|
||
if(reportDataViewState.dataView?.json_runtime_configuration_minified) { | ||
|
||
} | ||
|
||
}, []); | ||
|
||
return (<></>); | ||
} | ||
|
||
export default ReportDataViewFormModuleImports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ const DataViewGraphView: React.FC<{ | |
} | ||
|
||
const modulesToImport: Array<{ url: string, as: string }> = [ | ||
// {url: "https://cdn.skypack.dev/[email protected]", as: "topojson"}, | ||
{url: "https://cdn.skypack.dev/[email protected]", as: "topojson"}, | ||
]; | ||
|
||
const load = async () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* This file is part of RootDB. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* AUTHORS | ||
* PORQUET Sébastien <[email protected]> | ||
* ROBIN Brice <[email protected]> | ||
*/ | ||
|
||
type TJSModuleImport = { | ||
url: string, | ||
as: string | ||
} | ||
|
||
export = TJSModuleImport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,30 +19,33 @@ | |
* ROBIN Brice <[email protected]> | ||
*/ | ||
|
||
import { EDataViewType } from "./EDataViewType"; | ||
import TReportDataViewJs from "./TReportDataViewJs"; | ||
import TReportDataViewLibVersion from "./TReportDataViewLibVersion"; | ||
import { EDataViewType } from "./EDataViewType"; | ||
import TReportDataViewJs from "./TReportDataViewJs"; | ||
import TReportDataViewLibVersion from "./TReportDataViewLibVersion"; | ||
import TReportDataViewRunTimeConfiguration from "./TReportDataViewRuntimeConfiguration"; | ||
|
||
type TReportDataView = { | ||
id: number, | ||
by_chunk: boolean, | ||
chunk_size: number, | ||
created_at?: Date, | ||
description?: string, | ||
description_display_type?: number, | ||
is_visible: boolean, | ||
json_runtime_configuration?: TReportDataViewRunTimeConfiguration, | ||
json_runtime_configuration_minified?: boolean, | ||
on_queue: boolean, | ||
max_width: number | undefined, | ||
name: string, | ||
position: string, | ||
query: string, | ||
report_data_view_lib_type_id?: number, | ||
report_data_view_lib_version?: TReportDataViewLibVersion, | ||
report_data_view_lib_version_id: number, | ||
report_data_view_js: TReportDataViewJs, | ||
report_data_view_js_id: number, | ||
title?: string, | ||
type: EDataViewType, | ||
created_at?: Date, | ||
description?: string, | ||
report_data_view_lib_type_id?: number, | ||
report_data_view_lib_version?: TReportDataViewLibVersion, | ||
title?: string, | ||
updated_at?: Date | null, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* This file is part of RootDB. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* AUTHORS | ||
* PORQUET Sébastien <[email protected]> | ||
* ROBIN Brice <[email protected]> | ||
*/ | ||
|
||
import TJSModuleImport from "./TJSmoduleImport"; | ||
|
||
type TReportDataViewRunTimeConfiguration = { | ||
jsModules: array<TJSModuleImport> | ||
} | ||
|
||
export = TReportDataViewRunTimeConfiguration; |