Update Filament and Printer models for improved data structure

- Added 'createdAt' to the sorters array in the Filament model for enhanced sorting capabilities.
- Refactored the Printer model to change 'moonraker.host' to 'host' and introduced a new 'host._id' field for better object representation and clarity.
- Updated the 'hostname' field to improve consistency in naming conventions.
This commit is contained in:
Tom Butcher 2025-08-18 01:05:18 +01:00
parent ee90e75133
commit 97d5bfcee7
2 changed files with 25 additions and 2 deletions

View File

@ -47,7 +47,15 @@ export const Filament = {
'updatedAt' 'updatedAt'
], ],
filters: ['_id', 'name', 'type', 'color', 'cost', 'vendor', 'vendor._id'], filters: ['_id', 'name', 'type', 'color', 'cost', 'vendor', 'vendor._id'],
sorters: ['name', 'createdAt', 'type', 'vendor', 'cost', 'updatedAt'], sorters: [
'name',
'createdAt',
'type',
'vendor',
'cost',
'updatedAt',
'createdAt'
],
group: ['diameter', 'type', 'vendor'], group: ['diameter', 'type', 'vendor'],
properties: [ properties: [
{ {

View File

@ -92,8 +92,23 @@ export const Printer = {
readOnly: true readOnly: true
}, },
{ {
name: 'moonraker.host', name: 'host',
label: 'Host', label: 'Host',
type: 'object',
objectType: 'host',
required: true
},
{
name: 'host._id',
label: 'Host ID',
type: 'id',
objectType: 'host',
showHyperlink: true,
readOnly: true
},
{
name: 'moonraker.host',
label: 'Hostname',
type: 'text', type: 'text',
required: true required: true
}, },