traceInfo.ftl 11.0 KB
Newer Older
A
ascrutae 已提交
1 2 3 4 5
<#macro traceTableTmpl>
<script type="text/x-jsrender" id="traceTreeTableTmpl">
        <table id="traceTreeTable">
            <thead>
            <tr>
A
fix #82  
ascrutae 已提交
6 7 8 9 10 11
                <th style="width: 25%" >Application Code</th>
                <th style="width: 5%">Type</th>
                <th style="width: 5%">Status</th>
                <th style="width: 20%">Operation Name</th>
                <th style="width: 15%">Host</th>
                <th style="width: 30%">Time</th>
A
ascrutae 已提交
12 13 14 15 16 17 18 19 20 21
            </tr>
            </thead>
            <tbody>
                {{for treeNodes}}
                    <tr name='log' statusCodeStr="{{>statusCodeStr}}" data-tt-id='{{>colId}}'
                    {{if !isEntryNode }}data-tt-parent-id='{{>parentLevel}}'{{/if}}
                     >
                        <td><b>{{>applicationIdStr}}</b></td>
                        <td>{{>spanTypeName}}</td>
                        <td>{{>statusCodeName}}</td>
A
ascrutae 已提交
22 23 24 25 26 27 28
                        <td><a href="javascript:void(0);" data-toggle="modal" data-target="#modal{{>modalId}}">{{>viewPointIdSub}}</a> </td>
                        <!-- Modal -->
                        <div class="modal fade" id="modal{{>modalId}}" tabindex="-1" role="dialog" aria-labelledby="modal{{>modalId}}Label">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-body">
                                       <ul class="list-group">
A
fix #82  
ascrutae 已提交
29 30 31 32 33 34 35 36
                                            <li class="list-group-item" style="word-wrap:break-word"><strong>Operation Name:</strong>{{>viewPointId}}</li>
                                            <li class="list-group-item"><strong>Span Type:</strong>{{>spanTypeName}}</li>
                                            <li class="list-group-item"><strong>Cost:</strong>{{>cost}}<strong>ms</strong></li>
                                            <li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>Business Key:</strong>{{>businessKey}}</li>
                                            <li class="list-group-item"><strong>Application Code:</strong>{{>applicationCode}}</li>
                                            <li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>Host:</strong>{{>address}}</li>
                                            <li class="list-group-item"><strong>Process No.:</strong>{{>processNo}}</li>
                                            <li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>Exception Stack:</strong>
A
ascrutae 已提交
37 38 39 40
                                                {{if exceptionStack}}
                                                    {{>exceptionStack}}
                                                {{/if}}
                                                {{if serverExceptionStr}}
A
fix #82  
ascrutae 已提交
41
                                                    <br/>Server:{{>serverExceptionStr}}
A
ascrutae 已提交
42 43 44 45 46 47 48
                                                {{/if}}
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
A
ascrutae 已提交
49 50 51 52 53
                        <td>{{>address}}</td>
                        <td>
                         <div class="progress">
                            <div class="progress-bar" style="width: {{>totalLengthPercent}}%"></div>
                        {{if case == 1}}
A
ascrutae 已提交
54
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>spiltLengthPercent}}%;">{{>cost}}ms </div>
A
ascrutae 已提交
55 56
                        {{/if}}
                        {{if case == 2}}
A
ascrutae 已提交
57
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>spiltLengthPercent}}%;">{{>cost}}ms</div>
A
ascrutae 已提交
58 59 60
                        {{/if}}
                        {{if case == 3}}
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>clientCostPercent}}%;"></div>
A
ascrutae 已提交
61
                            <div class="progress-bar progress-bar-a progress-bar-striped" style="color:black;min-width: {{>networkCostPercent}}%;">{{>clientCost}}/{{>networkCost}}/{{>serverCost}}ms</div>
A
ascrutae 已提交
62 63 64
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>serverCostPercent}}%;"></div>
                        {{/if}}
                        {{if case == 4}}
A
ascrutae 已提交
65 66
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>clientCostPercent}}%;">{{>totalLength}}ms</div>
                            <div class="progress-bar progress-bar-a progress-bar-striped" style="color:black;min-width: {{>serverCostPercent}}%;">->{{>clientCost}}->{{>serverCost}}ms</div>
A
ascrutae 已提交
67 68
                        {{/if}}
                        {{if case == 5}}
A
ascrutae 已提交
69 70
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>clientCostPercent}}%;">{{>clientCost}}</div>
                            <div class="progress-bar progress-bar-striped" style="color:black;min-width: {{>networkCostPercent}}%;">/{{>serverCost}}ms</div>
A
ascrutae 已提交
71
                            <div class="progress-bar progress-bar-b progress-bar-striped" style="color:black;min-width: {{>serverCostPercent}}%;"></div>
A
ascrutae 已提交
72
                            <div class="progress-bar progress-split progress-bar-striped" style="color:black;">&nbsp; </div>
A
ascrutae 已提交
73 74 75 76 77
                        {{/if}}
                        </div>
                      </td>
                    </tr>
                {{/for}}
78 79 80 81 82
                {{if totalSize > maxQueryNodeSize}}
                    <tr data-tt-parent-id='0' data-tt-id="greatThanMaxQueryNodeSize">
                        <td>....</td>
                        <td>....</td>
                        <td>....</td>
A
fix #82  
ascrutae 已提交
83
                        <td style="text-align:center;color:green;">The number of call chain node is great than the max query node size({{>maxQueryNodeSize}}), only call entry node is displayed.</td>
84 85 86 87 88 89 90 91 92
                        <td>....</td>
                        <td>....</td>
                    </tr>
                {{/if}}
                {{if totalSize > maxShowNodeSize && totalSize <= maxQueryNodeSize}}
                    <tr data-tt-parent-id='0' data-tt-id="greatThanMaxShowNodeSize">
                        <td>....</td>
                        <td>....</td>
                        <td>....</td>
A
fix #82  
ascrutae 已提交
93 94
                        <td style="text-align:center;color:green;">The total  of  call chain node is {{>totalSize}},but the number is great than then max number of showing node({{>maxShowNodeSize}})
                        , Only the first {{>showSize}} chain node are displayed.</td>
95 96 97 98
                        <td>....</td>
                        <td>....</td>
                    </tr>
                {{/if}}
A
ascrutae 已提交
99 100 101
            </tbody>
        </table>
</script>
A
ascrutae 已提交
102

A
ascrutae 已提交
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
</#macro>

<#macro traceLogTmpl>
<script type="text/x-jsrender" id="traceLogTmpl">
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
        {{for treeNodes}}
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingOne">
                <h4 class="panel-title">
                    <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{: #index}}" aria-expanded="true" aria-controls="collapse{{: #index}}">
                            {{if parentLevel }}{{>parentLevel}}.{{/if}}{{>levelId}}---{{>viewPointIdSub}}
                    </a>
                </h4>
            </div>
            <div id="collapse{{: #index}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
                <div class="panel-body">
                    <ul class="list-group">
A
fix #82  
ascrutae 已提交
120 121 122 123 124 125 126 127 128
                        <li class="list-group-item" style="word-wrap:break-word"><strong>Operation Name:</strong>{{>viewPointId}}</li>
                        <li class="list-group-item"><strong>Span Type :</strong>{{>spanTypeName}}</li>
                        <li class="list-group-item"><strong>Start Time :</strong>{{>startDate}}</li>
                        <li class="list-group-item"><strong>Cost :</strong>{{>cost}}<strong>ms</strong></li>
                        <li class="list-group-item"><strong>Business Key:</strong>{{>businessKey}}</li>
                        <li class="list-group-item"><strong>Application Name:</strong>{{>applicationCode}}</li>
                        <li class="list-group-item"><strong>Host :</strong>{{>address}}</li>
                        <li class="list-group-item"><strong>Process No. :</strong>{{>processNo}}</li>
                        <li class="list-group-item"><strong>Exception stack:</strong>
A
ascrutae 已提交
129 130
                            {{if exceptionStack}}
                                {{>exceptionStack}}
A
ascrutae 已提交
131 132
                            {{/if}}
                            {{if serverExceptionStr}}
A
fix #82  
ascrutae 已提交
133
                                <br/>Server:{{>serverExceptionStr}}
A
ascrutae 已提交
134 135 136 137 138 139 140 141 142 143 144 145
                            {{/if}}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        {{/for}}
    </div>
</script>
</#macro>
<#macro traceTreeAllTmpl>
<script type="text/x-jsrender" id="traceTreeAllTmpl">
A
ascrutae 已提交
146 147
        <div class="row">
            <h5>
A
fix #82  
ascrutae 已提交
148 149
                Transaction <strong>{{>traceId}}</strong> starts in <strong>{{>callIP}}</strong> at <strong>{{>startTimeStr}}</strong> and it cost <strong>{{>totalTime}}</strong> ms.
                <br/>
150
                {{if totalSize > maxQueryNodeSize}}
A
fix #82  
ascrutae 已提交
151
                  This chain node number of transaction great than the max query node size(<strong>{{>maxQueryNodeSize}}</strong>),Only the entry node is displayed.
152
                {{else totalSize > maxShowNodeSize}}
A
fix #82  
ascrutae 已提交
153 154 155
                  This transaction has <strong>{{>totalSize}}</strong> call chain node(s), but the number is great than then max number of showing node,Only the first <strong>{{>showSize}}</strong>
                   are
                  displayed.
156
                {{else}}
A
fix #82  
ascrutae 已提交
157 158 159
                   This transaction has <strong>{{>totalSize}}</strong> call chain node(s).
                {{/if}}
                </h5>
A
ascrutae 已提交
160
        </div>
A
ascrutae 已提交
161 162 163
        <ul id="myTab" class="nav nav-tabs">
            <li class="active">
                <a href="#traceTree" data-toggle="tab">
A
ascrutae 已提交
164
                   trace tree
A
ascrutae 已提交
165 166
                </a>
            </li>
A
ascrutae 已提交
167
            <li><a href="#traceLog" data-toggle="tab">trace log</a></li>
A
ascrutae 已提交
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
        </ul>

        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="traceTree">
                <div class="row" id="traceTreeData">
                    {{include tmpl="#traceTreeTableTmpl"/}}
                </div>
            </div>
            <div class="tab-pane fade" id="traceLog">
                <div class="row" id="traceLogData">
                    {{include tmpl="#traceLogTmpl"/}}
                </div>
            </div>
        </div>
</script>
wu-sheng's avatar
wu-sheng 已提交
183
</#macro>