mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 12:54:31 +00:00
Fix NC Connector system status rendering
This commit is contained in:
@@ -2,36 +2,45 @@
|
||||
<h3>NC Connector</h3>
|
||||
<p class="bratonien-section__intro">Bratonien Tools verwaltet die Nextcloud-Anbindung und den regelmäßigen Piwigo-Abgleich.</p>
|
||||
|
||||
{assign var=nc_system_available value=isset($NC_CONNECTOR.system)}
|
||||
|
||||
<div class="bratonien-grid">
|
||||
<div class="bratonien-card">
|
||||
<h4>Connector-Status</h4>
|
||||
<div class="bratonien-form-grid">
|
||||
<span class="bratonien-label">Phase</span><strong>{$NC_CONNECTOR.phase|escape:html}</strong>
|
||||
<span class="bratonien-label">Connector-Verbindungen</span><strong>{$NC_CONNECTOR.connection_count|escape:html}</strong>
|
||||
<span class="bratonien-label">Timer aktiv</span><strong>{if $NC_CONNECTOR.system.timer_active}Ja{else}Nein{/if}</strong>
|
||||
<span class="bratonien-label">Timer aktiviert</span><strong>{if $NC_CONNECTOR.system.timer_enabled}Ja{else}Nein{/if}</strong>
|
||||
<span class="bratonien-label">Nächster Lauf</span><strong>{$NC_CONNECTOR.system.next_run_label|escape:html}</strong>
|
||||
<span class="bratonien-label">Timer aktiv</span><strong>{if $nc_system_available && $NC_CONNECTOR.system.timer_active}Ja{else}Nein{/if}</strong>
|
||||
<span class="bratonien-label">Timer aktiviert</span><strong>{if $nc_system_available && $NC_CONNECTOR.system.timer_enabled}Ja{else}Nein{/if}</strong>
|
||||
<span class="bratonien-label">Nächster Lauf</span><strong>{if $nc_system_available}{$NC_CONNECTOR.system.next_run_label|escape:html}{else}Nicht verfügbar{/if}</strong>
|
||||
</div>
|
||||
{if !$nc_system_available}
|
||||
<p class="bratonien-main-cache__warning">Systemstatus konnte nicht geladen werden. Die Connector-Verbindung selbst wird dadurch nicht verändert.</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="bratonien-card">
|
||||
<h4>Legacy-Bestand</h4>
|
||||
<div class="bratonien-form-grid">
|
||||
<span class="bratonien-label"><code>/opt/piwigo-sync</code></span><strong>{if $NC_CONNECTOR.system.legacy_runtime_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label"><code>/etc/piwigo-sync</code></span><strong>{if $NC_CONNECTOR.system.legacy_config_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label">Legacy-Service</span><strong>{if $NC_CONNECTOR.system.legacy_service_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label">Legacy-Timer</span><strong>{if $NC_CONNECTOR.system.legacy_timer_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
</div>
|
||||
{if $NC_CONNECTOR.system.legacy_runtime_exists || $NC_CONNECTOR.system.legacy_config_exists || $NC_CONNECTOR.system.legacy_service_exists || $NC_CONNECTOR.system.legacy_timer_exists}
|
||||
<p class="bratonien-main-cache__warning">Die Verbindung läuft bereits mit der Plugin-eigenen Runtime. Die verbliebenen Legacy-Dateien können jetzt entfernt werden.</p>
|
||||
{foreach from=$NC_CONNECTOR.connections item=cleanup_connection}
|
||||
{if $cleanup_connection.takeover_state == 'active' && $cleanup_connection.enabled && isset($cleanup_connection.config.takeover.runtime) && $cleanup_connection.config.takeover.runtime == 'plugin-runtime'}
|
||||
<p><strong>Einmalig im Piwigo-LXC als root:</strong></p>
|
||||
<p><code>php /var/www/piwigo/plugins/bratonien_tools/nc-connector-legacy-cleanup.php {$cleanup_connection.id|escape:html}</code></p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $nc_system_available}
|
||||
<div class="bratonien-form-grid">
|
||||
<span class="bratonien-label"><code>/opt/piwigo-sync</code></span><strong>{if $NC_CONNECTOR.system.legacy_runtime_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label"><code>/etc/piwigo-sync</code></span><strong>{if $NC_CONNECTOR.system.legacy_config_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label">Legacy-Service</span><strong>{if $NC_CONNECTOR.system.legacy_service_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
<span class="bratonien-label">Legacy-Timer</span><strong>{if $NC_CONNECTOR.system.legacy_timer_exists}Vorhanden{else}Entfernt{/if}</strong>
|
||||
</div>
|
||||
{if $NC_CONNECTOR.system.legacy_runtime_exists || $NC_CONNECTOR.system.legacy_config_exists || $NC_CONNECTOR.system.legacy_service_exists || $NC_CONNECTOR.system.legacy_timer_exists}
|
||||
<p class="bratonien-main-cache__warning">Die Verbindung läuft bereits mit der Plugin-eigenen Runtime. Die verbliebenen Legacy-Dateien können jetzt entfernt werden.</p>
|
||||
{foreach from=$NC_CONNECTOR.connections item=cleanup_connection}
|
||||
{if $cleanup_connection.takeover_state == 'active' && $cleanup_connection.enabled && isset($cleanup_connection.config.takeover.runtime) && $cleanup_connection.config.takeover.runtime == 'plugin-runtime'}
|
||||
<p><strong>Einmalig im Piwigo-LXC als root:</strong></p>
|
||||
<p><code>php /var/www/piwigo/plugins/bratonien_tools/nc-connector-legacy-cleanup.php {$cleanup_connection.id|escape:html}</code></p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<p class="bratonien-base-note">Der alte Script-Bestand ist vollständig entfernt. Der NC Connector arbeitet ausschließlich mit seiner Plugin-eigenen Runtime.</p>
|
||||
{/if}
|
||||
{else}
|
||||
<p class="bratonien-base-note">Der alte Script-Bestand ist vollständig entfernt. Der NC Connector arbeitet ausschließlich mit seiner Plugin-eigenen Runtime.</p>
|
||||
<p class="bratonien-base-note">Legacy-Status derzeit nicht verfügbar.</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -103,7 +112,7 @@
|
||||
<p><code>php /var/www/piwigo/plugins/bratonien_tools/nc-connector-cutover-v2.php {$connection.id|escape:html}</code></p>
|
||||
{elseif $connection.takeover_state == 'active'}
|
||||
<p class="bratonien-base-note"><strong>Connector aktiv.</strong> Der Connector-Timer übernimmt die regelmäßige Prüfung.</p>
|
||||
<p class="bratonien-base-note">Nächster geplanter Lauf: <strong>{$NC_CONNECTOR.system.next_run_label|escape:html}</strong></p>
|
||||
<p class="bratonien-base-note">Nächster geplanter Lauf: <strong>{if $nc_system_available}{$NC_CONNECTOR.system.next_run_label|escape:html}{else}Nicht verfügbar{/if}</strong></p>
|
||||
{if isset($connection.config.takeover.first_run.result)}
|
||||
<p class="bratonien-base-note">Erster Connector-Lauf: <strong>{$connection.config.takeover.first_run.result|escape:html}</strong>{if isset($connection.config.takeover.first_run.checked_at)} · {$connection.config.takeover.first_run.checked_at|escape:html}{/if}</p>
|
||||
{/if}
|
||||
@@ -129,8 +138,8 @@
|
||||
<div class="bratonien-card">
|
||||
<h4>Sync-Zustand</h4>
|
||||
<div class="bratonien-form-grid">
|
||||
<span class="bratonien-label">Connector-Timer</span><strong>{if $NC_CONNECTOR.system.timer_active}Aktiv{else}Nicht aktiv{/if}</strong>
|
||||
<span class="bratonien-label">Nächster Lauf</span><strong>{$NC_CONNECTOR.system.next_run_label|escape:html}</strong>
|
||||
<span class="bratonien-label">Connector-Timer</span><strong>{if $nc_system_available && $NC_CONNECTOR.system.timer_active}Aktiv{else}Nicht aktiv{/if}</strong>
|
||||
<span class="bratonien-label">Nächster Lauf</span><strong>{if $nc_system_available}{$NC_CONNECTOR.system.next_run_label|escape:html}{else}Nicht verfügbar{/if}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -139,4 +148,4 @@
|
||||
<p class="bratonien-base-note"><code>/var/lib/piwigo-sync</code> bleibt aktuell bestehen. Dort liegen keine alten Scripts oder Zugangsdaten, sondern die vom aktiven Connector benötigte Name-Map, Activity-State, Manifest- und Statusdaten.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
Reference in New Issue
Block a user