Home Reference Source

Function

Static Public Summary
public

Button(Object}: *): React.Component

Button.

public

Compose(props: Object): React.Component

Compose form.

public

Container(props: Object): React.Component

Container.

public

ContainerCard(props: Object): React.Component

Container's card for listing.

public

ContainerInfo(props: Object): React.Component

Container's basic informations.

public

ContainerLogs(props: Object): React.Component

Container's logs.

public

ContainerNetwork(props: Object): React.Component

Container's network informations.

public

ContainerVolumes(props: Object): React.Component

Container's volumes informations.

public

ContainersList(props: Object): React.Component

Container's list.

public

Login(props: Object): React.Component

Login form.

public

Main(props: Object): React.Component

Component wrapper for App.

public

Throbber(props: Object): React.Component

Throbber for displaying background task.

public

ThrobberButton(props: Object): React.Component

Throbber wrapped in a Button for displaying background task on click.

public

Toolbar(props: Object): React.Component

Toolbar for buttons and error message.

public

Saga of make an action on a container :

  • Execute action on container
  • Fetch container if non-destructive action
  • Redirect to home otherwise
public

* appSaga()

Sagas of app.

public

* composeSaga(action: Object)

Saga of creating new Docker's container from Compose file :

  • Create a new app from Compose
  • Redirect to home otherwise
public

container(state: Object, action: Object): Object

Container's reducer.

public

containers(state: Object, action: Object): Object

Containers' reducer.

public

Debounced fetch of containers.

public

error(state: Object, action: Object): Object

Error's reducer.

public

Saga of handling events' stream:

  • Fork the reading channel
  • Handle close request
public

Saga of Fetch container action :

  • Fetch container
public

Saga of Fetch containers action :

  • Fetch containers
public

* loginSaga(action: Object)

Saga of Login action :

  • Login
  • Fetch containers on succeed
  • Open events stream
  • Redirect to home
public

Saga of Logout action :

  • Logout
  • Close both streams (logs and events)
  • Redirect to login
public

logs(state: Object, action: Object): Object

Logs's reducer.

public

* logsSaga(action: Object)

Saga of handling logs' stream:

  • Fork the reading channel
  • Handle close request
public

makeActionAndTypeCreator(type: string, action: string, inputs: Array): object

Action creator : return the function and the constant for the given action

public

makeActionCreator(type: string, argNames: ...objects): func

Action creator : return a function for given action

public

makeApiActionCreator(camelCaseName: string, inputs: Array, outputs: Array): object

Action creator for an API call (request, success, fail)

public

makeOpenCloseActionCreator(camelCaseName: [type], opens: Array, closes: Array): [type]

Action creator for an WebSocket call (open, close)

public

onErrorActions(calledAction: String, error: Error): Array

Handle error on sagas.

public

onKeyDown(event: Object, callback: Function)

Handler for keyDown event on keyboard input.

public

pending(state: Object, action: Object): Object

Pendings' reducer.

public

Saga of reading events' stream :

  • Create a channel to handle every events
  • Debounced fetch containers
public

* readLogsSaga(action: Object)

Saga of reading logs' stream :

  • Create a channel to handle every log
  • Add log to state
public

setRef(that: *, name: *, component: *)

public

Transform a name into a type name : SNAKE_UPPER_CASE

Static Public

public Button(Object}: *): React.Component source

Button.

Params:

NameTypeAttributeDescription
Object} *

props Props of the component.

Return:

React.Component

Button with rendered children.

public Compose(props: Object): React.Component source

Compose form.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Compose form with inputs.

public Container(props: Object): React.Component source

Container.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Container informations.

public ContainerCard(props: Object): React.Component source

Container's card for listing.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Card with summarized details of container.

public ContainerInfo(props: Object): React.Component source

Container's basic informations.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Container's basic informations.

public ContainerLogs(props: Object): React.Component source

Container's logs.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Container's logs.

public ContainerNetwork(props: Object): React.Component source

Container's network informations.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Container's network information.

public ContainerVolumes(props: Object): React.Component source

Container's volumes informations.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Container's volumes information.

public ContainersList(props: Object): React.Component source

Container's list.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

List view of containers

public Login(props: Object): React.Component source

Login form.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Login with username/password

public Main(props: Object): React.Component source

Component wrapper for App.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Wrapper of App

public Throbber(props: Object): React.Component source

Throbber for displaying background task.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Throbber with label and title if provided

public ThrobberButton(props: Object): React.Component source

Throbber wrapped in a Button for displaying background task on click.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Button with wrapped children or Thorbber if pending.

public Toolbar(props: Object): React.Component source

Toolbar for buttons and error message.

Params:

NameTypeAttributeDescription
props Object

Props of the component.

Return:

React.Component

Toolbar with children and message if provided

public * actionContainerSaga(action: Object) source

import {actionContainerSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of make an action on a container :

  • Execute action on container
  • Fetch container if non-destructive action
  • Redirect to home otherwise

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public * appSaga() source

Sagas of app.

public * composeSaga(action: Object) source

import {composeSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of creating new Docker's container from Compose file :

  • Create a new app from Compose
  • Redirect to home otherwise

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public container(state: Object, action: Object): Object source

Container's reducer.

Params:

NameTypeAttributeDescription
state Object

Existing container's state

action Object

Action dispatched

Return:

Object

New state

public containers(state: Object, action: Object): Object source

Containers' reducer.

Params:

NameTypeAttributeDescription
state Object

Existing containers' state

action Object

Action dispatched

Return:

Object

New state

public * debounceFetchContainersSaga() source

import {debounceFetchContainersSaga} from 'docker-deploy/app/Container/sagas/index.js'

Debounced fetch of containers. Duration is based on the sleep servier-side before renaming containers.

public error(state: Object, action: Object): Object source

Error's reducer.

Params:

NameTypeAttributeDescription
state Object

Existing error's state

action Object

Action dispatched

Return:

Object

New state

public * eventsSaga() source

Saga of handling events' stream:

  • Fork the reading channel
  • Handle close request

public * fetchContainerSaga(action: Object) source

import {fetchContainerSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of Fetch container action :

  • Fetch container

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public * fetchContainersSaga() source

import {fetchContainersSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of Fetch containers action :

  • Fetch containers

public * loginSaga(action: Object) source

Saga of Login action :

  • Login
  • Fetch containers on succeed
  • Open events stream
  • Redirect to home

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public * logoutSaga() source

Saga of Logout action :

  • Logout
  • Close both streams (logs and events)
  • Redirect to login

public logs(state: Object, action: Object): Object source

Logs's reducer.

Params:

NameTypeAttributeDescription
state Object

Existing logs's state

action Object

Action dispatched

Return:

Object

New state

public * logsSaga(action: Object) source

Saga of handling logs' stream:

  • Fork the reading channel
  • Handle close request

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public makeActionAndTypeCreator(type: string, action: string, inputs: Array): object source

import {makeActionAndTypeCreator} from 'docker-deploy/app/Container/actions/index.js'

Action creator : return the function and the constant for the given action

Params:

NameTypeAttributeDescription
type string

Action type

action string

Action function name

inputs Array

Properties' names of action

Return:

object

An object containing both function and constant

public makeActionCreator(type: string, argNames: ...objects): func source

import {makeActionCreator} from 'docker-deploy/app/Container/actions/index.js'

Action creator : return a function for given action

Params:

NameTypeAttributeDescription
type string

Action type

argNames ...objects

Properties' names of action

Return:

func

Function that generate action with type and properties given the params

public makeApiActionCreator(camelCaseName: string, inputs: Array, outputs: Array): object source

import {makeApiActionCreator} from 'docker-deploy/app/Container/actions/index.js'

Action creator for an API call (request, success, fail)

Params:

NameTypeAttributeDescription
camelCaseName string

CamelCase name of action : the action function name

inputs Array

Properties' names of request action

outputs Array

Properties' names of response action

Return:

object

An object container constants and functions for requesting API

public makeOpenCloseActionCreator(camelCaseName: [type], opens: Array, closes: Array): [type] source

import {makeOpenCloseActionCreator} from 'docker-deploy/app/Container/actions/index.js'

Action creator for an WebSocket call (open, close)

Params:

NameTypeAttributeDescription
camelCaseName [type]

CamelCase name of action : the action function name

opens Array

Properties' names of open action

closes Array

Properties' names of close action

Return:

[type]

An object container constants and functions for requesting WS

public onErrorActions(calledAction: String, error: Error): Array source

import {onErrorActions} from 'docker-deploy/app/Container/sagas/index.js'

Handle error on sagas. Redirect to login if status is 401.

Params:

NameTypeAttributeDescription
calledAction String

Action to call with given error

error Error

Error summoned

Return:

Array

List of actions to put

public onKeyDown(event: Object, callback: Function) source

import onKeyDown from 'docker-deploy/app/Tools/input.js'

Handler for keyDown event on keyboard input.

Params:

NameTypeAttributeDescription
event Object

Event dispatched

callback Function

Callback called when press Enter;

public pending(state: Object, action: Object): Object source

Pendings' reducer.

Params:

NameTypeAttributeDescription
state Object

Existing pendings' state

action Object

Action dispatched

Return:

Object

New state

public * readEventsSaga() source

import {readEventsSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of reading events' stream :

  • Create a channel to handle every events
  • Debounced fetch containers

public * readLogsSaga(action: Object) source

import {readLogsSaga} from 'docker-deploy/app/Container/sagas/index.js'

Saga of reading logs' stream :

  • Create a channel to handle every log
  • Add log to state

Params:

NameTypeAttributeDescription
action Object

Action dispatched

public setRef(that: *, name: *, component: *) source

import setRef from 'docker-deploy/app/Tools/ref.js'

Params:

NameTypeAttributeDescription
that *
name *
component *

public toTypeName(name: string): string source

Transform a name into a type name : SNAKE_UPPER_CASE

Params:

NameTypeAttributeDescription
name string

A camel case action name

Return:

string

Snake upper case type name