From ba905334f7d5771a816555c47908c439b5e544e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sun, 18 Apr 2021 13:14:29 +0200 Subject: Start 0.7.16.0 cycle --- Changelog.md | 8 ++++++++ config/defaults.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index abe0252aa..f2da13773 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,11 @@ +# 0.7.16.0 + +## Refactor + +## Bug fixes + +## Features + # 0.7.15.0 ## Refactor diff --git a/config/defaults.yml b/config/defaults.yml index baf4424be..75548bd69 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -4,7 +4,7 @@ defaults: version: - number: "0.7.15.0" # Do not touch unless doing a release, do not backport the version number that's in master + number: "0.7.15.99" # Do not touch unless doing a release, do not backport the version number that's in master heroku: false environment: url: "http://localhost:3000/" -- cgit v1.2.3 From d4331f4e65781a9813f3cd991885115e4a603eef Mon Sep 17 00:00:00 2001 From: Thorsten Claus Date: Sun, 9 May 2021 10:17:30 +0200 Subject: 7992 wrap local_posts from statistics in a cache --- app/presenters/node_info_presenter.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb index e0c2c579b..045cd8c65 100644 --- a/app/presenters/node_info_presenter.rb +++ b/app/presenters/node_info_presenter.rb @@ -105,10 +105,12 @@ class NodeInfoPresenter end def local_posts - @local_posts ||= Post.where(type: "StatusMessage") - .joins(:author) - .where("owner_id IS NOT null") - .count + Rails.cache.fetch("NodeInfoPresenter/local_posts", expires_in: 1.hours) do + @local_posts ||= Post.where(type: "StatusMessage") + .joins(:author) + .where("owner_id IS NOT null") + .count + end end def local_comments -- cgit v1.2.3 From 704223721870bcb9dece55c6073d637cbb41216c Mon Sep 17 00:00:00 2001 From: Thorsten Claus Date: Sun, 9 May 2021 10:23:07 +0200 Subject: Styles, SQL format --- app/presenters/node_info_presenter.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb index 045cd8c65..343981422 100644 --- a/app/presenters/node_info_presenter.rb +++ b/app/presenters/node_info_presenter.rb @@ -105,17 +105,17 @@ class NodeInfoPresenter end def local_posts - Rails.cache.fetch("NodeInfoPresenter/local_posts", expires_in: 1.hours) do + Rails.cache.fetch("NodeInfoPresenter/local_posts", expires_in: 1.hour) do @local_posts ||= Post.where(type: "StatusMessage") - .joins(:author) - .where("owner_id IS NOT null") - .count + .joins(:author) + .where.not(people: {owner_id: nil}) + .count end end def local_comments @local_comments ||= Comment.joins(:author) - .where("owner_id IS NOT null") + .where.not(people: {owner_id: nil}) .count end end -- cgit v1.2.3 From 1f510d0b40143d0a2a34d1fd4332936e86e1a8aa Mon Sep 17 00:00:00 2001 From: Thorsten Claus Date: Sat, 12 Jun 2021 07:35:02 +0200 Subject: Wrapped local_comments also in a cache closes #8241 closes #7992 --- Changelog.md | 1 + app/presenters/node_info_presenter.rb | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index f2da13773..c69a19341 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,7 @@ # 0.7.16.0 ## Refactor +* Cache local posts/comments count for statistics [#8241](https://github.com/diaspora/diaspora/pull/8241) ## Bug fixes diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb index 343981422..8eeda65d3 100644 --- a/app/presenters/node_info_presenter.rb +++ b/app/presenters/node_info_presenter.rb @@ -114,8 +114,10 @@ class NodeInfoPresenter end def local_comments - @local_comments ||= Comment.joins(:author) - .where.not(people: {owner_id: nil}) - .count + Rails.cache.fetch("NodeInfoPresenter/local_comments", expires_in: 1.hour) do + @local_comments ||= Comment.joins(:author) + .where.not(people: {owner_id: nil}) + .count + end end end -- cgit v1.2.3 From 92a096f03cf0612d05696954ca162da219091950 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Sat, 3 Oct 2020 18:07:25 +0530 Subject: Add closing tags to replace invalid self-closing tags closes #8251 closes #8158 --- Changelog.md | 1 + .../templates/aspect_membership_dropdown_tpl.jst.hbs | 10 +++++----- app/assets/templates/comment-stream_tpl.jst.hbs | 2 +- app/assets/templates/comment_tpl.jst.hbs | 4 ++-- app/assets/templates/photo_tpl.jst.hbs | 4 ++-- app/assets/templates/pod_table_entry_tpl.jst.hbs | 6 +++--- app/assets/templates/reshare_tpl.jst.hbs | 2 +- .../single-post-viewer/single-post-content_tpl.jst.hbs | 14 +++++++------- app/assets/templates/stream-element_tpl.jst.hbs | 2 +- 9 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Changelog.md b/Changelog.md index c69a19341..a20ada372 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ ## Refactor * Cache local posts/comments count for statistics [#8241](https://github.com/diaspora/diaspora/pull/8241) +* Fix html-syntax in some handlebars templates [#8251](https://github.com/diaspora/diaspora/pull/8251) ## Bug fixes diff --git a/app/assets/templates/aspect_membership_dropdown_tpl.jst.hbs b/app/assets/templates/aspect_membership_dropdown_tpl.jst.hbs index 03e24c939..f4a96f1c2 100644 --- a/app/assets/templates/aspect_membership_dropdown_tpl.jst.hbs +++ b/app/assets/templates/aspect_membership_dropdown_tpl.jst.hbs @@ -10,7 +10,7 @@ {{ t "aspect_dropdown.toggle" count=aspectMembershipsLength }} {{/if}} - + {{#if dropdownMayCreateNewAspect}} - diff --git a/app/assets/templates/pod_table_entry_tpl.jst.hbs b/app/assets/templates/pod_table_entry_tpl.jst.hbs index e43ee6c6f..46f0a9909 100644 --- a/app/assets/templates/pod_table_entry_tpl.jst.hbs +++ b/app/assets/templates/pod_table_entry_tpl.jst.hbs @@ -9,7 +9,7 @@ {{host}} - + {{#if has_no_errors}} @@ -18,10 +18,10 @@ {{status_text}} {{/if}} {{#unless is_unchecked}} -
{{t 'admin.pods.last_check'}} +
{{t 'admin.pods.last_check'}} {{/unless}} {{#if offline}} - | {{t 'admin.pods.offline_since'}} + | {{t 'admin.pods.offline_since'}} {{/if}} {{#if is_unchecked}}
{{t 'admin.pods.no_info'}}{{/if}}