mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 18:36:08 +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.",
|
"description": "Dashboard URL for PowerBI service.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "uri",
|
"format": "uri",
|
||||||
"default": "https://analysis.windows.net/powerbi"
|
"default": "https://app.powerbi.com"
|
||||||
},
|
},
|
||||||
"scope": {
|
"scope": {
|
||||||
"title": "Scope",
|
"title": "Scope",
|
||||||
|
@ -38,6 +38,8 @@ from metadata.utils.logger import ingestion_logger
|
|||||||
|
|
||||||
logger = ingestion_logger()
|
logger = ingestion_logger()
|
||||||
|
|
||||||
|
POWERBI_APP_URL = "https://app.powerbi.com"
|
||||||
|
|
||||||
|
|
||||||
class PowerbiSource(DashboardServiceSource):
|
class PowerbiSource(DashboardServiceSource):
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -85,7 +87,7 @@ class PowerbiSource(DashboardServiceSource):
|
|||||||
yield CreateDashboardRequest(
|
yield CreateDashboardRequest(
|
||||||
name=dashboard_details["id"],
|
name=dashboard_details["id"],
|
||||||
# PBI has no hostPort property. All URL details are present in the webUrl property.
|
# 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"],
|
displayName=dashboard_details["displayName"],
|
||||||
description="",
|
description="",
|
||||||
charts=[
|
charts=[
|
||||||
@ -180,7 +182,7 @@ class PowerbiSource(DashboardServiceSource):
|
|||||||
description="",
|
description="",
|
||||||
chartType=ChartType.Other.value,
|
chartType=ChartType.Other.value,
|
||||||
# PBI has no hostPort property. All URL details are present in the webUrl property.
|
# 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(
|
service=EntityReference(
|
||||||
id=self.context.dashboard_service.id.__root__,
|
id=self.context.dashboard_service.id.__root__,
|
||||||
type="dashboardService",
|
type="dashboardService",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user