[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor display application handling #15076

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
Use composition api for display applications list
  • Loading branch information
guerler committed Nov 18, 2022
commit ab78425e9565e1da510b012454ba1cb7b484cf68
38 changes: 16 additions & 22 deletions client/src/components/Visualizations/DisplayApplications.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
<script setup>
import { safePath } from "utils/redirect";
import { DatasetProvider } from "components/providers";
import { defineProps } from "vue";
const props = defineProps({
datasetId: {
type: String,
required: true,
},
});
function getUrl(link) {
return safePath(`/display_applications/${ props.datasetId }/${ link.app_name }/${ link.link_name }`);
};
</script>
<template>
<div>
<DatasetProvider :id="datasetId" v-slot="{ result: dataset }">
<DatasetProvider :id="props.datasetId" v-slot="{ result: dataset }">
<b-alert
v-if="
(dataset && dataset.display_apps && dataset.display_apps.length > 0) ||
Expand Down Expand Up @@ -35,24 +49,4 @@
</b-alert>
</DatasetProvider>
</div>
</template>
<script>
import { safePath } from "utils/redirect";
import { DatasetProvider } from "components/providers";
export default {
components: {
DatasetProvider,
},
props: {
datasetId: {
type: String,
required: true,
},
},
methods: {
getUrl(link) {
return safePath(`/display_applications/${ this.datasetId }/${ link.app_name }/${ link.link_name }`);
},
},
};
</script>
</template>