Step to reproduce:
Go to a portfolio that contains an application. The overview page will display the application with a sub-portfolio icon. Clicking on the link to the application opens it as a portfolio.
/api/measures/component_tree is used to list the child components of a Portfolio. Applications are listed as Sub-Portfolios. Hence, the UI shows an incorrect icon, and generates an incorrect link (to /portfolio instead of /dashboard). The WS should return the correct qualifier for each child.