* fixed disc usage calculation

* enhanced ssl cert README
* centered view of log download button
This commit is contained in:
age 2007-02-10 00:25:01 +00:00
parent 9595580362
commit e96b33f5a2
3 changed files with 18 additions and 10 deletions

View File

@ -8,7 +8,7 @@ Below you will find detailed descriptions on how to set up an encrypted
connection to the webinterface:
- use the plugin "encrypted_webinterface"
- run the CryptoBox webserver behind an ssl-enabled webserver
- use stunnel to provide an SSL socket
- use stunnel or stunnel4 to provide an SSL socket
- use the a proxy server (e.g. pound)
- ...
@ -25,16 +25,18 @@ need encrypted http connections.
The plugin does the following during startup of the CryptoBox:
- create a self-signed X.509 certificate if necessary
- run stunnel on port 443 (https) with this certificate
- run stunnel4 from port 80 to 443 (https) with this certificate
Now you just need to point your browser to the URL of the CryptoBox with
'https' instead of 'http' and to accept the certificate permanently
(the Internet Explorer is not capable of doing this - use Firefox,
Konqueror, Safari, ... instead, if you need this ability). That's it!
Of course, this will not work, if the port 443 is already in use by
another program - in this case, you should better choose one of the
other solutions described below.
solutions described below.
Now, you need to point your browser to the URL of the CryptoBox with
'https' instead of 'http'. Or just follow the "Use encrypted
connection" link that appears, if you use plain http.
For a finer tuned certifacte follow the steps under "CryptoBox
behind stunnel".
-------------------------------------------------------------------
@ -62,7 +64,7 @@ need encrypted http connections.
3) CryptoBox behind stunnel (configured manually)
You may want to tunnel the traffic between the cryptobox-server
and your browser. "stunnel" is an excellent candidate for this job.
and your browser. "stunnel" or "stunnel4" are excellent candidates for this job.
If you do not have an ssl certificate yet, then you should create
one first. On Debian: "apt-get install ssl-cert" and run the following

View File

@ -65,11 +65,15 @@
/if ?>
</table>
<?cs call:print_form_header("download-log", "downloads/logs") ?>
<p style="text-align:center">
<button type="submit" value="refresh"><?cs
var:html_escape(Lang.Plugins.logs.Text.DownloadLogFile) ?></button>
</p>
</form>
<?cs else ?>
<p style="text-align:center">
<?cs call:hint("Plugins.logs.EmptyLog") ?>
</p>
<?cs /if ?>
</div>

View File

@ -144,8 +144,10 @@ class WebInterfaceDataset(dict):
self["Data.CurrentDisk.size"] = cbxTools.get_blockdevice_size_humanly(
container.get_device())
if is_mounted:
self.cbox.log.debug("FOO:")
(size, avail, used) = container.get_capacity()
percent = used / size
percent = int(used)*100 / int(size)
self.cbox.log.debug(percent)
self["Data.CurrentDisk.capacity.used"] = used
self["Data.CurrentDisk.capacity.free"] = avail
self["Data.CurrentDisk.capacity.size"] = size