mirror of
https://github.com/unraid/api.git
synced 2026-01-08 17:49:59 -06:00
feat(plg): added multi-language support for Unraid.net page
This commit is contained in:
@@ -23,8 +23,9 @@
|
||||
<!-- check for plugin update -->
|
||||
<FILE Run="/bin/bash" Method="install remove">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
if [ -e /etc/rc.d/rc.unraid-api ]; then
|
||||
/etc/rc.d/rc.flash_backup stop
|
||||
/etc/rc.d/rc.flash_backup stop &>/dev/null
|
||||
/etc/rc.d/rc.unraid-api uninstall
|
||||
rm -f /etc/rc.d/rc.unraid-api
|
||||
rm -f /etc/rc.d/rc.flash_backup
|
||||
@@ -39,7 +40,10 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then
|
||||
rm -f /usr/local/emhttp/webGui/javascript/vue.js
|
||||
rm -f /usr/local/emhttp/webGui/javascript/vue.min.js
|
||||
rm -rf /usr/local/emhttp/webGui/wc
|
||||
find /usr/local/emhttp/languages -type f \( -iname unraidnet.txt -o -iname unraidnet.dot \) -delete
|
||||
exit 0
|
||||
fi
|
||||
]]>
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
@@ -120,10 +124,6 @@ echo json_encode($arr);
|
||||
<URL>&node-api;</URL>
|
||||
</FILE>
|
||||
<!-- env -->
|
||||
<FILE Name="/boot/config/plugins/Unraid.net/env">
|
||||
<INLINE>env="&env;"</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Run="/bin/bash" Method="install">
|
||||
<INLINE>
|
||||
if [ "&env;" = "production" ] || [ ! -f /boot/config/plugins/Unraid.net/env ]; then
|
||||
@@ -372,7 +372,239 @@ This is work in progress. Use this for testing purposes only!
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Name="/usr/local/emhttp/plugins/dynamix.unraid.net/Unraid.net.page">
|
||||
<FILE Name="/usr/local/emhttp/languages/de_DE/unraidnet.txt">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
Activate=aktivieren Sie
|
||||
Activated=Aktiviert
|
||||
Activating=Aktivieren
|
||||
Allow Remote Access=Fernzugriff zulassen
|
||||
Are you sure you want to erase all change history in both local and unraidnet remote=Sind Sie sicher, dass Sie den gesamten Änderungsverlauf sowohl auf lokaler als auch auf unraid.net-Remote löschen möchten?
|
||||
Are you sure you want pause communication with your remote flash backup on unraidnet=Sind Sie sicher, dass Sie die Kommunikation mit Ihrem Remote-Flash-Backup auf unraid.net unterbrechen möchten?
|
||||
Changes=Änderungen
|
||||
Deactivate=Deaktivieren
|
||||
Deactivating=Deaktivieren
|
||||
Disabled until you Provision an unraidnet SSL Cert and set SSL-TLS to Auto=Deaktiviert, bis Sie ein unraid.net-SSL-Zertifikat bereitstellen und SSL / TLS auf Auto setzen
|
||||
Disabled until your root user account is password-protected=Deaktiviert, bis Ihr Root-Benutzerkonto kennwortgeschützt ist
|
||||
Flash backup=Flash backup
|
||||
Loading=Wird geladen
|
||||
Not activated=Nicht aktiviert
|
||||
Not up-to-date=Nicht auf dem neuesten Stand
|
||||
Reinitialize=Neu initialisieren
|
||||
Reinitializing=Neuinitialisierung
|
||||
This Unraid Server was unreachable from the outside=Dieser Unraid Server war von außen nicht erreichbar
|
||||
Unable to register this Unraid Server=Dieser Unraid-Server kann nicht registriert werden
|
||||
Unraidnet Status=Unraid.net Status
|
||||
Updating=Aktualisierung
|
||||
WAN Port=WAN-Netzwerkanschluss
|
||||
Your server has been registered=Ihr Server wurde registriert
|
||||
Your Unraid Server is reachable from the internet=Ihr Unraid Server ist über das Internet erreichbar
|
||||
|
||||
:unraidnet_wanpanel_help:
|
||||
> Der WAN-Netzwerkport ist die externe TCP-Portnummer, die auf Ihrem Router für NAT / Port eingerichtet wurde.
|
||||
> Leiten Sie den Datenverkehr vom Internet an diesen weiter Der SSL-Netzwerkport des unRAID-Servers für sicheren Webverkehr
|
||||
:end
|
||||
|
||||
:unraidnet_inactivespanel_help:
|
||||
> Klicken Sie auf Aktivieren, um ein lokales Git-Repo für Ihr lokales USB-Flash-Startgerät einzurichten und eine Verbindung zu einer dedizierten Fernbedienung auf unraid.net herzustellen, die an diesen Server gebunden ist.
|
||||
:end
|
||||
|
||||
:unraidnet_changespanel_help:
|
||||
> Der Status "Nicht auf dem neuesten Stand" zeigt an, dass lokale Dateien im Vergleich zur Fernbedienung auf unraid.net geändert wurden.
|
||||
|
||||
> Klicken Sie auf Aktualisieren, um Änderungen auf den Remote-Server zu übertragen.
|
||||
|
||||
> Klicken Sie auf Änderungen, um zu sehen, was sich geändert hat.
|
||||
:end
|
||||
|
||||
:unraidnet_uptodatepanel_help:
|
||||
> Der Status "auf dem neusten Stand" zeigt an, dass Ihre lokale Konfiguration mit der auf der unraid.net-Fernbedienung gespeicherten übereinstimmt.
|
||||
:end
|
||||
|
||||
:unraidnet_activepanel_help:
|
||||
> Klicken Sie auf Deaktivieren, um die Kommunikation mit Ihrer Fernbedienung auf unraid.net zu unterbrechen.
|
||||
|
||||
> Klicken Sie auf Neu initialisieren, um den gesamten Änderungsverlauf sowohl auf dem lokalen als auch auf dem unraid.net-Remoteserver zu löschen.
|
||||
:end
|
||||
]]>
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Name="/usr/local/emhttp/languages/fr_FR/unraidnet.txt">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
Activate=Activer
|
||||
Activated=Activé
|
||||
Activating=Activation
|
||||
Allow Remote Access=Autoriser l'accès à distance
|
||||
Are you sure you want to erase all change history in both local and unraidnet remote=Voulez-vous vraiment effacer tout l'historique des modifications sur le serveur distant local et unraid.net?
|
||||
Are you sure you want pause communication with your remote flash backup on unraidnet=Êtes-vous sûr de vouloir interrompre la communication avec votre sauvegarde flash distante sur unraid.net?
|
||||
Changes=Changements
|
||||
Deactivate=Désactiver
|
||||
Deactivating=Désactiver
|
||||
Disabled until you Provision an unraidnet SSL Cert and set SSL-TLS to Auto=Désactivé jusqu'à ce que vous fournissiez un certificat SSL unraid.net et que vous définissiez SSL / TLS sur Auto
|
||||
Disabled until your root user account is password-protected=Désactivé jusqu'à ce que votre compte d'utilisateur root soit protégé par mot de passe
|
||||
Flash backup=Sauvegarde Flash
|
||||
Loading=Chargement
|
||||
Not activated=Non activé
|
||||
Not up-to-date=Pas à jour
|
||||
Reinitialize=Réinitialiser
|
||||
Reinitializing=Réinitialiser
|
||||
This Unraid Server was unreachable from the outside=Ce serveur Unraid était inaccessible de l'extérieur
|
||||
Unable to register this Unraid Server=Impossible d'enregistrer ce serveur Unraid
|
||||
Unraidnet Status=Unraid.net Statut
|
||||
Updating=Mise à jour
|
||||
WAN Port=Port réseau WAN
|
||||
Your server has been registered=Votre serveur a été enregistré
|
||||
Your Unraid Server is reachable from the internet=Votre serveur Unraid est accessible depuis Internet
|
||||
|
||||
:unraidnet_wanpanel_help:
|
||||
> Le port WAN est la configuration du numéro de port TCP externe sur votre routeur vers le trafic NAT / Port Forward d'Internet vers ce
|
||||
> Port SSL du serveur Unraid pour un trafic Web sécurisé.
|
||||
:end
|
||||
|
||||
:unraidnet_inactivespanel_help:
|
||||
> Cliquez sur Activer pour configurer un référentiel git local pour votre périphérique de démarrage USB Flash local et connectez-vous à une télécommande dédiée sur unraid.net liée à ce serveur.
|
||||
:end
|
||||
|
||||
:unraidnet_changespanel_help:
|
||||
> L'état "Non à jour" indique que des fichiers locaux sont modifiés par rapport au serveur distant sur le serveur unraid.net.
|
||||
|
||||
> Cliquez sur "Mettre à jour" pour envoyer les modifications au serveur distant.
|
||||
|
||||
> Cliquez sur "Modifications" pour voir ce qui a changé.
|
||||
:end
|
||||
|
||||
:unraidnet_uptodatepanel_help:
|
||||
> L'état "À jour" indique les correspondances de votre configuration locale avec celles stockées sur le serveur distant unraid.net.
|
||||
:end
|
||||
|
||||
:unraidnet_activepanel_help:
|
||||
> Cliquez sur Désactiver pour interrompre la communication avec votre télécommande sur unraid.net.
|
||||
|
||||
> Cliquez sur Réinitialiser pour effacer tout l'historique des modifications dans la télécommande locale et unraid.net
|
||||
:end
|
||||
]]>
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Name="/usr/local/emhttp/languages/es_ES/unraidnet.txt">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
Activate=Activar
|
||||
Activated=Activado
|
||||
Activating=Activando
|
||||
Allow Remote Access=Permitir acceso remoto
|
||||
Are you sure you want to erase all change history in both local and unraidnet remote=¿Está seguro de que desea borrar todo el historial de cambios en el servidor remoto local y unraid.net?
|
||||
Are you sure you want pause communication with your remote flash backup on unraidnet=¿Está seguro de que desea pausar la comunicación con su copia de seguridad flash remota en unraid.net?
|
||||
Changes=Cambios
|
||||
Deactivate=Desactivar
|
||||
Deactivating=Desactivando
|
||||
Disabled until you Provision an unraidnet SSL Cert and set SSL-TLS to Auto=Desactivado hasta que aprovisione un certificado SSL de unraid.net y configure SSL / TLS en automático
|
||||
Disabled until your root user account is password-protected=Desactivado hasta que su cuenta de usuario raíz esté protegida con contraseña
|
||||
Flash backup=Copia de seguridad flash
|
||||
Loading=Cargando
|
||||
Not activated=No activado
|
||||
Not up-to-date=No actualizado
|
||||
Reinitialize=Reinicializar
|
||||
Reinitializing=Reinicializando
|
||||
This Unraid Server was unreachable from the outside=Este servidor de Unraid era inalcanzable desde el exterior
|
||||
Unable to register this Unraid Server=No se puede registrar este servidor Unraid
|
||||
Unraidnet Status=Estado de Unraid.net
|
||||
Updating=Actualizando
|
||||
WAN Port=Puerto WAN
|
||||
Your server has been registered=Su servidor ha sido registrado
|
||||
Your Unraid Server is reachable from the internet=Su servidor Unraid es accesible desde Internet
|
||||
|
||||
:unraidnet_wanpanel_help:
|
||||
> El puerto WAN es la configuración del número de puerto TCP externo en su enrutador para el tráfico de reenvío de puerto / NAT desde Internet a este
|
||||
> Puerto SSL del servidor Unraid para un tráfico web seguro.
|
||||
:end
|
||||
|
||||
:unraidnet_inactivespanel_help:
|
||||
> Haga clic en Activar para configurar un repositorio de git local para su dispositivo de arranque flash USB local y conéctese a un control remoto dedicado en unraid.net vinculado a este servidor.
|
||||
:end
|
||||
|
||||
:unraidnet_changespanel_help:
|
||||
> El estado "No actualizado" indica que hay archivos locales que se cambiaron en comparación con la copia de seguridad remota en unraid.net.
|
||||
|
||||
> Haga clic en "Actualizar" para enviar los cambios al servidor remoto.
|
||||
|
||||
> Haga clic en "Cambios" para ver qué ha cambiado.
|
||||
:end
|
||||
|
||||
:unraidnet_uptodatepanel_help:
|
||||
> El estado "actualizado" indica que su configuración local coincide con la almacenada en el servidor remoto de unraid.net.
|
||||
:end
|
||||
|
||||
:unraidnet_activepanel_help:
|
||||
> Haga clic en "Desactivar" para pausar la comunicación con su copia de seguridad remota en unraid.net.
|
||||
|
||||
> Haga clic en "Reinicializar" para borrar todo el historial de cambios en el servidor local y remoto de Unraid.net.
|
||||
:end
|
||||
]]>
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Name="/usr/local/emhttp/languages/en_US/unraidnet.txt">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
Activate=Activate
|
||||
Activated=Activated
|
||||
Activating=Activating
|
||||
Allow Remote Access=Allow Remote Access
|
||||
Are you sure you want to erase all change history in both local and unraidnet remote=Are you sure you want to erase all change history in both local and unraid.net remote?
|
||||
Are you sure you want pause communication with your remote flash backup on unraidnet=Are you sure you want pause communication with your remote flash backup on unraid.net?
|
||||
Changes=Changes
|
||||
Deactivate=Deactivate
|
||||
Deactivating=Deactivating
|
||||
Disabled until you Provision an unraidnet SSL Cert and set SSL-TLS to Auto=Disabled until you Provision an unraid.net SSL Cert and set SSL/TLS to Auto
|
||||
Disabled until your root user account is password-protected=Disabled until your root user account is password-protected
|
||||
Flash backup=Flash backup
|
||||
Loading=Loading
|
||||
Not activated=Not activated
|
||||
Not up-to-date=Not up-to-date
|
||||
Reinitialize=Reinitialize
|
||||
Reinitializing=Reinitializing
|
||||
This Unraid Server was unreachable from the outside=This Unraid Server was unreachable from the outside
|
||||
Unable to register this Unraid Server=Unable to register this Unraid Server
|
||||
Unraidnet Status=Unraid.net Status
|
||||
Updating=Updating
|
||||
WAN Port=WAN Port
|
||||
Your server has been registered=Your server has been registered
|
||||
Your Unraid Server is reachable from the internet=Your Unraid Server is reachable from the internet
|
||||
|
||||
:unraidnet_wanpanel_help:
|
||||
> WAN Port is the external TCP port number setup on your router to NAT/Port Forward traffic from the internet to this
|
||||
> Unraid server SSL port for secure web traffic.
|
||||
:end
|
||||
|
||||
:unraidnet_inactivespanel_help:
|
||||
> Click Activate to set up a local git repo for your local USB Flash boot device and connect to a dedicated remote on unraid.net tied to this server.
|
||||
:end
|
||||
|
||||
:unraidnet_changespanel_help:
|
||||
> The Not Up-to-date status indicates there are local files which are changed vs. the remote on unraid.net.
|
||||
|
||||
> Click Update to push changes to the remote.
|
||||
|
||||
> Click Changes to see what has changed.
|
||||
:end
|
||||
|
||||
:unraidnet_uptodatepanel_help:
|
||||
> The Up-to-date status indicates your local configuration matches that stored on the unraid.net remote.
|
||||
:end
|
||||
|
||||
:unraidnet_activepanel_help:
|
||||
> Click Deactivate to pause communication with your remote on unraid.net.
|
||||
|
||||
> Click Reinitialize to erase all change history in both local and unraid.net remote.
|
||||
:end
|
||||
]]>
|
||||
</INLINE>
|
||||
</FILE>
|
||||
|
||||
<FILE Name="/usr/local/emhttp/plugins/dynamix.unraid.net/Unraidnet.page">
|
||||
<INLINE>
|
||||
<![CDATA[
|
||||
Menu="ManagementAccess:100"
|
||||
@@ -428,8 +660,7 @@ function registerServer(button) {
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
var msg = "Sorry, an error ("+status+") occurred registering this server. " +
|
||||
"The error is: "+obj.error+".";
|
||||
var msg = _("Sorry, an error occurred") + "<br>" + _("The error is") + ": " + obj.error + ".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal('Oops',msg,'error');
|
||||
};
|
||||
@@ -444,57 +675,27 @@ function registerServer(button) {
|
||||
"remote_wanport": $('#wanport').val()
|
||||
},function(data2) {
|
||||
<?if(!$isRegistered):?>
|
||||
swal({title:"",text:"Your server has been registered",type:"success",allowEscapeKey:false},function(){button.form.submit();});
|
||||
swal({title:"",text:_("Your server has been registered"),type:"success",allowEscapeKey:false},function(){button.form.submit();});
|
||||
<?else:?>
|
||||
button.form.submit();
|
||||
<?endif?>
|
||||
});
|
||||
} else {
|
||||
failure({"status": 403, "responseJSON": {"error": "Unable to register this Unraid Server"}});
|
||||
failure({"status": 403, "responseJSON": {"error": _("Unable to register this Unraid Server")}});
|
||||
}
|
||||
};
|
||||
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> "+oldlabel+"ing");
|
||||
$(button).prop("disabled", true).html(_("Applying") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("/webGui/include/UpdateDNS.php",{username:$('#ips_username').val(),password:$('#ips_password').val(),externalport:$('#wanport').val(),remoteaccess:$('#wanaccess').val()},success).fail(failure);
|
||||
}
|
||||
|
||||
function unregisterServer(button) {
|
||||
var oldlabel = $.trim($(button).text());
|
||||
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
var msg = "Sorry, an error ("+status+") occurred unregistering this server. " +
|
||||
"The error is: "+obj.error+".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal('Oops',msg,'error');
|
||||
};
|
||||
|
||||
var success = function(data) {
|
||||
$.post('/webGui/include/Dispatcher.php',{
|
||||
"#cfg": "/boot/config/plugins/dynamix/dynamix.cfg",
|
||||
"remote_apikey": "",
|
||||
"remote_wanaccess": $('#wanaccess').val(),
|
||||
"remote_wanport": $('#wanport').val()
|
||||
});
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal({title:"",text:"Your server has been unregistered",type:"success",allowEscapeKey:false},function(){button.form.submit();});
|
||||
};
|
||||
|
||||
swal({title:"Remove Registration",text:"Are you sure you want to unregister your server?",type:'warning',confirmButtonText:'Unregister',showCancelButton:true},function(){
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> "+oldlabel+"ing");
|
||||
$.post("https://keys.lime-technology.com/account/server/unregister",{keyfile:"<?=$keyfile?>"},success).fail(failure);
|
||||
});
|
||||
}
|
||||
|
||||
function dnsCheckServer(button) {
|
||||
var oldlabel = $.trim($(button).text());
|
||||
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
var msg = "Sorry, an error ("+status+") occurred checking this server. " +
|
||||
"The error is: "+obj.error+".";
|
||||
var msg = _("Sorry, an error occurred") + "<br>" + _("The error is") + ": "+obj.error+".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal('Oops',msg,'error');
|
||||
};
|
||||
@@ -502,13 +703,13 @@ function dnsCheckServer(button) {
|
||||
var success = function(data) {
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
if (data.status) {
|
||||
swal("","Your Unraid Server is reachable from the internet","success");
|
||||
swal("",_("Your Unraid Server is reachable from the internet"),"success");
|
||||
} else {
|
||||
swal("Oops","This Unraid Server was unreachable from the outside","error");
|
||||
swal("Oops",_("This Unraid Server was unreachable from the outside"),"error");
|
||||
}
|
||||
};
|
||||
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> "+oldlabel+"ing");
|
||||
$(button).prop("disabled", true).html(_("Checking") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("https://keys.lime-technology.com/account/server/checkdns",{externalport:$('#wanport').val(),keyfile:"<?=$keyfile?>"},success).fail(failure);
|
||||
}
|
||||
|
||||
@@ -526,8 +727,7 @@ function enableFlashBackup(button) {
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
var msg = "Sorry, an error ("+status+") occurred enabling Flash backup. " +
|
||||
"The error is: "+obj.error+".";
|
||||
var msg = _("Sorry, an error occurred") + "<br>" + _("The error is") + ": "+obj.error+".";
|
||||
$(button).prop("disabled", false).html(oldlabel);
|
||||
swal({title:"",text:msg,type:"error",allowEscapeKey:false},function(){button.form.submit();});
|
||||
};
|
||||
@@ -537,28 +737,28 @@ function enableFlashBackup(button) {
|
||||
button.form.submit();
|
||||
};
|
||||
|
||||
if (oldlabel == 'Activate') {
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> Activating");
|
||||
if (oldlabel == _("Activate")) {
|
||||
$(button).prop("disabled", true).html(_("Activating") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("/plugins/dynamix.unraid.net/include/UpdateFlashBackup.php",{command:"activate"},success).fail(failure);
|
||||
}
|
||||
if (oldlabel == 'Deactivate') {
|
||||
swal({title:"Deactivate",text:"Are you sure you want pause communication with your remote flash backup on unraid.net?",type:'warning',confirmButtonText:'Deactivate',showCancelButton:true},function(){
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> Deactivating");
|
||||
if (oldlabel == _("Deactivate")) {
|
||||
swal({title:_("Deactivate"),text:_("Are you sure you want pause communication with your remote flash backup on unraid.net?"),type:'warning',confirmButtonText:_("Deactivate"),showCancelButton:true},function(){
|
||||
$(button).prop("disabled", true).html(_("Deactivating") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("/plugins/dynamix.unraid.net/include/UpdateFlashBackup.php",{command:"deactivate"},success).fail(failure);
|
||||
});
|
||||
}
|
||||
if (oldlabel == 'Update') {
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> Updating");
|
||||
if (oldlabel == _("Update")) {
|
||||
$(button).prop("disabled", true).html(_("Updating") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("/plugins/dynamix.unraid.net/include/UpdateFlashBackup.php",{command:"flush"},success).fail(failure);
|
||||
}
|
||||
if (oldlabel == 'Reinitialize') {
|
||||
swal({title:"Reinitialize",text:"Are you sure you want erase all change history in both local and unraid.net remote?",type:'warning',confirmButtonText:'Reinitialize',showCancelButton:true},function(){
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> Reinitializing");
|
||||
if (oldlabel == _("Reinitialize")) {
|
||||
swal({title:_("Reinitialize"),text:_("Are you sure you want to erase all change history in both local and unraid.net remote?"),type:'warning',confirmButtonText:_("Reinitialize"),showCancelButton:true},function(){
|
||||
$(button).prop("disabled", true).html(_("Reinitializing") + " <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
|
||||
$.post("/plugins/dynamix.unraid.net/include/UpdateFlashBackup.php",{command:"reinit"},success).fail(failure);
|
||||
});
|
||||
}
|
||||
if (oldlabel == 'Changes') {
|
||||
openBox("/webGui/include/gitstatus.php", "Changes", 600,600, false);
|
||||
if (oldlabel == _("Changes")) {
|
||||
openBox("/webGui/include/gitstatus.php", _("Changes"), 600,600, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +766,7 @@ function buttonStateReset(newstate) {
|
||||
$('#loadingpanel,#inactivespanel,#activepanel,#changespanel,#uptodatepanel').hide();
|
||||
|
||||
if (newstate['loading'] && newstate['loading']!='') {
|
||||
$('#loadingtext').text(newstate['loading']);
|
||||
$('#loadingtext').html(newstate['loading'] + ' <i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');
|
||||
$('#loadingpanel').show();
|
||||
return;
|
||||
}
|
||||
@@ -587,35 +787,35 @@ $.post('/plugins/dynamix.unraid.net/include/UpdateFlashBackup.php',{command:"sta
|
||||
</script>
|
||||
|
||||
<form id="UnraidNetSettings" markdown="1" name="UnraidNetSettings" method="POST" action="/update.htm" target="progressFrame">
|
||||
Unraid.net Status:
|
||||
_(Unraid.net Status)_:
|
||||
: <unraid-authed registered="<? echo $isRegistered ?>"></unraid-authed>
|
||||
|
||||
<?if($isRegistered):?>
|
||||
Allow Remote Access:
|
||||
_(Allow Remote Access)_:
|
||||
<?if(!$hasCert):?>
|
||||
: <span><i class="fa fa-warning icon warning"></i> Disabled until you Provision an unraid.net SSL Cert and set SSL/TLS to Auto</span>
|
||||
: <span><i class="fa fa-warning icon warning"></i> _(Disabled until you Provision an unraid.net SSL Cert and set SSL-TLS to Auto)_</span>
|
||||
<input type="hidden" id="wanaccess" value="no">
|
||||
<input type="hidden" id="wanport" value="0">
|
||||
<?elseif(!$boolWebUIAuth):?>
|
||||
: <span><i class="fa fa-warning icon warning"></i> Disabled until your root user account is password-protected</span>
|
||||
: <span><i class="fa fa-warning icon warning"></i> _(Disabled until your root user account is password-protected)_</span>
|
||||
<input type="hidden" id="wanaccess" value="no">
|
||||
<input type="hidden" id="wanport" value="0">
|
||||
<?else:?>
|
||||
: <select id="wanaccess" size="1" class="narrow" onchange="changeRemoteAccess(this)">
|
||||
<?=mk_option($remote['wanaccess'], "no", "No")?>
|
||||
<?=mk_option($remote['wanaccess'], "yes", "Yes")?>
|
||||
<?=mk_option($remote['wanaccess'], "no", _("No"))?>
|
||||
<?=mk_option($remote['wanaccess'], "yes", _("Yes"))?>
|
||||
</select>
|
||||
|
||||
<div markdown="1" id="wanpanel" style="display:<?=($remote['wanaccess']=='yes'?'block':'none')?>">
|
||||
WAN Port:
|
||||
: <input type="number" id="wanport" class="trim" min="0" max="65535" value="<?=htmlspecialchars($remote['wanport'])?>"> <button type="button" onclick="dnsCheckServer(this)" style="margin-top: 0">Check</button>
|
||||
_(WAN Port)_:
|
||||
: <input type="number" id="wanport" class="trim" min="0" max="65535" value="<?=htmlspecialchars($remote['wanport'])?>"> <button type="button" onclick="dnsCheckServer(this)" style="margin-top: 0">_(Check)_</button>
|
||||
|
||||
:unraidnet_wanpanel_help:
|
||||
|
||||
> WAN Port is the external TCP port number setup on your router to NAT/Port Forward traffic from the internet to this
|
||||
> Unraid server SSL port for secure web traffic.
|
||||
</div>
|
||||
|
||||
|
||||
: <button type="button" onclick="registerServer(this)">Apply</button>
|
||||
: <button type="button" onclick="registerServer(this)">_(Apply)_</button>
|
||||
<?endif?>
|
||||
<?endif?>
|
||||
</form>
|
||||
@@ -623,53 +823,47 @@ WAN Port:
|
||||
<?if($isRegistered):?>
|
||||
<form markdown="1" name="FlashBackup" method="POST" action="/update.htm" target="progressFrame">
|
||||
<div markdown="1" id="loadingpanel">
|
||||
Flash backup:
|
||||
: <span class='blue p0'><span markdown="1" id="loadingtext">Loading</span> <i class="fa fa-spinner fa-spin" aria-hidden="true"></i></span>
|
||||
_(Flash backup)_:
|
||||
: <span class='blue p0'><span markdown="1" id="loadingtext">_(Loading)_ <i class="fa fa-spinner fa-spin" aria-hidden="true"></i></span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="inactivespanel" style="display:none">
|
||||
Flash backup:
|
||||
: <span class='orange p0'>Not activated</span>
|
||||
_(Flash backup)_:
|
||||
: <span class='orange p0'>_(Not activated)_</span>
|
||||
|
||||
|
||||
: <button type="button" onclick="enableFlashBackup(this)">Activate</button>
|
||||
: <button type="button" onclick="enableFlashBackup(this)">_(Activate)_</button>
|
||||
|
||||
> Click Activate to set up a local git repo for your local USB Flash boot device and connect to a dedicated remote on unraid.net tied tothis server.
|
||||
:unraidnet_inactivespanel_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="uptodatepanel" style="display:none">
|
||||
Flash backup:
|
||||
: <span class='green p0'>Activated:</span> <span class='green p0'>Up-to-date</span>
|
||||
_(Flash backup)_:
|
||||
: <span class='green p0'>_(Activated)_:</span> <span class='green p0'>_(up-to-date)_</span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="changespanel" style="display:none">
|
||||
Flash backup:
|
||||
: <span class='green p0'>Activated:</span> <span class='orange p0'>Not up-to-date</span>
|
||||
_(Flash backup)_:
|
||||
: <span class='green p0'>_(Activated)_:</span> <span class='orange p0'>_(Not up-to-date)_</span>
|
||||
|
||||
|
||||
: <button type="button" onclick="enableFlashBackup(this)">Update</button> <button type="button" onclick="enableFlashBackup(this)">Changes</button>
|
||||
: <button type="button" onclick="enableFlashBackup(this)">_(Update)_</button> <button type="button" onclick="enableFlashBackup(this)">_(Changes)_</button>
|
||||
|
||||
> The Not Up-to-date status indicates there are local files which are changed vs. the remote on unraid.net.
|
||||
|
||||
> Click Update to push changes to the remote.
|
||||
|
||||
> Click Changes to see what has changed.
|
||||
:unraidnet_changespanel_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="uptodatepanel" style="display:none">
|
||||
|
||||
: <button type="button" disabled>Update</button>
|
||||
: <button type="button" disabled>_(Update)_</button>
|
||||
|
||||
> The Up-to-date status indicates your local configuration matches that stored on the unraid.net remote.
|
||||
:unraidnet_activepanel_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" id="activepanel" style="display:none">
|
||||
|
||||
: <button type="button" onclick="enableFlashBackup(this)">Deactivate</button> <button type="button" onclick="enableFlashBackup(this)">Reinitialize</button>
|
||||
: <button type="button" onclick="enableFlashBackup(this)">_(Deactivate)_</button> <button type="button" onclick="enableFlashBackup(this)">_(Reinitialize)_</button>
|
||||
|
||||
> Click Deactivate to pause communication with your remote on unraid.net.
|
||||
|
||||
> Click Reinitialize to erase all change history in both local and unraid.net remote.
|
||||
:unraidnet_activepanel_help:
|
||||
|
||||
</div>
|
||||
</form>
|
||||
@@ -678,7 +872,7 @@ var flashbackupsub = new NchanSubscriber('/sub/flashbackup');
|
||||
flashbackupsub.on('message', function(data) {
|
||||
var ini = parseINI(data);
|
||||
|
||||
console.info('Flash backup state: ', ini['flashbackup']);
|
||||
//console.info('Flash backup state: ', ini['flashbackup']);
|
||||
buttonStateReset(ini['flashbackup']);
|
||||
});
|
||||
$(function() {
|
||||
|
||||
Reference in New Issue
Block a user