Giter VIP home page Giter VIP logo

sap-labs-france / ev-dashboard Goto Github PK

View Code? Open in Web Editor NEW
65.0 12.0 97.0 39.7 MB

The Open e-Mobility Charging Station management front-end Angular application (check also ev-server and ev-mobile)

Home Page: https://open-e-mobility.fr/

License: Apache License 2.0

TypeScript 81.91% JavaScript 0.13% HTML 12.76% Dockerfile 0.03% Makefile 0.05% Shell 0.11% SCSS 5.01% CSS 0.01%
e-mobility charge-point-operation mobility-operation

ev-dashboard's Introduction

Open e-Mobility Angular Dashboard App

Summary

The Angular dashboard connects to the Open e-Mobility NodeJs Server to display the charging stations in real time.

The application features:

  • Charging Stations details and real-time statuses
  • Charging sessions curves in real time
  • Charging stations remote control (Reboot, Clear Cache, Stop Transaction, Unlock Connector)
  • Charging Station Template management: Zero configuration
  • User management
  • Badge management
  • Role management (ABAC)
  • Static Energy Management: Manually limit the charging station
  • Smart Charging with Assets, Fair Sharing, Peak Shaving, Cost Management and Phase Balancing
  • Realtime Asset Management (Building, Battery, Solar Panel)
  • Billing with Stripe
  • Complex Pricing
  • Roaming integration (Gire, Hubject)
  • Refunding (SAP Concur)
  • Simple Statistics + Advanced Analytics (SAP Analytics)
  • Car Connector Management (Get the car's data to optimize the charging session)

Contact the author Serge FABIANO

Installation

  • Install NodeJS: https://nodejs.org/ (install the LTS version)
  • Clone this GitHub project
  • Go into the ev-dashboard directory and run npm install or yarn install (use sudo in Linux)

NOTE:

choco install -y nodejs-lts
brew install node
  • Follow the rest of the setup below

The Dashboard

Configuration

There is one template provided: src/assets/config-template.json.

Rename it to config.json.

Move this configuration file into the src/assets directory.

Edit this file, you will set relevant config data in it.

Connect to the Central Service REST Server (CSRS)

The dashboard is served by a web server, downloaded into the browser and will call the REST Server to retrieve and display the data.

Set the REST Server URL:

  "CentralSystemServer": {
    "protocol": "http",
    "host": "localhost",
    "port": 80
  },

Create and set a Google Maps API key

Ev-dashboard requires you to setup a Google API key: https://developers.google.com/maps/documentation/javascript/get-api-key#restrict_key. Once the key is created it must be enabled (from the Google Console) and the value must replace the one present in /src/index.html, in Google Maps section:

src="https://maps.googleapis.com/maps/api/js?key=<YOUR_KEY_HERE>&libraries=places&language=en"></script>

Setup the reCaptcha API key

In order to call REST endpoints of ev-server, a reCaptcha key is required. Refers to this link https://www.google.com/recaptcha/admin/create to create one then copy the client key in config.json, in User section:

	"User": {
	  "maxPictureKb": 150,
	  "captchaSiteKey": "<GOOGLE_RECAPTCHA_KEY_CLIENT>"
	},

Start the Dashboard Server

Development Mode

npm start

Production Mode

First build the sources with:

npm run build:prod

Next, start the server with:

npm run start:prod

Secured Production Mode (SSL)

Build the sources as above and run it with:

npm run start:prod:ssl

Integration tests

To run integration tests, you first need to start the UI and run the below command:

npm run test

This will run all integraiton tests written with Jest framework.

License

This file and all other files in this repository are licensed under the Apache Software License, v.2 and copyrighted under the copyright in NOTICE file, except as noted otherwise in the LICENSE file.

Please note that Docker images can contain other software which may be licensed under different licenses. This LICENSE and NOTICE files are also included in the Docker image. For any usage of built Docker images please make sure to check the licenses of the artifacts contained in the images.

ev-dashboard's People

Contributors

alixh avatar cabch avatar ccatsapdotcom avatar clauderossi avatar dependabot[bot] avatar fonsu avatar gochax avatar guido4096 avatar jakob8 avatar jerome-benoit avatar lmargaron avatar lucasbrazi06 avatar lucasbrazi666 avatar mahdibenromdhane avatar mariansalceda avatar michalanthis avatar mocotrah avatar ninjeneer avatar olivegerste avatar rakeshvn avatar ramzay avatar rmangin-fr avatar rohanantony avatar roiko avatar sateeshk avatar sgarouachi avatar stefania-santimbrean avatar sweetsofia83 avatar vicyyn avatar willylellouch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ev-dashboard's Issues

User > Edit/Create: UX Enhancements

o Appliquer les contraintes « Pop-up »
o Mettre l’image en haut a gauche
o Badge ID is mandatory
o Générer un badge virtuel si vide (Initiales Prenom+Nom+ID) – meme algo que dans le backend
o Le nom du user doit être forcé en majuscule dans la pop-up

Sessions: Duration format

Check format with days / hours / mins in french
Remove mins if days if displayed
Put always in tooltip the full duration

Implement Variant Management in Table Filter's bar

Implement Variant Management in Logs:

If a filter is defined, show a variant section a the end of the filter bar

  • Variant is an Input field with a Save icon
  • Create a user's variant:
    -- Enter a new name
    -- Save it
  • Create cross-user variant at init time (server-side like DB indexes)
  • Change a variant
    -- Select a variant
    -- Change filter
    -- Save it
  • Load a variant
    -- Click in the input field
    -- Drop down shows available variants
    -- Select one
    -- Fill the filters
  • Delete a variant
    -- Click in the input field
    -- List is shown with delete icon
    -- Click on the delete icon
    -- Delete the variant

Pricing > Settings: Handle Information Card

o Pricing is inactive
□ Show one card with Simple + complex pricing
o Simple Pricing Active
□ Show Simple Pricing Settings + Complex Information card
o Complex Pricing Active
□ Show only Complex Pricing Settings

Table is not responsive

Table and filters are not responsive, so the component is not fully visible on small screen and mobiles devices.

1024*768:
image

IPhone X:
image

Navigation: weird behavior

When the user selects several times different menus in the side menu bar and stops clicking, some previous selections became active automatically.

OCPI > Settings: Change Registration list

Main line content:
o …
o Status
o Job Status
o Last Push Status (chip: 3 etats: Success, Warning, Error)

  • Add a detailed section with:
    o Job status (Active/Inactive)
    o Last update
    o Total Charge Point
    o Succeeded
    o Failed
    o 2 actions
    § Start or Stop the Job (with icone)
    § Push All Status

Chargers: Show/Hide Charger's actions according the Role

cf. email "ven. 08/03/2019 17:11":

Je suis Admin, je ne suis pas assigné au site et j’ai un badge.

Je dois pouvoir voir la courbe avec le bouton détail et la pop-up de transaction a droite.

Pas assigné au site + log off/on et la j’ai le détails mais je ne devrais pas avoir le bouton Start/Stop.

En gros il faut que tu fasses un tableau Role / Site / Badge et que tu testes sur tous les cas.

On peut se mettre d’accord sur le resultat attendu en fonction des 3 infos.

Implement Tenant

As discussed the whole topic below:

  • Add Super Admin (Type='S')
  • Add Namespace authorization (only SA can manage namespace)
  • Create Namespace view (List/Create/Edit/Delete) in the new dashboard
  • Use sub-domain to identify the namespace
  • Add namespace in login's token
  • Implement namespace in backend (get it from token and pass it up to the DB + prefix the collections)
  • Change URL of the charger to point to the right namespace
  • Migration / Switch to namespace
  • Doc to create a new namespace (Wiki? / Readme.md?)

Links sent via email are broken in the new Dashboard

LocaleService is not updated when language is changed.

To reproduce.

  • logon with your user
  • update your profile with another language
  • logout
  • logon
  • the language property in LocaleService is not updated
  • reload your browser
  • the language property in LocaleService is correctly updated

activation links during registration does not work

When clicking on the activation link in mail, the redirection does not work and a blank screen is loaded.
The following stack trace appears and the resulting url in the address bar is http://slf.localhost:45000/#/

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'auth/verify-email%3FVerificationToken%3D8f78e4df2bec61ba220cf8fc4050134ae6fa8407&Email%[email protected]'
Error: Cannot match any routes. URL Segment: 'auth/verify-email%3FVerificationToken%3D8f78e4df2bec61ba220cf8fc4050134ae6fa8407&Email%[email protected]'
    at ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (vendor.js:122165)
    at CatchSubscriber.selector (vendor.js:122146)
    at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchSubscriber.error (vendor.js:159142)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at TapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._error (vendor.js:163875)
    at ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (vendor.js:122165)
    at CatchSubscriber.selector (vendor.js:122146)
    at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchSubscriber.error (vendor.js:159142)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (vendor.js:155881)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (vendor.js:155861)
    at TapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._error (vendor.js:163875)
    at resolvePromise (polyfills.js:7567)
    at resolvePromise (polyfills.js:7524)
    at polyfills.js:7626
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:7174)
    at Object.onInvokeTask (vendor.js:58227)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:7173)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:6941)
    at drainMicroTaskQueue (polyfills.js:7348)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (polyfills.js:7253)
    at invokeTask (polyfills.js:8293)
defaultErrorLogger @ vendor.js:56089

Charger > Edit > Geolocation: UX Updates

o Ajouter icone 'X' pour fermer la pop-up
o Boutons Min/Max Zoom trop large (ecran large)
o Rename button 'Ok' by 'Set Coordinates'
o Ajouter du margin bottom sur la barre des boutons
o Recherche ne fonctionne pas
o Use 'drop' icone instead of charger

dev med

Server

  • Compilation
    • Do not delete 'dist' in dev mode (build:dev) ???

UI

  • Afficher temps en jours si > 24h
  • Renommer Charge@Home en Refunding

Sessions

  • All lists:

    • Remove filter User when role = Basic
    • Filtre sur toutes les listes
      • Basic/Demo: Site Area, Charging Station
      • Filter on Site Area: Add Site Name beside
  • Charge@Home

    • Rename Charge@Home tp Refunding
    • Show always the Refunding info and show explicit error
  • Faulty

    • Add transaction with big and impossible consumption >> need to specify first what is a big amount
  • Pop-up Session

    • Batterie (% start/end (+% gain))
    • Start Date at the first position beginning and only start date/time
    • Remove Connector Info and Site Info
    • Adjust the ratio of the chart (check also in the charger)
    • Mettre des tooltips sur les données sans label
    • [ ] Il y a une scrollbar qui apparait a droite => height must be a fixed value

Tenant view

  • Simple pricing
    • Bug in activating the Simple Pricing first time
    • In setting: Simple Pricing (with info on other comps like CC)

Other

  • Filtre popup: le filtre Search n’est pas reinit dans la pop-up si je l’ai déjà utilisé

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.