Integrate Kibana Dashboard With DSS Module

Overview

A new component called KibanaCard.js has been introduced to render Kibana DSS based on the configuration provided in dashboardConfig. This document outlines the steps to integrate the Kibana Dashboard with the DSS module.

Steps

In the dashboardConfig, a new configuration has been added to render Kibana DSS. The configuration includes details that specify which Kibana dashboards to render.

{
    "row": 1,
    "name": "DSS_KIBANA_MAPS",      // name of the config
    "vizArray": [
        {
            "id": 401,
            "name": "DSS_HEALTH_KIBANA_SCREEN",
            "label": "DSS_HEALTH_KIBANA_SCREEN",
            "vizType": "chart",     // vizType set to chart  
            "noUnit": true,
            "isCollapsible": false,
            "charts": [
                {
                    "id": "checklistCompletionRateOfDistrictSupervisor",
                    "name": "DSS_HEALTH_SUPERVISION_DISTRICT_SUPERVISORS_CHECKLISTS_COMPLETION_RATE",
                    "code": "",
                    "moduleName": "smc",  // moduleName is needed to fetch Kibana url
                    "pageName": "national", // moduleName is needed to fetch Kibana url
                    "chartType": "kibanaComponent",  // chart type set to kibanaComponent to render Kibana DSS
                    "filter": "",
                    "headers": []
                }
            ]
        }
    ]
}

So here moduleName refers to the module name in the uiConstants master, and pageName refers to the iframe routes route information.

Render KibanaCard

Based on the configuration, we render the KibanaCard component, passing moduleName and pageName as props.

Internal Implementation

Within KibanaCard, we utilise the IFrameInterface component. This component receives the following props passed from KibanaCard.

We can define the Kibana dashboard URL in the common-masters in uiCommonConstants.json config. Below are examples of the structure:

This component calls MDMS-V2 common-masters to fetch the URL of the Kibana dashboard and render it using an iframe.

Additionally, if a date range filter is set by the user, we update the Kibana URL to reflect this. The following logic is applied to construct the contextPath:

File Path

KibanaCard

IFrameInterface

MDMS

uiCommonConstant.json

Configuration

MasterDashboardConfig.json

API to fetch common constants

URL: https://health-demo.digit.org/mdms-v2/v1/_search?tenantId=mz

Payload:

Response:

Last updated

Was this helpful?