new plugins: 'format_fs', 'volume_mount', 'volume_props', 'shutdown' and 'volume_details'
new plugin attribute: "requestAuth"
This commit is contained in:
parent
0e8a5daa73
commit
ca13aebdc8
27 changed files with 920 additions and 45 deletions
21
pythonrewrite/plugins/volume_details/lang/en.hdf
Normal file
21
pythonrewrite/plugins/volume_details/lang/en.hdf
Normal file
|
@ -0,0 +1,21 @@
|
|||
Name = Technical details of a volume
|
||||
Link = Details
|
||||
Rank = 100
|
||||
|
||||
Title.Details = Technical details
|
||||
|
||||
Text {
|
||||
DeviceName = Name of device
|
||||
Status = Status
|
||||
StatusActive = active
|
||||
StatusPassive = passive
|
||||
EncryptionStatus = Encryption
|
||||
Yes = Yes
|
||||
No = No
|
||||
Size {
|
||||
All = Space of volume
|
||||
Avail = Available space of volume
|
||||
Used = Used space of volume
|
||||
}
|
||||
}
|
||||
|
19
pythonrewrite/plugins/volume_details/volume_details.cs
Normal file
19
pythonrewrite/plugins/volume_details/volume_details.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<?cs include:Settings.TemplateDir + "/show_volume_header.cs" ?>
|
||||
|
||||
<h2><?cs var:html_escape(Lang.Plugins.volume_details.Title.Details) ?></h2>
|
||||
|
||||
<p><ul>
|
||||
<li><?cs var:html_escape(Lang.Text.ContainerName) ?>: <?cs var:html_escape(Data.CurrentDisk.name) ?></li>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.DeviceName) ?>: <?cs var:html_escape(Data.CurrentDisk.device) ?></li>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.Status) ?>: <?cs if:Data.CurrentDisk.active ?><?cs var:html_escape(Lang.Plugins.volume_details.Text.StatusActive) ?><?cs else ?><?cs var:html_escape(Lang.Plugins.volume_details.Text.StatusPassive) ?><?cs /if ?></li>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.EncryptionStatus) ?>: <?cs if:Data.CurrentDisk.encryption ?><?cs var:html_escape(Lang.Plugins.volume_details.Text.Yes) ?><?cs else ?><?cs var:html_escape(Lang.Plugins.volume_details.Text.Yes) ?><?cs /if ?></li>
|
||||
<?cs if:Data.CurrentDisk.active ?>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.Size.All) ?>: <?cs var:html_escape(Data.CurrentDisk.capacity.size) ?></li>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.Size.Avail) ?>: <?cs var:html_escape(Data.CurrentDisk.capacity.free) ?></li>
|
||||
<li><?cs var:html_escape(Lang.Plugins.volume_details.Text.Size.Used) ?>: <?cs var:html_escape(Data.CurrentDisk.capacity.percent) ?>%</li>
|
||||
<?cs /if ?>
|
||||
</ul></p>
|
||||
|
||||
<?cs include:Settings.TemplateDir + "/show_volume_footer.cs" ?>
|
17
pythonrewrite/plugins/volume_details/volume_details.py
Normal file
17
pythonrewrite/plugins/volume_details/volume_details.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import CryptoBoxPlugin
|
||||
|
||||
|
||||
class volume_details(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
pluginCapabilities = [ "volume" ]
|
||||
requestAuth = False
|
||||
|
||||
|
||||
def doAction(self):
|
||||
## all variables are already set somewhere else
|
||||
return "volume_details"
|
||||
|
||||
|
||||
def getStatus(self):
|
||||
return "no status"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue