Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Tab framework consist of 3 main parts type, tab implementation, and the AppRoutes AppRoutes module. Different to the Dynamic Fields & Facets, the Tab framework doesn't depend entirely in the configuration like fields and facets, since all the logic is in the tab implementation; the Tab Framework is more focus in dynamic loading of the tabs, while making possible to make its behavior configurable.

...

Endpoint Configuration Override

...

The endpoint has a configuration in the server side in a the endpoint.js, which will be use by default, and will be use if the API is called directly. But by implementing a new configuration in the API payload, we can override the default configuration with this new one.

For this it is necessary:

  • The tab configuration most We make it that the tab configuration can have part if not the whole endpoint configuration,
  • We send it to the UI, where the property holding the config will be requested by the API service,
  • Attached to the request send to the server
  • for this the tab type must also support at least expect a property with the endpoint configuration (it is not need to describe the whole configuration)
  • The the function for the interaction with the endpoint, normally located in the API Service (ui/src/app/shared/services/api.service.ts), must assign the configuration to the payload, this way the configuration will be sent directly to the endpoint
  • The endpoint must look for this configuration in the payload and Where the endpoint will merge both configurations (endpoint.js and the one from the request), using the endpoint.js as the baseAnd the

The resulting configuration will be the one used for the rest of the configuration process

...

Simple, but useful, and since the tab configuration is updated in real time, this means the endpoint configuration can also be updated in real time