Update public/index.html
Browse files- public/index.html +6 -0
public/index.html
CHANGED
@@ -1284,6 +1284,7 @@
|
|
1284 |
</div>
|
1285 |
</div>
|
1286 |
<div class="action-buttons" style="display: ${isLoggedIn ? 'flex' : 'none'};">
|
|
|
1287 |
<button class="action-button" onclick="showConfirmDialog('restart', '${instance.repo_id}', '确认重启', '您确定要重启实例 ${instance.name} (${instance.repo_id}) 吗?')">重启</button>
|
1288 |
<button class="action-button" onclick="showConfirmDialog('rebuild', '${instance.repo_id}', '确认重建', '您确定要重建实例 ${instance.name} (${instance.repo_id}) 吗?')">重建</button>
|
1289 |
</div>
|
@@ -1559,6 +1560,11 @@
|
|
1559 |
updateActionButtons(isLoggedIn);
|
1560 |
}
|
1561 |
|
|
|
|
|
|
|
|
|
|
|
1562 |
// 新增函数:切换实例监控状态
|
1563 |
function toggleMonitorInstance(instanceId, checked) {
|
1564 |
const checkbox = document.getElementById(`monitor-${instanceId}`);
|
|
|
1284 |
</div>
|
1285 |
</div>
|
1286 |
<div class="action-buttons" style="display: ${isLoggedIn ? 'flex' : 'none'};">
|
1287 |
+
<button class="action-button view-button" onclick="viewInstance('${instance.url}')">查看</button>
|
1288 |
<button class="action-button" onclick="showConfirmDialog('restart', '${instance.repo_id}', '确认重启', '您确定要重启实例 ${instance.name} (${instance.repo_id}) 吗?')">重启</button>
|
1289 |
<button class="action-button" onclick="showConfirmDialog('rebuild', '${instance.repo_id}', '确认重建', '您确定要重建实例 ${instance.name} (${instance.repo_id}) 吗?')">重建</button>
|
1290 |
</div>
|
|
|
1560 |
updateActionButtons(isLoggedIn);
|
1561 |
}
|
1562 |
|
1563 |
+
// 新增函数:在新标签页中打开实例的URL
|
1564 |
+
function viewInstance(url) {
|
1565 |
+
window.open(url, '_blank');
|
1566 |
+
}
|
1567 |
+
|
1568 |
// 新增函数:切换实例监控状态
|
1569 |
function toggleMonitorInstance(instanceId, checked) {
|
1570 |
const checkbox = document.getElementById(`monitor-${instanceId}`);
|