mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #8024 from dannon/history_menu_trimming
History menu (cog) updates.
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
<span id="item-url-text" style="display: none">
|
||||
{{ item_url_parts[0] }}<span id="item-identifier">{{ item_url_parts[1] }}</span>
|
||||
</span>
|
||||
<a href="javascript:void(0)" id="edit-identifier"><img :src="pencil_url" alt="Edit Share Url"/></a>
|
||||
<a href="javascript:void(0)" id="edit-identifier"
|
||||
><img :src="pencil_url" alt="Edit Share Url"
|
||||
/></a>
|
||||
</blockquote>
|
||||
<div v-if="item.published">
|
||||
<p>
|
||||
|
||||
@@ -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__"
|
||||
}
|
||||
|
||||
@@ -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,36 +47,16 @@ var menu = [
|
||||
href: "workflow/build_from_current_history"
|
||||
},
|
||||
{
|
||||
html: _l("Delete"),
|
||||
anon: true,
|
||||
html: _l("Set Permissions"),
|
||||
func: function() {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
if (Galaxy && Galaxy.currHistoryPanel && confirm(_l("Really delete the current history?"))) {
|
||||
Galaxy.currHistoryPanel.model._delete().done(() => {
|
||||
Galaxy.currHistoryPanel.loadCurrentHistory();
|
||||
});
|
||||
if (Galaxy && Galaxy.currHistoryPanel && Galaxy.router) {
|
||||
Galaxy.router.push(`/histories/permissions?id=${Galaxy.currHistoryPanel.model.id}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
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"),
|
||||
html: _l("Make Private"),
|
||||
anon: true,
|
||||
func: function() {
|
||||
const Galaxy = getGalaxyInstance();
|
||||
@@ -109,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,
|
||||
@@ -118,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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -59,7 +59,7 @@ masthead:
|
||||
# user menu
|
||||
logout: 'Logout'
|
||||
custom_builds: 'Custom Builds'
|
||||
saved_histories: 'Saved Histories'
|
||||
histories: 'Histories'
|
||||
|
||||
# Shared data
|
||||
libraries: 'Data Libraries'
|
||||
|
||||
+17
-17
@@ -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()
|
||||
Reference in New Issue
Block a user