A frontend application, used to visualize and manipulate the backend application functionality of the monitoring tool
A running instance of the backend application is required for the frontend to function, default port of the backend is 8080.
To install and run the app do the following:
cd scripts/monitoring npm install npm run start
To view the app Navigate to http://localhost:4200/.
To run tests, run the following command:
npm run test
Get all registered workers
GET /workers
Get specific worker
GET /workers/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the worker to fetch |
Register worker for monitoring
POST /workers
Request body in JSON format:
| Body parameter | Type | Description |
|---|---|---|
name | string | Required. Name of the worker to register |
address | string | Required. Address of the worker to register |
Example:
{ "name": "Worker 1", "address": "localhost:8001" }
Edit registered worker
PUT /workers/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the worker to edit |
Request body in JSON format:
| Body parameter | Type | Description |
|---|---|---|
name | string | Changed name of the worker |
address | string | Changed address of the worker |
Example:
{ "name": "Worker 42", "address": "localhost:8005" }
Deregister specific worker
DELETE /workers/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the worker to deregister |
Get all registered coordinators
GET /coordinators
Get specific coordinator
GET /coordinators/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the coordinator to fetch |
Register coordinator for monitoring
POST /coordinators
Request body in JSON format:
| Body parameter | Type | Description |
|---|---|---|
name | string | Required. Name of the coordinator to register |
address | string | Required. Address of the coordinator to register |
Example:
{ "name": "Coordinator 1", "address": "localhost:8441" }
Edit registered coordinator
PUT /coordinators/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the coordinator to edit |
Request body in JSON format:
| Body parameter | Type | Description |
|---|---|---|
name | string | Changed name of the coordinator |
address | string | Changed address of the coordinator |
Example:
{ "name": "Coordinator 4", "address": "localhost:8445" }
Deregister specific coordinator
DELETE /coordinators/${id}
| Parameter | Type | Description |
|---|---|---|
id | int | Required. Id of the coordinator to deregister |