Skip to main content

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. This starter creates configurable security rules for the endpoints used by Atoti Admin UI, and sets up its static file delivery.

The Atoti Admin UI starter may be used alone, but we recommend pairing it with the Atoti Server Starter.

Installation

<dependency>
<groupId>com.activeviam.springboot</groupId>
<artifactId>atoti-admin-ui-starter</artifactId>
<version>6.1.2-SNAPSHOT</version>
</dependency>

Choosing the Atoti Admin UI version

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.

Necessary components

This starter requires one special file in order to properly initialize Atoti Admin UI: an env.js file. See the Atoti Admin UI doc for more details on its content and effects.

See the Env.js section to learn how to provide it.

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. Another SecurityFilterChain will most likely need to be defined to replace it.

Configuration

Env.js

Atoti Admin UI needs to be configured through an env.js file. This starter automatically loads any resources/static/atoti-admin-ui/env.js file provided by the user, but it is possible to change that behavior if needed. There are two ways to do so:

You may set the atoti.admin-ui.env-js-resource property to set the location of the file that is to be used. It must contain the path to the folder containing the env.js file.

You may also create an AdminUiEnvJs bean, defined so that its getResource() method returns a Spring Resource containing the content of the env.js file. As any implementation of Resource may be used, this content does not necessarily come from a file.