MarketDashboardManager
Table of Contents
Constants
- MARKET_COLLECTION_ID = 'bi_constructor_dashboards'
Methods
- applyDashboardSettings() : void
- Sets dashboard settings contained in archive. Sets period, scopes, etc.
- getInstance() : self
- getMarketCollectionUrl() : string
- getSystemApps() : array<string|int, mixed>
- getSystemDashboardApps() : array<string|int, mixed>
- handleDeleteApp() : Result
- handleInstallDatasets() : Result
- Sends import query to proxy to import datasets.
- handleInstallMarketDashboard() : Result
- Sends import query to proxy and add/update rows in b_biconnector_dashboard table.
- handleUninstallMarketApp() : Result
- installApplication() : Result
- installInitialDashboards() : Result
- isDatasetAppByAppCode() : bool
- isExportEnabled() : bool
- isSystemAppByAppCode() : bool
- reinstallDashboard() : void
- updateApplications() : mixed
Constants
MARKET_COLLECTION_ID
public
mixed
MARKET_COLLECTION_ID
= 'bi_constructor_dashboards'
Methods
applyDashboardSettings()
Sets dashboard settings contained in archive. Sets period, scopes, etc.
public
applyDashboardSettings(SupersetDashboard $dashboard[, array<string|int, mixed> $dashboardSettings = [] ]) : void
Parameters
- $dashboard : SupersetDashboard
- $dashboardSettings : array<string|int, mixed> = []
getInstance()
public
static getInstance() : self
Return values
selfgetMarketCollectionUrl()
public
static getMarketCollectionUrl() : string
Return values
stringgetSystemApps()
public
getSystemApps() : array<string|int, mixed>
Return values
array<string|int, mixed>getSystemDashboardApps()
public
getSystemDashboardApps() : array<string|int, mixed>
Return values
array<string|int, mixed>handleDeleteApp()
public
handleDeleteApp(int $appId) : Result
Parameters
- $appId : int
Return values
ResulthandleInstallDatasets()
Sends import query to proxy to import datasets.
public
handleInstallDatasets(string $filePath, Event $event) : Result
No manipulations in b_biconnector_superset_dashboard table required.
Parameters
- $filePath : string
-
Path to archive with datasets to send to superset.
- $event : Event
Return values
ResulthandleInstallMarketDashboard()
Sends import query to proxy and add/update rows in b_biconnector_dashboard table.
public
handleInstallMarketDashboard(string $filePath, Event $event) : Result
-
If it is a clean installing of partner's dashboard - there is no row in dashboard table, method adds it. Type is MARKET in this case.
-
If it is an installing of system dashboards - all of them are already preloaded - there are rows in dashboard table. Method updates this row - it fills EXTERNAL_ID field. Type is SYSTEM in this case.
-
If it is an updating dashboard - uuid of dashboard can be changed due to dependency uuid from app id. In this case we need to update EXTERNAL_ID of the row and delete dashboard with old uuid.
Parameters
- $filePath : string
-
Path to archive with dashboard to send to superset.
- $event : Event
-
Event with APP_ID parameter.
Return values
ResulthandleUninstallMarketApp()
public
handleUninstallMarketApp(string $appCode) : Result
Parameters
- $appCode : string
Return values
ResultinstallApplication()
public
installApplication(string $code[, int|null $version = null ]) : Result
Parameters
- $code : string
- $version : int|null = null
Return values
ResultinstallInitialDashboards()
public
installInitialDashboards() : Result
Return values
ResultisDatasetAppByAppCode()
public
static isDatasetAppByAppCode(string $appCode) : bool
Parameters
- $appCode : string
Return values
boolisExportEnabled()
public
isExportEnabled() : bool
Return values
boolisSystemAppByAppCode()
public
static isSystemAppByAppCode(string $appCode) : bool
Parameters
- $appCode : string
Return values
boolreinstallDashboard()
public
reinstallDashboard(int $dashboardId) : void
Parameters
- $dashboardId : int
updateApplications()
public
updateApplications() : mixed