Migrate custom reports

Migrate custom reports#

To make your nJAMS Server 5.0 Custom Reports work in nJAMS Server 5.1, you have to take care of two point:

  1. Elasticsearch query

  2. Angular Template Syntax

Elasticsearch query#

If you keep using Elasticsearch 6, the queries can stay the same. If you use Elasticsearch 7 after the update, any changes in the ES API must be taken into account.

Angular Template Syntax#

The Angular Template Syntax changed in some ways from AngularJS (used until nJAMS Server 5.0) to Angular (used since nJAMS Server 5.1). Here will be listed the most common directive changes and the way property and event binding works now.

Directive changes:

Old syntax

New syntax

ng-if=”true”

*ngIf=”true”

ng-repeat=”item in $ctrl.items”

*ngFor=”let item of items”

ng-class=”{show: true}”

*ngClass=”{show: true}”

Property binding:

Old syntax

New syntax

<div my-input=”$ctrl.inputValue”>

<div [myInput]=”inputValue”>

Event binding:

Old syntax

New syntax

<div ng-click=”$ctrl.clicked()”>

<div (click)=”clicked()”>

These are the basic and most common changes. For further information and more complexe scenarios, please consume the Angular Template syntax documentation: https://angular.io/guide/template-syntax