Merge pull request #615 from martindoublem/development

[modules/smartstatus] Add module reference to widgets
This commit is contained in:
tobi-wan-kenobi 2020-05-01 15:00:06 +02:00 committed by GitHub
commit 802f6c0342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ class Module(core.module.Module):
def create_widgets(self): def create_widgets(self):
widgets = [] widgets = []
if self.display == 'combined': if self.display == 'combined':
widget = core.widget.Widget() widget = core.widget.Widget(module=self)
widget.set('device', 'combined') widget.set('device', 'combined')
widget.set('assessment', self.combined()) widget.set('assessment', self.combined())
self.output(widget) self.output(widget)
@ -42,7 +42,7 @@ class Module(core.module.Module):
for device in self.devices: for device in self.devices:
if self.display == 'singles' and device not in self.drives: if self.display == 'singles' and device not in self.drives:
continue continue
widget = core.widget.Widget() widget = core.widget.Widget(module=self)
widget.set('device', device) widget.set('device', device)
widget.set('assessment', self.smart(device)) widget.set('assessment', self.smart(device))
self.output(widget) self.output(widget)