分析finebi5.x仪表板组件获取数据过程(数据是数据集或者sql的)
首先仪表板的公共连接类似:http://localhost:37799/webroot/decision/link/Bo6B
当我们访问这个连接时,会来到FineLinkAction的getShareReport方法。
public String getShareReport(HttpServletRequest req, HttpServletResponse res, @FinePathVariable("linkId") String linkId) throws Exception {Optional<ReportLink> reportLink = DashboardCellCreator.reportLink().getByLinkId(linkId);return reportLink.isPresent() ? getDashboardOpenService().share(req, res, ((ReportLink)reportLink.get()).getId()) : getDashboardOpenService().share(req, res, linkId);}
该方法返回一个html片段为:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" class