Giter VIP home page Giter VIP logo

nodejs-traffic-shadowing-tests's People

Contributors

goldbergyoni avatar sebmaz93 avatar

Stargazers

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

Watchers

 avatar  avatar

nodejs-traffic-shadowing-tests's Issues

Creating the UI view

Layout

This is a wireframe that outlines how the view should look like. All the images are located within the /images folder. Each car amount of messages starts with zero. Below the status panel there should be a button with the text 'Simulate'. Please put the following cars:

ferrari: 0,
fiat: 0,
skoda: 0,
alfaRomeo: 0,
vespa: 0,
tesla: 0,
audi: 0

image

Clicking on a car should send an update
Whenever a car is clicked, please send a POST to the server, this method already exists in the code, just call:

postEvent(carName, {
            id: 1,
            engine: {
                temperature: 90
            }
        });

Only the car 'Vespa' should send the same payload but without the property 'engine' (just id)

Updating the car events count
A websocket gets a list with all the cars and their updates count so you can update the UI. This already works in the code, just apply it to all cars count. This is how the websocket message looks like:

ferrari: 0,
    fiat: 0,
    skoda: 0,
    alfaRomeo: 0,
    vespa: 0,
    tesla: 0,
    audi: 0

The simulate button logic
This sends messages in-behalf of all cars, every 0.5 seconds send an update message from some car, just pick a car which is not Vespa and send the POST message as described in the section 'Clicking on a car should send an update'. This is the same logic, only without the need to click on the car.

After 30 seconds send a Vespa message (no engine property)

What happens in case of error
Whenever the websocket sends payload.messageType === 'error' then we should show the YouTube video within the status panel, this code already works - just position it within the status panel

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.