From bde1b4010676a603e7967290cc0a3250ae072066 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 4 Jun 2024 10:55:49 +0300 Subject: [PATCH 1/2] Filter data dialog entries by dataset state, only display valid states --- client/src/components/DataDialog/DataDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/DataDialog/DataDialog.vue b/client/src/components/DataDialog/DataDialog.vue index 8302589752e3..39785b54a7d4 100644 --- a/client/src/components/DataDialog/DataDialog.vue +++ b/client/src/components/DataDialog/DataDialog.vue @@ -90,7 +90,7 @@ function formatRows() { /** Returns the default url i.e. the url of the current history **/ function getHistoryUrl() { - return `${getAppRoot()}api/histories/${props.history}/contents?deleted=false`; + return `${getAppRoot()}api/histories/${props.history}/contents?v=dev&q=state-eq&qv=ok&q=deleted&qv=false`; } /** Called when the modal is hidden */ From 4d4f39bf25655f0b111759f8b5e40c6972f008e9 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 4 Jun 2024 18:22:13 +0300 Subject: [PATCH 2/2] Only filter list of entries in data dialog for visualizations activity for now --- client/src/components/DataDialog/DataDialog.vue | 8 +++++++- client/src/components/Panels/VisualizationPanel.vue | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/src/components/DataDialog/DataDialog.vue b/client/src/components/DataDialog/DataDialog.vue index 39785b54a7d4..fd0f86201ea4 100644 --- a/client/src/components/DataDialog/DataDialog.vue +++ b/client/src/components/DataDialog/DataDialog.vue @@ -23,6 +23,7 @@ interface Record { interface Props { allowUpload?: boolean; callback?: (results: Array) => void; + filterOkState?: boolean; format?: string; library?: boolean; modalStatic?: boolean; @@ -34,6 +35,7 @@ interface Props { const props = withDefaults(defineProps(), { allowUpload: true, callback: () => {}, + filterOkState: false, format: "download", library: true, modalStatic: false, @@ -90,7 +92,11 @@ function formatRows() { /** Returns the default url i.e. the url of the current history **/ function getHistoryUrl() { - return `${getAppRoot()}api/histories/${props.history}/contents?v=dev&q=state-eq&qv=ok&q=deleted&qv=false`; + let queryString = "&q=deleted&qv=false"; + if (props.filterOkState) { + queryString += "&q=state-eq&qv=ok"; + } + return `${getAppRoot()}api/histories/${props.history}/contents?v=dev${queryString}`; } /** Called when the modal is hidden */ diff --git a/client/src/components/Panels/VisualizationPanel.vue b/client/src/components/Panels/VisualizationPanel.vue index 50d0b089b473..fedc8dfab1fd 100644 --- a/client/src/components/Panels/VisualizationPanel.vue +++ b/client/src/components/Panels/VisualizationPanel.vue @@ -93,9 +93,10 @@ onMounted(() => { No matching visualization found.