Configuring the Dashboards
The Dashboard of the Moesif Developer Portal is powered by Moesif Embedded Templates. This functionality enables charts and visualizations in Moesif to be seamlessly displayed within the developer portal.
Adding Embedded Templates to the Dashboard
The Dashboard of the Developer Portal includes two key visualizations sourced from Moesif: a Live Event Log and a Time Series Chart. These charts provide insights into user activity trends and detailed call logs. To set up these embedded templates, follow the steps below:
Create the Live Event Log
- In Moesif, click the New button in the top-left menu and select Live Event Log.
- Once the log is displayed, click Embed/API in the top-right corner.
- In the Embed/API Access modal:
- Select Embed Template under Select Integration Type.
- Name the template (e.g., “Live Event Log”).
- Enable Dynamic User ID in the Sandbox Policy section.
- Click Get Embed Code to generate the embed code. Copy the workspace id in the first paragraph for later use.
Create the Time Series Chart
- In Moesif, click the New button and select Time Series.
- Once the chart is displayed, click Embed/API in the top-right corner.
- In the Embed/API Access modal:
- Select Embed Template under Select Integration Type.
- Name the template (e.g., “Time Series”).
- Enable Dynamic User ID in the Sandbox Policy section.
- Click Get Embed Code to generate the embed code. Copy the workspace id in the first paragraph for later use.
Updating Environment Variables
To integrate the management token and templates, update the environment variables for your development setup.
Environment Variables for Node
- Open the
my-dev-portal-api/.env
file. - Replace the following lines with the correct values:
MOESIF_TEMPLATE_WORKSPACE_ID_LIVE_EVENT_LOG="workspace ID"
MOESIF_TEMPLATE_WORKSPACE_ID_TIME_SERIES="workspace ID"
- Save the
.env
file to ensure the updated values are persisted.
Environment Variables for Docker
- Open the
distribution/docker-compose.yml
file. - Add or update the following entries in the relevant service configuration under
environment
:
dev-portal-api:
environment:
- MOESIF_TEMPLATE_WORKSPACE_ID_LIVE_EVENT_LOG="workspace ID"
- MOESIF_TEMPLATE_WORKSPACE_ID_TIME_SERIES="workspace ID"
- Save the
docker-compose.yml
file to ensure the updated values are persisted.
Next Steps
After updating the environment variables, save the changes and proceed to using the Developer Portal.