Pub Sub Security Service Developer Guide

Repository : https://gitlab.fit.fraunhofer.de/efpf-pilots/efpf-security-components/efpf-pub-sub-security/pub-sub-frontend.git –branch resource_management

Pub Sub Security Service Developer Guide

Technology stack

The Pub Sub Security Service is implemented as an Angular web application embedded in the Pub Sub Security Service frontend. The application includes dependencies to external libraries in order to support the available functionalities. Most of them are related to the UI in order to show tooltips, tables, forms and maps among other elements. In this regard, the Google Maps support for Angular (AGM) should be emphasized, so this also requires an API key to be introduced as property in the definition of the Resource Managemnent tool module.

The tool is mainly distributed in components, services and interfaces following the default structure of an Angular application.

Components

The components represent the different sections that users can navigate in the frontend of the tool. Main components are:

  • rsc-list: lists the resources available in the repository. This component contains two children components: rsc-table and locations
  • locations: shows a map to easy locate the resources
  • rsc-register: includes a form to register new resources. This component contains one children component: rsc-location-edit
  • rsc-details: shows information of the selected resource. This component contains two children components: rsc-info and rsc-location
  • rsc-table: includes a table to visualize the resources available in the repository
  • rsc-location-edit: allows to edit the location of a resource
  • rsc-info: includes a form with information of the selected resource
  • rsc-location: shows the position of a resource
  • monitoring: shows a summary view of resources and topics, with figures and charts. comment: <> (ToDo: Add Topic Management Components)

Besides this, the following components can be found:

  • top-bar: the navigation panel that contains buttons to access the main functionalities of the tool
  • alert: to show relevant messages in the bottom of the interface when some actions are performed comment: <> (ToDo: Add Topic Management Components)

Services

The services include functionality that it is consumed by several components:

  • resources-service: contains the main operations to manage resources interacting with the repository
  • message-service: this service is used to exchange data between components
  • monitoring: this service contains the main operations to obtain resources and topics data that are needed by the monitoring component. comment: <> (ToDo: Add Topic Management Services)

Interfaces

The interfaces represent objects that are commonly used in the code:

  • resource: represent the data model of a resource object according the the Service Registry specification
  • marker: represents the markers placed in the maps of resources. comment: <> (ToDo: Add Topic Management Interfaces)

Styles

In order to ease the maintenance and deployment of the tool, all the CSS styles have been introduce in the single file ‘resourcemanagement.component.scss’ which is the main CSS file of the tool. Note: the styles for the figures and charts in the monitoring UI is introduced in the corresponding ‘monitoring.component.scss’ for ease of adjustment regarding styles specific to monitoring UI appearance. comment: <> (ToDo: Add Topic Management Styles)

Validators

A validator is used to check the correct input of coordinates for the location of resources. comment: <> (ToDo: Add Topic Management Validators)

Global properties

A single file has been used to store global properties that are consumed by the tool: ‘globals.ts’ This eases the maintenance of the application when some parameter need to be changed. The file includes URLs of server endpoints and other general purpose properties such as the list of allowed resource types.

Note: To keep consistency, monnitoring component use the common services which refer to the properties defined in globals.ts. However, for obtaining data specific to monitoring componenet, the global property such as the base url for the api endpoint is also maintained in the monitoring service file. comment: <> (ToDo: Still a single file after the merge?)

In order to make the routing navigation work in the context of the Pub Sub Security Service, the required children routes need to be added to the tools-rooting module placed in app/tools/ folder.

This way, the tool can be enriched or adapted with further functionalities to meet additional requirements.

Previous
Next