Fix mistakes in docs.
[portal/nonrtric-controlpanel.git] / docs / developer-guide.rst
index 2995872..839b0e1 100644 (file)
@@ -1,59 +1,95 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. SPDX-License-Identifier: CC-BY-4.0
+.. Copyright (C) 2021 Nordix
 
 Developer Guide
 ===============
 
-This document provides a quickstart for developers of the Non-RT RIC Controlpanel.
+This document provides a quick start for developers of the Non-RT RIC Control Panel.
 
-The Non-RT RIC Controlpanel is an interface that allows human users to create, edit and delete policy instances, for
-each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC.
+The Non-RT RIC Control Panel is an interface that allows human users to create, edit and delete policy instances, for
+each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC. 
 
-See the README.md file in the nonrtric-controlpanel repo for info about how to use it.
+Additionally, producers and jobs for the Information coordinator service can be viewed.
 
-Start the Controlpanel for development
-======================================
+See the README.md file in the nonrtric-controlpanel repo for information about how to use it.
 
-To run the control panel locally for development with simulated services, follow these steps:
+Start the Control Panel for development
+---------------------------------------
 
-- Fetch the latest code from `gerrit`_
+To run the Control Panel locally for development, follow the steps below.
 
-.. _gerrit: https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric-controlpanel
 
-- Start the backend:
+First, fetch the latest code from `gerrit <https://gerrit.o-ran-sc.org/r/admin/repos/portal/nonrtric-controlpanel>`_ and
+go in to the frontend folder in the repo:
 
-    cd webapp-backend
 
-    mvn clean install
+    +----------------------------------------------------+
+    | cd nonrtric-controlpanel/webapp-frontend           |
+    +----------------------------------------------------+
 
-    mvn -Dorg.oransc.portal.nonrtric.controlpanel=mock -Dtest=ControlpanelTestServer -DfailIfNoTests=false test
+The Control Panel can be started with mock data to make it easy to develop the GUI without the need to start all services.
+Run the following command to start with mock data:
 
+  +------------------------------+
+  | npm run start:mock           |
+  +------------------------------+
 
-- Now you can open URL:  `localhost:8080`_ in a browser to access the backend directly.
+Open the URL:  `localhost:4200`_ in a browser to access the Control Panel with mock information.
 
-.. _localhost:8080: localhost:8080
+    .. _localhost:4200: http://localhost:4200
 
-Start the frontend:
+To start the frontend to get real information from Non-RT RIC services the following services need to be started first:
 
-    cd webapp-frontend
+-  ControlPanel API Gateway
+-  Policy Management Service,
+-  EI Service.
 
-    ./ng serve --proxy-config proxy.conf.json
+By pulling the `nonrtric <https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric>`__ repo and using the script
+"PM_EI_DEMO.sh" in the folder "test/autotest", the above services will be started and populated with data. It requires
+Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must
+first be created. To do this, run the following command:
 
-- Now you can open URL:  `localhost:4200`_ in a browser to access the Controlpanel.
+  +-------------------------------------------------------------------+
+  | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT .   |
+  +-------------------------------------------------------------------+
 
-.. _localhost:4200: localhost:4200
+Then run the following command to start the script with the local image:
 
-From the main page, click on the "Policy Control" card. From here, it is possible to create or list instances for each
-existing policy type.
+  +-------------------------------------------------------------------------------------------------------------------+
+  | sudo ./PM_EI_DEMO.sh remote-remove docker  --env-file ../common/test_env-oran-d-release.sh --use-local-image CP   |
+  +-------------------------------------------------------------------------------------------------------------------+
+
+When the above servers are started and populated with data, run the following command:
+
+   +---------------------+
+   | npm start           |
+   +---------------------+
+
+Open the URL:  `localhost:8080`_ in a browser to access the Control Panel with real information.
+
+    .. _localhost:8080: http://localhost:8080
+
+From the main page, click on the "Policy Control" card or use the menu on the left hand side of the page. From here, it
+is possible to create or list instances for each existing policy type.
 
 When the instances are listed, it is possible to edit or delete each instance from the expanded view.
 
-.. image:: ./images/non-RT_RIC_controlpanel.png
+.. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG
 
+From the menu on the left hand side, select "Policy -> RIC Config".
+
+.. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG
+
+
+From the main page, click on the "Enrichment information coordinator" card or use the menu on the left hand side of the page.
+From here it is possible to view producers and jobs from the Information service,
+
+.. image:: ./images/non-RT_RIC_controlpanel_EI.PNG
 
 End-to-end call
-===============
+---------------
 
 In order to make a complete end-to-end call, follow the instructions given in this `guide`_.
 
-.. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=12157166
\ No newline at end of file
+.. _guide: https://wiki.o-ran-sc.org/display/RICNR/Testing+End+to+End+call+in+Release+E