HPE Morpheus Enterprise
1836502 Members
2150 Online
110101 Solutions
New Discussion

Re: Plugins - AbstractGlobalUIComponentProvider with configuration options

 
SOLVED
Go to solution
mphe
Occasional Advisor

Plugins - AbstractGlobalUIComponentProvider with configuration options

Is there any way to create a UI plugin which also has options available to configure? The getOptionTypes method doesn't exist in this class (as it does in AbstractGenericIntegrationProvider)

1 REPLY 1
mphe
Occasional Advisor
Solution

Re: Plugins - AbstractGlobalUIComponentProvider with configuration options

In the initialize() method for the plugin, needed to define this.settings:

this.settings = [ 
    new OptionType(
        name: 'Option 1',
        code: 'option-1',
        fieldName: 'optionOne',
        displayOrder: 0,
        fieldLabel: 'Option One',
        defaultValue: '1234',
        required: true,
        inputType: OptionType.InputType.TEXT
    ),
    new OptionType(
        name: 'Option 2',
        code: 'option-2',
        fieldName: 'optionTwo',
        displayOrder: 1,
        fieldLabel: 'Option Two',
        required: true,
        localCredential: true,,
        inputType: OptionType.InputType.PASSWORD
    )
]