Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed May 7, 2024
2 parents fc8c8d1 + a283437 commit b7a2881
Show file tree
Hide file tree
Showing 30 changed files with 270 additions and 67 deletions.
9 changes: 8 additions & 1 deletion src/AdminCabinet/Controllers/UpdateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

namespace MikoPBX\AdminCabinet\Controllers;

use MikoPBX\Core\System\Util;

class UpdateController extends BaseController
{

Expand All @@ -28,6 +30,11 @@ class UpdateController extends BaseController
*/
public function indexAction(): void
{
$this->view->submitMode = null;
$this->view->setVars(
[
'isDocker'=>Util::isDocker(),
'submitMode'=>null,
]
);
}
}
63 changes: 63 additions & 0 deletions src/AdminCabinet/Views/Update/common.volt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<div class="ui modal" id="update-modal-form">
<div class="header">
{{ t._('upd_UpdateTitle') }}
</div>
<div class="image content">
<div class="image">
<i class="icon attention"></i>
</div>
<div class="description">
{{ t._('upd_UpdateDescription') }}<br><br>
{{ t._('upd_EnterIHaveBackupPhrasePreText') }} &nbsp&nbsp<b>{{ t._('upd_EnterIHaveBackupPhrase') }}</b>
<br><br>
<div class="ui input fluid max-width-400">
<label for="i-have-backup-input"></label>
<input type="text" name="i-have-backup-input" value=""/>
</div>
</div>
</div>
<div class="actions">
<div class="ui negative button">{{ t._('upd_Cancel') }}</div>
<div class="ui positive disabled button" id="start-upgrade-button">{{ t._('upd_Update') }}</div>
</div>
</div>
<form class="ui large grey segment form" id="upgrade-form">
<div class="field">
<label>{{ t._('upd_FileName') }}</label>
<div class="ui action input">
<input type="text" readonly>
<input type="file" name="update-file" accept=".img" style="display: none!important;"/>
<div class="ui icon button">
<i class="cloud upload alternate icon"></i>
</div>
</div>
</div>
<div class="field">
<div class="ui indicating progress" id="upload-progress-bar">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label" id="upload-progress-bar-label"></div>
</div>
</div>
{{ partial("partials/submitbutton",[
'submitBtnText':'upd_UpdateSystem',
'submitBtnIconClass':'save'
]) }}
<div class="ui clearing hidden divider"></div>
</form>
<div id="online-updates-block" style="display: none">
<h3 class="ui header">{{ t._('upd_AvailableUpdates') }}</h3>
<table class="ui celled table" id="updates-table">
<thead>
<tr>
<th class="collapsing center aligned column">{{ t._('upd_VersionColumn') }}</th>
<th>{{ t._('upd_DescriptionColumn') }}</th>
<th class="collapsing column"></th>
</tr>
</thead>
<tbody>

</tbody>
</table>
</div>
7 changes: 7 additions & 0 deletions src/AdminCabinet/Views/Update/docker.volt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="ui icon message">
<i class="docker icon"></i>
<div class="content">
<div class="ui header">{{ t._('upd_UpdateDockerHeader')}}</div>
<p>{{ t._('upd_UpdateDockerText')}}</p>
</div>
</div>
68 changes: 5 additions & 63 deletions src/AdminCabinet/Views/Update/index.volt
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
<div class="ui modal" id="update-modal-form">
<div class="header">
{{ t._('upd_UpdateTitle') }}
</div>
<div class="image content">
<div class="image">
<i class="icon attention"></i>
</div>
<div class="description">
{{ t._('upd_UpdateDescription') }}<br><br>
{{ t._('upd_EnterIHaveBackupPhrasePreText') }} &nbsp&nbsp<b>{{ t._('upd_EnterIHaveBackupPhrase') }}</b>
<br><br>
<div class="ui input fluid max-width-400">
<label for="i-have-backup-input"></label>
<input type="text" name="i-have-backup-input" value=""/>
</div>
</div>
</div>
<div class="actions">
<div class="ui negative button">{{ t._('upd_Cancel') }}</div>
<div class="ui positive disabled button" id="start-upgrade-button">{{ t._('upd_Update') }}</div>
</div>
</div>
<form class="ui large grey segment form" id="upgrade-form">
<div class="field">
<label>{{ t._('upd_FileName') }}</label>
<div class="ui action input">
<input type="text" readonly>
<input type="file" name="update-file" accept=".img" style="display: none!important;"/>
<div class="ui icon button">
<i class="cloud upload alternate icon"></i>
</div>
</div>
</div>
<div class="field">
<div class="ui indicating progress" id="upload-progress-bar">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label" id="upload-progress-bar-label"></div>
</div>
</div>
{{ partial("partials/submitbutton",[
'submitBtnText':'upd_UpdateSystem',
'submitBtnIconClass':'save'
]) }}
<div class="ui clearing hidden divider"></div>
</form>
<div id="online-updates-block" style="display: none">
<h3 class="ui header">{{ t._('upd_AvailableUpdates') }}</h3>
<table class="ui celled table" id="updates-table">
<thead>
<tr>
<th class="collapsing center aligned column">{{ t._('upd_VersionColumn') }}</th>
<th>{{ t._('upd_DescriptionColumn') }}</th>
<th class="collapsing column"></th>
</tr>
</thead>
<tbody>

</tbody>
</table>
</div>
{% if isDocker %}
{{ partial("Update/docker")}}
{% else %}
{{ partial("Update/common")}}
{% endif %}
8 changes: 8 additions & 0 deletions src/Common/Messages/az.php
Original file line number Diff line number Diff line change
Expand Up @@ -1269,4 +1269,12 @@
'Formatting storage partition 4 on disk' => 'Diskdə məlumat saxlamaq üçün dördüncü bölmənin formatlanması',
'Save storage disk settings' => 'Saxlama üçün disk parametrləri saxlanılır',
'auth_TooManyLoginAttempts' => 'Həddindən artıq giriş cəhdləri. IP ünvanınız %interval% saniyəyə bloklanıb.',
'nw_NATInfoInstruction1' => 'Şəbəkəniz 1:1 NAT-ı dəstəkləmək üçün konfiqurasiya edilibsə (bu, adətən buludlarda standart qaydadır), heç bir əlavə parametrlər etməyə ehtiyac yoxdur.',
'nw_NATInfoInstruction2' => '1:1 NAT istifadə edilmirsə, aşağıdakı portları ictimai IP-dən MikoPBX daxili IP ünvanına yönləndirin.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP və %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_ExternIpHostInstruction1' => 'Routerdəki SIP portu %SIP_PORT% deyilsə, onu iki nöqtə ilə ayrılmış IP ünvanından və ya xarici hostdan sonra daxil edin.',
'nw_ExternIpHostInstruction2' => 'Xarici host adı göstərilibsə, o, xarici IP ünvanına üstünlük veriləcək.',
'upd_UpdateDockerHeader' => 'Konteyner yeniləmə qaydaları',
'upd_UpdateDockerText' => 'Konteyneri dayandırın, silin, ən son versiyanı endirin və yaddaş qurğusunun parametrlərini və mühit dəyişənlərini qoruyaraq yenidən başlayın. Proses sənədlərdə daha ətraflı təsvir edilmişdir.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Copying configuration...' => 'Vyplňování počátečních konfiguračních nastavení…',
'Save storage disk settings' => 'Ukládání nastavení disku pro úložiště',
'auth_TooManyLoginAttempts' => 'Příliš mnoho pokusů o přihlášení. Vaše IP adresa je zablokována na %interval% sekund.',
'nw_NATInfoInstruction1' => 'Pokud je vaše síť nakonfigurována na podporu 1:1 NAT (toto je obvykle výchozí pravidlo v cloudu), nemusíte provádět žádná další nastavení.',
'nw_NATInfoInstruction2' => 'Pokud není použit NAT 1:1, přesměrujte níže uvedené porty z veřejné IP na vnitřní IP adresu MikoPBX.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP a %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_ExternIpHostInstruction1' => 'Pokud SIP port na routeru není %SIP_PORT%, zadejte jej za IP adresu nebo externího hostitele, oddělené dvojtečkou.',
'nw_ExternIpHostInstruction2' => 'Pokud je zadán externí název hostitele, bude použit přednostně před externí IP adresou.',
'upd_UpdateDockerHeader' => 'Pravidla aktualizace kontejneru',
'upd_UpdateDockerText' => 'Zastavte kontejner, odstraňte jej, stáhněte si nejnovější verzi a začněte znovu, přičemž zachováte nastavení připojení úložiště a proměnné prostředí. Proces je podrobněji popsán v dokumentaci.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/da.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Formatting storage partition 4 on disk' => 'Formatering af den fjerde partition for at gemme data på disken',
'Save storage disk settings' => 'Gemmer diskindstillinger til opbevaring',
'auth_TooManyLoginAttempts' => 'For mange loginforsøg. Din IP-adresse er blokeret i %interval% sekunder.',
'nw_NATInfoInstruction1' => 'Hvis dit netværk er konfigureret til at understøtte 1:1 NAT (dette er normalt standardreglen i skyer), behøver du ikke foretage yderligere indstillinger.',
'nw_NATInfoInstruction2' => 'Hvis 1:1 NAT ikke bruges, skal du omdirigere portene nedenfor fra den offentlige IP-adresse til MikoPBX\' interne IP-adresse.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP og %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_ExternIpHostInstruction2' => 'Hvis et eksternt værtsnavn er angivet, vil det blive brugt frem for den eksterne IP-adresse.',
'nw_ExternIpHostInstruction1' => 'Hvis SIP-porten på routeren ikke er %SIP_PORT%, skal du indtaste den efter IP-adressen eller den eksterne vært, adskilt af et kolon.',
'upd_UpdateDockerHeader' => 'Regler for containeropdatering',
'upd_UpdateDockerText' => 'Stop containeren, slet den, download den seneste version og start igen, mens lagermonteringsindstillingerne og miljøvariablerne bevares. Processen er nærmere beskrevet i dokumentationen.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -1273,4 +1273,12 @@
'Formatting storage partition 4 on disk' => 'Formatieren der vierten Partition zum Speichern von Daten auf der Festplatte',
'Save storage disk settings' => 'Speichern der Festplatteneinstellungen zur Speicherung',
'auth_TooManyLoginAttempts' => 'Zu viele Anmeldeversuche. Ihre IP-Adresse wird für %interval% Sekunden blockiert.',
'nw_NATInfoInstruction1' => 'Wenn Ihr Netzwerk so konfiguriert ist, dass es 1:1 NAT unterstützt (dies ist normalerweise die Standardregel in Clouds), müssen Sie keine weiteren Einstellungen vornehmen.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP und %TLS_PORT% TCP',
'nw_NATInfoInstruction2' => 'Wenn 1:1 NAT nicht verwendet wird, leiten Sie die unten aufgeführten Ports von der öffentlichen IP zur internen IP-Adresse der MikoPBX um.',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_ExternIpHostInstruction1' => 'Wenn der SIP-Port am Router nicht %SIP_PORT% ist, geben Sie ihn nach der IP-Adresse oder dem externen Host ein, getrennt durch einen Doppelpunkt.',
'nw_ExternIpHostInstruction2' => 'Wenn ein externer Hostname angegeben wird, wird dieser vorrangig vor der externen IP-Adresse verwendet.',
'upd_UpdateDockerHeader' => 'Regeln für die Containeraktualisierung',
'upd_UpdateDockerText' => 'Stoppen Sie den Container, löschen Sie ihn, laden Sie die neueste Version herunter und starten Sie erneut, wobei die Speicher-Mount-Einstellungen und Umgebungsvariablen erhalten bleiben. Der Vorgang wird in der Dokumentation genauer beschrieben.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/el.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Copying configuration...' => 'Συμπλήρωση αρχικών ρυθμίσεων διαμόρφωσης…',
'Save storage disk settings' => 'Αποθήκευση ρυθμίσεων δίσκου για αποθήκευση',
'auth_TooManyLoginAttempts' => 'Πάρα πολλές προσπάθειες σύνδεσης. Η διεύθυνση IP σας έχει αποκλειστεί για %interval% δευτερόλεπτα.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP και %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_NATInfoInstruction1' => 'Εάν το δίκτυό σας έχει ρυθμιστεί να υποστηρίζει NAT 1:1 (αυτός είναι συνήθως ο προεπιλεγμένος κανόνας στα σύννεφα), δεν χρειάζεται να κάνετε πρόσθετες ρυθμίσεις.',
'nw_NATInfoInstruction2' => 'Εάν δεν χρησιμοποιείται NAT 1:1, ανακατευθύνετε τις παρακάτω θύρες από τη δημόσια IP στην εσωτερική διεύθυνση IP του MikoPBX.',
'nw_ExternIpHostInstruction1' => 'Εάν η θύρα SIP του δρομολογητή δεν είναι %SIP_PORT%, εισαγάγετε τη μετά τη διεύθυνση IP ή τον εξωτερικό κεντρικό υπολογιστή, διαχωρισμένα με άνω και κάτω τελεία.',
'nw_ExternIpHostInstruction2' => 'Εάν έχει καθοριστεί ένα εξωτερικό όνομα κεντρικού υπολογιστή, θα χρησιμοποιείται κατά προτίμηση σε σχέση με την εξωτερική διεύθυνση IP.',
'upd_UpdateDockerHeader' => 'Κανόνες ενημέρωσης κοντέινερ',
'upd_UpdateDockerText' => 'Σταματήστε το κοντέινερ, διαγράψτε το, κατεβάστε την πιο πρόσφατη έκδοση και ξεκινήστε ξανά, διατηρώντας τις ρυθμίσεις βάσης αποθήκευσης και τις μεταβλητές περιβάλλοντος. Η διαδικασία περιγράφεται λεπτομερέστερα στην τεκμηρίωση.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -1273,4 +1273,12 @@
'Copying configuration...' => 'Filling out initial configuration settings…',
'Save storage disk settings' => 'Saving disk settings for storage',
'auth_TooManyLoginAttempts' => 'Too many login attempts. Your IP address is blocked for %interval% seconds.',
'nw_NATInfoInstruction1' => 'If your network is configured to support 1:1 NAT (this is usually the default rule in clouds), you do not need to make any additional settings.',
'nw_NATInfoInstruction2' => 'If 1:1 NAT is not used, redirect the ports below from the public IP to the MikoPBX internal IP address.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP and %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO% UDP',
'nw_ExternIpHostInstruction1' => 'If the SIP port on the router is not %SIP_PORT%, enter it after the IP address or external host, separated by a colon.',
'nw_ExternIpHostInstruction2' => 'If an external hostname is specified, it will be used in preference to the external IP address.',
'upd_UpdateDockerHeader' => 'Container update rules',
'upd_UpdateDockerText' => 'Stop the container, delete it, download the latest version and start again, preserving the storage mount settings and environment variables. The process is described in more detail in the documentation.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/es.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Formatting storage partition 4 on disk' => 'Formatear la cuarta partición para almacenar datos en el disco',
'Save storage disk settings' => 'Guardar la configuración del disco para almacenamiento',
'auth_TooManyLoginAttempts' => 'Demasiados intentos de inicio de sesión. Su dirección IP está bloqueada durante %interval% segundos.',
'nw_NATInfoInstruction1' => 'Si su red está configurada para admitir NAT 1:1 (esta suele ser la regla predeterminada en las nubes), no necesita realizar ninguna configuración adicional.',
'nw_NATInfoInstruction2' => 'Si no se utiliza NAT 1:1, redirija los puertos siguientes desde la IP pública a la dirección IP interna de MikoPBX.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP y %TLS_PORT% TCP',
'nw_ExternIpHostInstruction1' => 'Si el puerto SIP del enrutador no es %SIP_PORT%, ingréselo después de la dirección IP o del host externo, separados por dos puntos.',
'nw_ExternIpHostInstruction2' => 'Si se especifica un nombre de host externo, se utilizará con preferencia a la dirección IP externa.',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO%UDP',
'upd_UpdateDockerHeader' => 'Reglas de actualización de contenedores',
'upd_UpdateDockerText' => 'Detenga el contenedor, elimínelo, descargue la última versión y comience de nuevo, conservando la configuración de montaje de almacenamiento y las variables de entorno. El proceso se describe con más detalle en la documentación.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Formatting storage partition 4 on disk' => 'Formatage de la quatrième partition pour stocker les données sur le disque',
'Save storage disk settings' => 'Enregistrement des paramètres de disque pour le stockage',
'auth_TooManyLoginAttempts' => 'Trop de tentatives de connexion. Votre adresse IP est bloquée pendant %interval% secondes.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP et %TLS_PORT% TCP',
'nw_NATInfoInstruction1' => 'Si votre réseau est configuré pour prendre en charge le NAT 1:1 (il s\'agit généralement de la règle par défaut dans les cloud), vous n\'avez pas besoin de définir de paramètres supplémentaires.',
'nw_NATInfoInstruction2' => 'Si le NAT 1:1 n\'est pas utilisé, redirigez les ports ci-dessous de l\'adresse IP publique vers l\'adresse IP interne du MikoPBX.',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO%UDP',
'nw_ExternIpHostInstruction1' => 'Si le port SIP du routeur n\'est pas %SIP_PORT%, saisissez-le après l\'adresse IP ou l\'hôte externe, séparés par deux points.',
'nw_ExternIpHostInstruction2' => 'Si un nom d\'hôte externe est spécifié, il sera utilisé de préférence à l\'adresse IP externe.',
'upd_UpdateDockerHeader' => 'Règles de mise à jour du conteneur',
'upd_UpdateDockerText' => 'Arrêtez le conteneur, supprimez-le, téléchargez la dernière version et recommencez, en préservant les paramètres de montage de stockage et les variables d\'environnement. Le processus est décrit plus en détail dans la documentation.',
];
8 changes: 8 additions & 0 deletions src/Common/Messages/it.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,4 +1270,12 @@
'Formatting storage partition 4 on disk' => 'Formattazione della quarta partizione per archiviare i dati sul disco',
'Save storage disk settings' => 'Salvataggio delle impostazioni del disco per l\'archiviazione',
'auth_TooManyLoginAttempts' => 'Troppi tentativi di accesso. Il tuo indirizzo IP è bloccato per %interval% secondi.',
'nw_NATInfoInstruction1' => 'Se la tua rete è configurata per supportare NAT 1:1 (di solito questa è la regola predefinita nei cloud), non è necessario effettuare alcuna impostazione aggiuntiva.',
'nw_NATInfoInstruction2' => 'Se non viene utilizzato NAT 1:1, reindirizzare le porte seguenti dall\'IP pubblico all\'indirizzo IP interno del MikoPBX.',
'nw_NATInfoInstruction3' => '%SIP_PORT% TCP/UDP e %TLS_PORT% TCP',
'nw_NATInfoInstruction4' => '%RTP_PORT_FROM%-%RTP_PORT_TO%UDP',
'nw_ExternIpHostInstruction1' => 'Se la porta SIP sul router non è %SIP_PORT%, inserirla dopo l\'indirizzo IP o l\'host esterno, separato da due punti.',
'nw_ExternIpHostInstruction2' => 'Se viene specificato un nome host esterno, verrà utilizzato preferibilmente rispetto all\'indirizzo IP esterno.',
'upd_UpdateDockerHeader' => 'Regole di aggiornamento del contenitore',
'upd_UpdateDockerText' => 'Arresta il contenitore, eliminalo, scarica la versione più recente e ricomincia, preservando le impostazioni di montaggio dello storage e le variabili di ambiente. Il processo è descritto più dettagliatamente nella documentazione.',
];
Loading

0 comments on commit b7a2881

Please sign in to comment.