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.
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.

PropertyRequiredEffect
jwtServerYesServer used for authentication. All requests carry a JWT obtained from it.
contentServerNoEnables the Content tab.
atotiServersNoEnables 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:

  1. Without any additional configuration, Atoti Admin UI Starter automatically loads any resources/static/atoti-admin-ui/env.js file provided by the application.
  2. (Optional) Set the atoti.admin-ui.env-js-resource property to change the location of the env.js file. It must contain the path to the folder containing the env.js file.
  3. (Optional) 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.
    @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.