mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
Rename option to 'use_legacy_history'; invert assertions.
This commit is contained in:
@@ -11,7 +11,7 @@ on:
|
||||
- cron: '0 0 * * 2'
|
||||
env:
|
||||
GALAXY_CONFIG_GALAXY_URL_PREFIX: '/galaxypf'
|
||||
GALAXY_CONFIG_BETA_HISTORY_DEFAULT_ON: true
|
||||
GALAXY_CONFIG_USE_LEGACY_HISTORY: false
|
||||
GALAXY_TEST_DBURI: 'postgresql://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8'
|
||||
GALAXY_TEST_RAISE_EXCEPTION_ON_HISTORYLESS_HDA: '1'
|
||||
GALAXY_TEST_SELENIUM_RETRIES: 1
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
const USE_BETA_HISTORY_STORAGE_KEY = "useBetaHistory";
|
||||
const USE_LEGACY_HISTORY_STORAGE_KEY = "useLegacyHistory";
|
||||
|
||||
export const shouldUseBetaHistory = (instanceDefault) => {
|
||||
export const shouldUseLegacyHistory = (instanceDefaultUseLegacyHistory) => {
|
||||
// If there's a value set, respect it. Otherwise get instance default from config.
|
||||
const userPrefBetaHistory = sessionStorage.getItem(USE_BETA_HISTORY_STORAGE_KEY);
|
||||
if (userPrefBetaHistory != null) {
|
||||
return userPrefBetaHistory === "1";
|
||||
const userPrefLegacyHistory = sessionStorage.getItem(USE_LEGACY_HISTORY_STORAGE_KEY);
|
||||
if (userPrefLegacyHistory != null) {
|
||||
return userPrefLegacyHistory === "1";
|
||||
} else {
|
||||
return instanceDefault;
|
||||
return instanceDefaultUseLegacyHistory;
|
||||
}
|
||||
};
|
||||
|
||||
export const switchToLegacyHistoryPanel = () => {
|
||||
sessionStorage.setItem(USE_BETA_HISTORY_STORAGE_KEY, 0);
|
||||
sessionStorage.setItem(USE_LEGACY_HISTORY_STORAGE_KEY, 1);
|
||||
location.reload();
|
||||
};
|
||||
|
||||
export const switchToBetaHistoryPanel = () => {
|
||||
sessionStorage.setItem(USE_BETA_HISTORY_STORAGE_KEY, 1);
|
||||
sessionStorage.setItem(USE_LEGACY_HISTORY_STORAGE_KEY, 0);
|
||||
location.reload();
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ import Page from "layout/page";
|
||||
|
||||
// Vue adapter emulates current features of backbone history panel
|
||||
import { HistoryPanelProxy } from "components/History/adapters/HistoryPanelProxy";
|
||||
import { shouldUseBetaHistory } from "components/History/adapters/betaToggle";
|
||||
import { shouldUseLegacyHistory } from "components/History/adapters/betaToggle";
|
||||
|
||||
addInitialization((Galaxy, { options = {} }) => {
|
||||
console.log("Analysis custom page setup");
|
||||
@@ -14,9 +14,7 @@ addInitialization((Galaxy, { options = {} }) => {
|
||||
// Handle beta history panel
|
||||
// Need to mock Galaxy.currHistoryPanel
|
||||
// pass config through for defaults
|
||||
const HistoryPanel = shouldUseBetaHistory(Galaxy.config.beta_history_default_on)
|
||||
? HistoryPanelProxy
|
||||
: MvcHistoryPanel;
|
||||
const HistoryPanel = shouldUseLegacyHistory(Galaxy.config.use_legacy_history) ? MvcHistoryPanel : HistoryPanelProxy;
|
||||
|
||||
const pageOptions = Object.assign({}, options, {
|
||||
config: Object.assign({}, options.config, {
|
||||
|
||||
@@ -1879,12 +1879,12 @@
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``beta_history_default_on``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
``use_legacy_history``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Server-wide default selection of the 'beta' history during the
|
||||
Server-wide default selection to use the legacy history during the
|
||||
transition period, after which this option will disappear. Users
|
||||
will remain able to swap back and forth per their preference.
|
||||
:Default: ``false``
|
||||
@@ -3732,8 +3732,13 @@
|
||||
:Description:
|
||||
When the simplified workflow run form is rendered, should the
|
||||
invocation outputs be sent to the 'current' history or a 'new'
|
||||
history.
|
||||
:Default: ``current``
|
||||
history. If the user should be presented and option between these
|
||||
- set this to 'prefer_current' or 'prefer_new' to display a
|
||||
runtime setting with the corresponding default. The default is to
|
||||
provide the user this option and default it to the current history
|
||||
(the traditional behavior of Galaxy for years) - this corresponds
|
||||
to the setting 'prefer_current'.
|
||||
:Default: ``prefer_current``
|
||||
:Type: str
|
||||
|
||||
|
||||
@@ -4807,3 +4812,6 @@
|
||||
Display built-in converters in the tool panel.
|
||||
:Default: ``true``
|
||||
:Type: bool
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# Galaxy is configured by default to be usable in a single-user development
|
||||
# environment. To tune the application for a multi-user production
|
||||
# environment, see the documentation at:
|
||||
#
|
||||
#
|
||||
# https://docs.galaxyproject.org/en/master/admin/production.html
|
||||
#
|
||||
#
|
||||
# Throughout this sample configuration file, except where stated otherwise,
|
||||
# uncommented values override the default if left unset, whereas commented
|
||||
# values are set to the default value. Relative paths are relative to the root
|
||||
# Galaxy directory.
|
||||
#
|
||||
#
|
||||
# Examples of many of these options are explained in more detail in the Galaxy
|
||||
# Community Hub.
|
||||
#
|
||||
#
|
||||
# https://galaxyproject.org/admin/config
|
||||
#
|
||||
#
|
||||
# Config hackers are encouraged to check there before asking for help.
|
||||
#
|
||||
#
|
||||
# Configuration for Gravity process manager.
|
||||
# ``uwsgi:`` section will be ignored if Galaxy is started via Gravity commands (e.g ``./run.sh``, ``galaxy`` or ``galaxyctl``).
|
||||
gravity:
|
||||
@@ -1014,10 +1014,10 @@ galaxy:
|
||||
# <config_dir>.
|
||||
#trs_servers_config_file: trs_servers_conf.yml
|
||||
|
||||
# Server-wide default selection of the 'beta' history during the
|
||||
# Server-wide default selection to use the legacy history during the
|
||||
# transition period, after which this option will disappear. Users
|
||||
# will remain able to swap back and forth per their preference.
|
||||
#beta_history_default_on: false
|
||||
#use_legacy_history: false
|
||||
|
||||
# Location of the configuration file containing extra user
|
||||
# preferences.
|
||||
@@ -1850,8 +1850,13 @@ galaxy:
|
||||
|
||||
# When the simplified workflow run form is rendered, should the
|
||||
# invocation outputs be sent to the 'current' history or a 'new'
|
||||
# history.
|
||||
#simplified_workflow_run_ui_target_history: current
|
||||
# history. If the user should be presented and option between these -
|
||||
# set this to 'prefer_current' or 'prefer_new' to display a runtime
|
||||
# setting with the corresponding default. The default is to provide
|
||||
# the user this option and default it to the current history (the
|
||||
# traditional behavior of Galaxy for years) - this corresponds to the
|
||||
# setting 'prefer_current'.
|
||||
#simplified_workflow_run_ui_target_history: prefer_current
|
||||
|
||||
# When the simplified workflow run form is rendered, should the
|
||||
# invocation use job caching. This isn't a boolean so an option for
|
||||
@@ -2364,3 +2369,4 @@ galaxy:
|
||||
|
||||
# Display built-in converters in the tool panel.
|
||||
#display_builtin_converters: true
|
||||
|
||||
|
||||
@@ -1355,12 +1355,12 @@ mapping:
|
||||
If this is null (the default), a simple configuration containing
|
||||
just Dockstore will be used.
|
||||
|
||||
beta_history_default_on:
|
||||
use_legacy_history:
|
||||
type: bool
|
||||
default: true
|
||||
default: false
|
||||
required: false
|
||||
desc: |
|
||||
Server-wide default selection of the 'beta' history during the
|
||||
Server-wide default selection to use the legacy history during the
|
||||
transition period, after which this option will disappear. Users will
|
||||
remain able to swap back and forth per their preference.
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ class ConfigSerializer(base.ModelSerializer):
|
||||
"matomo_site_id": _use_config,
|
||||
"enable_unique_workflow_defaults": _use_config,
|
||||
"enable_beta_markdown_export": _use_config,
|
||||
"beta_history_default_on": _use_config,
|
||||
"use_legacy_history": _use_config,
|
||||
"simplified_workflow_run_ui": _use_config,
|
||||
"simplified_workflow_run_ui_target_history": _use_config,
|
||||
"simplified_workflow_run_ui_job_cache": _use_config,
|
||||
|
||||
Reference in New Issue
Block a user