Skip to content

Commit

Permalink
fix links from integrations to reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Dec 16, 2024
1 parent dc7e92f commit 414229c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### FIXED
- import data from file
- fix links from integrations to reports

## 5.2.0 - 2024-12-08
### Added
Expand Down
2 changes: 1 addition & 1 deletion lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
}

public function Url($endpoint) {
return $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . '#/r/' . $endpoint;
return $this->urlGenerator->linkToRouteAbsolute('analytics.page.report') . 'r/' . $endpoint;
}
}
2 changes: 1 addition & 1 deletion lib/ContextChat/ContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getAppId(): string {
* @since 1.1.0
*/
public function getItemUrl(string $id): string {
return $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . '#/r/' . $id;
return $this->urlGenerator->linkToRouteAbsolute('analytics.page.report') . 'r/' . $id;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function indexPublic($token, string $password = '')
if (empty($share)) {
// Dataset not shared or wrong token
return new RedirectResponse($this->urlGenerator->linkToRoute('core.login.showLoginForm', [
'redirect_url' => $this->urlGenerator->linkToRoute($this->appName . '.page.index', ['token' => $token]),
'redirect_url' => $this->urlGenerator->linkToRoute($this->appName . '.page.report', ['token' => $token]),
]));
} else {
if ($share['password'] !== null) {
Expand Down Expand Up @@ -207,7 +207,7 @@ public function indexPublicMin($token, string $password = '')
if (empty($share)) {
// Dataset not shared or wrong token
return new RedirectResponse($this->urlGenerator->linkToRoute('core.login.showLoginForm', [
'redirect_url' => $this->urlGenerator->linkToRoute($this->appName . '.page.index', ['token' => $token]),
'redirect_url' => $this->urlGenerator->linkToRoute($this->appName . '.page.report', ['token' => $token]),
]));
} else {
if ($share['password'] !== null) {
Expand Down
6 changes: 3 additions & 3 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function prepare(INotification $notification, string $languageCode): INot
switch ($notification->getObjectType()) {
case NotificationManager::SUBJECT_THRESHOLD:
$parsedSubject = $l->t("Report '{report}': {subject} reached the threshold of {rule} {value}");
$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . '#/r/' . $notification->getObjectId();
$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.report') . 'r/' . $notification->getObjectId();

$notification->setRichSubject(
$parsedSubject,
Expand Down Expand Up @@ -121,7 +121,7 @@ public function prepare(INotification $notification, string $languageCode): INot
break;
case NotificationManager::DATALOAD_ERROR:
$parsedSubject = $l->t("Error during data load \"{dataloadName}\" for data set \"{datasetName}\"" );
$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . 'a/#/r/' . $notification->getObjectId();
$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.advanced') . 'd/' . $notification->getObjectId();

$notification->setRichSubject(
$parsedSubject,
Expand All @@ -143,7 +143,7 @@ public function prepare(INotification $notification, string $languageCode): INot
break;
default: // legacy due to switch to subject field filled with an id for notification removal
//$parsedSubject = $l->t("Report '{report}': {subject} reached the threshold of {rule} {value}");
//$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . '#/r/' . $notification->getObjectId();
//$link = $this->urlGenerator->linkToRouteAbsolute('analytics.page.report') . 'r/' . $notification->getObjectId();
}


Expand Down
2 changes: 1 addition & 1 deletion lib/Search/SearchProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult
$this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('analytics', 'app-dark.svg')),
$dataset['name'],
'',
$this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('analytics.page.index') . '#/r/' . $dataset['id']),
$this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('analytics.page.report') . 'r/' . $dataset['id']),
''
);
}
Expand Down

0 comments on commit 414229c

Please sign in to comment.