|
12 | 12 | margin-bottom: 0; |
13 | 13 | } |
14 | 14 |
|
| 15 | + #listTable { |
| 16 | + margin: 0 auto; |
| 17 | + border: 1px solid #cfcfcf; |
| 18 | + border-radius: 4px; |
| 19 | + border-collapse: collapse; |
| 20 | + border-style:hidden; |
| 21 | + box-shadow: 0 0 0 1px #cfcfcf; |
| 22 | + } |
| 23 | + |
15 | 24 | #listTable th, #listTable td { |
16 | 25 | padding: 5px; |
| 26 | + border: 1px solid #cfcfcf; |
17 | 27 | } |
18 | 28 | </style> |
19 | 29 | </head> |
@@ -86,13 +96,13 @@ <h4 data-i18n="resources.title_nodeManagementUseExample"></h4> |
86 | 96 | <table id="listTable"> |
87 | 97 | <thead> |
88 | 98 | <tr role="row"> |
89 | | - <th rowspan="1" colspan="1" style="width: 50px;"> |
| 99 | + <th rowspan="1" colspan="1" style="width: 80px;"> |
90 | 100 | <div><span>id</span></div> |
91 | 101 | </th> |
92 | | - <th rowspan="1" colspan="1" style="width: 150px;"> |
| 102 | + <th rowspan="1" colspan="1" style="width: 200px;"> |
93 | 103 | <div><span data-i18n="resources.text_name"></span></div> |
94 | 104 | </th> |
95 | | - <th rowspan="1" colspan="1" style="width: 150px;"> |
| 105 | + <th rowspan="1" colspan="1" style="width: 220px;"> |
96 | 106 | <div><span data-i18n="resources.text_address"></span></div> |
97 | 107 | </th> |
98 | 108 | </tr> |
@@ -239,15 +249,18 @@ <h4 data-i18n="resources.title_nodeManagementUseExample"></h4> |
239 | 249 | .then(function (response) { |
240 | 250 | console.log(JSON.stringify(response)); |
241 | 251 | var result = response; |
| 252 | + var html = ""; |
242 | 253 | if (result.list) { |
243 | | - var html = ""; |
244 | 254 | for (var i = 0; i < result.list.length; i++) { |
245 | 255 | var obj = result.list[i]; |
246 | 256 | var address = obj.productInfos ? obj.productInfos[0].address : ""; |
247 | | - html += "<tr role='row'><td>" + obj.id + "</td><td>" + obj.nodeName + "</td><td><a href='" + address + "' target='_blank'>" + address + "</a></td><td></tr>"; |
| 257 | + html += "<tr role='row'><td>" + obj.id + "</td><td>" + obj.nodeName + "</td><td><a href='" + address + "' target='_blank'>" + address + "</a></td></tr>"; |
248 | 258 | } |
249 | | - $("#nodeList").html(html); |
| 259 | + |
| 260 | + } else { |
| 261 | + html += "<tr role='row'><td></td><td></td><td></td></tr>"; |
250 | 262 | } |
| 263 | + $("#nodeList").html(html); |
251 | 264 | }); |
252 | 265 | } |
253 | 266 |
|
|
0 commit comments