Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
add global tenant for report definition urls (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongnansu committed Feb 16, 2021
1 parent 9a0534d commit 74a4b8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kibana-reports/server/routes/utils/converters/backendToUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,15 @@ const getUiQueryUrl = (
const timeFrom = moment(beginTimeMs).toISOString();
const timeTo = moment(endTimeMs).toISOString();
let queryUrl = `${baseUrl}?_g=(time:(from:'${timeFrom}',to:'${timeTo}'))`;
if (tenant) {
if (tenant === '__user__') {
if (tenant !== undefined) {
if (tenant === '') {
tenant = 'global';
} else if (tenant === '__user__') {
tenant = 'private';
}
queryUrl = addTenantToURL(queryUrl, tenant);
}

return queryUrl;
};

Expand Down

0 comments on commit 74a4b8d

Please sign in to comment.