Show app version in admin UI and /version endpoint
Embed APP_VERSION build arg in Docker image (default: dev). build_push.sh passes the git tag as build arg. Proxy exposes GET /version, admin UI shows it as read-only field in settings.
This commit is contained in:
@@ -82,6 +82,7 @@ function SettingsSection({ password }) {
|
||||
const [modelsLoading, setModelsLoading] = useState(false);
|
||||
const [ollamaReachable, setOllamaReachable] = useState(true);
|
||||
const [proxyEndpoint, setProxyEndpoint] = useState(null);
|
||||
const [appVersion, setAppVersion] = useState(null);
|
||||
const [saved, setSaved] = useState(false);
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
@@ -115,6 +116,7 @@ function SettingsSection({ password }) {
|
||||
const s = settingsRes.data;
|
||||
setSettings(s);
|
||||
setProxyEndpoint(proxyRes.data.endpoint);
|
||||
setAppVersion(proxyRes.data.version);
|
||||
fetchModels(s.ollama_url, s.force_model);
|
||||
}).catch(() => setError('Einstellungen konnten nicht geladen werden.'));
|
||||
}, []);
|
||||
@@ -145,6 +147,10 @@ function SettingsSection({ password }) {
|
||||
<small> (Änderung erfordert Neustart)</small>
|
||||
</span>
|
||||
</div>
|
||||
<div className="settings-row">
|
||||
<label>Version</label>
|
||||
<span className="settings-value">{appVersion ?? '…'}</span>
|
||||
</div>
|
||||
<div className="settings-row">
|
||||
<label>Ollama-Endpunkt</label>
|
||||
<div className="settings-input-wrap">
|
||||
|
||||
Reference in New Issue
Block a user