Skip to content

Commit

Permalink
Include OS distribution name in status submission
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinckel committed Aug 31, 2024
1 parent 3153332 commit a0be9f7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/views/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions config/models/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions framarama/base/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a0be9f7

Please sign in to comment.