feat: Web Terminal in OPNsense TunnelTab; README auf Multi-Platform aktualisiert (OPNsense + Linux/Proxmox)
This commit is contained in:
@@ -3,6 +3,7 @@ import api from '../api/client'
|
||||
import StatusBadge from './StatusBadge'
|
||||
import { copyToClipboard } from '../utils/clipboard'
|
||||
import { useSettingsStore } from '../stores/settings'
|
||||
import TerminalModal from './TerminalModal'
|
||||
import {
|
||||
X, Cpu, MemoryStick, HardDrive, Clock, Network, Shield, Route,
|
||||
Globe, Key, Download, Terminal, Wifi, Search, Plus, Trash2, Copy, Check, ExternalLink, Unplug, Plug, MonitorSmartphone, Ban,
|
||||
@@ -835,6 +836,7 @@ function TunnelTab({ agentId, agent }) {
|
||||
const [customPort, setCustomPort] = useState('')
|
||||
const [error, setError] = useState('')
|
||||
const [sshCopied, setSshCopied] = useState(null)
|
||||
const [terminalOpen, setTerminalOpen] = useState(false)
|
||||
|
||||
const backendHost = useSettingsStore.getState().getBackendHost()
|
||||
|
||||
@@ -904,8 +906,12 @@ function TunnelTab({ agentId, agent }) {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{terminalOpen && (
|
||||
<TerminalModal agentId={agentId} agentName={agent?.name} onClose={() => setTerminalOpen(false)} />
|
||||
)}
|
||||
|
||||
{/* Quick Buttons */}
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex items-center gap-3 flex-wrap">
|
||||
<span className="text-sm text-gray-400">Schnellzugriff:</span>
|
||||
<button
|
||||
onClick={() => openTunnel('127.0.0.1', 4444, 'webgui')}
|
||||
@@ -923,6 +929,13 @@ function TunnelTab({ agentId, agent }) {
|
||||
<Terminal className="w-4 h-4" />
|
||||
{creating === 'ssh' ? 'Verbinde...' : 'SSH (22)'}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setTerminalOpen(true)}
|
||||
className="flex items-center gap-1.5 px-3 py-1.5 bg-green-700 hover:bg-green-600 rounded text-sm text-white transition-colors"
|
||||
>
|
||||
<Terminal className="w-4 h-4" />
|
||||
Web Terminal
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setCustomOpen(!customOpen)}
|
||||
className="flex items-center gap-1.5 px-3 py-1.5 bg-gray-700 hover:bg-gray-600 rounded text-sm text-gray-300 transition-colors"
|
||||
|
||||
Reference in New Issue
Block a user