Prechádzať zdrojové kódy

树状报告界面初版

insomniaLee 6 rokov pred
rodič
commit
acd3cf93ca

+ 22 - 0
src/main/java/com/mooctest/controller/GraphController.java

@@ -8,6 +8,8 @@ import com.mooctest.service.BugReportService;
 import com.mooctest.service.GraphService;
 import com.mooctest.service.MasterReportService;
 import com.mooctest.service.SupplementService;
+import com.mooctest.util.ReportUtil;
+import com.sun.org.glassfish.gmbal.ParameterNames;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -50,6 +52,11 @@ public class GraphController {
         return graphService.buildAggReportTree(masterId);
     }
 
+    @GetMapping(value = "/tree_graph")
+    public JSONObject getTreeByTreeReort(@RequestParam("treeId")String treeId){
+        return graphService.buildTreeReportTree(treeId); // 根据treeid得到画图的数据
+    }
+
     @GetMapping(value = "/graphDetail/rawReport")
     public void renderRawReport(@RequestParam("bugId") String bugId,
                                   @RequestParam("masterId") String masterId,
@@ -110,4 +117,19 @@ public class GraphController {
         View rawReportView = viewResolver.resolveViewName("thumbnail/agg_report", Locale.CHINESE);
         rawReportView.render(model.asMap(), req, resp);
     }
+
+    @GetMapping(value = "/graphDetail/treeReport")
+    public void renderTreeReport(@RequestParam("treeId") String treeId,
+                                HttpServletRequest req,
+                                HttpServletResponse resp,
+                                Model model) throws Exception {
+
+        BugDTO bug = bugReportService.getBugById(treeId);
+        model.addAttribute("report",bug);
+//        model.addAttribute("category2String", ReportUtil.category2String);
+//        model.addAttribute("recurrent2String", ReportUtil.recurrent2String);
+//        model.addAttribute("severity2String", ReportUtil.severity2String);
+        View rawReportView = viewResolver.resolveViewName("thumbnail/tree_report", Locale.CHINESE);
+        rawReportView.render(model.asMap(), req, resp);
+    }
 }

+ 44 - 36
src/main/java/com/mooctest/controller/HistoryController.java

@@ -1,8 +1,12 @@
 package com.mooctest.controller;
 
 import com.mooctest.data.BugDTO;
+import com.mooctest.data.FinalReportDTO;
+import com.mooctest.data.SupplementDTO;
 import com.mooctest.data.TaskDTO;
+import com.mooctest.model.FinalReport;
 import com.mooctest.service.*;
+import com.mooctest.util.ReportUtil;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -15,10 +19,8 @@ import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Controller
@@ -117,42 +119,46 @@ public class HistoryController {
                                  @RequestParam(value = "finalReportId", required = false) Long finalReportId,
                                  Model model) {
         Map<String, BugDTO> bugMap = bugReportService.getAllBugsMap(examId, caseId);
-        BugDTO masterReport = bugMap.get(treeId);  // 从bugmap中取得主报告的信息
+        BugDTO treeReport = bugMap.get(treeId);  // 从bugmap中取得主报告的信息
 		List<String> treeRootids = hisservice.getTreeRoots(caseId+"-"+examId); // 获得所有的根结点的id
-//		Map<String,List<String>> root2ReportIds = hisservice.getTree2BugIdsMap()
+		List<String> childReportIds = hisservice.getSingleRootReports(treeId); // 获得所有自报告的信息
+		List<BugDTO> childReports = new ArrayList<>();
+		childReportIds.forEach(s->{
+				childReports.add(bugMap.get(s));
+		});
+		Map<String, Long> categoryCounts = childReports.stream().collect(Collectors.groupingBy(BugDTO::getBugCategory, Collectors.counting()));
+		Map<String, Long> pageCounts =  childReports.stream().collect(Collectors.groupingBy(BugDTO::getBug_page,Collectors.counting()));
+		Map<String, Long> recurrentCounts = childReports.stream()
+				.map(BugDTO::getRecurrent)
+				.map((recurrentNum) -> ReportUtil.recurrent2String.get(recurrentNum))
+				.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
+		Map<String, Long> severityCounts = childReports.stream()
+				.map(BugDTO::getSeverity)
+				.map((severityNum) -> ReportUtil.severity2String.get(severityNum))
+				.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
+		List<FinalReportDTO> finalReports = new ArrayList<>();// 暂时还没有finalreport的数据
 
 
 //        List<BugDTO> bugs = new LinkedList<>();
 //        supplements.forEach(supplementDTO -> bugs.addAll(supplementDTO.getBugs()));
-//        List<BugDTO> sourceReports = bugs.stream().distinct().collect(Collectors.toList());
-//        Map<String, Long> categoryCounts = sourceReports.stream().collect(Collectors.groupingBy(BugDTO::getBugCategory, Collectors.counting()));
-//        Map<String, Long> pageCounts =  sourceReports.stream().collect(Collectors.groupingBy(BugDTO::getBug_page,Collectors.counting()));
-//        Map<String, Long> recurrentCounts = sourceReports.stream()
-//                .map(BugDTO::getRecurrent)
-//                .map((recurrentNum) -> ReportUtil.recurrent2String.get(recurrentNum))
-//                .collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
-//        Map<String, Long> severityCounts = sourceReports.stream()
-//                .map(BugDTO::getSeverity)
-//                .map((severityNum) -> ReportUtil.severity2String.get(severityNum))
-//                .collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
-//
-//        List<FinalReportDTO> finalReports = finalReportService.getBySourceId(masterId);
-//
-//        model.addAttribute("wordList", getWordCloudList(sourceReports));
-//        model.addAttribute("categoryCounts", categoryCounts);
-//        model.addAttribute("severityCounts", severityCounts);
-//        model.addAttribute("pageCounts",pageCounts);
-//        model.addAttribute("recurrentCounts",recurrentCounts);
-//        model.addAttribute("aggReportId", "ML-AG-" + masterId.substring(10));
-//        model.addAttribute("masterReport", masterReport);
-//        model.addAttribute("createTime", new Date(Long.parseLong(masterReport.getCreateTimeMillis())));
-//        model.addAttribute("supplements", supplements);
-//        model.addAttribute("finalReports", finalReports);
-//        model.addAttribute("category2String", ReportUtil.category2String);
-//        model.addAttribute("recurrent2String", ReportUtil.recurrent2String);
-//        model.addAttribute("severity2String", ReportUtil.severity2String);
-//        model.addAttribute("examId", examId);
-//        model.addAttribute("caseId", caseId);
+
+
+
+        model.addAttribute("categoryCounts", categoryCounts);
+        model.addAttribute("severityCounts", severityCounts);
+        model.addAttribute("pageCounts",pageCounts);
+        model.addAttribute("recurrentCounts",recurrentCounts);
+        model.addAttribute("aggReportId", "ML-TR-" + treeId.substring(10)); // 树报告的信息
+        model.addAttribute("masterReport", treeReport);
+        model.addAttribute("createTime", new Date(Long.parseLong(treeReport.getCreateTimeMillis())));
+        model.addAttribute("supplements", childReports);
+        model.addAttribute("finalReports", finalReports);
+        model.addAttribute("category2String", ReportUtil.category2String);
+        model.addAttribute("recurrent2String", ReportUtil.recurrent2String);
+        model.addAttribute("severity2String", ReportUtil.severity2String);
+        model.addAttribute("reviewed",false);
+        model.addAttribute("examId", examId);
+        model.addAttribute("caseId", caseId);
 //
 //        boolean bugReviewed = bugReviewService.isBugReviewed(masterId);
 //        model.addAttribute("reviewed", bugReviewed);
@@ -162,7 +168,7 @@ public class HistoryController {
 //            model.addAttribute("editReport", finalReportDTO.get());
 //
 //        }
-        return "agg_report_new";
+        return "tree_report_new";
     }
 
 
@@ -296,4 +302,6 @@ public class HistoryController {
 		if(session.getAttribute("trees") != null) {session.removeAttribute("trees");}
 		if(session.getAttribute("single") != null) {session.removeAttribute("single");}
 	}
+
+
 }

+ 6 - 2
src/main/java/com/mooctest/dao3/BugHistoryDao.java

@@ -42,8 +42,12 @@ public class BugHistoryDao {
 	}
 
 
-	public List<String> findSingleRootReports(){
-		return null;
+	//根据根节点查找所有属于该根结点的报告id'
+	public List<BugHistory> findSingleRootReports(String root ){
+		Query query = new Query();
+		query.addCriteria(Criteria.where("root").is(root));
+		List<BugHistory> res = mongoOps.find(query,BugHistory.class);
+		return res;
 	}
 	
 	//查找所有指定的根

+ 1 - 1
src/main/java/com/mooctest/service/BugReportService.java

@@ -11,7 +11,7 @@ public interface BugReportService {
     List<BugDTO> mergeAllBugs(List<ReportDTO> reportDTOs);
     List<BugDTO> getAllBugs(long examId, long caseId);
     Map<String, BugDTO> getAllBugsMap(long examId, long caseId);
-//    BugDTO getBugById(String bugId);
+    BugDTO getBugById(String bugId);
     BugDTO getBugById(String bugId, long examId, long caseId);
 //    Map<String, List<BugDTO>> getMasterBugMap(Map<String, List<String>> masterBugIdsMap, Map<String, BugDTO> bugsMap);
 }

+ 125 - 3
src/main/java/com/mooctest/service/GraphService.java

@@ -1,15 +1,20 @@
 package com.mooctest.service;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonAlias;
 import com.mooctest.dao.SupplementDao;
+import com.mooctest.dao3.BugHistoryDao;
+import com.mooctest.model.BugHistory;
 import com.mooctest.model.SupplementItem;
+import lombok.Data;
+import org.apache.commons.collections4.map.HashedMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import static java.util.stream.Collectors.groupingBy;
@@ -20,6 +25,30 @@ public class GraphService {
     @Autowired
     SupplementDao supplementDao;
 
+    @Autowired
+    BugHistoryDao historyDao;
+
+    public JSONObject buildTreeReportTree(String treeId){
+        List<BugHistory> reports = historyDao.findSingleRootReports(treeId);//得到所有的   bug Historu
+        Map<String , BugHistory> bugMap = reports.stream().collect(Collectors.toMap(BugHistory::getId,Function.identity()));
+        JSONObject root = new JSONObject();
+        JSONObject temp = new JSONObject();
+        root.fluentPut("id","tree_"+treeId);
+        Map<String,TreeNode> treeData = new HashedMap<>();
+        reports.forEach(s->{
+            treeData.put(s.getId(),new TreeNode(s));
+        });
+        TreeNode rootNode = treeData.get(treeId);
+        JSONObject res  = rootNode.setChildrenJson(treeData,1);
+        return res;
+    }
+
+
+
+
+
+
+
     public JSONObject buildAggReportTree(String masterId) {
         List<SupplementItem> supplementItems = supplementDao.findByMasterId(masterId);
         Map<String, List<SupplementItem>> supplementMap = supplementItems.stream()
@@ -164,4 +193,97 @@ public class GraphService {
         return nodes;
     }
 
+
+    class TreeNode {
+        private String id;
+        private int group;
+        private String name ;
+        private String href;
+        private BugHistory self;
+        private List<TreeNode>  children;
+
+        public TreeNode(BugHistory his ) {
+            this.id = "tree_"+his.getId();
+            this.group = 1;
+            this.name = "树状报告";
+            this.self= his;
+            this.href = "/graphDetail/treeReport?treeId=" + his.getId();
+            this.children = new ArrayList<>();
+        }
+
+
+        public JSONObject  setChildrenJson (Map<String , TreeNode> treeData,int group){
+            if(self.getChildren()==null||self.getChildren().size()==0){
+                //leafnode
+                return this2JSONObject(group);
+            }else{
+                JSONArray temp = new JSONArray();
+                self.getChildren().forEach(s->{
+                    temp.add(treeData.get(s).setChildrenJson(treeData,group+1));
+                });
+                JSONObject eee= this2JSONObject(group);
+                eee.put("children",temp);
+                return eee;
+            }
+        }
+
+        private JSONObject this2JSONObject(int group){
+            JSONObject res = new JSONObject();
+            res.fluentPut("id","tree_"+self.getId())
+                    .fluentPut("group",group)
+                    .fluentPut("name",group!=1?(group-1)+"级子报告":"父报告")
+                    .fluentPut("href", "/graphDetail/treeReport?treeId=" + self.getId());
+            return res;
+        }
+
+        public BugHistory getSelf() {
+            return self;
+        }
+
+        public void setSelf(BugHistory self) {
+            this.self = self;
+        }
+
+        public void addChildren (TreeNode node){
+            this.children.add(node);
+        }
+
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        public int getGroup() {
+            return group;
+        }
+
+        public void setGroup(int group) {
+            this.group = group;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getHref() {
+            return href;
+        }
+
+        public void setHref(String href) {
+            this.href = href;
+        }
+
+        public List<TreeNode> getChildren() {
+            return children;
+        }
+
+    }
+
 }

+ 6 - 0
src/main/java/com/mooctest/service/HistoryService.java

@@ -44,6 +44,12 @@ public class HistoryService {
 				)
 		);
 	}
+
+	//根据根节点的信息,获得属于该根结点的全部报告id
+	public List<String> getSingleRootReports(String root ){
+		List<BugHistory> histories = historydao.findSingleRootReports(root);
+		return histories.stream().map(BugHistory::getId).collect(Collectors.toList());
+	}
 	
 	public List<String> parents(String id) {
 		Stack<String> stack = new Stack<String>();

+ 5 - 0
src/main/java/com/mooctest/service/impl/BugReportServiceImpl.java

@@ -108,6 +108,11 @@ public class BugReportServiceImpl implements BugReportService {
         return bugs.stream().collect(toMap(BugDTO::getId, Function.identity()));
     }
 
+    @Override
+    public BugDTO getBugById(String bugId) {
+        return wrap(bugDao.findOne(bugId));
+    }
+
 
     public BugDTO getBugById(String bugId, long examId, long caseId) {
         Bug bug = bugDao.findOne(bugId);

+ 144 - 0
src/main/resources/static/js/tree_report_new.js

@@ -0,0 +1,144 @@
+$(function () {
+
+    function createImg(src) {
+        var $img = $('<img />')
+        $img.attr("src", src);
+        $img.attr("class", "my-img-thumbnail pointer to-delete");
+        $img.on("click", function (){
+            showimage(src);
+        });
+        return $img;
+    }
+    $(".to-add").on("dragend", function (e) {
+
+        var src = $(e.target).attr("src");
+        if (images.indexOf(src) < 0) {
+
+            images.push(src);
+
+            var $img = createImg(src);
+            $img.on("dragend", function (e) {
+                var src = $(e.target).attr("src");
+                var idx = images.indexOf(src);
+                if (idx >= 0) {
+                    images.splice(idx, 1);
+                }
+
+                $(e.target).remove();
+            });
+
+
+            $("#new-report-img").append($img)
+        }
+    });
+
+
+
+    $('.sup-collapse').click(function () {
+        var dupTitle = $(this).parents('li').find('.sup-title');
+        dupTitle.toggle();
+    });
+
+    var color = {
+        1: '#E36402',
+        2: '#1995CF',
+        3 : '#FFC000',
+        2.1: '#FFC000'
+    };
+
+    var urlParams = new URLSearchParams(window.location.search);
+    d3.json("/tree_graph?treeId=" + urlParams.get("treeId"), function(error, data) {
+        var root = d3.hierarchy(data);
+
+        var normal_r = 14;
+        var mouseon_r = 18;
+
+        var handleEvents = function (selection) {
+            selection.on('click', function (d) {
+                $.get(
+                    d.data.href,
+                    function (data) {
+                        $('.detail-div').css('background-color', 'white');
+                        $('.detail-div').html(data);
+                    });
+            })
+                .on('mouseover', function (d) {
+
+                    var g = d3.select(this); // The node
+                    var n = g.select('.the-node');
+                    var info = n.transition().duration(400).attr('r', 47 / d.data.group)
+                })
+                .on('mouseout', function (d) {
+                    var g = d3.select(this); // The node
+                    var n = g.select('.the-node');
+                    var info = n.transition().duration(400).attr('r', 40 / d.data.group)
+                });
+        }
+
+        /* TREE LAYOUT */
+
+
+        var treeLayout = d3.tree()
+        treeLayout.size([660, 250]);
+        treeLayout(root);
+
+
+        var tree = d3.select('#tree g.nodes')
+
+        var treeNodes = tree.selectAll('g.node')
+            .data(root.descendants())
+            .enter()
+            .append('g')
+            .classed('node', true)
+            .call(handleEvents)
+
+
+        treeNodes.append('circle')
+            .classed('the-node solid', true)
+            .attr('cx', d => d.x)
+    .attr('cy', d => d.y + 20)
+    .attr('r', d => 40 / d.data.group)
+    .style("fill", function (d) {
+            return color[d.data.group]
+        });
+
+        treeNodes.append('text')
+            .attr('class', 'label')
+            .attr('dx', function (d) {
+                return (d.data.group == 3) ? d.x - 40 / d.data.group : d.x + 40 / d.data.group + 5
+            })
+            .attr('dy', function (d) {
+                return (d.data.group == 3) ? d.y + 54 : d.y + 24
+            })
+            .text(d => d.data.name)
+
+        // var treeLinks = d3.select('#tree g.links')
+        //     .selectAll('line.link')
+        //     .data(root.links())
+        //     .enter()
+        //     .append('line')
+        //     .classed('link', true)
+        //     .attr("x1", d => d.source.x)
+        //     .attr("y1", d => d.source.y)
+        //     .attr("x2", d => d.target.x)
+        //     .attr("y2", d => d.target.y)
+        //     .style("stroke", "#5f5f5f");
+
+        var treeLinks = d3.select('#tree g.links')
+            .selectAll('path.link')
+            .data(root.descendants().slice(1))
+            .enter()
+            .append('path')
+            .classed('link', true)
+            .attr("d", (d) => {
+            return `
+      M ${d.x} ${d.y}
+      C 
+      ${d.x} ${(d.y + d.parent.y) / 2}
+      ${d.parent.x} ${(d.y + d.parent.y) / 2}
+      ${d.parent.x} ${d.parent.y}
+      `;
+    })
+    .style("stroke", "#5f5f5f");
+    });
+});

+ 43 - 0
src/main/resources/templates/thumbnail/tree_report.html

@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
+<ul class="list-group" style="max-width: 300px;">
+    <li class="list-group-item" style="background-color: rgb(227, 100, 2); color: white;">
+        <b>
+            <i class="fa fa-object-group" style="margin-right: 5px;"></i>
+            <span th:text="${report.id}"></span>
+        </b>
+    </li>
+    <!-- 	<li class="list-group-item">
+            <b>Type:    </b>
+            <label class="label" style="background-color: rgb(227, 100, 2);">
+                <span class="glyphicon glyphicon-duplicate" style="margin-right: 5px;"></span>
+                Aggregated Report
+            </label>
+        </li> -->
+<!--    <li class="list-group-item">-->
+<!--        <b>三级页面 </b>-->
+<!--        <span th:text="${report.bug_page}"></span><br />-->
+<!--    </li>-->
+<!--    <li class="list-group-item">-->
+<!--        <b>复现程度 </b>-->
+<!--        <span th:text="${recurrent2String.get(report.getRecurrent())}"></span><br />-->
+<!--    </li>-->
+<!--    <li class="list-group-item">-->
+<!--        <b>Bug分类 </b>-->
+<!--        <span th:text="${report.getBugCategory()}"></span><br />-->
+<!--    </li>-->
+<!--    <li class="list-group-item">-->
+<!--        <b>Bug严重性 </b>-->
+<!--        <span th:text="${severity2String.get(report.getSeverity())}"></span><br />-->
+<!--    </li>-->
+    <li class="list-group-item">
+        <b>主要内容 <span class="glyphicon glyphicon-star" style="color: rgb(244, 172, 7); margin-right: 5px;"></span></b>
+        <span th:text="${report.description}"></span><br />
+    </li>
+    <li class="list-group-item">
+        <img class="my-img-thumbnail pointer to-add" th:src="${imgUrl}"
+             th:each="imgUrl,iterStat : ${report.getImgUrls()}"
+             th:onclick="'javascript:showimage(\''+${imgUrl}+'\');'"/>
+    </li>
+</ul>
+</html>

+ 14 - 22
src/main/resources/templates/tree_report_new.html

@@ -45,7 +45,7 @@
 <th:block layout:fragment="maincontent">
 
     <section class="content-header">
-        <h1>融合报告详情
+        <h1>树状报告详情
             <small th:text="${aggReportId}"></small>
         </h1>
         <!-- <h1>Summary for report 0-5</h1> -->
@@ -189,11 +189,11 @@
                                         <div class="sup-title">
                                             <!-- 如果有文字,则仅显示top 1的diff_sentence,并且不展示图片 -->
 
-                                            <span th:if="${supplement.hasTxt}"
-                                                  th:text="'...' + ${supplement.topTxt} + '...'"></span>
+                                            <span
+                                                  th:text="'...' + ${supplement.description} + '...'"></span>
 
-                                            <img th:if="${!supplement.hasTxt}" class="my-img-thumbnail pointer to-add"
-                                                 th:src="${imgUrl}" th:each="imgUrl,iterStat : ${supplement.top3Img}"
+                                            <img  class="my-img-thumbnail pointer to-add"
+                                                 th:src="${imgUrl}" th:each="imgUrl,iterStat : ${supplement.taggedImgs}"
                                                  th:onclick="'javascript:showimage(\''+${imgUrl}+'\');'"/>
 
 
@@ -201,10 +201,10 @@
                                         <div th:id="'sup-' + ${iterStat.count}" class="collapse">
                                             <ul class="list-group" style="margin-bottom: 0px;">
                                                 <li class="list-group-item" style="padding: 3px 3px;"
-                                                    th:each="report : ${supplement.bugs}">
+                                                    >
                                                 <span class="glyphicon glyphicon-file"
                                                       style="color: #3c8dbc; margin-right: 5px;"></span>
-                                                    <a href="#" style="margin-right: 5px;" th:text="${report.id}"></a>
+                                                    <a href="#" style="margin-right: 5px;" th:text="${supplement.getId()}"></a>
                                                     <!--查看树状报告-->
                                                     <span class="glyphicon glyphicon-tree-conifer"
                                                           style="color: #07b309; margin-right: 5px;" >
@@ -212,22 +212,19 @@
 
                                                     <!-- de scription -->
 
-                                                    <th:block th:each="sent, iterStat : ${report.taggedSentences}">
-                                                        <span th:if="${sent.isDiff()}" th:text="${sent.sentence}"
-                                                              style="color: red; font-weight: bold;"></span>
-                                                        <span th:unless="${sent.isDiff()}"
-                                                              th:text="${sent.sentence}"></span>
+                                                    <th:block >
+                                                        <span
+                                                              th:text="${supplement.description}"></span>
                                                     </th:block>
 
                                                     <br/>
 
                                                     <!-- imgs -->
-                                                    <th:block th:each="img, iterStat : ${report.taggedImgs}">
+                                                    <th:block th:each="img, iterStat : ${supplement.getImgUrls()}">
 
                                                         <img class="my-img-thumbnail pointer to-add"
-                                                             th:style="${img.isDiff()? 'border: 2px solid red;' : ''}"
-                                                             th:src="${img.imgUrl}"
-                                                             th:onclick="'javascript:showimage(\''+${img.imgUrl}+'\');'"/>
+                                                             th:src="${img}"
+                                                             th:onclick="'javascript:showimage(\''+${img}+'\');'"/>
 
                                                     </th:block>
                                                 </li>
@@ -364,7 +361,6 @@
 
         <div style="overflow: auto;" class="row tree-container">
             <div class="col-md-8 tree-wrapper">
-
                 <div class="box box-info pull-left svg-div" style="background-color: rgb(247, 247, 247); ">
                     <h4 style="padding-left: 10px;" class="pull-left">聚合图</h4>
                     <svg class="graph" id="tree" width="100%" height="420" viewBox="0 0 700 350">
@@ -373,19 +369,15 @@
                             <g class="nodes"></g>
                         </g>
                     </svg>
-
                 </div>
             </div>
             <div class="col-md-4">
 
                 <div class="detail-div"
                      style="height: 459px; max-height: 459px; font-size: 10px; overflow: scroll;">
-
                 </div>
             </div>
         </div>
-
-
     </section>
 </th:block>
 
@@ -426,7 +418,7 @@
     }
 </script>
 <script src="https://d3js.org/d3.v4.min.js"></script>
-<script type="text/javascript" src="/static/js/agg_report_new.js"></script>
+<script type="text/javascript" src="/static/js/tree_report_new.js"></script>
 <script type="text/javascript" src="/static/js/jqcloud-1.0.4.min.js"></script>
 <!--<script type="text/javascript" src="/static/js/partload.js"></script>-->
 <script type="text/javascript" xmlns:th="http://www.thymeleaf.org" th:inline="javascript">