View Source ExTeal.Application.Configuration behaviour (ExTeal v0.27.0)
Defines a behavior for configuring the main teal application.
It relies on (and uses):
Summary
Callbacks
Returns the name of the teal application that is used in the html titles of all pages.
Define which plugin is responsible for providing attachment uploads
for rich text content. Teal does not currently provide a default for
this. If you do not need to upload attachments, you can return nil
.
Returns an array of dashboards
Returns the json configuration required for the vue app.
Returns the path to the logo that is used in the admin panel.
Define the order in which groups are shown in the sidebar. By default only the
general 'Resources' group is used, but by overriding the nav_groups/1
function in the manifest,
you can define the order of the groups.
Returns the base path that the teal app is located.
Callbacks
@callback application_name() :: String.t()
Returns the name of the teal application that is used in the html titles of all pages.
@callback asset_upload_provider() :: nil | String.t()
Define which plugin is responsible for providing attachment uploads
for rich text content. Teal does not currently provide a default for
this. If you do not need to upload attachments, you can return nil
.
Providers from plugins must implement a window.{PROVIDER_NAME}.uploadFile
that
accepts a File
and a progressCallback
callback function. The function should
return a <Promise{response: AxiosResponse}>
that resolves to the response from
uploading the file.
@callback dashboards() :: [module()]
Returns an array of dashboards
@callback json_configuration(Plug.Conn.t()) :: map()
Returns the json configuration required for the vue app.
@callback logo_image_path() :: String.t()
Returns the path to the logo that is used in the admin panel.
@callback path() :: String.t()
Returns the base path that the teal app is located.
Functions
@spec parse_json(Plug.Conn.t()) :: map()