How to update charts in the developer portal?

Solution Verified - Updated -

Environment

  • Red Hat 3scale API Management SaaS

Issue

  • How can we update the charts in the developer portal to make them look as in the admin portal?

Resolution

Follow the instructions below:

Part I

1. In Admin Portal, locate the partial “stats/chart” for the Developer Portal (navigate to Developer Portal in the top menu and search for “stats/chart” in the Filter field on the left.)
2. Copy paste the content of the attached file chart.liquid.txt, to replace the current content of the “stats/chart” partial and click Save.

Important! You may have customized the “stats/chart” partial in the past. This step will remove all customizations introduced and replace the content with the newest version. Make sure it keeps the desired look and feel of the page by checking and re-adding the past customizations on top of the new version if needed.

Part II

3. In Admin Portal, locate the index of stats page for the Developer Portal (navigate to Developer Portal in the top menu, search for “stats” in the Filter field on the left and then select Root > Stats > Index).
4. Modify the content so it no longer includes the JavaScript file buyer/1/analytics, most likely you will just need remove the first 3 lines of code:

{% content_for javascripts %}
  {{ 'buyer/1/analytics' | javascript_include_tag }}
{% endcontent_for %}

Alternatively, you can replace the whole content with the newest version of the page. To do so, copy and paste the content of the attached file stats_index.liquid.txt to the template.

Important! You may have customized the index of stats page in the past. This step may break or completely remove some of the customizations introduced. Make sure it keeps the desired look and feel of the page by checking and re-adding the past customizations on top of the new version if needed.
5. Click Save

Check and Publish

6. Check if all works and looks as expected in the draft version of your Developer Portal
7. Make further styling/DOM changes if needed. If you cannot get it to work, contact Red Hat support.
8. Publish when everything looks good.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.