status page added
This commit is contained in:
parent
27ed317dad
commit
c1b5e829a0
|
@ -11,6 +11,7 @@ Lang {
|
||||||
Config = Konfiguration der CryptoBox
|
Config = Konfiguration der CryptoBox
|
||||||
Log = Protokoll der CryptoBox
|
Log = Protokoll der CryptoBox
|
||||||
ShutDown = System
|
ShutDown = System
|
||||||
|
Status = Status der CryptoBox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +36,8 @@ Lang {
|
||||||
DoUmount = Deaktivierung des verschlüsselten Dateisystems
|
DoUmount = Deaktivierung des verschlüsselten Dateisystems
|
||||||
DoMount = Aktivierung des verschlüsselten Dateisystems
|
DoMount = Aktivierung des verschlüsselten Dateisystems
|
||||||
Configuration = Einstellungen
|
Configuration = Einstellungen
|
||||||
|
CryptoIsActive = Die Crypto-Daten sind verfügbar.
|
||||||
|
CryptoIsDown = Die Crypto-Daten sind vor jedem Zugriff geschützt.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,6 +52,7 @@ Lang {
|
||||||
ReBoot = neu starten
|
ReBoot = neu starten
|
||||||
Protocol = Protokoll
|
Protocol = Protokoll
|
||||||
Documentation = Handbuch
|
Documentation = Handbuch
|
||||||
|
Status = Status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ Lang {
|
||||||
Config = CryptoBox configuration
|
Config = CryptoBox configuration
|
||||||
Log = CryptoBox logfiles
|
Log = CryptoBox logfiles
|
||||||
ShutDown = System
|
ShutDown = System
|
||||||
|
Status = Status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +36,8 @@ Lang {
|
||||||
DoUmount = Deactivation of the encrypted filesystem
|
DoUmount = Deactivation of the encrypted filesystem
|
||||||
DoMount = Activation of the encrypted filesystem
|
DoMount = Activation of the encrypted filesystem
|
||||||
Configuration = Configuration
|
Configuration = Configuration
|
||||||
|
CryptoIsActive = The encrypted data is accessible.
|
||||||
|
CryptoIsDown = The encrypted data is protected from any access.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,6 +52,7 @@ Lang {
|
||||||
ReBoot = Reboot
|
ReBoot = Reboot
|
||||||
Protocol = Logfiles
|
Protocol = Logfiles
|
||||||
Documentation = Manual
|
Documentation = Manual
|
||||||
|
Status = Status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ Lang {
|
||||||
Config = CryptoBox konfiguracija
|
Config = CryptoBox konfiguracija
|
||||||
Log = CryptoBox dnevnik
|
Log = CryptoBox dnevnik
|
||||||
ShutDown = Ugasni
|
ShutDown = Ugasni
|
||||||
|
Status = Stanje
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +36,8 @@ Lang {
|
||||||
DoUmount = Deaktivacija kriptiranega datotečnega sistema
|
DoUmount = Deaktivacija kriptiranega datotečnega sistema
|
||||||
DoMount = Aktivacija kriptiranega datotečnega sistema
|
DoMount = Aktivacija kriptiranega datotečnega sistema
|
||||||
Configuration = Konfiguracija
|
Configuration = Konfiguracija
|
||||||
|
CryptoIsActive = The encrypted data is accessible.
|
||||||
|
CryptoIsDown = The encrypted data is protected from any access.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,6 +52,7 @@ Lang {
|
||||||
ReBoot = Ponovni zagon
|
ReBoot = Ponovni zagon
|
||||||
Protocol = Dnevnik
|
Protocol = Dnevnik
|
||||||
Documentation = Priročnik
|
Documentation = Priročnik
|
||||||
|
Status = Stanje
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
1
cbox-tree.d/usr/share/cryptobox/templates/empty.cs
Normal file
1
cbox-tree.d/usr/share/cryptobox/templates/empty.cs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<!-- what else would you expect here? -->
|
|
@ -1,5 +1,5 @@
|
||||||
<?cs if:Data.Redirect.URL ?>
|
<?cs if:Data.Redirect ?>
|
||||||
<p class="warning"><a href="<?cs var:Data.Redirect.URL ?>"><?cs var:Lang.Text.RedirectNote ?></a></p>
|
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?><?cs /if ?>"><?cs var:Lang.Text.RedirectNote ?></a></p>
|
||||||
<?cs /if ?>
|
<?cs /if ?>
|
||||||
|
|
||||||
</div><!-- end of 'words' -->
|
</div><!-- end of 'words' -->
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
<meta http-equiv="cache-control" content="no-cache" />
|
<meta http-equiv="cache-control" content="no-cache" />
|
||||||
<meta http-equiv="expires" content="0" />
|
<meta http-equiv="expires" content="0" />
|
||||||
<link rel="stylesheet" media="screen" href="/cryptobox.css" type="text/css" />
|
<link rel="stylesheet" media="screen" href="/cryptobox.css" type="text/css" />
|
||||||
<?cs if:Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>"><?cs /if ?>
|
<?cs if:Data.Redirect.URL ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs var:Data.Redirect.URL ?>" /><?cs
|
||||||
|
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:getSelfURL('action=' + Data.Redirect.Action, '') ?>" /><?cs /if ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
|
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
|
||||||
<?cs else ?>
|
<?cs else ?>
|
||||||
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
|
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
|
||||||
|
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
|
||||||
<?cs /if ?>
|
<?cs /if ?>
|
||||||
<?cs /if ?>
|
<?cs /if ?>
|
||||||
|
|
||||||
|
|
3
cbox-tree.d/usr/share/cryptobox/templates/status.cs
Normal file
3
cbox-tree.d/usr/share/cryptobox/templates/status.cs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<h1><?cs var:Lang.Title.Status ?></h1>
|
||||||
|
<p><?cs if:(Data.Status.Mounted == 1) ?><?cs var:Lang.Text.CryptoIsActive ?>
|
||||||
|
<?cs else ?><?cs var:Lang.Text.CryptoIsDown ?><?cs /if ?></p>
|
|
@ -311,10 +311,12 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} elsif (&check_init_running()) {
|
} elsif (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'config_form');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} elsif ( ! &check_mounted()) {
|
} elsif ( ! &check_mounted()) {
|
||||||
$pagedata->setValue('Data.Warning', 'NotMounted');
|
$pagedata->setValue('Data.Warning', 'NotMounted');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
} else {
|
} else {
|
||||||
# unmounten
|
# unmounten
|
||||||
&umount_vol();
|
&umount_vol();
|
||||||
|
@ -323,7 +325,9 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Success', 'UmountDone');
|
$pagedata->setValue('Data.Success', 'UmountDone');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
################ mount_do ########################
|
################ mount_do ########################
|
||||||
|
@ -334,10 +338,14 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} elsif (&check_init_running()) {
|
} elsif (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'config_form');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} elsif (&check_mounted()) {
|
} elsif (&check_mounted()) {
|
||||||
$pagedata->setValue('Data.Warning', 'IsMounted');
|
$pagedata->setValue('Data.Warning', 'IsMounted');
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} elsif ($query->param('crypto_password') eq '') {
|
} elsif ($query->param('crypto_password') eq '') {
|
||||||
# leeres Passwort
|
# leeres Passwort
|
||||||
$pagedata->setValue('Data.Warning', 'EmptyCryptoPassword');
|
$pagedata->setValue('Data.Warning', 'EmptyCryptoPassword');
|
||||||
|
@ -350,7 +358,9 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Success', 'MountDone');
|
$pagedata->setValue('Data.Success', 'MountDone');
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
################## mount_ask #######################
|
################## mount_ask #######################
|
||||||
|
@ -360,10 +370,14 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} elsif (&check_init_running()) {
|
} elsif (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'config_form');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} elsif (&check_mounted()) {
|
} elsif (&check_mounted()) {
|
||||||
$pagedata->setValue('Data.Warning', 'IsMounted');
|
$pagedata->setValue('Data.Warning', 'IsMounted');
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
}
|
}
|
||||||
|
@ -374,7 +388,9 @@ if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} elsif ( ! &check_mounted()) {
|
} elsif ( ! &check_mounted()) {
|
||||||
$pagedata->setValue('Data.Warning', 'NotMounted');
|
$pagedata->setValue('Data.Warning', 'NotMounted');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
}
|
}
|
||||||
|
@ -475,11 +491,9 @@ if ( ! &check_ssl()) {
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Success', 'ConfigSaved');
|
$pagedata->setValue('Data.Success', 'ConfigSaved');
|
||||||
}
|
}
|
||||||
if (&check_mounted()) {
|
$pagedata->setValue('Data.Action', 'status');
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
} else {
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#################### show_log #######################
|
#################### show_log #######################
|
||||||
|
@ -502,12 +516,28 @@ if ( ! &check_ssl()) {
|
||||||
if ($query->param('type') eq 'reboot') {
|
if ($query->param('type') eq 'reboot') {
|
||||||
&system_reboot();
|
&system_reboot();
|
||||||
$pagedata->setValue('Data.Success', 'ReBoot');
|
$pagedata->setValue('Data.Success', 'ReBoot');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "180");
|
||||||
} else {
|
} else {
|
||||||
&system_poweroff();
|
&system_poweroff();
|
||||||
$pagedata->setValue('Data.Success', 'PowerOff');
|
$pagedata->setValue('Data.Success', 'PowerOff');
|
||||||
}
|
}
|
||||||
$pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
$pagedata->setValue('Data.Action', 'doc');
|
#################### status #########################
|
||||||
|
} elsif ($action eq 'status') {
|
||||||
|
if ( ! &check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotInitialized');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif (&check_init_running()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'config_form');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "30");
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||||
|
}
|
||||||
################### unknown #########################
|
################### unknown #########################
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Error', 'UnknownAction');
|
$pagedata->setValue('Data.Error', 'UnknownAction');
|
||||||
|
@ -515,14 +545,14 @@ if ( ! &check_ssl()) {
|
||||||
###################### default ##########################
|
###################### default ##########################
|
||||||
} else {
|
} else {
|
||||||
if (&check_init_running()) {
|
if (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Doc.Page', 'CryptoBoxIntro');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
$pagedata->setValue('Data.Action', 'doc');
|
$pagedata->setValue('Data.Action', 'empty');
|
||||||
|
$pagedata->setValue('Data.Redirect.Action', 'config_form');
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||||
} elsif (&check_config()) {
|
} elsif (&check_config()) {
|
||||||
if (&check_mounted()) {
|
$pagedata->setValue('Data.Action', 'status');
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
$pagedata->setValue('Data.Redirect.Action', 'status');
|
||||||
} else {
|
$pagedata->setValue('Data.Redirect.Delay', "60");
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue