From d0bb67394c6b79aa822ed6c3ea6989cc8a94a261 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 23 May 2019 11:26:49 -0400 Subject: [PATCH 1/6] Drop 'Delete' and 'Delete Permanently' from the history cog menu. These two actions affecting the entire history are better accessed via the multiview or saved histories lists --- .../scripts/mvc/history/options-menu.js | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/client/galaxy/scripts/mvc/history/options-menu.js b/client/galaxy/scripts/mvc/history/options-menu.js index b8d6030e5de..1f678403c07 100644 --- a/client/galaxy/scripts/mvc/history/options-menu.js +++ b/client/galaxy/scripts/mvc/history/options-menu.js @@ -60,35 +60,6 @@ var menu = [ html: _l("Extract Workflow"), href: "workflow/build_from_current_history" }, - { - html: _l("Delete"), - anon: true, - func: function() { - const Galaxy = getGalaxyInstance(); - if (Galaxy && Galaxy.currHistoryPanel && confirm(_l("Really delete the current history?"))) { - Galaxy.currHistoryPanel.model._delete().done(() => { - Galaxy.currHistoryPanel.loadCurrentHistory(); - }); - } - } - }, - { - html: _l("Delete Permanently"), - purge: true, - anon: true, - func: function() { - const Galaxy = getGalaxyInstance(); - if ( - Galaxy && - Galaxy.currHistoryPanel && - confirm(_l("Really delete the current history permanently? This cannot be undone.")) - ) { - Galaxy.currHistoryPanel.model.purge().done(() => { - Galaxy.currHistoryPanel.loadCurrentHistory(); - }); - } - } - }, { html: _l("Make Data Private"), anon: true, From b07642e70e0d2aa65f610e5216814c5dc294911b Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 23 May 2019 11:27:32 -0400 Subject: [PATCH 2/6] Client format. --- client/galaxy/scripts/components/Sharing.vue | 4 +++- client/galaxy/scripts/mvc/ui/ui-slider.js | 5 ++--- client/galaxy/scripts/mvc/workflow/workflow-terminals.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/galaxy/scripts/components/Sharing.vue b/client/galaxy/scripts/components/Sharing.vue index a967f8d7612..84ffbde9e3c 100644 --- a/client/galaxy/scripts/components/Sharing.vue +++ b/client/galaxy/scripts/components/Sharing.vue @@ -25,7 +25,9 @@ - Edit Share Url + Edit Share Url

diff --git a/client/galaxy/scripts/mvc/ui/ui-slider.js b/client/galaxy/scripts/mvc/ui/ui-slider.js index 8f3c39c915a..f1050baf374 100644 --- a/client/galaxy/scripts/mvc/ui/ui-slider.js +++ b/client/galaxy/scripts/mvc/ui/ui-slider.js @@ -32,11 +32,10 @@ const View = Backbone.View.extend({ const input = e.currentTarget; if (this._isParameter(input.value)) { return; - } - else if (!this.model.get("precise")) { + } else if (!this.model.get("precise")) { input.value = input.value.split(".")[0]; } - input.value = input.value.replace(/[^0-9eE.-]/g, ''); + input.value = input.value.replace(/[^0-9eE.-]/g, ""); }); // build slider, cannot be rebuild in render diff --git a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js index 0f1015c9cf0..590986d6042 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js @@ -435,7 +435,7 @@ var InputTerminal = BaseInputTerminal.extend({ } if (thisMapOver.isCollection && thisMapOver.canMatch(otherCollectionType)) { return this._producesAcceptableDatatype(other); - } else if (this.multiple && new CollectionTypeDescription('list').canMatch(otherCollectionType)) { + } else if (this.multiple && new CollectionTypeDescription("list").canMatch(otherCollectionType)) { // This handles the special case of a list input being connected to a multiple="true" data input. // Nested lists would be correctly mapped over by the above condition. return this._producesAcceptableDatatype(other); From 51a02d66d2d03b36d37c7bd86c847b8a3246bc3c Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Thu, 23 May 2019 11:45:14 -0400 Subject: [PATCH 3/6] reorder and rename history cog menu, move some options out --- client/galaxy/scripts/layout/menu.js | 13 +++-- .../scripts/mvc/history/options-menu.js | 48 +++++++------------ 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/client/galaxy/scripts/layout/menu.js b/client/galaxy/scripts/layout/menu.js index be37421f08a..e494d17e039 100644 --- a/client/galaxy/scripts/layout/menu.js +++ b/client/galaxy/scripts/layout/menu.js @@ -279,22 +279,27 @@ var Collection = Backbone.Collection.extend({ onclick: logoutClick }, { - title: _l("Saved Datasets"), + title: _l("Datasets"), url: "datasets/list", target: "__use_router__" }, { - title: _l("Saved Histories"), + title: _l("Histories"), url: "histories/list", target: "__use_router__" }, { - title: _l("Saved Pages"), + title: _l("Histories shared with me"), + url: "histories/list_shared", + target: "__use_router__" + }, + { + title: _l("Pages"), url: "pages/list", target: "__use_router__" }, { - title: _l("Saved Visualizations"), + title: _l("Visualizations"), url: "visualizations/list", target: "__use_router__" } diff --git a/client/galaxy/scripts/mvc/history/options-menu.js b/client/galaxy/scripts/mvc/history/options-menu.js index 1f678403c07..411d4a6d2cb 100644 --- a/client/galaxy/scripts/mvc/history/options-menu.js +++ b/client/galaxy/scripts/mvc/history/options-menu.js @@ -10,26 +10,12 @@ import Webhooks from "mvc/webhooks"; // ============================================================================ var menu = [ { - html: _l("History Lists"), - header: true - }, - { - html: _l("Saved Histories"), - href: "histories/list", - target: "_top" - }, - { - html: _l("Histories Shared with Me"), - href: "histories/list_shared", - target: "_top" - }, - { - html: _l("Current History"), + html: _l("History Actions"), header: true, anon: true }, { - html: _l("Copy History"), + html: _l("Copy"), func: function() { const Galaxy = getGalaxyInstance(); historyCopyDialog(Galaxy.currHistoryPanel.model).done(() => { @@ -61,7 +47,16 @@ var menu = [ href: "workflow/build_from_current_history" }, { - html: _l("Make Data Private"), + html: _l("Set Permissions"), + func: function() { + const Galaxy = getGalaxyInstance(); + if (Galaxy && Galaxy.currHistoryPanel && Galaxy.router) { + Galaxy.router.push(`/histories/permissions?id=${Galaxy.currHistoryPanel.model.id}`); + } + } + }, + { + html: _l("Make Private"), anon: true, func: function() { const Galaxy = getGalaxyInstance(); @@ -80,6 +75,11 @@ var menu = [ } } }, + { + html: _l("Resume Paused Jobs"), + href: "history/resume_paused_jobs?current=True", + anon: true + }, { html: _l("Dataset Actions"), header: true, @@ -89,20 +89,6 @@ var menu = [ html: _l("Copy Datasets"), href: "dataset/copy_datasets" }, - { - html: _l("Dataset Security"), - func: function() { - const Galaxy = getGalaxyInstance(); - if (Galaxy && Galaxy.currHistoryPanel && Galaxy.router) { - Galaxy.router.push(`/histories/permissions?id=${Galaxy.currHistoryPanel.model.id}`); - } - } - }, - { - html: _l("Resume Paused Jobs"), - href: "history/resume_paused_jobs?current=True", - anon: true - }, { html: _l("Collapse Expanded Datasets"), func: function() { From c8facb61913aeb1879849eb8013bc06b7b17e4c4 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 23 May 2019 15:36:36 -0400 Subject: [PATCH 4/6] Update selenium navigation target for Saved Histories (now just histories) --- test/galaxy_selenium/navigation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/galaxy_selenium/navigation.yml b/test/galaxy_selenium/navigation.yml index f680f6fc04d..39a7f82e0ca 100644 --- a/test/galaxy_selenium/navigation.yml +++ b/test/galaxy_selenium/navigation.yml @@ -59,7 +59,7 @@ masthead: # user menu logout: 'Logout' custom_builds: 'Custom Builds' - saved_histories: 'Saved Histories' + saved_histories: 'Histories' # Shared data libraries: 'Data Libraries' From 55bf2fea06148124e6579b3224d566bbf0e16004 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 23 May 2019 15:38:30 -0400 Subject: [PATCH 5/6] Go ahead and update saved_histories -> histories everywhere in selenium tests --- test/galaxy_selenium/navigation.yml | 2 +- test/selenium_tests/test_saved_histories.py | 34 ++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/galaxy_selenium/navigation.yml b/test/galaxy_selenium/navigation.yml index 39a7f82e0ca..96b2fdd7e62 100644 --- a/test/galaxy_selenium/navigation.yml +++ b/test/galaxy_selenium/navigation.yml @@ -59,7 +59,7 @@ masthead: # user menu logout: 'Logout' custom_builds: 'Custom Builds' - saved_histories: 'Histories' + histories: 'Histories' # Shared data libraries: 'Data Libraries' diff --git a/test/selenium_tests/test_saved_histories.py b/test/selenium_tests/test_saved_histories.py index a0821224d34..c250f4f1877 100644 --- a/test/selenium_tests/test_saved_histories.py +++ b/test/selenium_tests/test_saved_histories.py @@ -9,15 +9,15 @@ from .framework import ( class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test - def test_saved_histories_list(self): + def test_histories_list(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.assert_histories_in_grid([self.history2_name, self.history3_name]) @selenium_test def test_history_switch(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.screenshot("histories_saved_grid") self.click_popup_option(self.history2_name, 'Switch') self.sleep_for(self.wait_types.UX_RENDER) @@ -31,7 +31,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_history_view(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.click_popup_option(self.history2_name, 'View') history_name = self.wait_for_selector('.name.editable-text') self.assertEqual(history_name.text, self.history2_name) @@ -39,13 +39,13 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_history_publish(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() # Publish the history self.click_popup_option(self.history2_name, 'Share or Publish') self.components.histories.sharing.make_accessible_and_publish.wait_for_and_click() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.histories_click_advanced_search() self.select_filter('sharing', 'published') @@ -56,7 +56,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_rename_history(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.click_popup_option('Unnamed history', 'Rename') @@ -67,14 +67,14 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): self.wait_for_and_click_selector("button#submit") - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.assert_histories_in_grid([self.history1_name, self.history2_name, self.history3_name]) @selenium_test def test_delete_and_undelete_history(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() # Delete the history self.click_popup_option(self.history2_name, 'Delete') @@ -98,7 +98,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): self._login() self.create_history(self.history4_name) - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.assert_histories_in_grid([self.history4_name]) self.click_popup_option(self.history4_name, 'Delete Permanently') @@ -115,7 +115,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_delete_and_undelete_multiple_histories(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() delete_button_selector = 'input[type="button"][value="Delete"]' undelete_button_selector = 'input[type="button"][value="Undelete"]' @@ -144,7 +144,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_sort_by_name(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.wait_for_and_click_selector('.sort-link[sort_key="name"]') actual_histories = self.get_histories() @@ -162,7 +162,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_standard_search(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() input_selector = '#input-free-text-search-filter' search_input = self.wait_for_selector(input_selector) @@ -181,7 +181,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_advanced_search(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() self.histories_click_advanced_search() @@ -209,7 +209,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): @selenium_test def test_tags(self): self._login() - self.navigate_to_saved_histories_page() + self.navigate_to_histories_page() # Insert a tag tags_cell = self.get_history_tags_cell(self.history2_name) @@ -269,10 +269,10 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): self.wait_for_and_click_selector(close_button_selector) self.sleep_for(self.wait_types.UX_RENDER) - def navigate_to_saved_histories_page(self): + def navigate_to_histories_page(self): self.home() self.click_masthead_user() # Open masthead menu - self.components.masthead.saved_histories.wait_for_and_click() + self.components.masthead.histories.wait_for_and_click() def setup_shared_state(self): SavedHistoriesTestCase.user_email = self._get_random_email() From 4bcd3b4b39c161ee75b26b3aecf86fc11e40392f Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 23 May 2019 15:39:55 -0400 Subject: [PATCH 6/6] Move 'test_saved_histories' to 'test_histories_list' --- .../{test_saved_histories.py => test_histories_list.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/selenium_tests/{test_saved_histories.py => test_histories_list.py} (100%) diff --git a/test/selenium_tests/test_saved_histories.py b/test/selenium_tests/test_histories_list.py similarity index 100% rename from test/selenium_tests/test_saved_histories.py rename to test/selenium_tests/test_histories_list.py