GDGToulouse / devfest-embedded-devices-monorepo

The monorepo to manage embedded devices we put in each room during the DevFest Toulouse, the devices are here to assist us during the event.
MIT License
9 stars 3 forks source link

Xterm NgRx and HTTP binding #57

Open hadrien-toma opened 4 years ago

hadrien-toma commented 4 years ago

Enhancement

Metadata

key value
name xterm-ngrx-and-http-binding

Description

As a system user/owner, I want to be able to open a terminal communicating with the devices through HTTP and I want to have this communication traced in a state in order to be able to trouble shoot any issues.

As a developer I want to have a generic component that I will be able to import and configure in several routes.

Implementation ideas

Here is the route to instanciate a terminal: libs/apps/embedded-device-manager/routes/routes/terminal/route

Interfaces

export interface NgTerminalState {
    configuration: {
                // all inputs of [ng-terminal component](https://github.com/qwefgh90/ng-terminal/blob/master/projects/ng-terminal/src/lib/ng-terminal.component.ts)
    },
    api: {
        // cf  libs/apps/embedded-device-manager/routes/route/src/lib/reducers/lang-menu-list/api/get.reducer.ts
    },
    events: {
        keyEventInput: 
        historySize: number;
        list: {
        key: string;
        keyCode: number;
        }[];
        },
        keyInput: 
        historySize: number;
        list: {
        //useful params of keyInput's events
        }[];
        },
    }
}
export interface State {
    [ngTerminalId: string]: NgTerminalState;
}

NgRx flow

References