Home Reference Source Repository

Function

Static Public Summary
public

auth_failure(message: string): {type: string, message: *}

Create an action stating that the authentication failed

public

auth_failure_reducer(state: *, action: *): *

public

auth_started(username: *, password: *): *

public

auth_started_reducer(state: Object, action: Object): *

Process the asynchronous action indicating that authentication has started.

public

auth_success(token: str, expiration_date: str): *

Action creator for the "AUTH_SUCCESS" action.

public

auth_success_reducer(state: *, action: *): *

Clean up the authenticator, create and add an authorization header to the omicron_api headers,

public

Dispatch a thunk to authenticate the user given a username and password

public

cloneObject(obj: *): *

Created by Michal on 2016-02-11.

public

Thunk action to fetch the data from the URL.

public

get_data_from_url(url: *): *

public

get_data_from_url_reducer(state: *, action: *): *

public

logout(): *

public

map_dispatch_to_props(dispatch: *): *

public

Takes the current application state, and returns an object containing the buttons to render in the menu bar

public
public

map_state_to_props(state: Object): {http_test_result: initial_state.http_test.reactjs.data|{}, url_value: *}

Takes in the current application state, and returns an object with the required properties to render the HTTP Request form.

public

password_change_reducer(state: *, action: *): *

public

receive_data_from_url(url: *, received_json: *): *

public

receive_data_from_url_reducer(state: *, action: *): *

public

run_test(): {type: string}

Create the test action

public

run_test_reducer(state: Object, action: Object): Object

Toggle the fetching flag to "true"

public

submit_reducer(state: *, action: *): *

public

url_changed(new_url: *): {type: string, new_url: *}

Action creator for the URL_CHANGED action

public

If the action is of the "URL_CHANGED" type, copies the current application state, alters the url to be the new url, and returns the new state

public

username_change_reducer(state: *, action: *): *

Static Public

public auth_failure(message: string): {type: string, message: *} source

import {auth_failure} from 'omicron-client/src/auth/actions.js'

Create an action stating that the authentication failed

Params:

NameTypeAttributeDescription
message string

The message to send to the

Return:

{type: string, message: *}

public auth_failure_reducer(state: *, action: *): * source

import {auth_failure_reducer} from 'omicron-client/src/auth/actions.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public auth_started(username: *, password: *): * source

import {auth_started} from 'omicron-client/src/auth/actions.js'

Params:

NameTypeAttributeDescription
username *
password *

Return:

*

public auth_started_reducer(state: Object, action: Object): * source

import {auth_started_reducer} from 'omicron-client/src/auth/actions.js'

Process the asynchronous action indicating that authentication has started. This action fills in the required parameters for the authenticator to run the HTTP request for authentication, being the username and password supplied for the authenticator attempt.

Params:

NameTypeAttributeDescription
state Object

The current state of the application

action Object

The action to execute on the state

Return:

*

The new state

public auth_success(token: str, expiration_date: str): * source

import {auth_success} from 'omicron-client/src/auth/actions.js'

Action creator for the "AUTH_SUCCESS" action. Takes in the token and expiration date

Params:

NameTypeAttributeDescription
token str

The token supplied on authentication

expiration_date str

The datetime of expiration of the current token

Return:

*

public auth_success_reducer(state: *, action: *): * source

import {auth_success_reducer} from 'omicron-client/src/auth/actions.js'

Clean up the authenticator, create and add an authorization header to the omicron_api headers,

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public authenticate_user(): function source

import {authenticate_user} from 'omicron-client/src/containers/login_form.js'

Dispatch a thunk to authenticate the user given a username and password

Return:

function

A callback taking in the action dispatcher as a callback. This callback is evaluated by ReduxThunkMiddleware asynchronously.

public cloneObject(obj: *): * source

import cloneObject from 'omicron-client/src/object_cloning.js'

Created by Michal on 2016-02-11.

Params:

NameTypeAttributeDescription
obj *

Return:

*

public fetch_data(): Function source

Thunk action to fetch the data from the URL. This is used just like any other action creator.

Return:

Function

public get_data_from_url(url: *): * source

import {get_data_from_url} from 'omicron-client/src/containers/http_request.js'

Params:

NameTypeAttributeDescription
url *

Return:

*

public get_data_from_url_reducer(state: *, action: *): * source

import {get_data_from_url_reducer} from 'omicron-client/src/containers/http_request.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public logout(): * source

Return:

*

public map_dispatch_to_props(dispatch: *): * source

import {map_dispatch_to_props} from 'omicron-client/src/containers/header.js'

Params:

NameTypeAttributeDescription
dispatch *

Return:

*

public map_header_state_to_props(state: Object): {buttons: string} source

import {map_header_state_to_props} from 'omicron-client/src/containers/header.js'

Takes the current application state, and returns an object containing the buttons to render in the menu bar

Params:

NameTypeAttributeDescription
state Object

The current application state

Return:

{buttons: string}

the buttons to render

public map_logout_state_to_props(state: *): * source

import {map_logout_state_to_props} from 'omicron-client/src/components/login_form.js'

Params:

NameTypeAttributeDescription
state *

Return:

*

public map_state_to_props(state: Object): {http_test_result: initial_state.http_test.reactjs.data|{}, url_value: *} source

import {map_state_to_props} from 'omicron-client/src/containers/http_request.js'

Takes in the current application state, and returns an object with the required properties to render the HTTP Request form. Used in the connect decorator to link up the application's state with the template props.

Params:

NameTypeAttributeDescription
state Object

The current application state.

Return:

{http_test_result: initial_state.http_test.reactjs.data|{}, url_value: *}

public password_change_reducer(state: *, action: *): * source

import {password_change_reducer} from 'omicron-client/src/containers/login_form.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public receive_data_from_url(url: *, received_json: *): * source

import {receive_data_from_url} from 'omicron-client/src/containers/http_request.js'

Params:

NameTypeAttributeDescription
url *
received_json *

Return:

*

public receive_data_from_url_reducer(state: *, action: *): * source

import {receive_data_from_url_reducer} from 'omicron-client/src/containers/http_request.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public run_test(): {type: string} source

Create the test action

Return:

{type: string}

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

import {run_test_reducer} from 'omicron-client/src/containers/http_request.js'

Toggle the fetching flag to "true"

Params:

NameTypeAttributeDescription
state Object

The initial application state

action Object

The action that is to change the state

Return:

Object

The new application state

public submit_reducer(state: *, action: *): * source

import {submit_reducer} from 'omicron-client/src/containers/login_form.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public url_changed(new_url: *): {type: string, new_url: *} source

Action creator for the URL_CHANGED action

Params:

NameTypeAttributeDescription
new_url *

Return:

{type: string, new_url: *}

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

import {url_changed_reducer} from 'omicron-client/src/containers/http_request.js'

If the action is of the "URL_CHANGED" type, copies the current application state, alters the url to be the new url, and returns the new state

Params:

NameTypeAttributeDescription
state Object

The initial application state

action Object

The action that is to change the state

Return:

Object

The new application state

public username_change_reducer(state: *, action: *): * source

import {username_change_reducer} from 'omicron-client/src/containers/login_form.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*