mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Remove editor mako use router instead
This commit is contained in:
@@ -427,7 +427,7 @@ export default {
|
||||
this.showInPanel = "attributes";
|
||||
},
|
||||
onEditSubworkflow(contentId) {
|
||||
const editUrl = `${getAppRoot()}workflow/editor?workflow_id=${contentId}`;
|
||||
const editUrl = `${getAppRoot()}workflows/edit?id=${contentId}`;
|
||||
this.onNavigate(editUrl);
|
||||
},
|
||||
async onClone(node) {
|
||||
|
||||
@@ -79,7 +79,7 @@ export function saveAs(workflow) {
|
||||
},
|
||||
})
|
||||
.done((id) => {
|
||||
workflow.onNavigate(`${getAppRoot()}workflow/editor?id=${id}`, true);
|
||||
workflow.onNavigate(`${getAppRoot()}workflows/edit?id=${id}`, true);
|
||||
})
|
||||
.fail((err) => {
|
||||
console.debug(err);
|
||||
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
props: ["workflow"],
|
||||
computed: {
|
||||
urlEdit() {
|
||||
return `${getAppRoot()}workflow/editor?id=${this.workflow.id}`;
|
||||
return `${getAppRoot()}workflows/edit?id=${this.workflow.id}`;
|
||||
},
|
||||
urlDownload() {
|
||||
return `${getAppRoot()}api/workflows/${this.workflow.id}/download?format=json-download`;
|
||||
|
||||
@@ -328,7 +328,7 @@ export function getRouter(Galaxy) {
|
||||
component: FormGeneric,
|
||||
props: {
|
||||
url: "workflow/create",
|
||||
redirect: "workflow/editor",
|
||||
redirect: "workflows/edit",
|
||||
active_tab: "workflow",
|
||||
submitTitle: "Create",
|
||||
submitIcon: "fa-check",
|
||||
|
||||
@@ -649,7 +649,7 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
return trans.response.send_redirect(f"{url_for('/')}workflow?status=done&message={escape(message)}")
|
||||
|
||||
@web.expose
|
||||
# @web.json
|
||||
@web.json
|
||||
@web.require_login("edit workflows")
|
||||
def editor(self, trans, id=None, workflow_id=None, version=None):
|
||||
"""
|
||||
@@ -741,8 +741,7 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
}
|
||||
|
||||
# parse to mako
|
||||
# return editor_config
|
||||
return trans.fill_template("workflow/editor.mako", editor_config=editor_config)
|
||||
return editor_config
|
||||
|
||||
@web.json
|
||||
def load_workflow(self, trans, id, version=None):
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<%inherit file="/webapps/galaxy/base_panels.mako"/>
|
||||
|
||||
<%def name="title()">
|
||||
Workflow Editor
|
||||
</%def>
|
||||
|
||||
<%def name="init()">
|
||||
<%
|
||||
self.active_view="workflow"
|
||||
self.overlay_visible=True
|
||||
%>
|
||||
</%def>
|
||||
|
||||
<%def name="javascript_app()">
|
||||
${parent.javascript_app()}
|
||||
<script type="text/javascript">
|
||||
var editorConfig = ${ h.dumps( editor_config ) };
|
||||
config.addInitialization(function(galaxy, config) {
|
||||
console.log("workflow/editor.mako, editorConfig", editorConfig);
|
||||
window.bundleEntries.mountWorkflowEditor(editorConfig);
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="stylesheets()">
|
||||
## Include "base.css" for styling tool menu and forms (details)
|
||||
${h.css("jquery-ui/smoothness/jquery-ui" )}
|
||||
|
||||
## But make sure styles for the layout take precedence
|
||||
${parent.stylesheets()}
|
||||
</%def>
|
||||
|
||||
<%def name="overlay(visible=False)">
|
||||
${parent.overlay( "Loading workflow...",
|
||||
"<div class='progress progress-striped progress-info active'><div class='progress-bar' style='width: 100%;'></div></div>", self.overlay_visible )}
|
||||
</%def>
|
||||
|
||||
<%def name="left_panel()">
|
||||
</%def>
|
||||
|
||||
<%def name="center_panel()">
|
||||
</%def>
|
||||
|
||||
<%def name="right_panel()">
|
||||
</%def>
|
||||
Reference in New Issue
Block a user