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 |
map_header_state_to_props(state: Object): {buttons: string} Takes the current application state, and returns an object containing the buttons to render in the menu bar |
|
public |
map_logout_state_to_props(state: *): * |
|
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 |
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 |
url_changed_reducer(state: Object, action: Object): Object 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:
Name | Type | Attribute | Description |
message | string | The message to send to the |
public auth_failure_reducer(state: *, action: *): * source
import {auth_failure_reducer} from 'omicron-client/src/auth/actions.js'
Params:
Name | Type | Attribute | Description |
state | * | ||
action | * |
Return:
* |
public auth_started(username: *, password: *): * source
import {auth_started} from 'omicron-client/src/auth/actions.js'
Params:
Name | Type | Attribute | Description |
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.
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
obj | * |
Return:
* |
public fetch_data(): Function source
import {fetch_data} from 'omicron-client/src/containers/http_request.js'
Thunk action to fetch the data from the URL. This is used just like any other action creator.
public get_data_from_url(url: *): * source
import {get_data_from_url} from 'omicron-client/src/containers/http_request.js'
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
state | * | ||
action | * |
Return:
* |
public logout(): * source
import {logout} from 'omicron-client/src/components/login_form.js'
Return:
* |
public map_dispatch_to_props(dispatch: *): * source
import {map_dispatch_to_props} from 'omicron-client/src/containers/header.js'
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
state | Object | The current application state |
public map_logout_state_to_props(state: *): * source
import {map_logout_state_to_props} from 'omicron-client/src/components/login_form.js'
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
state | * | ||
action | * |
Return:
* |
public run_test(): {type: string} source
import {run_test} from 'omicron-client/src/containers/http_request.js'
Create the test action
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"
public submit_reducer(state: *, action: *): * source
import {submit_reducer} from 'omicron-client/src/containers/login_form.js'
Params:
Name | Type | Attribute | Description |
state | * | ||
action | * |
Return:
* |
public url_changed(new_url: *): {type: string, new_url: *} source
import {url_changed} from 'omicron-client/src/containers/http_request.js'
Action creator for the URL_CHANGED action
Params:
Name | Type | Attribute | Description |
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
public username_change_reducer(state: *, action: *): * source
import {username_change_reducer} from 'omicron-client/src/containers/login_form.js'
Params:
Name | Type | Attribute | Description |
state | * | ||
action | * |
Return:
* |