diff --git a/api/views/config.py b/api/views/config.py index 8cac4db..c6ddce0 100755 --- a/api/views/config.py +++ b/api/views/config.py @@ -145,7 +145,7 @@ class Meta: 'screen_on', 'screen_width', 'screen_height', 'items_total', 'items_shown', 'items_error', 'items_updated', 'app_uptime', 'app_date', 'app_branch', 'app_hash', 'app_checked', 'app_installed', - 'os_name', 'os_version', 'container_name', 'container_version', 'python_version', 'django_version', + 'os_dist', 'os_name', 'os_version', 'container_name', 'container_version', 'python_version', 'django_version', 'links', ) read_only_fields = BaseSerializer.Meta.read_only_fields diff --git a/config/migrations/0034_displaystatus_container_name_and_more.py b/config/migrations/0034_displaystatus_container_name_and_more.py index 9127d7c..7f22891 100644 --- a/config/migrations/0034_displaystatus_container_name_and_more.py +++ b/config/migrations/0034_displaystatus_container_name_and_more.py @@ -30,6 +30,11 @@ class Migration(migrations.Migration): name='python_version', field=models.CharField(blank=True, help_text='Version of python in use', max_length=32, null=True, verbose_name='Python version'), ), + migrations.AddField( + model_name='displaystatus', + name='os_dist', + field=models.CharField(blank=True, help_text='Distribution of installed operating system', max_length=32, null=True, verbose_name='Operating system distribution'), + ), migrations.AddField( model_name='displaystatus', name='os_name', diff --git a/config/models/display.py b/config/models/display.py index 1ed3973..028706b 100755 --- a/config/models/display.py +++ b/config/models/display.py @@ -141,6 +141,9 @@ class DisplayStatus(BaseModel): app_installed = models.DateTimeField( blank=True, null=True, verbose_name='Application installation', help_text='Date of last update installation') + os_dist = models.CharField( + max_length=32, blank=True, null=True, + verbose_name='Operating system distribution', help_text='Distribution of installed operating system') os_name = models.CharField( max_length=32, blank=True, null=True, verbose_name='Operating system', help_text='Name of installed operating system') diff --git a/framarama/base/frontend.py b/framarama/base/frontend.py index f9304cb..9cf6255 100755 --- a/framarama/base/frontend.py +++ b/framarama/base/frontend.py @@ -240,6 +240,7 @@ def get_status(self, restrictions=None): _data['container'] = { 'name': _container, 'version' : _container_version } _os_info = _capability.os_info() _data['os'] = { + 'dist': _os_info.get('distibution') if _os_info else None, 'name': _os_info.get('name') if _os_info else None, 'version': _os_info.get('release') if _os_info else None }