| 6309 | if (loadingElement) { |
| 6310 | loadingElement.remove(); |
| 6311 | } |
| 6312 | |
| 6313 | if (result && result.success) { |
| 6314 | // Show success message briefly |
| 6315 | const successMsg = document.createElement('div'); |
| 6316 | successMsg.style.cssText = 'position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #4a9eff; color: white; padding: 20px; border-radius: 8px; z-index: 10001; box-shadow: 0 4px 6px rgba(0,0,0,0.3);'; |
| 6317 | successMsg.textContent = 'Server restarted successfully'; |
| 6318 | document.body.appendChild(successMsg); |
| 6319 | setTimeout(() => { |
| 6320 | if (successMsg.parentNode) { |
| 6321 | successMsg.remove(); |
| 6322 | } |
| 6323 | }, 2000); |
| 6324 | } else { |
| 6325 | // Show error message |
| 6326 | alert('Failed to restart server: ' + (result?.message || 'Unknown error')); |
| 6327 | } |
| 6328 | } catch (error) { |