Commit ec8bd0e9 authored by Dannon Baker's avatar Dannon Baker
Browse files

Rename option to 'use_legacy_history'; invert assertions.

parent eef29d34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+8 −8
Original line number Diff line number Diff line
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();
};
+2 −4
Original line number Diff line number Diff line
@@ -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, {
+14 −6
Original line number Diff line number Diff line
@@ -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


+16 −10
Original line number Diff line number Diff line
@@ -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
Loading