added gray disc icon for unitialized volumes

simple partitioning interface finished
order in navigation bar changed
ignore extended partitions (in container list)
This commit is contained in:
lars 2006-09-18 10:16:05 +00:00
parent 665d18bdbd
commit 1c8db28989
16 changed files with 243 additions and 97 deletions

View file

@ -34,6 +34,10 @@ class WebInterfaceSites:
def __resetDataset(self):
"""this method has to be called at the beginning of every "site" action
important: only at the beginning of an action (to not loose information)
important: for _every_ "site" action (cherrypy is stateful)
"""
self.dataset = WebInterfaceDataset.WebInterfaceDataset(self.cbox, self.prefs)
@ -144,8 +148,6 @@ class WebInterfaceSites:
self.dataset["Data.Warning"] = "SetVolumeNameFailed"
else:
self.log.info("successfully renamed volume '%s' to '%s'" % (device, volume_name))
# reread the dataset
self.__resetDataset()
self.dataset.setCurrentDiskState(device)
else:
self.dataset["Data.Warning"] = "InvalidVolumeName"
@ -188,8 +190,6 @@ class WebInterfaceSites:
self.log.warn("failed to mount the device (%s)" % device)
else:
self.log.info("successfully mounted the container (%s)" % device)
# reread the dataset
self.__resetDataset()
self.dataset.setCurrentDiskState(device)
else:
if self.cbox.getContainerList():
@ -264,7 +264,6 @@ class WebInterfaceSites:
else:
self.log.info("successfully initialized device '%s'" % device)
# reread the dataset
self.__resetDataset()
self.dataset.setCurrentDiskState(device)
return self.__render("show_volume")
else:
@ -274,8 +273,9 @@ class WebInterfaceSites:
return self.__render("show_status")
def test(self):
def test(self, weblang=""):
self.__resetDataset()
self.__setWebLang(weblang)
return "test passed"
@ -306,7 +306,6 @@ class WebInterfaceSites:
else:
self.log.info("successfully unmounted the container (%s)" % device)
# reread the dataset
self.__resetDataset()
self.dataset.setCurrentDiskState(device)
else:
if self.cbox.getContainerList():
@ -455,6 +454,9 @@ class WebInterfaceSites:
## add the current state of the plugins to the hdf dataset
self.dataset.setPluginState(self.pluginList)
## update the container information
self.dataset.setContainersState()
hdf = neo_util.HDF()
hdf.readFile(hdf_path)
self.log.debug(self.dataset)