The Atoti Admin UI Starter
Introduction
The Atoti Admin UI Starter automatically sets up an Atoti Server application to work with Atoti
Admin UI, while
still allowing custom settings to overrule default behaviors.
Admin UI application is accessible at this URL http://<application-url>:<port>/admin/ui.
How to set up Atoti Admin UI
1. Add the maven dependency
To use the starter, add the following dependency to your pom.xml.
<dependency>
<groupId>com.activeviam.springboot</groupId>
<artifactId>atoti-admin-ui-starter</artifactId>
<version>${project.version}</version>
</dependency>
This starter automatically uses a suitable Atoti Admin UI version for your Atoti Server version.
Nevertheless, the admin-ui.version maven property may be set to the desired version to override
the default.
However, only official versions 5.2+ are supported.
2. Provide the env.js file
Atoti Admin UI needs a JavaScript file named env.js during startup to locate the Content Server and the Atoti Server.
Without env.js, Atoti Admin UI cannot determine where to connect.
Content
env.js file content structure is described in Atoti UI set up documentation.
| Property | Required | Effect |
|---|---|---|
jwtServer | Yes | Server used for authentication. All requests carry a JWT obtained from it. |
contentServer | No | Enables the Content tab. |
atotiServers | No | Enables the Database, Measure lineage, Query history tabs. |
atotiServers is a key-value map: the key identifies the server, the value is a { url, version } object.
Only the first server is used by Admin UI.
Remove contentServer or atotiServers to hide the tabs you do not need.
Location
There are three ways to configure the env.js file's location:
- Without any additional configuration, Atoti Admin UI Starter automatically loads any
resources/static/atoti-admin-ui/env.jsfile provided by the application. - (Optional) Set the
atoti.admin-ui.env-js-resourceproperty to change the location of theenv.jsfile. It must contain the path to the folder containing theenv.jsfile. - (Optional) Create an
AdminUiEnvJsbean, defined so that itsgetResource()method returns a SpringResourcecontaining the content of theenv.jsfile. As any implementation ofResourcemay be used, this content does not necessarily come from a file.@Bean
public AdminUiEnvJs adminUiProperties() {
final Resource adminUiEnvJs = adminUiEnvJs();
return () -> adminUiEnvJs;
}
3. Define Security
This starter defines a security rule to control the access to Atoti Admin UI and its web resources.
Like Atoti Server Starter, it automatically uses
an HumanToMachineDsl to configure general security
rules.
Should a different behavior be needed, the atoti.server.security.adminui.enabled property can
be set
to false to disable this default rule and replace it with one of your own.