action removed

This commit is contained in:
age 2006-08-24 09:02:10 +00:00
parent 550d0fb5e2
commit 414a6c6e60
9 changed files with 22 additions and 21 deletions

View file

@ -11,8 +11,8 @@ class CryptoBoxWebserverSettings:
## put all found Settings values in the dictionary
for key in self.cbxPrefs["Settings"].keys():
website.settings["Settings."+key] = self.cbxPrefs["Settings"][key]
# for the logbook
self.log.info(self.cbxPrefs)
## for reading the logbook, we have to propagate it's # filename
website.settings["Settings.Details"] = self.cbxPrefs["Log"]["Details"]
#self.log.info(self.settings)

View file

@ -41,6 +41,8 @@ class CryptoBoxWebserverSites(CryptoBox.CryptoBoxProps, CryptoBoxWebserverSettin
self.__prepare("show_log")
import filehandling
self.settings["Data.Log"] = filehandling.read_file(self.settings["Settings.Details"])
#TODO: give the logs a nice format for displaying as html
# sed s/$/<\/br>/
return website.render(self)
def status(self):

View file

@ -1,7 +1,7 @@
<?cs # $Id$ ?>
<?cs if:Data.Redirect ?>
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:link('action',Data.Redirect.Action,'','','','') ?><?cs /if ?>"><?cs var:html_escape(Lang.Text.RedirectNote) ?></a></p>
<p class="warning"><a href="<?cs if:Data.Redirect.URL ?><?cs var:Data.Redirect.URL ?><?cs else ?><?cs call:link(Data.Redirect.Action,'','','','') ?><?cs /if ?>"><?cs var:html_escape(Lang.Text.RedirectNote) ?></a></p>
<?cs /if ?>
</div><!-- end of 'words' -->

View file

@ -5,24 +5,23 @@
<p><ul>
<?cs # poweroff ?>
<li><a href="<?cs call:link('action','shutdown_do','type','poweroff','','') ?>" title="<?cs
var:html_escape(Lang.Button.PowerOff) ?>"><?cs var:html_escape(Lang.Button.PowerOff) ?></a></li>
<li><a href="<?cs call:link('reboot','','','','') ?>" title="<?cs var:html_escape(Lang.Button.PowerOff) ?>">
<?cs var:html_escape(Lang.Button.PowerOff) ?></a></li>
<?cs # reboot ?>
<li><a href="<?cs call:link('action','shutdown_do','type','reboot','','') ?>" title="<?cs
<li><a href="<?cs call:link('shutdown_do','type','reboot','','') ?>" title="<?cs
var:html_escape(Lang.Button.ReBoot) ?>"><?cs var:html_escape(Lang.Button.ReBoot) ?></a></li>
<?cs # config ?>
<li><a href="<?cs call:link('action','config_ask','','','','') ?>" title="<?cs
<li><a href="<?cs call:link('config_ask','','','','') ?>" title="<?cs
var:html_escape(Lang.Button.Config) ?>"><?cs var:html_escape(Lang.Button.Config) ?></a></li>
<?cs # initialize ?>
<li><a href="<?cs call:link('action','init_ask','','','','') ?>" title="<?cs
<li><a href="<?cs call:link('init_ask','','','','') ?>" title="<?cs
var:html_escape(Lang.Button.DoInit) ?>"><?cs var:html_escape(Lang.Button.DoInit) ?></a></li>
<?cs # show log files ?>
<li><a href="<?cs call:link('action','show_log','','','','') ?>" title="<?cs
var:html_escape(Lang.Button.Protocol) ?>"><?cs var:html_escape(Lang.Button.Protocol) ?></a></li>
<li><a href="/logs" title="<?cs var:html_escape(Lang.Button.Protocol) ?>"><?cs var:html_escape(Lang.Button.Protocol) ?></a></li>
</ul></p>

View file

@ -12,7 +12,7 @@
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" media="screen" href="<?cs var:Settings.Stylesheet ?>" 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
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:link('action',Data.Redirect.Action,'','','','') ?>" /><?cs /if ?>
elif:Data.Redirect.Action ?><meta http-equiv="refresh" content="<?cs var:Data.Redirect.Delay ?>;url=<?cs call:link(Data.Redirect.Action,'','','','') ?>" /><?cs /if ?>
</head>
<body>
@ -24,7 +24,7 @@
<div id="lang">
<?cs each:item = Data.Languages ?>
<a href="<?cs call:link('weblang',name(item),'','','','') ?><?cs
<a href="<?cs call:link('weblang',name(item),'','','') ?><?cs
if:Data.QueryString ?>&<?cs var:Data.QueryString ?><?cs /if ?>"><?cs
var:item ?></a><br/>
<?cs /each ?>

View file

@ -77,6 +77,6 @@ def:link(path, attr1, value1, attr2, value2)
def:print_form_header() ?><?cs #
# the header of a form - including Setting.LinkAttrs
?><form action="<?cs call:link("","","","","","") ?>" method="post" enctype="application/x-www-from-urlencoded" accept-charset="utf-8"><?cs
?><form action="<?cs call:link("","","","","") ?>" method="post" enctype="application/x-www-from-urlencoded" accept-charset="utf-8"><?cs
/def ?>

View file

@ -5,21 +5,21 @@
<!-- TODO: remove the following lines, as soon as we completely switched to the volume-based user interface
<?cs if:subcount(Data.Disks.passive) > 0 ?>
<a href="<?cs call:link('action','mount_ask','','','','') ?>" title="<?cs var:html_escape(Lang.Text.DoMount) ?>"><?cs var:html_escape(Lang.Button.Mount) ?></a><?cs /if ?>
<a href="<?cs call:link('mount_ask','','','','') ?>" title="<?cs var:html_escape(Lang.Text.DoMount) ?>"><?cs var:html_escape(Lang.Button.Mount) ?></a><?cs /if ?>
<?cs if:subcount(Data.Disks.active) > 0 ?>
<a href="<?cs call:link('action','umount_ask','','','','') ?>" title="<?cs var:html_escape(Lang.Text.DoUmount) ?>"><?cs var:html_escape(Lang.Button.Umount) ?></a><?cs /if ?>
<a href="<?cs call:link('umount_ask','','','','') ?>" title="<?cs var:html_escape(Lang.Text.DoUmount) ?>"><?cs var:html_escape(Lang.Button.Umount) ?></a><?cs /if ?>
-->
<a href="<?cs if:subcount(Data.Disks.available) > 1
?><?cs call:link('action','show_status','','','','')
?><?cs call:link('show_status','','','','')
?><?cs else
?><?cs call:link('action','show_volume','device',Data.Disks.available.0.device,'','')
?><?cs call:link('show_volume','device',Data.Disks.available.0.device,'','')
?><?cs /if
?>" title="<?cs var:html_escape(Lang.Button.Status) ?>"><?cs var:html_escape(Lang.Button.Status) ?></a>
<?cs /if ?>
<?cs # manual ?>
<!-- <a href="<?cs call:link('action','doc','','','','') ?>" title="<?cs var:html_escape(Lang.Button.Documentation) ?>"><?cs var:html_escape(Lang.Button.Documentation) ?></a>-->
<!-- <a href="<?cs call:link('doc','','','','') ?>" title="<?cs var:html_escape(Lang.Button.Documentation) ?>"><?cs var:html_escape(Lang.Button.Documentation) ?></a>-->
<a href="/status" title="<?cs var:html_escape(Lang.Button.Status) ?>"><?cs var:html_escape(Lang.Button.Status) ?></a>
<a href="/doc" title="<?cs var:html_escape(Lang.Button.Documentation) ?>"><?cs var:html_escape(Lang.Button.Documentation) ?></a>

View file

@ -17,12 +17,12 @@
<?cs if:subcount(Data.Disks.active) > 0 ?>
<p><?cs var:html_escape(Lang.Text.ActivePartitions) ?>:
<ul><?cs each:partition = Data.Disks.active ?>
<li><a href="<?cs call:link('action','show_volume','device',partition.device,'','')
<li><a href="<?cs call:link('show_volume','device',partition.device,'','')
?>"><?cs var:partition.name ?></a></li><?cs /each ?></ul><?cs /if ?>
<?cs if:subcount(Data.Disks.passive) > 0 ?>
<p><?cs var:html_escape(Lang.Text.PassivePartitions) ?>:
<ul><?cs each:partition = Data.Disks.passive ?>
<li><a href="<?cs call:link('action','show_volume','device',partition.device,'','')
<li><a href="<?cs call:link('show_volume','device',partition.device,'','')
?>"><?cs var:partition.name ?></a></li><?cs /each ?></ul><?cs /if ?>
<?cs /if ?>

View file

@ -2,7 +2,7 @@
<?cs each:volume = Data.Disks.available ?>
<a href="<?cs call:link('action','show_volume','device',volume.device,'','') ?>" title="<?cs
<a href="<?cs call:link('show_volume','device',volume.device,'','') ?>" title="<?cs
var:volume.name ?>">
<?cs # the "div" is the container for the background image ?>
<div class="<?cs if:volume.isActive ?>active<?cs else ?>passive<?cs /if ?><?cs