override parseTips()

in frontend/app/components/overview/recommendation_result_view/recommendation_result_view.ts [70:125]


  override parseTips() {
    const data = this.recommendationResult || {};
    const hostTips: string[] = [];
    const deviceTips: string[] = [];
    const documentationTips: string[] = [];
    const faqTips: string[] = [];
    data.rows = data.rows || [];
    data.rows.forEach(row => {
      if (row.c && row.c[0] && row.c[0].v && row.c[1] && row.c[1].v) {
        switch (row.c[0].v) {
          case 'host':
            hostTips.push(convertKnownToolToAnchorTag(String(row.c[1].v)));
            break;
          case 'device':
            deviceTips.push(convertKnownToolToAnchorTag(String(row.c[1].v)));
            break;
          case 'doc':
            documentationTips.push(String(row.c[1].v));
            break;
          case 'faq':
            faqTips.push(String(row.c[1].v));
            break;
          default:
            break;
        }
      }
    });
    const bottleneck = this.getRecommendationResultProp('bottleneck');
    if (bottleneck === 'device') {
      hostTips.length = 0;
    } else if (bottleneck === 'host') {
      deviceTips.length = 0;
    }

    const tipInfoArray = [
      {
        title: 'Tool troubleshooting / FAQ',
        tips: faqTips,
      },
      {
        title: 'Next tools to use for reducing the input time',
        tips: hostTips,
        useClickCallback: true,
      },
      {
        title: 'Next tools to use for reducing the Device time',
        tips: deviceTips,
        useClickCallback: true,
      },
      {
        title: 'Other useful resources',
        tips: documentationTips,
      },
    ];
    this.tipInfoArray = tipInfoArray.filter(tipInfo => tipInfo.tips.length > 0);
  }