Skip to content

kampana/migration-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Angular Migration Dashboard

This tool is generates statistics on your current JS files, and understand how many injectables are left to migrate.

How does it work?

Basically, this monitoring service searches for JS files, looks for predefined patterns (fully customizable), and looks for AngularJS component types (directives, controllers, components, factories,...). The tool gathers the statistics from the local development git repository, polling it on regular intervals (customizable again), and then pushes the analyzes result to any data store you’d like - in my case it’s an elasticsearch.

Result example:

{
  "_source": {  
    "numberOfJsFiles": 723,
    "timestamp": "2019-03-03T07:41:11.272Z",
    "analyzeResult": {
      "injectable": [
        {
          "$scope": 433
        }
      ],
      "componentType": [
        {
          "controller": 312
        },
        {
          "factory": 115
        },
        {
          "constant": 7
        },
        {
          "directive": 212
        },
        {
          "service": 9
        }]
    }

  }
}

How to config

The /monitoring-server/src/config/config.json configuration file contains the following:

  1. git - the settings for pulling the latest branch from
  2. dataAccessLayer - the settings to push to any dataAccessLayer desired. (currently only elasticSearch was written, feel free to extend!)
  3. searchPatterns - the search patterns to look in each JS file

How to run

In /monitoring-server/ folder

npm install
npm start

Security concerns

This tool was developed for running in local environment without exposing any sensitive data to outsiders. Feel free to add any external libraries, and send any analyzes data result to external data stores, but I do not take any responsibilities for any sensitive pattern you will be tracking on.

What about monitoring dashboard?

To Be Developed. I am planning to write a user interface to view the analyzes result, so development teams can see the current state as a burn down chart, until zero JS files and zero AngularJS dependencies exist in their code base.

About

Angular Migration Dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published