[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
Connect display application component with api endpoint
  • Loading branch information
guerler committed Nov 18, 2022
commit fcaf44e413c676bfb7e881bfa32ed808d719c527
49 changes: 27 additions & 22 deletions client/src/components/Visualizations/DisplayApplication.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
<script setup>
import { urlData } from "utils/url";
import { DatasetProvider } from "components/providers";
import { defineProps, onMounted } from "vue";
const props = defineProps({
appName: {
type: String,
required: true,
},
datasetId: {
type: String,
required: true,
},
linkName: {
type: String,
required: true,
},
});
async function getCreateLink() {
const buildUrl = `/api/display_applications/create_link?dataset_id=${ props.datasetId }&app_name=${ props.appName }&link_name=${ props.linkName }`;
const data = await urlData({ url: buildUrl });
console.log(data);
}
onMounted(() => {
getCreateLink();
});
</script>
<template>
<div>
{{ appName }}
{{ datasetId }}
{{ linkName }}
</div>
</template>
<script>
import { DatasetProvider } from "components/providers";
export default {
components: {
DatasetProvider,
},
props: {
appName: {
type: String,
required: true,
},
datasetId: {
type: String,
required: true,
},
linkName: {
type: String,
required: true,
},
},
};
</script>
1 change: 0 additions & 1 deletion lib/galaxy/webapps/galaxy/api/display_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def reload(self, trans, payload=None, **kwd):
return self.manager.reload(ids)

@expose_api
@require_admin
def create_link(self,
trans,
dataset_id=None,
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/buildapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def connect_invocation_endpoint(endpoint_name, endpoint_suffix, action, conditio
"/api/display_applications/create_link",
controller="display_applications",
action="create_link",
conditions=dict(method=["POST"]),
conditions=dict(method=["GET"]),
)

webapp.mapper.connect(
Expand Down