From 3541c304c6c32054b7e874d9d1d7b5bfd33568f8 Mon Sep 17 00:00:00 2001 From: guerler Date: Sun, 16 Oct 2022 13:27:59 -0400 Subject: [PATCH 01/10] Consistently serialize tags in Visualization --- lib/galaxy/model/__init__.py | 4 ++-- lib/galaxy/webapps/galaxy/api/visualizations.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 2e3dcd5116a..82cda0e6645 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -8836,7 +8836,7 @@ class CloudAuthz(Base, _HasTable): ) -class Page(Base, Dictifiable, RepresentById): +class Page(Base, HasTags, Dictifiable, RepresentById): __tablename__ = "page" __table_args__ = (Index("ix_page_slug", "slug", mysql_length=200),) @@ -8942,7 +8942,7 @@ class PageUserShareAssociation(Base, UserShareAssociation): page = relationship("Page", back_populates="users_shared_with") -class Visualization(Base, RepresentById): +class Visualization(Base, HasTags, RepresentById): __tablename__ = "visualization" __table_args__ = ( Index("ix_visualization_dbkey", "dbkey", mysql_length=200), diff --git a/lib/galaxy/webapps/galaxy/api/visualizations.py b/lib/galaxy/webapps/galaxy/api/visualizations.py index 3d854f7fb20..2a588e965c6 100644 --- a/lib/galaxy/webapps/galaxy/api/visualizations.py +++ b/lib/galaxy/webapps/galaxy/api/visualizations.py @@ -191,6 +191,7 @@ class VisualizationsController(BaseGalaxyAPIController, UsesVisualizationMixin, slug=visualization.slug, ) dictionary["username"] = visualization.user.username + dictionary["tags"] = visualization.make_tag_string_list() dictionary["annotation"] = self.get_item_annotation_str(trans.sa_session, trans.user, visualization) # need to encode ids in revisions as well encoded_revisions = [] From e35ffce78be64eb8ef996871a4f3c2e10a409c23 Mon Sep 17 00:00:00 2001 From: guerler Date: Sun, 16 Oct 2022 14:39:50 -0400 Subject: [PATCH 02/10] Restore rating stars and display for published items --- client/package.json | 1 + client/src/components/Common/Published.vue | 35 ++++++++++++---- client/src/components/Common/Ratings.vue | 42 +++++++++++++++++++ .../components/History/HistoryPublished.vue | 11 ++++- .../components/PageDisplay/PageDisplay.vue | 9 +++- .../Visualizations/VisualizationPublished.vue | 11 ++++- .../components/Workflow/WorkflowPublished.vue | 11 ++++- client/yarn.lock | 9 +++- .../webapps/galaxy/controllers/history.py | 1 - 9 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 client/src/components/Common/Ratings.vue diff --git a/client/package.json b/client/package.json index 1ea15517c35..bd139e04005 100644 --- a/client/package.json +++ b/client/package.json @@ -91,6 +91,7 @@ "vue-prismjs": "^1.2.0", "vue-router": "^3.5.3", "vue-rx": "^6.2.0", + "vue-star-rating": "^1.7.0", "vue-virtual-scroll-list": "^2.3.3", "vuedraggable": "2.24.3", "vuex": "^3.6.2", diff --git a/client/src/components/Common/Published.vue b/client/src/components/Common/Published.vue index 063b53a6f10..cd83592585c 100644 --- a/client/src/components/Common/Published.vue +++ b/client/src/components/Common/Published.vue @@ -11,8 +11,8 @@

About this {{ modelTitle }}

-

{{ details.title || details.name }}

- +

{{ item.title || item.name }}

+

Author

{{ owner }}
@@ -24,8 +24,15 @@
Published {{ plural }} by {{ owner }}.
+
+
- +
@@ -33,28 +40,39 @@ diff --git a/client/src/components/Common/Ratings.vue b/client/src/components/Common/Ratings.vue new file mode 100644 index 00000000000..2cacefb5963 --- /dev/null +++ b/client/src/components/Common/Ratings.vue @@ -0,0 +1,42 @@ + + diff --git a/client/src/components/History/HistoryPublished.vue b/client/src/components/History/HistoryPublished.vue index 3ccbdd55779..c827912aa7c 100644 --- a/client/src/components/History/HistoryPublished.vue +++ b/client/src/components/History/HistoryPublished.vue @@ -1,5 +1,5 @@