From 1c4268dd811b6b82a823f701e0c0eca34d8b052c Mon Sep 17 00:00:00 2001 From: geek Date: Mon, 3 Jul 2017 16:16:01 +0900 Subject: [PATCH] vntl --- .gitignore | 1 + src/ts/noauthprobe/api/model/NoAuthProbe.ts | 16 ++++++++ src/ts/noauthprobe/api/model/_ | 0 .../api/service/NoAuthProbeService.ts | 25 ++++++++++++ src/ts/noauthprobe/api/service/_ | 0 src/ts/probe/api/model/Probe.ts | 16 ++++++++ src/ts/probe/api/model/ProbeTask.ts | 16 ++++++++ src/ts/probe/api/model/_ | 0 src/ts/probe/api/service/ProbeService.ts | 19 ++++++++++ src/ts/probe/api/service/ProbeTaskService.ts | 21 ++++++++++ src/ts/probe/api/service/_ | 0 src/ts/sensor/api/model/Sensor.ts | 15 ++++++++ src/ts/sensor/api/model/SensorItem.ts | 11 ++++++ src/ts/sensor/api/model/_ | 0 .../sensor/api/service/SensorItemService.ts | 29 ++++++++++++++ src/ts/sensor/api/service/SensorService.ts | 38 +++++++++++++++++++ src/ts/sensor/api/service/_ | 0 src/ts/target/api/_ | 0 src/ts/target/api/model/Target.ts | 13 +++++++ src/ts/target/api/model/_ | 0 .../api/service/TargetDiscoveryService.ts | 17 +++++++++ src/ts/target/api/service/TargetService.ts | 36 ++++++++++++++++++ src/ts/target/api/service/_ | 0 23 files changed, 273 insertions(+) create mode 100644 src/ts/noauthprobe/api/model/NoAuthProbe.ts delete mode 100644 src/ts/noauthprobe/api/model/_ create mode 100644 src/ts/noauthprobe/api/service/NoAuthProbeService.ts delete mode 100644 src/ts/noauthprobe/api/service/_ create mode 100644 src/ts/probe/api/model/Probe.ts create mode 100644 src/ts/probe/api/model/ProbeTask.ts delete mode 100644 src/ts/probe/api/model/_ create mode 100644 src/ts/probe/api/service/ProbeService.ts create mode 100644 src/ts/probe/api/service/ProbeTaskService.ts delete mode 100644 src/ts/probe/api/service/_ create mode 100644 src/ts/sensor/api/model/Sensor.ts create mode 100644 src/ts/sensor/api/model/SensorItem.ts delete mode 100644 src/ts/sensor/api/model/_ create mode 100644 src/ts/sensor/api/service/SensorItemService.ts create mode 100644 src/ts/sensor/api/service/SensorService.ts delete mode 100644 src/ts/sensor/api/service/_ delete mode 100644 src/ts/target/api/_ create mode 100644 src/ts/target/api/model/Target.ts delete mode 100644 src/ts/target/api/model/_ create mode 100644 src/ts/target/api/service/TargetDiscoveryService.ts create mode 100644 src/ts/target/api/service/TargetService.ts delete mode 100644 src/ts/target/api/service/_ diff --git a/.gitignore b/.gitignore index b95c78c..b3e913e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea/ node_modules/ dist/ **/.vs diff --git a/src/ts/noauthprobe/api/model/NoAuthProbe.ts b/src/ts/noauthprobe/api/model/NoAuthProbe.ts new file mode 100644 index 0000000..f7fad6e --- /dev/null +++ b/src/ts/noauthprobe/api/model/NoAuthProbe.ts @@ -0,0 +1,16 @@ +import Probe from '../../../probe/api/model/Probe'; + +interface NoAuthProbe { + id?: number; + hostName?: string; + macAddress: number; + ipAddress: number; + status: MetaNoAuthProbeStatus; + tempProbeKey: string; + createDate?: Date; + apiKey: string; + domain?: Domain; + probe: Probe; +} + +export default NoAuthProbe; \ No newline at end of file diff --git a/src/ts/noauthprobe/api/model/_ b/src/ts/noauthprobe/api/model/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/noauthprobe/api/service/NoAuthProbeService.ts b/src/ts/noauthprobe/api/service/NoAuthProbeService.ts new file mode 100644 index 0000000..8aa03e2 --- /dev/null +++ b/src/ts/noauthprobe/api/service/NoAuthProbeService.ts @@ -0,0 +1,25 @@ +import Service from 'commons/api/Service'; +import NoAuthProbe from '../model/NoAuthProbe'; +import Domain from '../../../domain/api/model/Domain'; + +export class NoAuthProbeService extends Service { + + public constructor() { + super('NoAuthProbeService'); + } + + public regist(noAuthProbe:NoAuthProbe): void { + return null; + } + + // Todo List + public readAllBySensor(domain:Domain): Promise { + return null; + } + + public read(id:string): Promise { + return null; + } +} + +export default NoAuthProbeService; \ No newline at end of file diff --git a/src/ts/noauthprobe/api/service/_ b/src/ts/noauthprobe/api/service/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/probe/api/model/Probe.ts b/src/ts/probe/api/model/Probe.ts new file mode 100644 index 0000000..f877e0f --- /dev/null +++ b/src/ts/probe/api/model/Probe.ts @@ -0,0 +1,16 @@ +import MetaProbeStatus from '../../../meta/api/model/MetaProbeStatus'; +import Domain from '../../../domain/api/model/Domain'; + +interface Probe { + id?: number; + status: MetaProbeStatus; + description: string; + createDate?: Date; + lastPollingDate?: Date; + nextPollingDate?: Date; + domain?: Domain; + probeKey: string; + encryptionKey: string; +} + +export default Probe; diff --git a/src/ts/probe/api/model/ProbeTask.ts b/src/ts/probe/api/model/ProbeTask.ts new file mode 100644 index 0000000..9fa1e76 --- /dev/null +++ b/src/ts/probe/api/model/ProbeTask.ts @@ -0,0 +1,16 @@ +import Probe from './Probe'; +import MetaProbeTaskType from '../../../meta/api/model/MetaProbeTaskType'; + +interface ProbeTask { + id?: number; + metaProbeTaskType: MetaProbeTaskType; + probe: Probe; + data: string; + createDate?: Date; + sendDate?: Date; + startDate?: Date; + endDate?: Date; + succeed: boolean; +} + +export default ProbeTask; diff --git a/src/ts/probe/api/model/_ b/src/ts/probe/api/model/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/probe/api/service/ProbeService.ts b/src/ts/probe/api/service/ProbeService.ts new file mode 100644 index 0000000..8bac9c4 --- /dev/null +++ b/src/ts/probe/api/service/ProbeService.ts @@ -0,0 +1,19 @@ +import Service from 'commons/api/Service'; +import Probe from '../model/Probe'; + +export class ProbeService extends Service { + + public constructor() { + super('ProbeService'); + } + + public regist(probe:Probe): void { + return null; + } + + public remove(probeKey:string): Promise { + return null; + } +} + +export default ProbeService; \ No newline at end of file diff --git a/src/ts/probe/api/service/ProbeTaskService.ts b/src/ts/probe/api/service/ProbeTaskService.ts new file mode 100644 index 0000000..b75a310 --- /dev/null +++ b/src/ts/probe/api/service/ProbeTaskService.ts @@ -0,0 +1,21 @@ +import Service from 'commons/api/Service'; +import ProbeTask from '../model/ProbeTask'; +import Probe from '../model/Probe'; + +export class ProbeTaskService extends Service { + + public constructor() { + super('ProbeService'); + } + + public regist(probeTask:ProbeTask): void { + return null; + } + + // Todo List + public readAllByProbe(probe:Probe): Promise { + return null; + } +} + +export default ProbeTaskService; \ No newline at end of file diff --git a/src/ts/probe/api/service/_ b/src/ts/probe/api/service/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/sensor/api/model/Sensor.ts b/src/ts/sensor/api/model/Sensor.ts new file mode 100644 index 0000000..e2e3136 --- /dev/null +++ b/src/ts/sensor/api/model/Sensor.ts @@ -0,0 +1,15 @@ +import Target from '../../../target/api/model/Target'; +import MetaSensorStatus from '../../../meta/api/model/MetaSensorStatus'; +import MetaCrawler from '../../../meta/api/model/MetaCrawler'; + +interface Sensor { + id?: number; + createDate?: Date; + description: string; + status: MetaSensorStatus; + target: Target; + crawler: MetaCrawler; + crawlerInputItems: string; +} + +export default Sensor; diff --git a/src/ts/sensor/api/model/SensorItem.ts b/src/ts/sensor/api/model/SensorItem.ts new file mode 100644 index 0000000..53c82df --- /dev/null +++ b/src/ts/sensor/api/model/SensorItem.ts @@ -0,0 +1,11 @@ +import Sensor from './Sensor'; +import MetaSensorItem from '../../../meta/api/model/MetaSensorItem'; + +interface SensorItem { + id?: number; + sensor: Sensor; + item: MetaSensorItem; + createDate?: Date; +} + +export default SensorItem; diff --git a/src/ts/sensor/api/model/_ b/src/ts/sensor/api/model/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/sensor/api/service/SensorItemService.ts b/src/ts/sensor/api/service/SensorItemService.ts new file mode 100644 index 0000000..7f6eb90 --- /dev/null +++ b/src/ts/sensor/api/service/SensorItemService.ts @@ -0,0 +1,29 @@ +import Service from 'commons/api/Service'; +import SensorItem from '../model/SensorItem'; +import Sensor from '../model/Sensor'; + +export class SensorItemService extends Service { + + public constructor() { + super('SensorItemService'); + } + + public regist(sensorItem:SensorItem): Promise { + return null; + } + + // Todo List + public readAllBySensor(sensor:Sensor): Promise { + return null; + } + + public read(id:string): Promise { + return null; + } + + public remove(sensorItem:SensorItem): Promise { + return null; + } +} + +export default SensorItemService; diff --git a/src/ts/sensor/api/service/SensorService.ts b/src/ts/sensor/api/service/SensorService.ts new file mode 100644 index 0000000..52a2443 --- /dev/null +++ b/src/ts/sensor/api/service/SensorService.ts @@ -0,0 +1,38 @@ + +import Service from 'commons/api/Service'; +import Sensor from '../model/Sensor'; +import Target from '../../../target/api/model/Target'; + +export class SensorService extends Service { + + public constructor() { + super('SensorService'); + } + + public regist(sensor:Sensor): Promise { + return null; + } + + // Todo List + public readAllByTarget(target:Target): Promise { + return null; + } + + public read(id:string): Promise { + return null; + } + + public remove(sensor:Sensor): Promise { + return null; + } + + public start(sensor:Sensor): Promise { + return null; + } + + public stop(sensor:Sensor): Promise { + return null; + } +} + +export default SensorService; diff --git a/src/ts/sensor/api/service/_ b/src/ts/sensor/api/service/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/target/api/_ b/src/ts/target/api/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/target/api/model/Target.ts b/src/ts/target/api/model/Target.ts new file mode 100644 index 0000000..602f5df --- /dev/null +++ b/src/ts/target/api/model/Target.ts @@ -0,0 +1,13 @@ +import Probe from '../../../probe/api/model/Probe'; +import Infra from '../../../infra/api/model/Infra'; + +interface Target { + id?: number; + createDate?: Date; + probe: Probe; + infra: Infra; +} + +export default Target; + + diff --git a/src/ts/target/api/model/_ b/src/ts/target/api/model/_ deleted file mode 100644 index e69de29..0000000 diff --git a/src/ts/target/api/service/TargetDiscoveryService.ts b/src/ts/target/api/service/TargetDiscoveryService.ts new file mode 100644 index 0000000..be0d185 --- /dev/null +++ b/src/ts/target/api/service/TargetDiscoveryService.ts @@ -0,0 +1,17 @@ +import Service from 'commons/api/Service'; +import Probe from '../../../probe/api/model/Probe'; + +export class TargetService extends Service { + public constructor() { + super('TargetService'); + } + + // Todo List + public remove(host:Host, probe:Probe): void { + return null; + } +} + +export default TargetService; + + diff --git a/src/ts/target/api/service/TargetService.ts b/src/ts/target/api/service/TargetService.ts new file mode 100644 index 0000000..fcb3c23 --- /dev/null +++ b/src/ts/target/api/service/TargetService.ts @@ -0,0 +1,36 @@ +import Service from 'commons/api/Service'; +import Target from '../model/Target'; +import Probe from '../../../probe/api/model/Probe'; + +export class TargetService extends Service { + + public constructor() { + super('TargetService'); + } + + public regist(target: Target): Promise { + return new Promise(resolve => { + const json = this.send('regist', target); + let tempTarget: Target; + + resolve(tempTarget); + }); + } + + public read(id:string): Promise { + return new Promise(resolve => { + resolve(null); + }); + } + + public readByProbe(probe:Probe): Promise { + return null; + } + + public remove(target:Target): Promise { + return null; + } +} + +export default TargetService; + diff --git a/src/ts/target/api/service/_ b/src/ts/target/api/service/_ deleted file mode 100644 index e69de29..0000000