-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashboard-renderer): stub out support for EntityLink [MA-2716]
- Loading branch information
1 parent
e51f145
commit 13a1ff3
Showing
8 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/analytics/dashboard-renderer/src/composables/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import useExternalLinkCreator from './useExternalLinkCreator' | ||
import useI18n from './useI18n' | ||
|
||
// All composables must be exported as part of the default object for Cypress test stubs | ||
export default { | ||
useExternalLinkCreator, | ||
useI18n, | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/analytics/dashboard-renderer/src/composables/useExternalLinkCreator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { useExternalLinkCreator } from '@kong-ui-public/entities-shared' | ||
|
||
export default (routeParams: string[]): string => { | ||
// TODO: may have to pass in geo from consuming app | ||
const activeGeoCode = 'us' | ||
|
||
const parsedRouteParams = routeParams.map(rp => rp.replace('{geo}', activeGeoCode)) | ||
|
||
// TODO: replace `{idTuple0}` and `{idTuple1}` with actual record ID vales | ||
|
||
return useExternalLinkCreator(parsedRouteParams) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.