Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/galaxyproject/galaxy into co…
Browse files Browse the repository at this point in the history
…nfigurable_priorities
  • Loading branch information
Matthew Spelchak committed Mar 6, 2018
2 parents 920be90 + a69fb6e commit 25dfcc2
Show file tree
Hide file tree
Showing 190 changed files with 4,040 additions and 7,330 deletions.
30 changes: 27 additions & 3 deletions client/galaxy/scripts/apps/analysis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import jQuery from "jquery";
var $ = jQuery;
import * as _ from "underscore";
import GalaxyApp from "galaxy";
import Router from "layout/router";
import ToolPanel from "./panels/tool-panel";
Expand All @@ -14,6 +15,7 @@ import GridView from "mvc/grid/grid-view";
import GridShared from "mvc/grid/grid-shared";
import Workflows from "mvc/workflow/workflow";
import HistoryImport from "components/HistoryImport.vue";
import HistoryView from "components/HistoryView.vue";
import HistoryList from "mvc/history/history-list";
import ToolFormComposite from "mvc/tool/tool-form-composite";
import QueryStringParsing from "utils/query-string-parsing";
Expand All @@ -23,8 +25,11 @@ import DatasetError from "mvc/dataset/dataset-error";
import DatasetEditAttributes from "mvc/dataset/dataset-edit-attributes";
import Visualization from "mvc/visualization/visualization-view";
import Citations from "components/Citations.vue";
import DisplayStructure from "components/DisplayStructured.vue";
import Vue from "vue";

/* global Galaxy */

/** define the 'Analyze Data'/analysis/main/home page for Galaxy
* * has a masthead
* * a left tool menu to allow the user to load tools in the center panel
Expand Down Expand Up @@ -65,6 +70,8 @@ window.app = function app(options, bootstrapped) {
"(/)histories(/)rename(/)": "show_histories_rename",
"(/)histories(/)import(/)": "show_histories_import",
"(/)histories(/)permissions(/)": "show_histories_permissions",
"(/)histories/view": "show_history_view",
"(/)histories/show_structure": "show_history_structure",
"(/)histories(/)(:action_id)": "show_histories",
"(/)datasets(/)list(/)": "show_datasets",
"(/)custom_builds": "show_custom_builds",
Expand Down Expand Up @@ -127,11 +134,26 @@ window.app = function app(options, bootstrapped) {
show_workflows_published: function() {
this.page.display(
new GridView({
url_base: `${Galaxy.root}workflow/list_published`
url_base: `${Galaxy.root}workflow/list_published`,
active_tab: "shared"
})
);
},

show_history_view: function() {
var historyInstance = Vue.extend(HistoryView);
var vm = document.createElement("div");
this.page.display(vm);
new historyInstance({ propsData: { id: QueryStringParsing.get("id") } }).$mount(vm);
},

show_history_structure: function() {
let displayStructureInstance = Vue.extend(DisplayStructure);
let vm = document.createElement("div");
this.page.display(vm);
new displayStructureInstance({ propsData: { id: QueryStringParsing.get(" id: ") } }).$mount(vm);
},

show_histories: function(action_id) {
this.page.display(new HistoryList.View({ action_id: action_id }));
},
Expand Down Expand Up @@ -171,15 +193,17 @@ window.app = function app(options, bootstrapped) {
show_openids: function() {
this.page.display(
new GridView({
url_base: `${Galaxy.root}user/openids_list`
url_base: `${Galaxy.root}user/openids_list`,
active_tab: "user"
})
);
},

show_datasets: function() {
this.page.display(
new GridView({
url_base: `${Galaxy.root}dataset/list`
url_base: `${Galaxy.root}dataset/list`,
active_tab: "user"
})
);
},
Expand Down
87 changes: 1 addition & 86 deletions client/galaxy/scripts/apps/extended.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _l from "utils/localization";
import GalaxyApp from "galaxy";
import WorkflowView from "mvc/workflow/workflow-view";
import Trackster from "viz/trackster";
Expand All @@ -17,7 +16,6 @@ import StructureView from "mvc/history/history-structure-view";
import HistoryContents from "mvc/history/history-contents";
import MultiPanel from "mvc/history/multi-panel";
import HistoryView from "mvc/history/history-view";
import HistoryViewEdit from "mvc/history/history-view-edit";
import HistoryViewAnnotated from "mvc/history/history-view-annotated";
import HistoryCopyDialog from "mvc/history/copy-dialog";
import HDAListItemEdit from "mvc/history/hda-li-edit";
Expand Down Expand Up @@ -67,89 +65,6 @@ export function libraryEntry(options) {
new GalaxyLibrary.GalaxyApp(options);
}

export function historyEntry(options) {
$("#toggle-deleted").modeButton({
initialMode: options.initialModeDeleted,
modes: [
{ mode: "showing_deleted", html: _l("Exclude deleted") },
{ mode: "not_showing_deleted", html: _l("Include deleted") }
]
});
$("#toggle-hidden").modeButton({
initialMode: options.initialModeHidden,
modes: [
{ mode: "showing_hidden", html: _l("Exclude hidden") },
{ mode: "not_showing_hidden", html: _l("Include hidden") }
]
});
$("#switch").click(function() {
//##HACK:ity hack hack
//##TODO: remove when out of iframe
var hview =
Galaxy.currHistoryPanel || (window.top.Galaxy && window.top.Galaxy.currHistoryPanel)
? window.top.Galaxy.currHistoryPanel
: null;
if (hview) {
hview.switchToHistory("${ history[ 'id' ] }");
} else {
window.location = "${ switch_to_url }";
}
});
// use_panels effects where the the center_panel() is rendered:
// w/o it renders to the body, w/ it renders to #center - we need to adjust a few things for scrolling to work
if (options.hasMasthead) {
$("#center").addClass("flex-vertical-container");
}

let viewClass = options.userIsOwner ? HistoryViewEdit.HistoryViewEdit : HistoryView.HistoryView;
let historyModel = new History.History(options.historyJSON);

// attach the copy dialog to the import button now that we have a history
$("#import").click(function() {
HistoryCopyDialog(historyModel, {
useImport: true,
// use default datasets option to match the toggle-deleted button
allDatasets: $("#toggle-deleted").modeButton("getMode").mode === "showing_deleted"
}).done(function() {
if (window === window.parent) {
window.location = Galaxy.root;
} else if (Galaxy.currHistoryPanel) {
Galaxy.currHistoryPanel.loadCurrentHistory();
}
});
});

let historyView = new viewClass({
el: $("#history-" + options.historyJSON.id),
className: viewClass.prototype.className + " wide",
$scrollContainer: options.hasMasthead
? function() {
return this.$el.parent();
}
: undefined,
model: historyModel,
show_deleted: options.showDeletedJson,
show_hidden: options.showHiddenJson,
purgeAllowed: options.allow_user_dataset_purge
});
historyView.trigger("loading");
historyModel
.fetchContents({ silent: true })
.fail(function() {
alert("Galaxy history failed to load");
})
.done(function() {
historyView.trigger("loading-done");
historyView.render();
});
$("#toggle-deleted").on("click", function() {
historyView.toggleShowDeleted();
});
$("#toggle-hidden").on("click", function() {
historyView.toggleShowHidden();
});
}

export function multiHistoryEntry(options) {
let histories = new History.HistoryCollection([], {
includeDeleted: options.includingDeleted,
Expand Down Expand Up @@ -180,7 +95,7 @@ export const bundleEntries = {
phyloviz: Phyloviz.PhylovizView,
createTabularDatasetChunkedView: Data.createTabularDatasetChunkedView,
multiHistory: multiHistoryEntry,
history: historyEntry,
history: HistoryView.historyEntry,
History: History.History,
HistoryContents: HistoryContents.HistoryContents,
SweepsterVisualization: Sweepster.SweepsterVisualization,
Expand Down

0 comments on commit 25dfcc2

Please sign in to comment.