Previous code uses global variable to store configurations for Grafana component.
This PR moved them into a type Config, and passes Config object to Grafana component code.
Most of the changes are updating caller code, and fixing tests.
Issue
[ ] Check this box if this PR fixes an issue, and then paste the link below
Describe your changes
Previous code uses global variable to store configurations for Grafana component. This PR moved them into a type Config, and passes Config object to Grafana component code. Most of the changes are updating caller code, and fixing tests.
Issue
Test: