From d703eed26f7d14041c0fd704cc9c8487e6097dfc Mon Sep 17 00:00:00 2001 From: Sebastian Kapust Date: Tue, 1 Oct 2019 07:04:12 +0200 Subject: [PATCH 01/22] Add inf. scroll, collapsible citations, info modal --- .../galaxy/scripts/components/Citations.vue | 20 ++- .../galaxy/scripts/components/ToolsView.vue | 169 ++++++++++++++++++ .../scripts/entry/analysis/AnalysisRouter.js | 6 +- client/package.json | 3 +- client/yarn.lock | 5 + 5 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 client/galaxy/scripts/components/ToolsView.vue diff --git a/client/galaxy/scripts/components/Citations.vue b/client/galaxy/scripts/components/Citations.vue index 75906671f88..8402cd04d6e 100644 --- a/client/galaxy/scripts/components/Citations.vue +++ b/client/galaxy/scripts/components/Citations.vue @@ -1,4 +1,5 @@ @@ -51,43 +69,50 @@ diff --git a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js index db4e5640976..039828d5fc9 100644 --- a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js +++ b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js @@ -33,6 +33,11 @@ import HistoryView from "components/HistoryView.vue"; import WorkflowInvocationReport from "components/WorkflowInvocationReport.vue"; import WorkflowRun from "components/Workflow/Run/WorkflowRun.vue"; import RecentInvocations from "components/User/RecentInvocations.vue"; +<<<<<<< HEAD +======= +import ToolsView from "components/ToolsView.vue"; +import ToolsJson from "components/ToolsJson.vue"; +>>>>>>> 669a685171... Add tools/json page which serves json-ld data import HistoryList from "mvc/history/history-list"; import PluginList from "components/PluginList.vue"; import QueryStringParsing from "utils/query-string-parsing"; @@ -51,6 +56,11 @@ export const getAnalysisRouter = Galaxy => routes: { "(/)(#)(_=_)": "home", "(/)root*": "home", +<<<<<<< HEAD +======= + "(/)tools/view": "show_tools_view", + "(/)tools/json": "show_tools_json", +>>>>>>> 669a685171... Add tools/json page which serves json-ld data "(/)tours(/)(:tour_id)": "show_tours", "(/)user(/)": "show_user", "(/)user(/)cloud_auth": "show_cloud_auth", @@ -241,11 +251,16 @@ export const getAnalysisRouter = Galaxy => show_histories_import: function() { this._display_vue_helper(HistoryImport); }, + show_tools_view: function() { this.page.panels.left.hide(); this.page.panels.right.hide(); this._display_vue_helper(ToolsView); }, + + show_tools_json: function() { + this._display_vue_helper(ToolsJson); + }, show_histories_permissions: function() { this.page.display( new FormWrapper.View({ diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 7281d8240af..f998ca73765 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -123,6 +123,8 @@ def app_factory(global_conf, load_app_kwds={}, **kwargs): webapp.add_client_route('/admin/quotas', 'admin') webapp.add_client_route('/admin/form/{form_id}', 'admin') webapp.add_client_route('/admin/api_keys', 'admin') + webapp.add_client_route('/tools/view') + webapp.add_client_route('/tools/json') webapp.add_client_route('/tours') webapp.add_client_route('/tours/{tour_id}') webapp.add_client_route('/user') From 772f7b9fac78bd6854d3093873c54af34ce14fa1 Mon Sep 17 00:00:00 2001 From: Sebastian Kapust Date: Tue, 1 Oct 2019 07:04:12 +0200 Subject: [PATCH 07/22] Remove microdata tags --- client/galaxy/scripts/components/ToolsView.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client/galaxy/scripts/components/ToolsView.vue b/client/galaxy/scripts/components/ToolsView.vue index 020487cf4f7..16269529f6c 100644 --- a/client/galaxy/scripts/components/ToolsView.vue +++ b/client/galaxy/scripts/components/ToolsView.vue @@ -35,26 +35,21 @@ :key="index" class="m-2" style="width: 23rem;" - itemscope - itemtype="http://schema.org/SoftwareApplication" > - -
-

Info - {{ info["version"] + " / " + info["id"] }} + {{ info["version"] + " / " + info["id"] }}

{{ info["description"] }}

From b335a2f641c1ae2a7d7cb0c4f4f610abfa37d8b8 Mon Sep 17 00:00:00 2001 From: Sebastian Kapust Date: Tue, 1 Oct 2019 07:04:12 +0200 Subject: [PATCH 08/22] Fixes * Handle empty tool panel data * Robust collapse/layout animation transitions --- .../galaxy/scripts/components/Citations.vue | 7 ++++ .../galaxy/scripts/components/ToolsJson.vue | 6 ++- .../galaxy/scripts/components/ToolsView.vue | 37 +++++++++---------- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/client/galaxy/scripts/components/Citations.vue b/client/galaxy/scripts/components/Citations.vue index 8402cd04d6e..fd6acfa2e72 100644 --- a/client/galaxy/scripts/components/Citations.vue +++ b/client/galaxy/scripts/components/Citations.vue @@ -38,6 +38,8 @@

@@ -90,6 +92,11 @@ export default { ); } }, + updated: function() { + this.$nextTick(function() { + this.$emit("rendered"); + }); + }, created: function() { axios .get(`${getAppRoot()}api/${this.source}/${this.id}/citations`) diff --git a/client/galaxy/scripts/components/ToolsJson.vue b/client/galaxy/scripts/components/ToolsJson.vue index dac788bb784..0772b80d243 100644 --- a/client/galaxy/scripts/components/ToolsJson.vue +++ b/client/galaxy/scripts/components/ToolsJson.vue @@ -25,7 +25,11 @@ export default { ] : _acc; } - return acc.concat(section["elems"].reduce(extractTools, [])); + if ("elems" in section) { + return acc.concat(section["elems"].reduce(extractTools, [])); + } else { + return acc; + } } return { "@context": "http://schema.org", diff --git a/client/galaxy/scripts/components/ToolsView.vue b/client/galaxy/scripts/components/ToolsView.vue index 16269529f6c..c5fa26211c8 100644 --- a/client/galaxy/scripts/components/ToolsView.vue +++ b/client/galaxy/scripts/components/ToolsView.vue @@ -30,22 +30,14 @@ :list="buffer" style="margin: 0 auto;" > - +

{{ info["name"] }}

{{ info["section"] }}
-

+

Info @@ -54,7 +46,14 @@

- +
@@ -87,7 +86,6 @@ export default { getFilterData: { filterByText: el => { const re = new RegExp(this.filterText, "i"); - console.log(this.filterText); return el["name"].match(re) || el["description"].match(re) || el["help"].match(re); } } @@ -99,13 +97,10 @@ export default { }; }, methods: { - updateLayout() { - setTimeout(() => { - this.$refs.iso.layout(); - }, 500); + layout() { + this.$refs.iso.layout(); }, filter(key) { - console.log("filter here with key: ", key); this.$refs.iso.filter(key); }, toolsExtracted(tools) { @@ -126,7 +121,11 @@ export default { ] : _acc; } - return acc.concat(section["elems"].reduce(extractTools, [])); + if ("elems" in section) { + return acc.concat(section["elems"].reduce(extractTools, [])); + } else { + return acc; + } } return tools .reduce(extractSections, []) @@ -173,8 +172,6 @@ export default { this.tools = this.toolsExtracted(response.data); this.buffer = this.tools.slice(0, 20); this.loading = false; - - this.updateLayout(); }) .catch(error => { console.error(error); From a3bf24dd401967f14b4b3ae00436978ca23b66e2 Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Thu, 23 Jan 2020 18:03:44 +0100 Subject: [PATCH 09/22] fix cherry-pick artifacts --- client/galaxy/scripts/components/Citations.vue | 9 ++++++++- client/galaxy/scripts/entry/analysis/AnalysisRouter.js | 6 ------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/galaxy/scripts/components/Citations.vue b/client/galaxy/scripts/components/Citations.vue index fd6acfa2e72..bbaaabc1fd8 100644 --- a/client/galaxy/scripts/components/Citations.vue +++ b/client/galaxy/scripts/components/Citations.vue @@ -1,6 +1,6 @@