I'm building a custom historian module for 8.3. I want to have pre-filled-in values for some of the fields when creating it on the gateway config page.
I've implemented defaultSettings() but the settings do not show up on the config page for whatever reason (I want the poll rate to default to 60000).
This is what I have:
In REDACTEDExtentionPoint.java:
@Override
public Optional<REDACTEDSettings> defaultSettings() {
REDACTEDSettings.Connectivity connectivity = new REDACTEDSettings.Connectivity(null);
REDACTEDSettings.Advanced advanced = new REDACTEDSettings.Advanced(60000);
REDACTEDSettings settings = new REDACTEDSettings(connectivity, advanced);
return Optional.of(settings);
}
REDACTEDSettings.java:
public record REDACTEDSettings(Connectivity connectivity, Advanced advanced) implements HistorianSettings {
public record Connectivity(
@FormCategory("Connectivity")
@FormField(FormFieldType.REFERENCE)
@Label("Database Connection")
@Required
@Description("The database connection to use.")
@FormReferenceType("ignition/database-connection")
String databaseConnection
) {}
public record Advanced(
@FormCategory("Advanced")
@FormField(FormFieldType.NUMBER)
@Label("Poll Rate")
@Required
@Description("The rate (in milliseconds) at which the historian should query the datasource to check for updates")
int pollRate
) {}
I've also tried the @DefaultValue() annotation which didn't work either. Looking at the docs, it seems to be meant for optional parameters and applied after the user fails to specify a value, which is not what I'm looking for.
I've tried @ExampleValue("60000") as well, but that doesn't seem to fill it out either...
When stepping through with the debugger, it looks like the default settings get created correctly and are stored with the list of extension points, but the Create Historian popup doesn't use them...
Am I misunderstanding the purpose of the defaultSettings() method? If so, what should I use instead?

