diff --git a/webui/src/admin/components/RoverConfigurationEditor.jsx b/webui/src/admin/components/RoverConfigurationEditor.jsx index d1be0ad8..4e7d23c2 100644 --- a/webui/src/admin/components/RoverConfigurationEditor.jsx +++ b/webui/src/admin/components/RoverConfigurationEditor.jsx @@ -1,6 +1,5 @@ import { useEffect, useState } from 'react'; -import Form from '@rjsf/core'; -import validator from '@rjsf/validator-ajv8'; +import SchemaConfigurationForm from './SchemaConfigurationForm.jsx'; function request(socket, event, payload = {}) { return new Promise((resolve, reject) => { @@ -12,57 +11,12 @@ function request(socket, event, payload = {}) { }); } -function label(key) { return key.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/^./, (c) => c.toUpperCase()); } - -function fieldUI(schema, path = []) { - const ui = { 'ui:title': path.length ? label(path.at(-1)) : '', 'ui:options': { path } }; - if (schema.type === 'string') ui['ui:emptyValue'] = ''; - for (const [key, child] of Object.entries(schema.properties || {})) ui[key] = fieldUI(child, [...path, key]); - return ui; -} - -function FieldLayout({ id, label: title, children, errors, help, description, schema, uiSchema, registry }) { - const path = uiSchema?.['ui:options']?.path || []; - const object = schema.type === 'object'; - return
Update: {record.updateStatus.state} — {record.updateStatus.message}
}{message}
{results.length > 0 &&{entry.name}: {entry.description}
)}Status: {record.mediaStatus?.[category] || (online ? 'Waiting for status' : 'Offline')}
-Save configuration changes before saving a custom profile, which restarts the rover.
}