| 
21 | 21 |                 <table class="table table-striped table-bordered table-hover" id="tableDataList">  | 
22 | 22 |                     <thead>  | 
23 | 23 |                     <tr>  | 
24 |  | -                        <td>应用id</td>  | 
 | 24 | +                        <td>id</td>  | 
25 | 25 |                         <td>slot迁移进度</td>  | 
 | 26 | +                        <td>目标源实例</td>  | 
 | 27 | +                        <td>开始结束slot</td>  | 
 | 28 | +                        <td>正在迁移的slot</td>  | 
26 | 29 |                         <td>状态</td>  | 
27 | 30 |                         <td>开始时间</td>  | 
28 | 31 |                         <td>结束时间 </td>  | 
29 | 32 |                     </tr>  | 
30 | 33 |                     </thead>  | 
31 | 34 |                     <tbody>  | 
32 |  | -                    <c:forEach var="instanceReshardProcess" items="${instanceReshardProcessList}">  | 
33 |  | -                        <tr>  | 
34 |  | -                            <td>${instanceReshardProcess.appId}</td>  | 
35 |  | -                            <td>  | 
36 |  | -	                          <div class="progress margin-custom-bottom0">  | 
37 |  | -						      	  <div id="reshardSlotProgress${instanceReshardProcess.id}" class="progress-bar progress-bar-success"  | 
38 |  | -						           role="progressbar" aria-valuenow="${instanceReshardProcess.finishSlotNum}" aria-valuemax="${instanceReshardProcess.totalSlot}"  | 
39 |  | -						           aria-valuemin="0" style="width: ${instanceReshardProcess.finishSlotNum / instanceReshardProcess.totalSlot}">  | 
40 |  | -						             <label style="color: #000000">  | 
41 |  | -						                 <span id="finishSlotNum${instanceReshardProcess.id}">${instanceReshardProcess.finishSlotNum}</span>  Finish/<span id="totalSlot${instanceReshardProcess.id}">${instanceReshardProcess.totalSlot}</span>  Total  | 
42 |  | -						             </label>  | 
43 |  | -						           </div>  | 
44 |  | -						       </div>  | 
45 |  | -                            </td>  | 
46 |  | -                            <td id="statusDesc${instanceReshardProcess.id}">  | 
47 |  | -                            	<c:choose>  | 
48 |  | -                            		<c:when test="${instanceReshardProcess.status == 0}">运行中</c:when>  | 
49 |  | -                            		<c:when test="${instanceReshardProcess.status == 1}">完成</c:when>  | 
50 |  | -                            		<c:when test="${instanceReshardProcess.status == 2}">出错</c:when>  | 
51 |  | -                            	</c:choose>  | 
52 |  | -                            </td>  | 
53 |  | -                            <td>  | 
54 |  | -                            	<fmt:formatDate value="${instanceReshardProcess.startTime}" type="time" timeStyle="full" pattern="yyyy-MM-dd HH:mm:ss"/>  | 
55 |  | -                            </td>  | 
56 |  | -                            <td>  | 
57 |  | -                            	<fmt:formatDate value="${instanceReshardProcess.endTime}" type="time" timeStyle="full" pattern="yyyy-MM-dd HH:mm:ss"/>  | 
58 |  | -                            </td>  | 
59 |  | -                        </tr>  | 
60 |  | -                    </c:forEach>  | 
 | 35 | +	                    <c:forEach var="instanceReshardProcess" items="${instanceReshardProcessList}">  | 
 | 36 | +	                        <tr>  | 
 | 37 | +	                            <td>${instanceReshardProcess.id}</td>  | 
 | 38 | +	                            <td>  | 
 | 39 | +		                          <div class="progress margin-custom-bottom0">  | 
 | 40 | +							      	  <div id="reshardSlotProgress${instanceReshardProcess.id}" class="progress-bar progress-bar-success"  | 
 | 41 | +							           role="progressbar" aria-valuenow="${instanceReshardProcess.finishSlotNum}" aria-valuemax="${instanceReshardProcess.totalSlot}"  | 
 | 42 | +							           aria-valuemin="0" style="width: ${instanceReshardProcess.finishSlotNum / instanceReshardProcess.totalSlot}">  | 
 | 43 | +							             <label style="color: #000000">  | 
 | 44 | +							                 <span id="finishSlotNum${instanceReshardProcess.id}">${instanceReshardProcess.finishSlotNum}</span>  Finish/<span id="totalSlot${instanceReshardProcess.id}">${instanceReshardProcess.totalSlot}</span>  Total  | 
 | 45 | +							             </label>  | 
 | 46 | +							           </div>  | 
 | 47 | +							       </div>  | 
 | 48 | +	                            </td>  | 
 | 49 | +	                            <td id="sourceTargetInstance${instanceReshardProcess.id}">  | 
 | 50 | +	                                ${instanceReshardProcess.sourceInstanceId}(${instanceInfoMap[instanceReshardProcess.sourceInstanceId].ip}:${instanceInfoMap[instanceReshardProcess.sourceInstanceId].port})  | 
 | 51 | +	                            		-->  | 
 | 52 | +	                            		${instanceReshardProcess.targetInstanceId}(${instanceInfoMap[instanceReshardProcess.targetInstanceId].ip}:${instanceInfoMap[instanceReshardProcess.targetInstanceId].port})  | 
 | 53 | +	                            </td>  | 
 | 54 | +	                            <td id="startEndSlot${instanceReshardProcess.id}">  | 
 | 55 | +	                            		${instanceReshardProcess.startSlot}   | 
 | 56 | +	                            		-->  | 
 | 57 | +	                            		${instanceReshardProcess.endSlot}   | 
 | 58 | +	                            </td>  | 
 | 59 | +	                            <td id="migratingSlot${instanceReshardProcess.id}">  | 
 | 60 | +	                            		${instanceReshardProcess.migratingSlot}   | 
 | 61 | +	                            </td>  | 
 | 62 | +	                            <td id="statusDesc${instanceReshardProcess.id}">  | 
 | 63 | +		                            	<c:choose>  | 
 | 64 | +		                            		<c:when test="${instanceReshardProcess.status == 0}">运行中</c:when>  | 
 | 65 | +		                            		<c:when test="${instanceReshardProcess.status == 1}">完成</c:when>  | 
 | 66 | +		                            		<c:when test="${instanceReshardProcess.status == 2}">出错</c:when>  | 
 | 67 | +		                            	</c:choose>  | 
 | 68 | +	                            </td>  | 
 | 69 | +	                            <td>  | 
 | 70 | +	                            		<fmt:formatDate value="${instanceReshardProcess.startTime}" type="time" timeStyle="full" pattern="yyyy-MM-dd HH:mm:ss"/>  | 
 | 71 | +	                            </td>  | 
 | 72 | +	                            <td id="startTime${instanceReshardProcess.id}">  | 
 | 73 | +	                            		<c:if test="${instanceReshardProcess.status == 1}">  | 
 | 74 | +	                            			<fmt:formatDate value="${instanceReshardProcess.endTime}" type="time" timeStyle="full" pattern="yyyy-MM-dd HH:mm:ss"/>  | 
 | 75 | +	                            		</c:if>  | 
 | 76 | +	                            </td>  | 
 | 77 | +	                        </tr>  | 
 | 78 | +	                    </c:forEach>  | 
61 | 79 |                     </tbody>  | 
62 | 80 |                 </table>  | 
63 | 81 |             </div>  | 
 | 
79 | 97 |   					var appId = data.appId;  | 
80 | 98 |   					var finishSlotNum = data.finishSlotNum;  | 
81 | 99 |   					var totalSlot = data.totalSlot;  | 
 | 100 | +  					var status = data.status;  | 
82 | 101 |   					var statusDesc = data.statusDesc;  | 
 | 102 | +  					var migratingSlot = data.migratingSlot;  | 
 | 103 | +  					var endTimeFormat = data.endTimeFormat;  | 
83 | 104 |   					document.getElementById("finishSlotNum" + id).innerHTML = finishSlotNum;  | 
84 | 105 |   					document.getElementById("totalSlot" + id).innerHTML = totalSlot;  | 
85 | 106 |   					document.getElementById("reshardSlotProgress" + id).style.width = (finishSlotNum * 100 / totalSlot ) + "%";  | 
86 | 107 |   					document.getElementById("statusDesc" + id).innerHTML = statusDesc;  | 
 | 108 | +  					document.getElementById("migratingSlot" + id).innerHTML = migratingSlot;  | 
 | 109 | +  					//如果完成显示结束时间  | 
 | 110 | +  					if (status == 1) {  | 
 | 111 | +  	  					document.getElementById("startTime" + id).innerHTML = endTimeFormat;  | 
 | 112 | +  					}  | 
87 | 113 |   				}  | 
88 | 114 |   			});  | 
89 | 115 | 		}  | 
 | 
0 commit comments