Example #1
0
import { Module } from 'reductor';
import UsersContainer from './UsersContainer.jsx';
import UserContainer from './UserContainer.jsx';
import { InitUsers } from './actions/';
import { InitWorkspaces } from '../Workspaces/actions/';

const UsersModule = new Module();

UsersModule
  .name('Users')
  .version('1.0.0');

// Initial State
UsersModule
  .setInitialState({
    initialized: false,
    initializedUser: false,
    users: [],
  });

const UsersSelector = (state, ownProps) => ({
  spInfo: state['module/session'].loginProfile,
  ...state['module/users'],
  params: ownProps.params,
});

UsersModule
  .component('UsersContainer', UsersContainer, UsersSelector)
  .component('UserContainer', UserContainer);

UsersModule
Example #2
0
import { Module } from 'reductor';
import ConnectorsContainer from './ConnectorsContainer.jsx';
import SelectedConnectorContainer from './SelectedConnectorContainer.jsx';
import { InitConnectors, InitSelectedConnector, deleteConnector, createConnector } from './actions/';

const ConnectorsModule = new Module();

ConnectorsModule
  .name('Connectors')
  .version('1.0.0');

// Initial State
const InitialState = {
  initialized: false,
  connectors: [],
  connector: {},
};

ConnectorsModule
  .initialState(InitialState)
  .on(InitConnectors.Action, InitConnectors.Reducer, InitConnectors.PayloadCreator)
  .on(InitSelectedConnector.Action, InitSelectedConnector.Reducer, InitSelectedConnector.PayloadCreator)
  .on(deleteConnector.Action, deleteConnector.Reducer, deleteConnector.PayloadCreator)
  .on(createConnector.Action, createConnector.Reducer, createConnector.PayloadCreator)
  .component('ConnectorsContainer', ConnectorsContainer)
  .component('SelectedConnectorContainer', SelectedConnectorContainer);

export default ConnectorsModule;
Example #3
0
import { Module } from 'reductor';
import WorkflowsContainer from './WorkflowsContainer.jsx';
import WorkflowContainer from './WorkflowContainer.jsx';
import { InitWorkflows, InitWorkflow } from './actions/';

const WorkflowsModule = new Module();

WorkflowsModule
  .name('Workflows')
  .version('1.0.0');

WorkflowsModule
  .setInitialState({
    initialized: false,
    initializedWorkflow: false,
    workflows: [],
    workflow: [],
  });

WorkflowsModule
  .component('WorkflowsContainer', WorkflowsContainer)
  .component('WorkflowContainer', WorkflowContainer);

WorkflowsModule
  .on(InitWorkflows.Action, InitWorkflows.Reducer, InitWorkflows.PayloadCreator)
  .on(InitWorkflow.Action, InitWorkflow.Reducer, InitWorkflow.PayloadCreator);

export default WorkflowsModule;
Example #4
0
import { Module } from 'reductor';
import VirtualMachinesContainer from './VirtualMachinesContainer.jsx';
import { InitVirtualMachines } from './actions/';
import { InitClouds } from '../Clouds/actions/';

const VirtualMachinesModule = new Module();

VirtualMachinesModule
  .name('Virtual Machines')
  .version('1.0.0');

const InitialState = {
  initialized: false,
  vmData: [],
  clouds: [],
};

VirtualMachinesModule
  .initialState(InitialState)
  .on(InitVirtualMachines.Action, InitVirtualMachines.Reducer, InitVirtualMachines.PayloadCreator)
  .on(InitClouds.Action, InitClouds.Reducer, InitClouds.PayloadCreator)
  .component('VirtualMachinesContainer', VirtualMachinesContainer);

export default VirtualMachinesModule;
Example #5
0
import { Module } from 'reductor';

import {
  InitSession,
  UserLogin,
  UserLogout,
} from './actions/';

import SessionContainer from './SessionContainer.jsx';
import SecureContainer from './SecureContainer.jsx';
import LoginContainer from './LoginContainer.jsx';
import LandingPage from './LandingPage.jsx';

const SessionModule = new Module();

SessionModule
  .name('Session')
  .version('1.0.0');

// Initial State
const InitSessionState = {
  __persist: true,
  initialized: false,
  error: null,
  loginProfile: {},
  sessionId: null,
  accessLevel: null,
  user: {
    id: null,
    name: null,
    logo: null,
Example #6
0
import { Module } from 'reductor';
import LogsContainer from './LogsContainer.jsx';
import { InitLogs } from './actions/';
import { InitClouds } from '../Clouds/actions/';
import { InitWorkspaces } from '../Workspaces/actions/';

const LogsModule = new Module();

LogsModule
  .name('Logs')
  .version('1.0.0');

// Initial State
const InitialState = {
  initialized: false,
  logData: [],
  clouds: [],
  workspaces: [],
};

LogsModule
  .initialState(InitialState)
  .on(InitLogs.Action, InitLogs.Reducer, InitLogs.PayloadCreator)
  .on(InitClouds.Action, InitClouds.Reducer, InitClouds.PayloadCreator)
  .on(InitWorkspaces.Action, InitWorkspaces.Reducer, InitWorkspaces.PayloadCreator)
  .component('LogsContainer', LogsContainer);

export default LogsModule;
Example #7
0
import { Module } from 'reductor';
import HelpContainer from './HelpContainer.jsx';

const HelpModule = new Module();

HelpModule
  .name('Help')
  .version('1.0.0')
  .initialState({ })
  .component('HelpContainer', HelpContainer);

export default HelpModule;