mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge branch 'revise_close_workflow' into dev
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
<script>
|
||||
import _ from "underscore";
|
||||
import axios from "axios";
|
||||
import Vue from 'vue';
|
||||
import BootstrapVue from 'bootstrap-vue';
|
||||
import Vue from "vue";
|
||||
import BootstrapVue from "bootstrap-vue";
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
import * as bibtexParse from "libs/bibtexParse";
|
||||
import { convertLaTeX } from "latex-to-unicode-converter";
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
</b-card>
|
||||
</b-form>
|
||||
<b-button v-for="idp in oidc_idps" :key="idp" class="d-block mt-3" @click="submitOIDCLogin(idp)">
|
||||
<i v-bind:class="oidc_idps_icons[idp]" /> Sign in with {{ idp.charAt(0).toUpperCase() + idp.slice(1) }}
|
||||
<i v-bind:class="oidc_idps_icons[idp]" /> Sign in with
|
||||
{{ idp.charAt(0).toUpperCase() + idp.slice(1) }}
|
||||
</b-button>
|
||||
</div>
|
||||
<div v-if="show_welcome_with_login" class="col">
|
||||
|
||||
@@ -441,7 +441,7 @@ var ToolPanel = Backbone.Model.extend({
|
||||
// and is not a ExpressionTool is treated as a generic tool.
|
||||
if (type.indexOf("Tool") === type.length - 4) {
|
||||
const tool = self.attributes.tools.get(elt_dict.id);
|
||||
if (type === 'ExpressionTool') {
|
||||
if (type === "ExpressionTool") {
|
||||
tool.hide();
|
||||
}
|
||||
return tool;
|
||||
|
||||
@@ -38,9 +38,9 @@ var Base = Backbone.View.extend({
|
||||
.removeClass()
|
||||
.addClass("ui-options")
|
||||
.addClass(this.model.get("cls"))
|
||||
.append(this.$message = $("<div/>").addClass("mt-2"))
|
||||
.append(this.$menu = $("<div/>").addClass("ui-options-menu"))
|
||||
.append(this.$options = $(this._template()));
|
||||
.append((this.$message = $("<div/>").addClass("mt-2")))
|
||||
.append((this.$menu = $("<div/>").addClass("ui-options-menu")))
|
||||
.append((this.$options = $(this._template())));
|
||||
|
||||
// add select/unselect all button
|
||||
this.all_button = null;
|
||||
|
||||
@@ -276,7 +276,7 @@ var Node = Backbone.Model.extend({
|
||||
// the output already exists, but the output formats may have changed.
|
||||
// Therefore we update the datatypes and destroy invalid connections.
|
||||
node.output_terminals[output.name].datatypes = output.extensions;
|
||||
if (node.type == 'parameter_input') {
|
||||
if (node.type == "parameter_input") {
|
||||
node.output_terminals[output.name].attributes.type = output.type;
|
||||
}
|
||||
node.output_terminals[output.name].destroyInvalidConnections();
|
||||
|
||||
@@ -68,30 +68,6 @@ export default Backbone.View.extend({
|
||||
var self = (window.workflow_globals.app = this);
|
||||
this.options = options;
|
||||
this.urls = (options && options.urls) || {};
|
||||
var close_editor = () => {
|
||||
self.workflow.check_changes_in_active_form();
|
||||
if (self.workflow && self.workflow.has_changes) {
|
||||
var do_close = () => {
|
||||
window.onbeforeunload = undefined;
|
||||
window.document.location = self.urls.workflow_index;
|
||||
};
|
||||
show_modal(
|
||||
"Close workflow editor",
|
||||
"There are unsaved changes to your workflow which will be lost.",
|
||||
{
|
||||
Cancel: hide_modal,
|
||||
"Save Changes": function() {
|
||||
save_current_workflow(null, do_close);
|
||||
}
|
||||
},
|
||||
{
|
||||
"Don't Save": do_close
|
||||
}
|
||||
);
|
||||
} else {
|
||||
window.document.location = self.urls.workflow_index;
|
||||
}
|
||||
};
|
||||
var workflow_index = self.urls.workflow_index;
|
||||
var save_current_workflow = (eventObj, success_callback) => {
|
||||
show_message("Saving workflow", "progress");
|
||||
@@ -378,7 +354,9 @@ export default Backbone.View.extend({
|
||||
// Load workflow definition
|
||||
this.load_workflow(self.options.id, self.options.version);
|
||||
if (make_popupmenu) {
|
||||
$("#workflow-run-button").click(() => window.location = `${getAppRoot()}workflows/run?id=${self.options.id}`);
|
||||
$("#workflow-run-button").click(
|
||||
() => (window.location = `${getAppRoot()}workflows/run?id=${self.options.id}`)
|
||||
);
|
||||
$("#workflow-save-button").click(() => save_current_workflow());
|
||||
make_popupmenu($("#workflow-options-button"), {
|
||||
"Save As": workflow_save_as,
|
||||
@@ -389,8 +367,7 @@ export default Backbone.View.extend({
|
||||
Download: {
|
||||
url: `${getAppRoot()}api/workflows/${self.options.id}/download?format=json-download`,
|
||||
action: function() {}
|
||||
},
|
||||
Close: close_editor
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -804,7 +804,8 @@ class NavigatesGalaxy(HasDriver):
|
||||
return self.wait_for_and_click_selector("#workflow-run-button")
|
||||
|
||||
def workflow_editor_click_save(self):
|
||||
return self.wait_for_and_click_selector("#workflow-save-button")
|
||||
self.wait_for_and_click_selector("#workflow-save-button")
|
||||
self.sleep_for(self.wait_types.DATABASE_OPERATION)
|
||||
|
||||
def admin_open(self):
|
||||
self.components.masthead.admin.wait_for_and_click()
|
||||
|
||||
@@ -63,7 +63,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
editor.label_input.wait_for_and_click() # Seems to help force the save of whole annotation.
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("workflow_editor_data_input_filled_in")
|
||||
self.workflow_editor_save_and_close()
|
||||
self.workflow_editor_click_save()
|
||||
self.workflow_index_open_with_name(name)
|
||||
data_input_node = editor.node._(label="input1")
|
||||
data_input_node.title.wait_for_and_click()
|
||||
@@ -89,7 +89,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
editor.label_input.wait_for_and_click() # Seems to help force the save of whole annotation.
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("workflow_editor_data_collection_input_filled_in")
|
||||
self.workflow_editor_save_and_close()
|
||||
self.workflow_editor_click_save()
|
||||
self.workflow_index_open_with_name(name)
|
||||
data_input_node = editor.node._(label="input1")
|
||||
data_input_node.title.wait_for_and_click()
|
||||
@@ -116,7 +116,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
editor.label_input.wait_for_and_click() # Seems to help force the save of whole annotation.
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("workflow_editor_parameter_input_filled_in")
|
||||
self.workflow_editor_save_and_close()
|
||||
self.workflow_editor_click_save()
|
||||
self.workflow_index_open_with_name(name)
|
||||
data_input_node = editor.node._(label="input1")
|
||||
data_input_node.title.wait_for_and_click()
|
||||
@@ -334,10 +334,6 @@ steps:
|
||||
self.assert_modal_has_text("Tool is not installed")
|
||||
self.screenshot("workflow_editor_missing_tool")
|
||||
|
||||
def workflow_editor_save_and_close(self):
|
||||
self.workflow_editor_click_save()
|
||||
self.workflow_editor_click_option("Close")
|
||||
|
||||
def workflow_editor_maximize_center_pane(self, collapse_left=True, collapse_right=True):
|
||||
if collapse_left:
|
||||
self.components._.left_panel_collapse.wait_for_and_click()
|
||||
|
||||
Reference in New Issue
Block a user