stylesheet files added to 'partition' and 'log' plugin
This commit is contained in:
parent
90efd72b8b
commit
c95ba55f25
8 changed files with 28 additions and 0 deletions
6
pythonrewrite/plugins/logs/logs.css
Normal file
6
pythonrewrite/plugins/logs/logs.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
#log p.console {
|
||||
margin-left: 10%;
|
||||
margin-right: 10%;
|
||||
font-family: monospace;
|
||||
text-align: left;
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import CryptoBoxPlugin
|
||||
import os
|
||||
|
||||
class logs(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
|
@ -16,6 +17,7 @@ class logs(CryptoBoxPlugin.CryptoBoxPlugin):
|
|||
|
||||
def __prepareFormData(self):
|
||||
self.hdf[self.hdf_prefix + "Content"] = self.__getLogContent()
|
||||
self.hdf[self.hdf_prefix + "StyleSheetFile"] = os.path.abspath(os.path.join(self.pluginDir, "logs.css"))
|
||||
|
||||
|
||||
def __getLogContent(self, lines=30, maxSize=2000):
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<style type="text/css">
|
||||
<?cs include:Data.Plugins.logs.StyleSheetFile ?>
|
||||
</style>
|
||||
|
||||
<div id="log">
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.logs.Title.Log) ?></h1>
|
||||
|
|
4
pythonrewrite/plugins/partition/partition.css
Normal file
4
pythonrewrite/plugins/partition/partition.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
table.partition tr td{
|
||||
text-align: center
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ class partition(CryptoBoxPlugin.CryptoBoxPlugin):
|
|||
|
||||
|
||||
def doAction(self, **args):
|
||||
## load default hdf values
|
||||
self.__prepareDataset()
|
||||
## retrieve some values from 'args' - defaults are empty
|
||||
self.withConfigPartition = self.__isWithConfigPartition(args)
|
||||
self.device = self.__getSelectedDevice(args)
|
||||
|
@ -43,6 +45,10 @@ class partition(CryptoBoxPlugin.CryptoBoxPlugin):
|
|||
return "%s / %s / %s" % (self.device, self.deviceSize, self.withConfigPartition)
|
||||
|
||||
|
||||
def __prepareDataset(self):
|
||||
self.hdf[self.hdf_prefix + "StyleSheetFile"] = os.path.join(self.pluginDir, "partition.css")
|
||||
|
||||
|
||||
def __getSelectedDevice(self, args):
|
||||
try:
|
||||
device = args["block_device"]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<style type="text/css"><?cs include:Data.Plugins.partition.StyleSheetFile ?></style>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
|
||||
|
||||
<?cs if:subcount(Data.Plugins.partition.BlockDevices) > 0 ?>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<style type="text/css"><?cs include:Data.Plugins.partition.StyleSheetFile ?></style>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
|
||||
|
||||
<div align="center">
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<style type="text/css"><?cs include:Data.Plugins.partition.StyleSheetFile ?></style>
|
||||
|
||||
<h1><?cs var:html_escape(Lang.Plugins.partition.Title.Partition) ?></h1>
|
||||
|
||||
<p><?cs var:html_escape(Lang.Plugins.partition.Text.ProgressInfo) ?>
|
||||
|
|
Loading…
Reference in a new issue