Fix other users dashboards

When an user visit other user dashboard with cold page load, dashboard
doesn't load because preloading will preload queries for user dashboard
(self) that will not work for other user dashboard.

This is fixed by restricting regexp for identifying which dashboard url
should get preloading.

Change-Id: Ie2c51fa4a403e0af53c948e55b0d0ecd358a9014
This commit is contained in:
Milutin Kristofic
2020-08-20 12:27:38 +02:00
parent 85e160f509
commit 74d7cd99a5
2 changed files with 12 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ public class IndexPreloadingUtil {
Pattern.compile(CHANGE_CANONICAL_URL + BASE_PATCH_NUM_URL_PART + "?" + "/?$");
public static final Pattern DIFF_URL_PATTERN =
Pattern.compile(CHANGE_CANONICAL_URL + BASE_PATCH_NUM_URL_PART + "(/(.+))" + "/?$");
public static final Pattern DASHBOARD_PATTERN = Pattern.compile(".*/dashboard/.+$");
public static final Pattern DASHBOARD_PATTERN = Pattern.compile(".*/dashboard/self$");
// These queries should be kept in sync with PolyGerrit:
// polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.ts