Fix broken link in settings#groups

Group ID is always encoded in API response, so to match with our
double encode behavior on router, need to decode before generating
the url.

Bug: Issue 11342
Change-Id: Ib0bcebe1ebc9f46978dbb870a24270f5809d2448
This commit is contained in:
Tao Zhou
2019-08-20 16:32:28 +02:00
parent 3c6f23028c
commit 0f6cb6b82f
2 changed files with 4 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ limitations under the License.
<h3 id="groupUUID">Group UUID</h3>
<fieldset>
<gr-copy-clipboard
text="[[_groupConfig.id]]"></gr-copy-clipboard>
text="[[groupId]]"></gr-copy-clipboard>
</fieldset>
<h3 id="groupName" class$="[[_computeHeaderClass(_rename)]]">
Group Name

View File

@@ -40,7 +40,9 @@
_computeGroupPath(group) {
if (!group || !group.id) { return; }
return Gerrit.Nav.getUrlForGroup(group.id);
// Group ID is already encoded from the API
// Decode it here to match with our router encoding behavior
return Gerrit.Nav.getUrlForGroup(decodeURIComponent(group.id));
},
});
})();