Skip to content

Commit

Permalink
Only filter list of entries in data dialog for visualizations activit…
Browse files Browse the repository at this point in the history
…y for now
  • Loading branch information
guerler committed Jun 4, 2024
1 parent bde1b40 commit 4d4f39b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion client/src/components/DataDialog/DataDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface Record {
interface Props {
allowUpload?: boolean;
callback?: (results: Array<Record>) => void;
filterOkState?: boolean;
format?: string;
library?: boolean;
modalStatic?: boolean;
Expand All @@ -34,6 +35,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {
allowUpload: true,
callback: () => {},
filterOkState: false,
format: "download",
library: true,
modalStatic: false,
Expand Down Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Panels/VisualizationPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ onMounted(() => {
<BAlert v-else v-localize variant="info" show> No matching visualization found. </BAlert>
</div>
<DataDialog
v-if="showDataDialog"
v-if="currentHistoryId && showDataDialog"
format=""
:history="currentHistoryId"
:filter-ok-state="true"
@onOk="createVisualization"
@onCancel="showDataDialog = false" />
</ActivityPanel>
Expand Down

0 comments on commit 4d4f39b

Please sign in to comment.