mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 10:26:09 +00:00
PowerBi urls fixed (#7295)
* PowerBi urls fixed * added constants Co-authored-by: Onkar Ravgan <onkarravgan@Onkars-MacBook-Pro.local>
This commit is contained in:
parent
176874e0d5
commit
5aabf76b49
@ -48,7 +48,7 @@
|
||||
"description": "Dashboard URL for PowerBI service.",
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"default": "https://analysis.windows.net/powerbi"
|
||||
"default": "https://app.powerbi.com"
|
||||
},
|
||||
"scope": {
|
||||
"title": "Scope",
|
||||
|
@ -38,6 +38,8 @@ from metadata.utils.logger import ingestion_logger
|
||||
|
||||
logger = ingestion_logger()
|
||||
|
||||
POWERBI_APP_URL = "https://app.powerbi.com"
|
||||
|
||||
|
||||
class PowerbiSource(DashboardServiceSource):
|
||||
def __init__(
|
||||
@ -85,7 +87,7 @@ class PowerbiSource(DashboardServiceSource):
|
||||
yield CreateDashboardRequest(
|
||||
name=dashboard_details["id"],
|
||||
# PBI has no hostPort property. All URL details are present in the webUrl property.
|
||||
dashboardUrl=dashboard_details["webUrl"],
|
||||
dashboardUrl=dashboard_details["webUrl"].replace(POWERBI_APP_URL, ""),
|
||||
displayName=dashboard_details["displayName"],
|
||||
description="",
|
||||
charts=[
|
||||
@ -180,7 +182,7 @@ class PowerbiSource(DashboardServiceSource):
|
||||
description="",
|
||||
chartType=ChartType.Other.value,
|
||||
# PBI has no hostPort property. All URL details are present in the webUrl property.
|
||||
chartUrl=chart["embedUrl"],
|
||||
chartUrl=chart["embedUrl"].replace(POWERBI_APP_URL, ""),
|
||||
service=EntityReference(
|
||||
id=self.context.dashboard_service.id.__root__,
|
||||
type="dashboardService",
|
||||
|
Loading…
x
Reference in New Issue
Block a user