Skip to content
Snippets Groups Projects
admin-gui.md 3.23 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Admin GUI
    
    ## What it does
    
    The Admin GUI is a web user interface dedicated to admin users.
    
    
    Alessandro Cerioni's avatar
    Alessandro Cerioni committed
    It let them administrate the database of different services such as resources (resources, formats, projections), partners, reuse...
    
    
    It also has a section that provides logs of the datasets indexation jobs. It can be usefull to track indexation errors, execution time for each task...
    
    ## Installation and usage
    
    The interface has been developed with the Angular framework, so you need to have [Node.js](https://nodejs.org/en/download/) installed on your machine in order to run the web application.
    
    Once you have Node.js installed you need to install the Angular CLI. Open a command line and run:
    
    ```
    npm install -g @angular/cli
    ```
    
    ### Configuration
    
    Open the `/src/assets/config/config.json` file and update the configuration in order to match yours.
    
    
    Alessandro Cerioni's avatar
    Alessandro Cerioni committed
    For more explainations on how the configuration system works refer to the dedicated [section](../../miscellaneous/multi-environments-docker-build-for-angular.md).
    
    
    
    
    ### Start the web application
    
    Using the Angular CLI:
    ```
    ng serve
    ```
    
    or the npm script (which use the Angular CLI)
    ```
    npm run start
    ```
    
    ### Build the application
    
    We defined in the package.json two scripts that can build the application. One that generates an optimized build and the other one an unoptimized build. The optimized build takes longer than the normal one.
    
    Those two scripts contain an option `--max_old_space_size=<nb of max RAM octets the node process can take>`. Make sure the number does not exceed your RAM capacity (you can simply remove the option, it will use the default value: 512mb on 32-bit systems and 1gb on 64-bit systems). By incrising the node process memory limit we decrease the build time.
    
    For development environment (not optimized)
    ```
    npm run build:dev
    ```
    
    For production environment (optimized)
    ```
    npm run build:prod
    ```
    
    ### Build and deploy with Docker
    
    The related files are:
    - `docker-compose.yml` which indicates what Dockerfile should be used, what image is going to be build, volumes, exposed port...
    - `Dockerfile` which describe the steps to build the docker image.
    
    Some environment variables need to be set before building or running the image. Use the appropriate command to set those variables: `SET` on Windows, `export` on Linux.
    
    ```
    export TAG=<version>
    export APP_PORT=<port the application should be running on>
    export CONFIG_FILE_PATH=<path to your config file>
    ```
    
    Then to build the image run (you can change prod to dev if you don't want an optimized build):
    ```
    docker-compose build --build-arg conf=prod admin-gui
    ```
    
    Once the image is built on your machine, run the following command to start a container:
    ```
    docker-compose --project-name admin-gui up
    ```
    
    ## Authentication
    
    
    It uses the same authentication methods as the portail data web app, so if you have an account you will be able to log in. However only a user belonging to the admin group will be able to create, modify and delete entities. The groups are managed by the api gateway, for more information refer to the [Authentication and Authorization](../../miscellaneous/authentication&authorization.md) section.
    
    
    
    ## TO DEVELOP
    
    The management of images w/ respect to the Organizations and Credits services on the one hand, the Media Library on the other.