Improved module controls (#16372)

* Improved module controls
Ability to clear device module overrides from webui
Ability to clear all database data for a module (helpful for module you have disabled that still have data)

Database reset only works for modern modules.

* Update functions.php
This commit is contained in:
Tony Murray
2024-09-09 02:09:19 -05:00
committed by GitHub
parent ebce44543c
commit 071076149a
24 changed files with 342 additions and 131 deletions

View File

@@ -406,9 +406,9 @@ class Device extends BaseModel
$this->save();
}
public function getAttrib($name)
public function getAttrib($name, $default = null)
{
return $this->attribs->pluck('attrib_value', 'attrib_type')->get($name);
return $this->attribs->pluck('attrib_value', 'attrib_type')->get($name, $default);
}
public function setAttrib($name, $value)