Coder Social home page Coder Social logo

web-logger-nodejs-angular's Introduction

Net Usages API (Backend) & Web Logger v0.1 (Frontend)

This project is based on net usages data API.

Installation and Setup Guide:

Node: v8.12.0 (LTS) or greater and npm v6.4.1 or greater. Angular: 7. check if these are installed on machine by running

  • node -v
  • npm -v
  • ng version

If these are not installed then run commands:

  • sudo apt install curl
  • curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
  • sudo apt install nodejs
  • npm install -g @angular/cli

If all version are as specified then

  • First go to ~/Weblog/ and run npm install
  • After successful installation of packages run npm start
  • Then go to ~/Weblog/frontend/ and run npm install
  • After successful installation of packages run ng serve --host hostname --port portnumber.
  • Then go to http://hostname:portnumber

Web Logger v0.1 (Frontend) Workflow

  • After page loaded: There are two panel
    1. Date-Time panel
    2. Status panel
  1. Status panel:

    • Status panel displays overall status of the web log.
      • e.g. Number of visits, Number of mac addresses, Start time and End time
  2. Date-time panel:

    • After setting date-time from and to field >>> Get Mac >>>>> Machine address panel ===> Select any one Mac address >>> Chart Panel
    • OR, Today/Week/Last Hour >>>>> Mac address panel ===> Select any one Mac address >>> Chart Panel

API Document (Backend)

  • /summary # returns timestamp start, end, number of rows, number of uniq mac
    • GET Method: Get overall status of net usages
    • API: http://hostname:3000/api/summary
    • Details:
      • Returns summary of weblog db's startTime, endTime, number of rows, number of uniq mac in Json, response: 200 or 304 , Content-Type: application/json; charset=utf-8
        • e.g. { "startTime": int (Number: int of Unix timestamp in second), "endTime": int (Number: int of Unix timestamp in second), "rowNum": int, "uniqueMac": int }
  • /mac?from=A&to=B # returns uniq list of mac addresses with datetime limit
    • GET Method: Get mac addresses and coresponding visit numbers in a given date-time range as parameter
    • API: http://hostname:3000/api/mac?from='1538363117'&to='1538399117'
    • Query parameter: from , to
    • Details:
      • returns a list of mac addresses within the given date-time in unix timestamp format in json.
        • e.g. [ { "mac" :"00:00:00:00:00:00", "num": 1234 }, { ... } ]
  • /ip?from=A&to=B&mac=M # retuns {mac: ip} with datetime limit
    • GET Method: Get organization name, percentage num, timestamp in a preset date-time range as and a mac address parameter
    • API: http://hostname:3000/api/ip?from='1538363117'&to='1538399117'&mac='00:00:00:00:00:00'
    • Query parameter: from , to
    • Details:
      • returns a list of organization name with a value within the given date-time in json.
        • e.g. [ { name: 'Google LLC', y: 37.16, startTime: 1538363117, endTime: 1538399117 }, { ... } ]

web-logger-nodejs-angular's People

Contributors

emon-jan avatar

Watchers

 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.