class Exports (SectionPlugin): config_path = '/etc/exports' def init(self): self.title = _('NFS Exports') self.icon = 'hdd' self.category = _('Software') self.append(self.ui.inflate('exports:main')) if not os.path.exists(self.config_path): open(self.config_path, 'w').close() self.config = ExportsConfig(path=self.config_path) self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData() def on_page_load(self): self.config.load() self.binder.reset(self.config.tree).autodiscover().populate() @on('save', 'click') def save(self): self.binder.update() self.config.save() self.context.notify('info', _('Saved'))
class Exports(SectionPlugin): config_path = '/etc/exports' def init(self): self.title = 'NFS Exports' self.icon = 'hdd' self.category = 'System' self.append(self.ui.inflate('exports:main')) if not os.path.exists(self.config_path): open(self.config_path, 'w').close() self.config = ExportsConfig(path=self.config_path) self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData() def on_page_load(self): self.config.load() self.binder.reset(self.config.tree).autodiscover().populate() @on('save', 'click') def save(self): self.binder.update() self.config.save() self.context.notify('info', 'Saved')
def init(self): self.title = 'NFS Exports' self.icon = 'hdd' self.category = 'System' self.append(self.ui.inflate('exports:main')) self.config = ExportsConfig(path='/etc/exports') self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData()
def init(self): self.title = 'NFS Exports' self.icon = 'hdd' self.category = 'System' self.append(self.ui.inflate('exports:main')) if not os.path.exists(self.config_path): open(self.config_path, 'w').close() self.config = ExportsConfig(path=self.config_path) self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData()
class Exports (SectionPlugin): def init(self): self.title = 'NFS Exports' self.icon = 'hdd' self.category = 'System' self.append(self.ui.inflate('exports:main')) self.config = ExportsConfig(path='/etc/exports') self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData() def on_page_load(self): self.config.load() self.binder.reset(self.config.tree).autodiscover().populate() @on('save', 'click') def save(self): self.binder.update() self.config.save() self.context.notify('info', 'Saved')
def init(self): self.title = _('NFS Exports') self.icon = 'hdd' self.category = _('Software') self.append(self.ui.inflate('exports:main')) if not os.path.exists(self.config_path): open(self.config_path, 'w').close() self.config = ExportsConfig(path=self.config_path) self.binder = Binder(None, self) self.find('exports').new_item = lambda c: ExportData() self.find('clients').new_item = lambda c: ClientData()