From 8bb21e5921c1ab5f80877be8336b81b057a41724 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 27 Aug 2021 15:28:44 -0400 Subject: [PATCH 1/7] Display Tabular datasets as sortable tables with correct metadata headers in pages --- .../Elements/HistoryDatasetDisplay.vue | 96 +++++++++++++------ .../providers/SingleQueryProvider.js | 4 + lib/galaxy/managers/markdown_util.py | 5 +- 3 files changed, 75 insertions(+), 30 deletions(-) diff --git a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue index 5cc4e14bbb7..cf2836efef4 100644 --- a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue +++ b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue @@ -33,14 +33,35 @@ - -
-
-                        {{ itemContent.item_data }}
-                    
-
No content found.
- Show More... -
+ + +
{{ error }}
+
+
+
+                                {{ itemContent.item_data }}
+                            
+
+ + +
{{ metaError }}
+ +
+
+
+
No content found.
+ Show More... +
+
@@ -49,10 +70,12 @@ From 20fd446fcb2ce125feea378a43b665a53d35f66d Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 30 Aug 2021 15:33:52 -0400 Subject: [PATCH 3/7] Match tabular datatype through datatype mapping, add filter to ignore empty rows --- .../Elements/HistoryDatasetDisplay.vue | 63 ++++++++++++------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue index 147a27f4c78..7d5abb2409b 100644 --- a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue +++ b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue @@ -44,25 +44,31 @@ :src="displayUrl" />
-
- - -
{{ metaError }}
- -
-
-
-                                {{ itemContent.item_data }}
-                            
+ + +
+ + +
{{ metaError }}
+ +
+
+
+                                    {{ itemContent.item_data }}
+                                
+
No content found.
Show More... @@ -77,6 +83,7 @@ import { getAppRoot } from "onload/loadConfig"; import LoadingSpan from "components/LoadingSpan"; import { UrlDataProvider } from "components/providers/UrlDataProvider"; +import { DatatypesMapperModel } from "components/Datatypes/model"; export default { components: { @@ -106,6 +113,9 @@ export default { const dataset = this.datasets[this.args.history_dataset_id]; return dataset && dataset.name; }, + datatypesUrl() { + return "api/datatypes/types_and_mapping"; + }, downloadUrl() { return `${getAppRoot()}dataset/display?dataset_id=${this.args.history_dataset_id}`; }, @@ -123,6 +133,10 @@ export default { }, }, methods: { + isSubType(child, parent, datatypesModel) { + const datatypesMapper = new DatatypesMapperModel(datatypesModel); + return datatypesMapper.isSubType(child, parent); + }, getFields(metaData) { const fields = []; const columnNames = metaData.metadata_column_names || []; @@ -145,10 +159,17 @@ export default { if (i >= comments) { const tabs = line.split(delimiter); const rowData = {}; + let hasData = false; tabs.forEach((cellData, j) => { - rowData[j] = cellData; + const cellDataTrimmed = cellData.trim(); + if (cellDataTrimmed) { + hasData = true; + } + rowData[j] = cellDataTrimmed; }); - tableData.push(rowData); + if (hasData) { + tableData.push(rowData); + } } }); return tableData; From c22aa7d7a27efa4f76d175bf683483015ed064b2 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 30 Aug 2021 15:45:24 -0400 Subject: [PATCH 4/7] Use dataset mapper for html and pdf subtype mapping --- .../Elements/HistoryDatasetDisplay.vue | 76 ++++++++++--------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue index 7d5abb2409b..ed207cd2544 100644 --- a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue +++ b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue @@ -37,41 +37,45 @@
{{ error }}
- -
- - -
- - -
{{ metaError }}
- -
+ + +
+ +
+
+ + +
{{ metaError }}
+ +
+
+
+                                            {{ itemContent.item_data }}
+                                        
-
-                                    {{ itemContent.item_data }}
-                                
- -
-
No content found.
- Show More... +
No content found.
+ + Show More... + +
+
@@ -133,9 +137,9 @@ export default { }, }, methods: { - isSubType(child, parent, datatypesModel) { + isSubTypeOfAny(child, parents, datatypesModel) { const datatypesMapper = new DatatypesMapperModel(datatypesModel); - return datatypesMapper.isSubType(child, parent); + return datatypesMapper.isSubTypeOfAny(child, parents); }, getFields(metaData) { const fields = []; From 06599fb0f7599f5d482e9571ed07a926d834b892 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 30 Aug 2021 16:06:31 -0400 Subject: [PATCH 5/7] Fix indent missed by format client --- .../components/Markdown/Elements/HistoryDatasetDisplay.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue index ed207cd2544..c725d313abc 100644 --- a/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue +++ b/client/src/components/Markdown/Elements/HistoryDatasetDisplay.vue @@ -67,8 +67,8 @@
-                                            {{ itemContent.item_data }}
-                                        
+ {{ itemContent.item_data }} +
No content found.
From ed3c4d8b8f82da98b7b534bb3e3c892ace752fea Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 30 Aug 2021 23:37:11 -0400 Subject: [PATCH 6/7] Remove unused divs in markdown components, slightly increase padding for pages to improve scolling and navigation --- .../CollectionDisplay.vue | 98 ++++++----- .../Elements/HistoryDatasetDisplay.vue | 153 +++++++++--------- .../Markdown/Elements/JobMetrics.vue | 8 +- .../Markdown/Elements/JobParameters.vue | 8 +- .../components/Markdown/Elements/ToolStd.vue | 12 +- .../Markdown/Elements/Visualization.vue | 12 +- .../Elements/Workflow/WorkflowDisplay.vue | 84 +++++----- client/src/components/Markdown/Markdown.vue | 2 +- client/src/style/scss/markdown.scss | 7 + 9 files changed, 186 insertions(+), 198 deletions(-) diff --git a/client/src/components/Markdown/Elements/HistoryDatasetCollection/CollectionDisplay.vue b/client/src/components/Markdown/Elements/HistoryDatasetCollection/CollectionDisplay.vue index 6b69dc66870..077e7b77536 100644 --- a/client/src/components/Markdown/Elements/HistoryDatasetCollection/CollectionDisplay.vue +++ b/client/src/components/Markdown/Elements/HistoryDatasetCollection/CollectionDisplay.vue @@ -1,54 +1,52 @@