From 77a3ce77bad2467cfe2e6687537187a2ce3e26ab Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 4 Jul 2017 14:23:42 +0900 Subject: [PATCH 1/4] infra regist --- .../infra/redux/action/infra_host_regist.ts | 43 +++++++++++++++++++ .../redux/action/infra_machine_regist.ts | 43 +++++++++++++++++++ .../action/infra_os_application_regist.ts | 43 +++++++++++++++++++ .../redux/action/infra_os_daemon_regist.ts | 43 +++++++++++++++++++ .../redux/action/infra_os_port_regist.ts | 43 +++++++++++++++++++ .../infra/redux/action/infra_os_regist.ts | 43 +++++++++++++++++++ .../infra/redux/action/infra_regist.ts | 43 +++++++++++++++++++ .../redux/action/infra_service_regist.ts | 43 +++++++++++++++++++ 8 files changed, 344 insertions(+) diff --git a/src/ts/@overflow/infra/redux/action/infra_host_regist.ts b/src/ts/@overflow/infra/redux/action/infra_host_regist.ts index e69de29..1ab0770 100644 --- a/src/ts/@overflow/infra/redux/action/infra_host_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_host_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraHost from '../..//api/model/InfraHost'; + +import InfraHostRegistPayload from '../payload/InfraHostRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraHost/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraHost/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraHost/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraHost/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraHost/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraHost/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraHost: InfraHost) => Action; +export type requestSuccess = (infraHost: InfraHost) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraHost: InfraHost): Action => { + return { + type: REQUEST, + payload: { + infraHost:infraHost, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraHost: InfraHost): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraHost, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts b/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts index e69de29..b36476e 100644 --- a/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraMachine from '../..//api/model/InfraMachine'; + +import InfraMachineRegistPayload from '../payload/InfraMachineRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraMachine: InfraMachine) => Action; +export type requestSuccess = (infraMachine: InfraMachine) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraMachine: InfraMachine): Action => { + return { + type: REQUEST, + payload: { + infraMachine:infraMachine, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraMachine: InfraMachine): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraMachine, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts b/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts index e69de29..9d05c42 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraOSApplication from '../..//api/model/InfraOSApplication'; + +import InfraOSApplicationRegistPayload from '../payload/InfraOSApplicationRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraOSApplication: InfraOSApplication) => Action; +export type requestSuccess = (infraOSApplication: InfraOSApplication) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraOSApplication: InfraOSApplication): Action => { + return { + type: REQUEST, + payload: { + infraOSApplication:infraOSApplication, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraOSApplication: InfraOSApplication): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraOSApplication, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts b/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts index e69de29..aa1b6b0 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraOSDaemon from '../..//api/model/InfraOSDaemon'; + +import InfraOSDaemonRegistPayload from '../payload/InfraOSDaemonRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraOSDaemon: InfraOSDaemon) => Action; +export type requestSuccess = (infraOSDaemon: InfraOSDaemon) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraOSDaemon: InfraOSDaemon): Action => { + return { + type: REQUEST, + payload: { + infraOSDaemon:infraOSDaemon, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraOSDaemon: InfraOSDaemon): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraOSDaemon, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts b/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts index e69de29..78a6ce6 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraOSPort from '../..//api/model/InfraOSPort'; + +import InfraOSPortRegistPayload from '../payload/InfraOSPortRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraOSPort: InfraOSPort) => Action; +export type requestSuccess = (infraOSPort: InfraOSPort) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraOSPort: InfraOSPort): Action => { + return { + type: REQUEST, + payload: { + infraOSPort:infraOSPort, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraOSPort: InfraOSPort): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraOSPort, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_os_regist.ts b/src/ts/@overflow/infra/redux/action/infra_os_regist.ts index e69de29..22955d6 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_os_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraOS from '../..//api/model/InfraOS'; + +import InfraOSRegistPayload from '../payload/InfraOSRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraOS: InfraOS) => Action; +export type requestSuccess = (infraOS: InfraOS) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraOS: InfraOS): Action => { + return { + type: REQUEST, + payload: { + infraOS:infraOS, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraOS: InfraOS): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraOS, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_regist.ts b/src/ts/@overflow/infra/redux/action/infra_regist.ts index e69de29..b30fc41 100644 --- a/src/ts/@overflow/infra/redux/action/infra_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import Infra from '../..//api/model/Infra'; + +import InfraRegistPayload from '../payload/InfraRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infra: Infra) => Action; +export type requestSuccess = (infra: Infra) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infra: Infra): Action => { + return { + type: REQUEST, + payload: { + infra:infra, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infra: Infra): Action => { + return { + type: REQUEST_SUCCESS, + payload: infra, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/infra/redux/action/infra_service_regist.ts b/src/ts/@overflow/infra/redux/action/infra_service_regist.ts index e69de29..71de387 100644 --- a/src/ts/@overflow/infra/redux/action/infra_service_regist.ts +++ b/src/ts/@overflow/infra/redux/action/infra_service_regist.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import InfraService from '../..//api/model/InfraService'; + +import InfraServiceRegistPayload from '../payload/InfraServiceRegistPayload'; + +// Action Type +export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/infraMachine/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (infraService: InfraService) => Action; +export type requestSuccess = (infraService: InfraService) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (infraService: InfraService): Action => { + return { + type: REQUEST, + payload: { + infraService:infraService, + }, + }; +}; + +export const requestSuccess: requestSuccess = (infraService: InfraService): Action => { + return { + type: REQUEST_SUCCESS, + payload: infraService, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; From 451c169ae68c59a82a32adda110e55ef5e360b28 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 4 Jul 2017 14:33:39 +0900 Subject: [PATCH 2/4] added apikey read --- .../apikey/api/service/ApiKeyService.ts | 5 +++ src/ts/@overflow/apikey/redux/action/read.ts | 44 +++++++++++++++++++ .../apikey/redux/payload/ReadPayload.ts | 9 ++++ src/ts/@overflow/apikey/redux/saga/read.ts | 39 ++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 src/ts/@overflow/apikey/redux/action/read.ts create mode 100644 src/ts/@overflow/apikey/redux/payload/ReadPayload.ts create mode 100644 src/ts/@overflow/apikey/redux/saga/read.ts diff --git a/src/ts/@overflow/apikey/api/service/ApiKeyService.ts b/src/ts/@overflow/apikey/api/service/ApiKeyService.ts index 133ec42..f86bb71 100644 --- a/src/ts/@overflow/apikey/api/service/ApiKeyService.ts +++ b/src/ts/@overflow/apikey/api/service/ApiKeyService.ts @@ -1,5 +1,6 @@ import Service from '@overflow/commons/api/Service'; import ApiKey from '../model/ApiKey'; +import Domain from '@overflow/domain/api/model/Domain'; class ApiKeyService extends Service { @@ -12,6 +13,10 @@ class ApiKeyService extends Service { return null; } + public read(domain: Domain): ApiKey { + return null; + } + } diff --git a/src/ts/@overflow/apikey/redux/action/read.ts b/src/ts/@overflow/apikey/redux/action/read.ts new file mode 100644 index 0000000..5af6077 --- /dev/null +++ b/src/ts/@overflow/apikey/redux/action/read.ts @@ -0,0 +1,44 @@ +import Action from '@overflow/commons/redux/Action'; +import ApiKey from '../..//api/model/ApiKey'; +import Domain from '@overflow/domain/api/model/Domain'; + +import ReadPayload from '../payload/ReadPayload'; + +// Action Type +export type REQUEST = '@overflow/apikey/read/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/apikey/read/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/apikey/read/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/apikey/read/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/apikey/read/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/apikey/read/REQUEST_FAILURE'; + +// Action Creater +export type request = (domain: Domain) => Action; +export type requestSuccess = (apiKey: ApiKey) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (domain: Domain): Action => { + return { + type: REQUEST, + payload: { + domain:domain, + }, + }; +}; + +export const requestSuccess: requestSuccess = (apiKey: ApiKey): Action => { + return { + type: REQUEST_SUCCESS, + payload: apiKey, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/apikey/redux/payload/ReadPayload.ts b/src/ts/@overflow/apikey/redux/payload/ReadPayload.ts new file mode 100644 index 0000000..d42cc5d --- /dev/null +++ b/src/ts/@overflow/apikey/redux/payload/ReadPayload.ts @@ -0,0 +1,9 @@ + +import Domain from '@overflow/domain/api/model/Domain'; + +interface ReadPayload { + domain: Domain; +} + +export default ReadPayload; + diff --git a/src/ts/@overflow/apikey/redux/saga/read.ts b/src/ts/@overflow/apikey/redux/saga/read.ts new file mode 100644 index 0000000..3d1ecb9 --- /dev/null +++ b/src/ts/@overflow/apikey/redux/saga/read.ts @@ -0,0 +1,39 @@ +import { SagaIterator } from 'redux-saga'; +import { call, Effect, fork, put, takeLatest } from 'redux-saga/effects'; + + +import AppContext from '@overflow/commons/context'; +import Action from '@overflow/commons/redux/Action'; + +import ApiKey from '../../api/model/ApiKey'; +import ApiKeyService from '../../api/service/ApiKeyService'; +import * as ReadActions from '../action/read'; +import ReadPayload from '../payload/ReadPayload'; + +function* read(action: Action): SagaIterator { + try { + const {domain} = action.payload; + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: true}, + // }); + + const retApikey = yield call(AppContext.getService().read, domain); + + // if (responseBody.token === undefined) { + // throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE); + // } + yield put(ReadActions.requestSuccess(retApikey)); + } catch (e) { + yield put(ReadActions.requestFailure(e)); + } finally { + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: false}, + // }); + } +} + +export function* watchSignin(): SagaIterator { + yield takeLatest(ReadActions.REQUEST, read); +} From 326f4f5745ac6b51a0b7cf507b954bcba0fb3f02 Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 4 Jul 2017 15:35:34 +0900 Subject: [PATCH 3/4] target --- .../target/api/service/TargetService.ts | 2 +- .../target/redux/action/readByProbe.ts | 3 -- .../target/redux/action/read_all_by_probe.ts | 43 ++++++++++++++++++ .../@overflow/target/redux/action/regist.ts | 11 +++-- .../@overflow/target/redux/action/remove.ts | 45 +++++++++++++++++-- .../redux/payload/ReadAllByProbePayload.ts | 7 +++ .../redux/payload/ReadByProbePayload.ts | 3 -- .../target/redux/payload/ReadPayload.ts | 5 +++ .../target/redux/payload/RegistPayload.ts | 6 +-- .../@overflow/target/redux/payload/Remove.ts | 3 -- .../target/redux/payload/RemovePayload.ts | 7 +++ src/ts/@overflow/target/redux/saga/read.ts | 41 +++++++++++++++-- .../target/redux/saga/read_all_by_probe.ts | 38 ++++++++++++++++ .../target/redux/saga/read_by_probe.ts | 3 -- src/ts/@overflow/target/redux/saga/regist.ts | 38 ++++++++++++++++ 15 files changed, 226 insertions(+), 29 deletions(-) delete mode 100644 src/ts/@overflow/target/redux/action/readByProbe.ts create mode 100644 src/ts/@overflow/target/redux/action/read_all_by_probe.ts create mode 100644 src/ts/@overflow/target/redux/payload/ReadAllByProbePayload.ts delete mode 100644 src/ts/@overflow/target/redux/payload/ReadByProbePayload.ts delete mode 100644 src/ts/@overflow/target/redux/payload/Remove.ts create mode 100644 src/ts/@overflow/target/redux/payload/RemovePayload.ts create mode 100644 src/ts/@overflow/target/redux/saga/read_all_by_probe.ts delete mode 100644 src/ts/@overflow/target/redux/saga/read_by_probe.ts diff --git a/src/ts/@overflow/target/api/service/TargetService.ts b/src/ts/@overflow/target/api/service/TargetService.ts index 3ecd120..ff74536 100644 --- a/src/ts/@overflow/target/api/service/TargetService.ts +++ b/src/ts/@overflow/target/api/service/TargetService.ts @@ -23,7 +23,7 @@ export class TargetService extends Service { }); } - public readByProbe(probe:Probe): Promise { + public readAllByProbe(probe:Probe): Promise { return null; } diff --git a/src/ts/@overflow/target/redux/action/readByProbe.ts b/src/ts/@overflow/target/redux/action/readByProbe.ts deleted file mode 100644 index 5c15c15..0000000 --- a/src/ts/@overflow/target/redux/action/readByProbe.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Created by geek on 17. 7. 3. - */ diff --git a/src/ts/@overflow/target/redux/action/read_all_by_probe.ts b/src/ts/@overflow/target/redux/action/read_all_by_probe.ts new file mode 100644 index 0000000..ae30e31 --- /dev/null +++ b/src/ts/@overflow/target/redux/action/read_all_by_probe.ts @@ -0,0 +1,43 @@ +import Action from '@overflow/commons/redux/Action'; +import Target from '../../api/model/Target'; +import Probe from '@overflow/probe/api/model/Probe'; +import ReadAllByProbePayload from '../payload/ReadAllByProbePayload'; + +// Action Type +export type REQUEST = '@overflow/target/read/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/target/read/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/target/read/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/target/read/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/target/read/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/target/read/REQUEST_FAILURE'; + +// Action Creater +export type request = (probe: Probe) => Action; +export type requestSuccess = (targets: Target[]) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (probe: Probe): Action => { + return { + type: REQUEST, + payload: { + probe: probe, + }, + }; +}; + +export const requestSuccess: requestSuccess = (targets: Target[]): Action => { + return { + type: REQUEST_SUCCESS, + payload: targets, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/target/redux/action/regist.ts b/src/ts/@overflow/target/redux/action/regist.ts index 8dca3c8..034390d 100644 --- a/src/ts/@overflow/target/redux/action/regist.ts +++ b/src/ts/@overflow/target/redux/action/regist.ts @@ -14,26 +14,25 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/target/regist/REQUEST export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/target/regist/REQUEST_FAILURE'; // Action Creater -export type request = (probe: Probe, infra: Infra) => Action; +export type request = (target: Target) => Action; export type requestSuccess = (target: Target) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (probe: Probe, infra: Infra): Action => { +export const request: request = (target: Target): Action => { return { type: REQUEST, payload: { - probe: probe, - infra: infra, + target: target, }, }; }; -export const requestSuccess: requestSuccess = (apiKey: ApiKey): Action => { +export const requestSuccess: requestSuccess = (target: Target): Action => { return { type: REQUEST_SUCCESS, - payload: apiKey, + payload: target, }; }; diff --git a/src/ts/@overflow/target/redux/action/remove.ts b/src/ts/@overflow/target/redux/action/remove.ts index 5c15c15..e12b89c 100644 --- a/src/ts/@overflow/target/redux/action/remove.ts +++ b/src/ts/@overflow/target/redux/action/remove.ts @@ -1,3 +1,42 @@ -/** - * Created by geek on 17. 7. 3. - */ +import Action from '@overflow/commons/redux/Action'; +import Target from '../../api/model/Target'; +import RemovePayload from '../payload/RemovePayload'; + +// Action Type +export type REQUEST = '@overflow/target/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/target/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/target/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/target/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/target/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/target/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (target: Target) => Action; +export type requestSuccess = () => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (target: Target): Action => { + return { + type: REQUEST, + payload: { + target: target, + }, + }; +}; + +export const requestSuccess: requestSuccess = (target: Target): Action => { + return { + type: REQUEST_SUCCESS, + payload: target, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/target/redux/payload/ReadAllByProbePayload.ts b/src/ts/@overflow/target/redux/payload/ReadAllByProbePayload.ts new file mode 100644 index 0000000..2f5901e --- /dev/null +++ b/src/ts/@overflow/target/redux/payload/ReadAllByProbePayload.ts @@ -0,0 +1,7 @@ +import Probe from '@overflow/probe/api/model/Probe'; + +interface ReadAllByProbePayload { + probe: Probe; +} + +export default ReadAllByProbePayload; diff --git a/src/ts/@overflow/target/redux/payload/ReadByProbePayload.ts b/src/ts/@overflow/target/redux/payload/ReadByProbePayload.ts deleted file mode 100644 index 5c15c15..0000000 --- a/src/ts/@overflow/target/redux/payload/ReadByProbePayload.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Created by geek on 17. 7. 3. - */ diff --git a/src/ts/@overflow/target/redux/payload/ReadPayload.ts b/src/ts/@overflow/target/redux/payload/ReadPayload.ts index e69de29..a56fb77 100644 --- a/src/ts/@overflow/target/redux/payload/ReadPayload.ts +++ b/src/ts/@overflow/target/redux/payload/ReadPayload.ts @@ -0,0 +1,5 @@ +interface ReadPayload { + id: string; +} + +export default ReadPayload; diff --git a/src/ts/@overflow/target/redux/payload/RegistPayload.ts b/src/ts/@overflow/target/redux/payload/RegistPayload.ts index a11c90d..292d691 100644 --- a/src/ts/@overflow/target/redux/payload/RegistPayload.ts +++ b/src/ts/@overflow/target/redux/payload/RegistPayload.ts @@ -1,9 +1,7 @@ -import Infra from '@overflow/infra/api/model/Infra'; -import Probe from '@overflow/probe/api/model/Probe'; +import Target from '../../api/model/Target'; interface RegistPayload { - infra: Infra; - probe: Probe; + target: Target; } export default RegistPayload; diff --git a/src/ts/@overflow/target/redux/payload/Remove.ts b/src/ts/@overflow/target/redux/payload/Remove.ts deleted file mode 100644 index 5c15c15..0000000 --- a/src/ts/@overflow/target/redux/payload/Remove.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Created by geek on 17. 7. 3. - */ diff --git a/src/ts/@overflow/target/redux/payload/RemovePayload.ts b/src/ts/@overflow/target/redux/payload/RemovePayload.ts new file mode 100644 index 0000000..8d706e2 --- /dev/null +++ b/src/ts/@overflow/target/redux/payload/RemovePayload.ts @@ -0,0 +1,7 @@ +import Target from '../../api/model/Target'; + +interface RemovePayload { + target: Target; +} + +export default RemovePayload; diff --git a/src/ts/@overflow/target/redux/saga/read.ts b/src/ts/@overflow/target/redux/saga/read.ts index 5c15c15..3f9c7d8 100644 --- a/src/ts/@overflow/target/redux/saga/read.ts +++ b/src/ts/@overflow/target/redux/saga/read.ts @@ -1,3 +1,38 @@ -/** - * Created by geek on 17. 7. 3. - */ +import { SagaIterator } from 'redux-saga'; +import { call, Effect, fork, put, takeLatest } from 'redux-saga/effects'; + +import AppContext from '@overflow/commons/context'; +import Action from '@overflow/commons/redux/Action'; + +import Target from '../../api/model/Target'; +import TargetService from '../../api/service/TargetService'; +import * as ReadActions from '../action/read'; +import ReadPayload from '../payload/ReadPayload'; + +function* read(action: Action): SagaIterator { + try { + const {target} = action.payload; + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: true}, + // }); + + const retTarget = yield call(AppContext.getService().regist, target); + + // if (responseBody.token === undefined) { + // throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE); + // } + yield put(RegistActions.requestSuccess(retTarget)); + } catch (e) { + yield put(RegistActions.requestFailure(e)); + } finally { + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: false}, + // }); + } +} + +export function* watchSignin(): SagaIterator { + yield takeLatest(RegistActions.REQUEST, regist); +} diff --git a/src/ts/@overflow/target/redux/saga/read_all_by_probe.ts b/src/ts/@overflow/target/redux/saga/read_all_by_probe.ts new file mode 100644 index 0000000..897c87d --- /dev/null +++ b/src/ts/@overflow/target/redux/saga/read_all_by_probe.ts @@ -0,0 +1,38 @@ +import { SagaIterator } from 'redux-saga'; +import { call, Effect, fork, put, takeLatest } from 'redux-saga/effects'; + +import AppContext from '@overflow/commons/context'; +import Action from '@overflow/commons/redux/Action'; + +import Target from '../../api/model/Target'; +import TargetService from '../../api/service/TargetService'; +import * as ReadAllByProbeActions from '../action/read_all_by_probe'; +import ReadAllByProbePayload from '../payload/ReadAllByProbePayload'; + +function* regist(action: Action): SagaIterator { + try { + const {target} = action.payload; + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: true}, + // }); + + const retTarget = yield call(AppContext.getService().regist, target); + + // if (responseBody.token === undefined) { + // throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE); + // } + yield put(RegistActions.requestSuccess(retTarget)); + } catch (e) { + yield put(RegistActions.requestFailure(e)); + } finally { + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: false}, + // }); + } +} + +export function* watchSignin(): SagaIterator { + yield takeLatest(RegistActions.REQUEST, regist); +} diff --git a/src/ts/@overflow/target/redux/saga/read_by_probe.ts b/src/ts/@overflow/target/redux/saga/read_by_probe.ts deleted file mode 100644 index 5c15c15..0000000 --- a/src/ts/@overflow/target/redux/saga/read_by_probe.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Created by geek on 17. 7. 3. - */ diff --git a/src/ts/@overflow/target/redux/saga/regist.ts b/src/ts/@overflow/target/redux/saga/regist.ts index e69de29..b308497 100644 --- a/src/ts/@overflow/target/redux/saga/regist.ts +++ b/src/ts/@overflow/target/redux/saga/regist.ts @@ -0,0 +1,38 @@ +import { SagaIterator } from 'redux-saga'; +import { call, Effect, fork, put, takeLatest } from 'redux-saga/effects'; + +import AppContext from '@overflow/commons/context'; +import Action from '@overflow/commons/redux/Action'; + +import Target from '../../api/model/Target'; +import TargetService from '../../api/service/TargetService'; +import * as RegistActions from '../action/regist'; +import RegistPayload from '../payload/RegistPayload'; + +function* regist(action: Action): SagaIterator { + try { + const {target} = action.payload; + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: true}, + // }); + + const retTarget = yield call(AppContext.getService().regist, target); + + // if (responseBody.token === undefined) { + // throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE); + // } + yield put(RegistActions.requestSuccess(retTarget)); + } catch (e) { + yield put(RegistActions.requestFailure(e)); + } finally { + // yield put({ + // type: types.SENDING_REQUEST, + // payload: {sendingRequest: false}, + // }); + } +} + +export function* watchSignin(): SagaIterator { + yield takeLatest(RegistActions.REQUEST, regist); +} From 4b2e78295559e51147594aa77f2deaccc71dcaf4 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 4 Jul 2017 15:37:45 +0900 Subject: [PATCH 4/4] fixed infra --- src/ts/@overflow/infra/redux/action/host_read.ts | 0 .../redux/action/{infra_host_regist.ts => host_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/machine_read.ts | 0 .../action/{infra_machine_regist.ts => machine_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/os_application_read.ts | 0 ...a_os_application_regist.ts => os_application_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/os_daemon_read.ts | 0 .../{infra_os_daemon_regist.ts => os_daemon_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/os_port_read.ts | 0 .../action/{infra_os_port_regist.ts => os_port_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/os_read.ts | 0 .../redux/action/{infra_os_regist.ts => os_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/read.ts | 0 .../infra/redux/action/{infra_regist.ts => regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/action/service_read.ts | 0 .../action/{infra_service_regist.ts => service_regist.ts} | 6 +++--- src/ts/@overflow/infra/redux/payload/HostReadPayload.ts | 7 +++++++ .../{InfraHostRegistPayload.ts => HostRegistPayload.ts} | 4 ++-- src/ts/@overflow/infra/redux/payload/InfraRegistPayload.ts | 7 ------- src/ts/@overflow/infra/redux/payload/MachineReadPayload.ts | 7 +++++++ ...nfraMachineRegistPayload.ts => MachineRegistPayload.ts} | 4 ++-- .../infra/redux/payload/OSApplicationReadPayload.ts | 7 +++++++ ...ationRegistPayload.ts => OSApplicationRegistPayload.ts} | 4 ++-- .../@overflow/infra/redux/payload/OSDaemonReadPayload.ts | 7 +++++++ ...raOSDaemonRegistPayload.ts => OSDaemonRegistPayload.ts} | 4 ++-- src/ts/@overflow/infra/redux/payload/OSPortReadPayload.ts | 7 +++++++ ...{InfraOSPortRegistPayload.ts => OSPortRegistPayload.ts} | 4 ++-- src/ts/@overflow/infra/redux/payload/OSReadPayload.ts | 7 +++++++ .../{InfraOSRegistPayload.ts => OSRegistPayload.ts} | 4 ++-- src/ts/@overflow/infra/redux/payload/ReadPayload.ts | 7 +++++++ src/ts/@overflow/infra/redux/payload/RegistPayload.ts | 7 +++++++ src/ts/@overflow/infra/redux/payload/ServiceReadPayload.ts | 7 +++++++ ...nfraServiceRegistPayload.ts => ServiceRegistPayload.ts} | 4 ++-- src/ts/@overflow/infra/redux/reducer/host_read.ts | 0 src/ts/@overflow/infra/redux/reducer/machine_read.ts | 0 .../@overflow/infra/redux/reducer/os_application_read.ts | 0 src/ts/@overflow/infra/redux/reducer/os_daemon_read.ts | 0 src/ts/@overflow/infra/redux/reducer/os_port_read.ts | 0 src/ts/@overflow/infra/redux/reducer/os_read.ts | 0 src/ts/@overflow/infra/redux/reducer/read.ts | 0 src/ts/@overflow/infra/redux/reducer/service_read.ts | 0 src/ts/@overflow/infra/redux/saga/host_read.ts | 0 src/ts/@overflow/infra/redux/saga/machine_read.ts | 0 src/ts/@overflow/infra/redux/saga/os_application_read.ts | 0 src/ts/@overflow/infra/redux/saga/os_daemon_read.ts | 0 src/ts/@overflow/infra/redux/saga/os_port_read.ts | 0 src/ts/@overflow/infra/redux/saga/os_read.ts | 0 src/ts/@overflow/infra/redux/saga/read.ts | 0 src/ts/@overflow/infra/redux/saga/service_read.ts | 0 49 files changed, 101 insertions(+), 45 deletions(-) create mode 100644 src/ts/@overflow/infra/redux/action/host_read.ts rename src/ts/@overflow/infra/redux/action/{infra_host_regist.ts => host_regist.ts} (82%) create mode 100644 src/ts/@overflow/infra/redux/action/machine_read.ts rename src/ts/@overflow/infra/redux/action/{infra_machine_regist.ts => machine_regist.ts} (86%) create mode 100644 src/ts/@overflow/infra/redux/action/os_application_read.ts rename src/ts/@overflow/infra/redux/action/{infra_os_application_regist.ts => os_application_regist.ts} (88%) create mode 100644 src/ts/@overflow/infra/redux/action/os_daemon_read.ts rename src/ts/@overflow/infra/redux/action/{infra_os_daemon_regist.ts => os_daemon_regist.ts} (85%) create mode 100644 src/ts/@overflow/infra/redux/action/os_port_read.ts rename src/ts/@overflow/infra/redux/action/{infra_os_port_regist.ts => os_port_regist.ts} (86%) create mode 100644 src/ts/@overflow/infra/redux/action/os_read.ts rename src/ts/@overflow/infra/redux/action/{infra_os_regist.ts => os_regist.ts} (83%) create mode 100644 src/ts/@overflow/infra/redux/action/read.ts rename src/ts/@overflow/infra/redux/action/{infra_regist.ts => regist.ts} (84%) create mode 100644 src/ts/@overflow/infra/redux/action/service_read.ts rename src/ts/@overflow/infra/redux/action/{infra_service_regist.ts => service_regist.ts} (86%) create mode 100644 src/ts/@overflow/infra/redux/payload/HostReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraHostRegistPayload.ts => HostRegistPayload.ts} (51%) delete mode 100644 src/ts/@overflow/infra/redux/payload/InfraRegistPayload.ts create mode 100644 src/ts/@overflow/infra/redux/payload/MachineReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraMachineRegistPayload.ts => MachineRegistPayload.ts} (53%) create mode 100644 src/ts/@overflow/infra/redux/payload/OSApplicationReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraOSApplicationRegistPayload.ts => OSApplicationRegistPayload.ts} (55%) create mode 100644 src/ts/@overflow/infra/redux/payload/OSDaemonReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraOSDaemonRegistPayload.ts => OSDaemonRegistPayload.ts} (53%) create mode 100644 src/ts/@overflow/infra/redux/payload/OSPortReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraOSPortRegistPayload.ts => OSPortRegistPayload.ts} (52%) create mode 100644 src/ts/@overflow/infra/redux/payload/OSReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraOSRegistPayload.ts => OSRegistPayload.ts} (50%) create mode 100644 src/ts/@overflow/infra/redux/payload/ReadPayload.ts create mode 100644 src/ts/@overflow/infra/redux/payload/RegistPayload.ts create mode 100644 src/ts/@overflow/infra/redux/payload/ServiceReadPayload.ts rename src/ts/@overflow/infra/redux/payload/{InfraServiceRegistPayload.ts => ServiceRegistPayload.ts} (53%) create mode 100644 src/ts/@overflow/infra/redux/reducer/host_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/machine_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/os_application_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/os_daemon_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/os_port_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/os_read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/read.ts create mode 100644 src/ts/@overflow/infra/redux/reducer/service_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/host_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/machine_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/os_application_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/os_daemon_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/os_port_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/os_read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/read.ts create mode 100644 src/ts/@overflow/infra/redux/saga/service_read.ts diff --git a/src/ts/@overflow/infra/redux/action/host_read.ts b/src/ts/@overflow/infra/redux/action/host_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_host_regist.ts b/src/ts/@overflow/infra/redux/action/host_regist.ts similarity index 82% rename from src/ts/@overflow/infra/redux/action/infra_host_regist.ts rename to src/ts/@overflow/infra/redux/action/host_regist.ts index 1ab0770..9ccf0fd 100644 --- a/src/ts/@overflow/infra/redux/action/infra_host_regist.ts +++ b/src/ts/@overflow/infra/redux/action/host_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraHost from '../..//api/model/InfraHost'; -import InfraHostRegistPayload from '../payload/InfraHostRegistPayload'; +import HostRegistPayload from '../payload/HostRegistPayload'; // Action Type export type REQUEST = '@overflow/infraHost/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraHost/regist/REQU export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraHost/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraHost: InfraHost) => Action; +export type request = (infraHost: InfraHost) => Action; export type requestSuccess = (infraHost: InfraHost) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraHost: InfraHost): Action => { +export const request: request = (infraHost: InfraHost): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/machine_read.ts b/src/ts/@overflow/infra/redux/action/machine_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts b/src/ts/@overflow/infra/redux/action/machine_regist.ts similarity index 86% rename from src/ts/@overflow/infra/redux/action/infra_machine_regist.ts rename to src/ts/@overflow/infra/redux/action/machine_regist.ts index b36476e..1220d46 100644 --- a/src/ts/@overflow/infra/redux/action/infra_machine_regist.ts +++ b/src/ts/@overflow/infra/redux/action/machine_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraMachine from '../..//api/model/InfraMachine'; -import InfraMachineRegistPayload from '../payload/InfraMachineRegistPayload'; +import MachineRegistPayload from '../payload/MachineRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraMachine: InfraMachine) => Action; +export type request = (infraMachine: InfraMachine) => Action; export type requestSuccess = (infraMachine: InfraMachine) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraMachine: InfraMachine): Action => { +export const request: request = (infraMachine: InfraMachine): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/os_application_read.ts b/src/ts/@overflow/infra/redux/action/os_application_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts b/src/ts/@overflow/infra/redux/action/os_application_regist.ts similarity index 88% rename from src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts rename to src/ts/@overflow/infra/redux/action/os_application_regist.ts index 9d05c42..c2715d0 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_application_regist.ts +++ b/src/ts/@overflow/infra/redux/action/os_application_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraOSApplication from '../..//api/model/InfraOSApplication'; -import InfraOSApplicationRegistPayload from '../payload/InfraOSApplicationRegistPayload'; +import OSApplicationRegistPayload from '../payload/OSApplicationRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraOSApplication: InfraOSApplication) => Action; +export type request = (infraOSApplication: InfraOSApplication) => Action; export type requestSuccess = (infraOSApplication: InfraOSApplication) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraOSApplication: InfraOSApplication): Action => { +export const request: request = (infraOSApplication: InfraOSApplication): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/os_daemon_read.ts b/src/ts/@overflow/infra/redux/action/os_daemon_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts b/src/ts/@overflow/infra/redux/action/os_daemon_regist.ts similarity index 85% rename from src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts rename to src/ts/@overflow/infra/redux/action/os_daemon_regist.ts index aa1b6b0..e8ed62b 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_daemon_regist.ts +++ b/src/ts/@overflow/infra/redux/action/os_daemon_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraOSDaemon from '../..//api/model/InfraOSDaemon'; -import InfraOSDaemonRegistPayload from '../payload/InfraOSDaemonRegistPayload'; +import OSDaemonRegistPayload from '../payload/OSDaemonRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraOSDaemon: InfraOSDaemon) => Action; +export type request = (infraOSDaemon: InfraOSDaemon) => Action; export type requestSuccess = (infraOSDaemon: InfraOSDaemon) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraOSDaemon: InfraOSDaemon): Action => { +export const request: request = (infraOSDaemon: InfraOSDaemon): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/os_port_read.ts b/src/ts/@overflow/infra/redux/action/os_port_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts b/src/ts/@overflow/infra/redux/action/os_port_regist.ts similarity index 86% rename from src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts rename to src/ts/@overflow/infra/redux/action/os_port_regist.ts index 78a6ce6..32bfc48 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_port_regist.ts +++ b/src/ts/@overflow/infra/redux/action/os_port_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraOSPort from '../..//api/model/InfraOSPort'; -import InfraOSPortRegistPayload from '../payload/InfraOSPortRegistPayload'; +import OSPortRegistPayload from '../payload/OSPortRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraOSPort: InfraOSPort) => Action; +export type request = (infraOSPort: InfraOSPort) => Action; export type requestSuccess = (infraOSPort: InfraOSPort) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraOSPort: InfraOSPort): Action => { +export const request: request = (infraOSPort: InfraOSPort): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/os_read.ts b/src/ts/@overflow/infra/redux/action/os_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_os_regist.ts b/src/ts/@overflow/infra/redux/action/os_regist.ts similarity index 83% rename from src/ts/@overflow/infra/redux/action/infra_os_regist.ts rename to src/ts/@overflow/infra/redux/action/os_regist.ts index 22955d6..027893e 100644 --- a/src/ts/@overflow/infra/redux/action/infra_os_regist.ts +++ b/src/ts/@overflow/infra/redux/action/os_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraOS from '../..//api/model/InfraOS'; -import InfraOSRegistPayload from '../payload/InfraOSRegistPayload'; +import OSRegistPayload from '../payload/OSRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraOS: InfraOS) => Action; +export type request = (infraOS: InfraOS) => Action; export type requestSuccess = (infraOS: InfraOS) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraOS: InfraOS): Action => { +export const request: request = (infraOS: InfraOS): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/read.ts b/src/ts/@overflow/infra/redux/action/read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_regist.ts b/src/ts/@overflow/infra/redux/action/regist.ts similarity index 84% rename from src/ts/@overflow/infra/redux/action/infra_regist.ts rename to src/ts/@overflow/infra/redux/action/regist.ts index b30fc41..2310c17 100644 --- a/src/ts/@overflow/infra/redux/action/infra_regist.ts +++ b/src/ts/@overflow/infra/redux/action/regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import Infra from '../..//api/model/Infra'; -import InfraRegistPayload from '../payload/InfraRegistPayload'; +import RegistPayload from '../payload/RegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infra: Infra) => Action; +export type request = (infra: Infra) => Action; export type requestSuccess = (infra: Infra) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infra: Infra): Action => { +export const request: request = (infra: Infra): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/action/service_read.ts b/src/ts/@overflow/infra/redux/action/service_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/action/infra_service_regist.ts b/src/ts/@overflow/infra/redux/action/service_regist.ts similarity index 86% rename from src/ts/@overflow/infra/redux/action/infra_service_regist.ts rename to src/ts/@overflow/infra/redux/action/service_regist.ts index 71de387..902c53e 100644 --- a/src/ts/@overflow/infra/redux/action/infra_service_regist.ts +++ b/src/ts/@overflow/infra/redux/action/service_regist.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import InfraService from '../..//api/model/InfraService'; -import InfraServiceRegistPayload from '../payload/InfraServiceRegistPayload'; +import ServiceRegistPayload from '../payload/ServiceRegistPayload'; // Action Type export type REQUEST = '@overflow/infraMachine/regist/REQUEST'; @@ -13,13 +13,13 @@ export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/infraMachine/regist/R export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/infraMachine/regist/REQUEST_FAILURE'; // Action Creater -export type request = (infraService: InfraService) => Action; +export type request = (infraService: InfraService) => Action; export type requestSuccess = (infraService: InfraService) => Action; export type requestFailure = (error: Error) => Action; -export const request: request = (infraService: InfraService): Action => { +export const request: request = (infraService: InfraService): Action => { return { type: REQUEST, payload: { diff --git a/src/ts/@overflow/infra/redux/payload/HostReadPayload.ts b/src/ts/@overflow/infra/redux/payload/HostReadPayload.ts new file mode 100644 index 0000000..2b782d4 --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/HostReadPayload.ts @@ -0,0 +1,7 @@ + + +interface HostReadPayload { + id: number; +} + +export default HostReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraHostRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/HostRegistPayload.ts similarity index 51% rename from src/ts/@overflow/infra/redux/payload/InfraHostRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/HostRegistPayload.ts index 1512bf6..2606a35 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraHostRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/HostRegistPayload.ts @@ -1,7 +1,7 @@ import InfraHost from '../../api/model/InfraHost'; -interface InfraHostRegistPayload { +interface HostRegistPayload { infraHost: InfraHost; } -export default InfraHostRegistPayload; +export default HostRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/InfraRegistPayload.ts deleted file mode 100644 index c96b89a..0000000 --- a/src/ts/@overflow/infra/redux/payload/InfraRegistPayload.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Infra from '../../api/model/Infra'; - -interface InfraRegistPayload { - infra: Infra; -} - -export default InfraRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/MachineReadPayload.ts b/src/ts/@overflow/infra/redux/payload/MachineReadPayload.ts new file mode 100644 index 0000000..40e9beb --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/MachineReadPayload.ts @@ -0,0 +1,7 @@ + + +interface MachineReadPayload { + id: number; +} + +export default MachineReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraMachineRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/MachineRegistPayload.ts similarity index 53% rename from src/ts/@overflow/infra/redux/payload/InfraMachineRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/MachineRegistPayload.ts index 719d0e0..8f308c5 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraMachineRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/MachineRegistPayload.ts @@ -2,8 +2,8 @@ import InfraMachine from '../../api/model/InfraMachine'; -interface InfraMachineRegistPayload { +interface MachineRegistPayload { infraMachine: InfraMachine; } -export default InfraMachineRegistPayload; +export default MachineRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/OSApplicationReadPayload.ts b/src/ts/@overflow/infra/redux/payload/OSApplicationReadPayload.ts new file mode 100644 index 0000000..d1cd574 --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/OSApplicationReadPayload.ts @@ -0,0 +1,7 @@ + + +interface OSApplicationReadPayload { + id: number; +} + +export default OSApplicationReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraOSApplicationRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/OSApplicationRegistPayload.ts similarity index 55% rename from src/ts/@overflow/infra/redux/payload/InfraOSApplicationRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/OSApplicationRegistPayload.ts index 6919770..b0e475d 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraOSApplicationRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/OSApplicationRegistPayload.ts @@ -1,7 +1,7 @@ import InfraOSApplication from '../../api/model/InfraOSApplication'; -interface InfraOSApplicationRegistPayload { +interface OSApplicationRegistPayload { infraOSApplication: InfraOSApplication; } -export default InfraOSApplicationRegistPayload; +export default OSApplicationRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/OSDaemonReadPayload.ts b/src/ts/@overflow/infra/redux/payload/OSDaemonReadPayload.ts new file mode 100644 index 0000000..7f6b4bb --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/OSDaemonReadPayload.ts @@ -0,0 +1,7 @@ + + +interface OSDaemonReadPayload { + id: number; +} + +export default OSDaemonReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraOSDaemonRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/OSDaemonRegistPayload.ts similarity index 53% rename from src/ts/@overflow/infra/redux/payload/InfraOSDaemonRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/OSDaemonRegistPayload.ts index 2ad6f25..9e3c1e4 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraOSDaemonRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/OSDaemonRegistPayload.ts @@ -1,7 +1,7 @@ import InfraOSDaemon from '../../api/model/InfraOSDaemon'; -interface InfraOSDaemonRegistPayload { +interface OSDaemonRegistPayload { infraOSDaemon: InfraOSDaemon; } -export default InfraOSDaemonRegistPayload; +export default OSDaemonRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/OSPortReadPayload.ts b/src/ts/@overflow/infra/redux/payload/OSPortReadPayload.ts new file mode 100644 index 0000000..c9ec0df --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/OSPortReadPayload.ts @@ -0,0 +1,7 @@ + + +interface OSPortReadPayload { + id: number; +} + +export default OSPortReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraOSPortRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/OSPortRegistPayload.ts similarity index 52% rename from src/ts/@overflow/infra/redux/payload/InfraOSPortRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/OSPortRegistPayload.ts index 8d8febc..b632001 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraOSPortRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/OSPortRegistPayload.ts @@ -1,7 +1,7 @@ import InfraOSPort from '../../api/model/InfraOSPort'; -interface InfraOSPortRegistPayload { +interface OSPortRegistPayload { infraOSPort: InfraOSPort; } -export default InfraOSPortRegistPayload; +export default OSPortRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/OSReadPayload.ts b/src/ts/@overflow/infra/redux/payload/OSReadPayload.ts new file mode 100644 index 0000000..9102feb --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/OSReadPayload.ts @@ -0,0 +1,7 @@ + + +interface OSReadPayload { + id: number; +} + +export default OSReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraOSRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/OSRegistPayload.ts similarity index 50% rename from src/ts/@overflow/infra/redux/payload/InfraOSRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/OSRegistPayload.ts index 96fed3b..66b09e6 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraOSRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/OSRegistPayload.ts @@ -1,7 +1,7 @@ import InfraOS from '../../api/model/InfraOS'; -interface InfraOSRegistPayload { +interface OSRegistPayload { infraOS: InfraOS; } -export default InfraOSRegistPayload; +export default OSRegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/ReadPayload.ts b/src/ts/@overflow/infra/redux/payload/ReadPayload.ts new file mode 100644 index 0000000..4ba9f3b --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/ReadPayload.ts @@ -0,0 +1,7 @@ + + +interface ReadPayload { + id: number; +} + +export default ReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/RegistPayload.ts b/src/ts/@overflow/infra/redux/payload/RegistPayload.ts new file mode 100644 index 0000000..d039825 --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/RegistPayload.ts @@ -0,0 +1,7 @@ +import Infra from '../../api/model/Infra'; + +interface RegistPayload { + infra: Infra; +} + +export default RegistPayload; diff --git a/src/ts/@overflow/infra/redux/payload/ServiceReadPayload.ts b/src/ts/@overflow/infra/redux/payload/ServiceReadPayload.ts new file mode 100644 index 0000000..b283d9e --- /dev/null +++ b/src/ts/@overflow/infra/redux/payload/ServiceReadPayload.ts @@ -0,0 +1,7 @@ + + +interface ServiceReadPayload { + id: number; +} + +export default ServiceReadPayload; diff --git a/src/ts/@overflow/infra/redux/payload/InfraServiceRegistPayload.ts b/src/ts/@overflow/infra/redux/payload/ServiceRegistPayload.ts similarity index 53% rename from src/ts/@overflow/infra/redux/payload/InfraServiceRegistPayload.ts rename to src/ts/@overflow/infra/redux/payload/ServiceRegistPayload.ts index dd821f9..35175d4 100644 --- a/src/ts/@overflow/infra/redux/payload/InfraServiceRegistPayload.ts +++ b/src/ts/@overflow/infra/redux/payload/ServiceRegistPayload.ts @@ -1,7 +1,7 @@ import InfraService from '../../api/model/InfraService'; -interface InfraServiceRegistPayload { +interface ServiceRegistPayload { infraService: InfraService; } -export default InfraServiceRegistPayload; +export default ServiceRegistPayload; diff --git a/src/ts/@overflow/infra/redux/reducer/host_read.ts b/src/ts/@overflow/infra/redux/reducer/host_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/machine_read.ts b/src/ts/@overflow/infra/redux/reducer/machine_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/os_application_read.ts b/src/ts/@overflow/infra/redux/reducer/os_application_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/os_daemon_read.ts b/src/ts/@overflow/infra/redux/reducer/os_daemon_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/os_port_read.ts b/src/ts/@overflow/infra/redux/reducer/os_port_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/os_read.ts b/src/ts/@overflow/infra/redux/reducer/os_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/read.ts b/src/ts/@overflow/infra/redux/reducer/read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/reducer/service_read.ts b/src/ts/@overflow/infra/redux/reducer/service_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/host_read.ts b/src/ts/@overflow/infra/redux/saga/host_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/machine_read.ts b/src/ts/@overflow/infra/redux/saga/machine_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/os_application_read.ts b/src/ts/@overflow/infra/redux/saga/os_application_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/os_daemon_read.ts b/src/ts/@overflow/infra/redux/saga/os_daemon_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/os_port_read.ts b/src/ts/@overflow/infra/redux/saga/os_port_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/os_read.ts b/src/ts/@overflow/infra/redux/saga/os_read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/read.ts b/src/ts/@overflow/infra/redux/saga/read.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/@overflow/infra/redux/saga/service_read.ts b/src/ts/@overflow/infra/redux/saga/service_read.ts new file mode 100644 index 0000000..e69de29