Commit 149d4a33 authored by M. Rehan Abbasi's avatar M. Rehan Abbasi
Browse files

add API console integration of new service for frontend

parent f6c12951
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -9,13 +9,21 @@ This guide contains all frontend-related aspects that need to be enhanced for in
3- [Grafana dashboard for monitoring service-related metrics](#grafana-dashboard-for-monitoring-service-related-metrics)

## Pull downs for the new service in the frontend
For adding the new service in the [MEC API dropdown](../Sandbox-User-Interface/README.md#sbox05a), the following file in the [MEC Sandbox repository](https://forge.etsi.org/rep/mec/mec-sandbox/-/tree/master) needs to be modified.
For adding the new service in the [MEC API dropdown](../Sandbox-User-Interface/README.md#sbox05a), the following file in the [MEC Sandbox repository](https://forge.etsi.org/rep/mec/mec-sandbox) needs to be modified.

- `mec-sandbox/js-apps/frontend/src/js/util/scenario-utils.js`
  - In the `parseEdgeApps()` function, add an `else if` block for the new service and assign the variables such as _path_, _url_, _dropDownName_ etc. with appropriate values<br>**NOTE:** _See the information for existing MEC services in the if-else blocks for reference._

This will show the new service in the dropdown if that service is supported by the selected network scenario upon next MEC Sandbox upgrade.

To make the service appear in the [API console](./Sandbox-User-Interface#sbox05b), make the following changes in [MEC Sandbox repository](https://forge.etsi.org/rep/mec/mec-sandbox) to the files mentioned:

- `mec-sandbox/js-apps/frontend/src/js/containers/sandbox/api-table.js`
  - In the `mapService()` function, add the new service name (`meep-<mec-identifier>`) in the `prefixes` variable.
  - In the same `mapService()` function, add a new case with value `meep-<mec-identifier>` and set value of `prefixStd` to the MEC GS specifications number.
- `mec-sandbox/js-apps/frontend/src/js/components/dialogs/detailed-data-dialog.js`
  - In the `mapService()` function, add the new service name (`meep-<mec-identifier>`) in the `prefixes` variable.
  - In the same `mapService()` function, add a new case with value `meep-<mec-identifier>` and set value of `prefixStd` to the MEC GS specifications number.

## Swagger UI integration