Configuring the UI

The Audit screen can be added to any Atoti UI application with version greater than or equal to 5.2.0.

Add the Audit screen to Atoti UI

To add the audit screen to an existing solution you need to add the following dependency to your package.json.

"dependencies": {
...
+   "@activeviam/bas-audit": "5.2.6",
+   "@activeviam/accelerator-settings": "5.2.6",
...
}

This dependency exports the enableAuditScreenIfNotPresent function. This function accepts the configuration from the activate function and adds the audit screen to your UI. You’ll also need to add the bas-menu-item-audit entry to your basSettings for each server key you want to enable the audit screen for.

Here’s an example of how to add this, replacing serverKey1, serverKey2, and so on, with the server keys you want to enable the audit screen for.

+ import { enableAuditScreenIfNotPresent } from "@activeviam/bas-audit";
+ import { withBASSettings } from "@activeviam/accelerator-settings";

const extension: ExtensionModule = {
  activate: async (configuration: Configuration) => {
     ...
+    configuration.higherOrderComponents.push(
+      withBASSettings({
+        $[serverKey1]: {
+          "bas-menu-item-audit": {},
+        },
+        $[serverKey2]: {
+          "bas-menu-item-audit": {},
+        },
+      }),
+    );
+    enableAuditScreenIfNotPresent(configuration);

  }
}