This commit is contained in:
snoop 2017-07-03 16:16:39 +09:00
commit df6e7fb79a
23 changed files with 273 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.idea/
node_modules/
dist/
**/.vs

View File

@ -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;

View File

@ -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<NoAuthProbe>
public readAllBySensor(domain:Domain): Promise<NoAuthProbe> {
return null;
}
public read(id:string): Promise<NoAuthProbe> {
return null;
}
}
export default NoAuthProbeService;

View File

@ -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;

View File

@ -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;

View File

@ -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<Probe> {
return null;
}
}
export default ProbeService;

View File

@ -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<ProbeTask>
public readAllByProbe(probe:Probe): Promise<ProbeTask> {
return null;
}
}
export default ProbeTaskService;

View File

@ -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;

View File

@ -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;

View File

@ -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<SensorItem> {
return null;
}
// Todo List<SensorItem>
public readAllBySensor(sensor:Sensor): Promise<SensorItem> {
return null;
}
public read(id:string): Promise<Sensor> {
return null;
}
public remove(sensorItem:SensorItem): Promise<Sensor> {
return null;
}
}
export default SensorItemService;

View File

@ -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<Sensor> {
return null;
}
// Todo List<Sensor>
public readAllByTarget(target:Target): Promise<Sensor> {
return null;
}
public read(id:string): Promise<Sensor> {
return null;
}
public remove(sensor:Sensor): Promise<Sensor> {
return null;
}
public start(sensor:Sensor): Promise<Sensor> {
return null;
}
public stop(sensor:Sensor): Promise<Sensor> {
return null;
}
}
export default SensorService;

View File

View File

@ -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;

View File

@ -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<Host>
public remove(host:Host, probe:Probe): void {
return null;
}
}
export default TargetService;

View File

@ -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<Target> {
return new Promise<Target>(resolve => {
const json = this.send('regist', target);
let tempTarget: Target;
resolve(tempTarget);
});
}
public read(id:string): Promise<Target> {
return new Promise<Target>(resolve => {
resolve(null);
});
}
public readByProbe(probe:Probe): Promise<Target> {
return null;
}
public remove(target:Target): Promise<Target> {
return null;
}
}
export default TargetService;