GithubHelp home page GithubHelp logo

esoubiran-aneo / armonik.admin.gui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aneoconsulting/armonik.admin.gui

0.0 0.0 0.0 7.87 MB

Monitor and manage an ArmoniK cluster.

Home Page: https://aneoconsulting.github.io/ArmoniK.Admin.GUI

License: Apache License 2.0

Shell 0.09% JavaScript 2.71% TypeScript 75.93% HTML 18.10% Dockerfile 0.27% SCSS 2.91%

armonik.admin.gui's Introduction

ArmoniK GUI

ArmoniK GUI add an administration interface to the ArmoniK project.

It is a monorepo containing the client and shared libraries.

Tech Stack

Client: Angular, Clarity, gRCP

Build System: Nx

Apps

  • app: The main app of the project. It is the administration interface of ArmoniK.

Libs

The libs are divided into 4 categories:

  • feature: The feature libs are the libs that implement smart UI (with access to data sources) for specific business use cases or pages in an application.
  • ui: The UI libs are the libs that contain only presentational components (also called "dumb" components).
  • data-access: The data-access libs are the libs that contain code for interacting with a back-end system. It also includes all the code related to state management.
  • utility: The utility libs are the libs that contain low-level utilities used by many libraries and applications.

There is also a shared lib that contains code that is shared between multiple apps and libs.

  • shared: The shared libs are the libs that contain code that is shared between multiple apps and libs. It will be divided into the 4 categories above.

This structure is based on the Nx documentation. It is a good practice to have a better separation of concerns and a better maintainability. So this structure mused be respected.

Run Locally

Clone the project

  git clone --recurse-submodules https://github.com/aneoconsulting/ArmoniK.Admin.GUI

Go to the project directory

  cd ArmoniK.Admin.GUI

Install dependencies

  yarn

Generate translations

yarn translate

Then, you can edit the generated files in apps/app/src/assets/locale.

Create proxy configuration

Duplicate the file proxy.conf.json.example to proxy.conf.json and change the <protocol>://<host>:<port> value to the url of the ArmoniK backend.

This file is necessary to have access to the gRPC services and in order to be able to build the project.

Commandes available

# Start the project (App)
yarn start
# Build the project (App)
yarn build
# Run test on the project (App and libs)
yarn test
# Format the project (App and libs)
yarn format
# Check format of the project (App and libs)
yarn format:check
# Lint the project (App and libs)
yarn lint

App

Start the app

  yarn ng serve app

In order to have access to data, you must install ArmoniK and start the service.

Analyze the app

Graph

Nx provides a graph of the dependencies between the apps and libs. It's useful to understand the architecture of the project.

  yarn ng graph

In fact, this project is sliced into multiple apps and libs. This allow to have a better separation of concerns and a better maintainability. Also, we can use the power of Nx to build, test and lint only the affected files and libs thanks to caching. And, thanks this architecture, work with orthers is easier.

Bundle Analyzer

If Angular tells that the dist folder is too heavy, you can analyze the app and dependencies with the following command:

  # Install a source map explorer
  npm install -g source-map-explorer
  # Build app and generate source maps
  yarn ng build app --prod --sourceMap=true
  # Analyze source maps
  source-map-explorer dist/apps/app/main.<hash>.js

Using this, you can optimize the way the dependencies are loaded and reduce initial load.

App

Start the GUI

  yarn ng run-many --target=serve --all

Generate a new lib

  yarn ng g @nrwl/angular:library --unitTestRunner karma --standalone --directory=<directory-name> [email protected]/<directory-name>/<lib-name> <lib-name>

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Running Tests

The tests run at each automatic PR via the actions.

But, it is possible to run tests locally (only on affected files).

Format code

  yarn ng affected --target=format --parallel=3 --base=main

Check lint

  yarn ng affected --target=lint --parallel=3 --base=main

Run tests

  yarn ng affected --target=test --parallel=3 --code-coverage --base=main

Build project

  yarn ng affected --target=build --parallel=3 --base=main

Deployment

ArmoniK GUI is intended to work within the ArmoniK project. It is therefore not interesting to deploy the project independently.

With each push on main and a tag, a docker image is built and sent to the docker hub of aneo. The docker image is then used within the ArmoniK project.

Docker

To build docker images, you need to run on linux this command

./scripts/create-container.sh <app> <version>

This is useful to try current GUI in a local deployment of ArmoniK and avoid name mistake.

Authors

License

Apache 2.0

armonik.admin.gui's People

Contributors

esoubiran-aneo avatar ngruelaneo avatar fdewas-aneo avatar lemaitre-aneo avatar renovate[bot] avatar aneojgurhem avatar ddubuc avatar lzianekhodja-aneo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.