@things-factory/dataset 5.0.0-alpha.12 → 5.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/bootstrap.js +3 -3
- package/client/pages/data-entry-form.js +14 -5
- package/client/pages/data-ooc.js +418 -0
- package/client/pages/data-sample.js +94 -47
- package/client/pages/data-sensor.js +1 -8
- package/client/pages/data-set.js +72 -10
- package/client/route.js +4 -0
- package/dist-server/controllers/data-use-case.js +57 -0
- package/dist-server/controllers/data-use-case.js.map +1 -0
- package/dist-server/controllers/index.js +17 -0
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/data-item/data-item-type.js +6 -6
- package/dist-server/service/data-item/data-item-type.js.map +1 -1
- package/dist-server/service/data-item/data-item.js +1 -1
- package/dist-server/service/data-item/data-item.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-mutation.js +130 -0
- package/dist-server/service/data-ooc/data-ooc-mutation.js.map +1 -0
- package/dist-server/service/data-ooc/data-ooc-query.js +115 -0
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -0
- package/dist-server/service/data-ooc/data-ooc-type.js +99 -0
- package/dist-server/service/data-ooc/data-ooc-type.js.map +1 -0
- package/dist-server/service/data-ooc/data-ooc.js +218 -0
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -0
- package/dist-server/service/data-ooc/index.js +9 -0
- package/dist-server/service/data-ooc/index.js.map +1 -0
- package/dist-server/service/data-sample/data-sample-mutation.js +31 -89
- package/dist-server/service/data-sample/data-sample-mutation.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-type.js +5 -43
- package/dist-server/service/data-sample/data-sample-type.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +17 -3
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-set/data-set-mutation.js +1 -2
- package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +12 -0
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-set/data-set-type.js +19 -3
- package/dist-server/service/data-set/data-set-type.js.map +1 -1
- package/dist-server/service/data-set/data-set.js +22 -10
- package/dist-server/service/data-set/data-set.js.map +1 -1
- package/dist-server/service/index.js +6 -2
- package/dist-server/service/index.js.map +1 -1
- package/package.json +15 -14
- package/server/controllers/data-use-case.ts +85 -0
- package/server/controllers/index.ts +1 -0
- package/server/index.ts +1 -0
- package/server/service/data-item/data-item-type.ts +3 -4
- package/server/service/data-item/data-item.ts +1 -1
- package/server/service/data-ooc/data-ooc-mutation.ts +117 -0
- package/server/service/data-ooc/data-ooc-query.ts +63 -0
- package/server/service/data-ooc/data-ooc-type.ts +62 -0
- package/server/service/data-ooc/data-ooc.ts +188 -0
- package/server/service/data-ooc/index.ts +6 -0
- package/server/service/data-sample/data-sample-mutation.ts +35 -97
- package/server/service/data-sample/data-sample-type.ts +3 -31
- package/server/service/data-sample/data-sample.ts +19 -3
- package/server/service/data-set/data-set-mutation.ts +1 -4
- package/server/service/data-set/data-set-query.ts +8 -1
- package/server/service/data-set/data-set-type.ts +15 -4
- package/server/service/data-set/data-set.ts +17 -7
- package/server/service/index.ts +6 -2
- package/things-factory.config.js +4 -0
- package/translations/en.json +13 -2
- package/translations/ko.json +13 -2
- package/translations/ms.json +13 -2
- package/translations/zh.json +13 -2
@@ -1,12 +1,13 @@
|
|
1
1
|
import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
|
2
|
-
import { In } from 'typeorm'
|
3
2
|
|
4
3
|
import { DataItem } from '../data-item/data-item'
|
5
4
|
import { DataSet } from '../data-set/data-set'
|
6
5
|
import { DataSample } from './data-sample'
|
7
|
-
import {
|
6
|
+
import { NewDataSample } from './data-sample-type'
|
8
7
|
|
9
8
|
import moment from 'moment'
|
9
|
+
import { DataUseCase } from '../../controllers'
|
10
|
+
import { DataOoc, DataOocStatus } from '../data-ooc/data-ooc'
|
10
11
|
|
11
12
|
const debug = require('debug')('things-factory:dataset:data-sample:data-sample-mutation')
|
12
13
|
|
@@ -22,7 +23,7 @@ const replaceVariables = (keys, dic) => {
|
|
22
23
|
return keys
|
23
24
|
}
|
24
25
|
|
25
|
-
// It is required UTC date for Partitioning File System like AWS S3.
|
26
|
+
// It is required UTC date for Partitioning File System like AWS S3 from Athena.
|
26
27
|
// ex) %YYYY, %MM, %DD
|
27
28
|
const formatDate = (keys, _moment) => {
|
28
29
|
for (const k in keys) {
|
@@ -43,7 +44,9 @@ export class DataSampleMutation {
|
|
43
44
|
async createDataSample(@Arg('dataSample') dataSample: NewDataSample, @Ctx() context: any): Promise<DataSample> {
|
44
45
|
const { domain, user, tx } = context.state
|
45
46
|
|
46
|
-
const dataSet = await tx.getRepository(DataSet).findOne({
|
47
|
+
const dataSet = await tx.getRepository(DataSet).findOne({
|
48
|
+
where: { id: dataSample.dataSet.id }
|
49
|
+
})
|
47
50
|
const dataItems = await tx.getRepository(DataItem).find({
|
48
51
|
where: {
|
49
52
|
domain,
|
@@ -63,6 +66,9 @@ export class DataSampleMutation {
|
|
63
66
|
return spec
|
64
67
|
}, {})
|
65
68
|
|
69
|
+
// appending spec to data for reporting and optimizing AWS Athena search
|
70
|
+
dataSample.data = { ...dataSample.data, _spec: JSON.stringify(spec) }
|
71
|
+
|
66
72
|
var partitionKeys = {
|
67
73
|
...dataSet.partitionKeys
|
68
74
|
}
|
@@ -70,114 +76,46 @@ export class DataSampleMutation {
|
|
70
76
|
const collectedAt = dataSample.collectedAt || new Date()
|
71
77
|
partitionKeys = formatDate(partitionKeys, moment(collectedAt).utc())
|
72
78
|
partitionKeys = replaceVariables(partitionKeys, {
|
73
|
-
|
74
|
-
dataSetId: dataSample.
|
79
|
+
domain: domain.subdomain,
|
80
|
+
dataSetId: dataSample.dataSet.id,
|
75
81
|
...dataSample.data
|
76
82
|
})
|
77
83
|
|
78
|
-
|
84
|
+
const { ooc, oos } = DataUseCase.evaluate(dataSet, dataItems, dataSample.data) || {}
|
85
|
+
|
86
|
+
const result = await tx.getRepository(DataSample).save({
|
79
87
|
name: dataSet.name,
|
80
88
|
description: dataSet.description,
|
81
89
|
...dataSample,
|
82
90
|
domain,
|
83
91
|
partitionKeys,
|
84
92
|
spec,
|
93
|
+
ooc,
|
94
|
+
oos,
|
85
95
|
collectedAt,
|
86
96
|
creator: user,
|
87
97
|
updater: user
|
88
98
|
})
|
89
|
-
}
|
90
|
-
|
91
|
-
@Directive('@privilege(category: "data-sample", privilege: "mutation", domainOwnerGranted: true)')
|
92
|
-
@Directive('@transaction')
|
93
|
-
@Mutation(returns => DataSample, { description: 'To modify data sample information' })
|
94
|
-
async updateDataSample(
|
95
|
-
@Arg('id') id: string,
|
96
|
-
@Arg('patch') patch: DataSamplePatch,
|
97
|
-
@Ctx() context: any
|
98
|
-
): Promise<DataSample> {
|
99
|
-
const { domain, user, tx } = context.state
|
100
|
-
|
101
|
-
const repository = tx.getRepository(DataSample)
|
102
|
-
const dataSample = await repository.findOne({
|
103
|
-
where: { domain, id }
|
104
|
-
})
|
105
|
-
|
106
|
-
return await repository.save({
|
107
|
-
...dataSample,
|
108
|
-
...patch,
|
109
|
-
updater: user
|
110
|
-
})
|
111
|
-
}
|
112
|
-
|
113
|
-
@Directive('@privilege(category: "data-sample", privilege: "mutation", domainOwnerGranted: true)')
|
114
|
-
@Directive('@transaction')
|
115
|
-
@Mutation(returns => [DataSample], { description: "To modify multiple data samples' information" })
|
116
|
-
async updateMultipleDataSample(
|
117
|
-
@Arg('patches', type => [DataSamplePatch]) patches: DataSamplePatch[],
|
118
|
-
@Ctx() context: any
|
119
|
-
): Promise<DataSample[]> {
|
120
|
-
const { domain, user, tx } = context.state
|
121
|
-
|
122
|
-
let results = []
|
123
|
-
const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
|
124
|
-
const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
|
125
|
-
const dataSampleRepo = tx.getRepository(DataSample)
|
126
|
-
|
127
|
-
if (_createRecords.length > 0) {
|
128
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
129
|
-
const newRecord = _createRecords[i]
|
130
|
-
|
131
|
-
const result = await dataSampleRepo.save({
|
132
|
-
...newRecord,
|
133
|
-
domain,
|
134
|
-
creator: user,
|
135
|
-
updater: user
|
136
|
-
})
|
137
99
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
}
|
100
|
+
if (ooc || oos) {
|
101
|
+
await tx.getRepository(DataOoc).save({
|
102
|
+
name: dataSet.name,
|
103
|
+
description: dataSet.description,
|
104
|
+
dataSet,
|
105
|
+
dataSample: result,
|
106
|
+
data: dataSample.data,
|
107
|
+
domain,
|
108
|
+
partitionKeys,
|
109
|
+
spec,
|
110
|
+
ooc,
|
111
|
+
oos,
|
112
|
+
state: DataOocStatus.CREATED,
|
113
|
+
collectedAt,
|
114
|
+
creator: user,
|
115
|
+
updater: user
|
116
|
+
})
|
155
117
|
}
|
156
118
|
|
157
|
-
return
|
158
|
-
}
|
159
|
-
|
160
|
-
@Directive('@privilege(category: "data-sample", privilege: "mutation", domainOwnerGranted: true)')
|
161
|
-
@Directive('@transaction')
|
162
|
-
@Mutation(returns => Boolean, { description: 'To delete a data sample' })
|
163
|
-
async deleteDataSample(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {
|
164
|
-
const { domain, tx } = context.state
|
165
|
-
|
166
|
-
await tx.getRepository(DataSample).delete({ domain, id })
|
167
|
-
return true
|
168
|
-
}
|
169
|
-
|
170
|
-
@Directive('@privilege(category: "data-sample", privilege: "mutation", domainOwnerGranted: true)')
|
171
|
-
@Directive('@transaction')
|
172
|
-
@Mutation(returns => Boolean, { description: 'To delete multiple data samples' })
|
173
|
-
async deleteDataSamples(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {
|
174
|
-
const { domain, tx } = context.state
|
175
|
-
|
176
|
-
await tx.getRepository(DataSample).delete({
|
177
|
-
domain,
|
178
|
-
id: In(ids)
|
179
|
-
})
|
180
|
-
|
181
|
-
return true
|
119
|
+
return result
|
182
120
|
}
|
183
121
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'
|
2
|
-
|
3
|
-
import { ScalarObject } from '@things-factory/shell'
|
2
|
+
import { ObjectRef, ScalarObject } from '@things-factory/shell'
|
4
3
|
|
5
4
|
import { DataSample } from './data-sample'
|
6
5
|
|
@@ -12,8 +11,8 @@ export class NewDataSample {
|
|
12
11
|
@Field({ nullable: true })
|
13
12
|
description?: string
|
14
13
|
|
15
|
-
@Field({ nullable: true })
|
16
|
-
|
14
|
+
@Field(type => ObjectRef, { nullable: true })
|
15
|
+
dataSet?: ObjectRef
|
17
16
|
|
18
17
|
@Field(type => ScalarObject, { nullable: true })
|
19
18
|
data?: ScalarObject
|
@@ -28,33 +27,6 @@ export class NewDataSample {
|
|
28
27
|
collectedAt?: Date
|
29
28
|
}
|
30
29
|
|
31
|
-
@InputType()
|
32
|
-
export class DataSamplePatch {
|
33
|
-
@Field(type => ID, { nullable: true })
|
34
|
-
id?: string
|
35
|
-
|
36
|
-
@Field({ nullable: true })
|
37
|
-
name?: string
|
38
|
-
|
39
|
-
@Field({ nullable: true })
|
40
|
-
description?: string
|
41
|
-
|
42
|
-
@Field({ nullable: true })
|
43
|
-
dataSetId?: string
|
44
|
-
|
45
|
-
@Field(type => ScalarObject, { nullable: true })
|
46
|
-
data?: ScalarObject
|
47
|
-
|
48
|
-
@Field({ nullable: true })
|
49
|
-
rawData?: string
|
50
|
-
|
51
|
-
@Field({ nullable: true })
|
52
|
-
source?: string
|
53
|
-
|
54
|
-
@Field()
|
55
|
-
cuFlag: string
|
56
|
-
}
|
57
|
-
|
58
30
|
@ObjectType()
|
59
31
|
export class DataSampleList {
|
60
32
|
@Field(type => [DataSample])
|
@@ -20,6 +20,11 @@ const ORMCONFIG = config.get('ormconfig', {})
|
|
20
20
|
const DATABASE_TYPE = ORMCONFIG.type
|
21
21
|
@Entity()
|
22
22
|
@Index('ix_data_sample_0', (dataSample: DataSample) => [dataSample.domain, dataSample.dataSet], { unique: false })
|
23
|
+
@Index(
|
24
|
+
'ix_data_sample_2',
|
25
|
+
(dataSample: DataSample) => [dataSample.domain, dataSample.dataSet, dataSample.collectedAt],
|
26
|
+
{ unique: false }
|
27
|
+
)
|
23
28
|
@ObjectType({ description: 'Entity for DataSample' })
|
24
29
|
export class DataSample {
|
25
30
|
@PrimaryGeneratedColumn('uuid')
|
@@ -53,12 +58,11 @@ export class DataSample {
|
|
53
58
|
@Field(type => ScalarObject, { nullable: true })
|
54
59
|
partitionKeys?: ScalarObject
|
55
60
|
|
56
|
-
@ManyToOne(type => DataSet
|
57
|
-
@Field(type => DataSet, { nullable:
|
61
|
+
@ManyToOne(type => DataSet)
|
62
|
+
@Field(type => DataSet, { nullable: false })
|
58
63
|
dataSet?: DataSet
|
59
64
|
|
60
65
|
@RelationId((dataSample: DataSample) => dataSample.dataSet)
|
61
|
-
@Field({ nullable: true })
|
62
66
|
dataSetId?: string
|
63
67
|
|
64
68
|
@Column('simple-json', { nullable: true })
|
@@ -87,6 +91,18 @@ export class DataSample {
|
|
87
91
|
@Field({ nullable: true })
|
88
92
|
source?: string
|
89
93
|
|
94
|
+
@Column({
|
95
|
+
nullable: true
|
96
|
+
})
|
97
|
+
@Field({ nullable: true })
|
98
|
+
ooc?: boolean
|
99
|
+
|
100
|
+
@Column({
|
101
|
+
nullable: true
|
102
|
+
})
|
103
|
+
@Field({ nullable: true })
|
104
|
+
oos?: boolean
|
105
|
+
|
90
106
|
@Column({ nullable: true })
|
91
107
|
@Field({ nullable: true })
|
92
108
|
collectedAt?: Date
|
@@ -200,10 +200,7 @@ export class DataSetMutation {
|
|
200
200
|
|
201
201
|
return copiedDataSets.map(dataSet => {
|
202
202
|
dataSet.dataItems = copiedDataItems.filter(dataItem => dataItem.dataSet == dataSet.id)
|
203
|
-
return
|
204
|
-
...dataSet,
|
205
|
-
state: 'UNLOADED' // DataSetInstanceStatus.UNLOADED
|
206
|
-
}
|
203
|
+
return dataSet
|
207
204
|
})
|
208
205
|
}
|
209
206
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'
|
2
2
|
import { getRepository } from 'typeorm'
|
3
3
|
|
4
|
-
import { User } from '@things-factory/auth-base'
|
4
|
+
import { Role, User } from '@things-factory/auth-base'
|
5
5
|
import { convertListParams, Domain, ListParam } from '@things-factory/shell'
|
6
6
|
|
7
7
|
import { DataItem } from '../data-item/data-item'
|
@@ -38,6 +38,13 @@ export class DataSetQuery {
|
|
38
38
|
})
|
39
39
|
}
|
40
40
|
|
41
|
+
@FieldResolver(type => Role)
|
42
|
+
async supervisoryRole(@Root() dataSet: DataSet): Promise<Role> {
|
43
|
+
return await getRepository(Role).findOne({
|
44
|
+
id: dataSet.supervisoryRoleId
|
45
|
+
})
|
46
|
+
}
|
47
|
+
|
41
48
|
@FieldResolver(type => Domain)
|
42
49
|
async domain(@Root() dataSet: DataSet): Promise<Domain> {
|
43
50
|
return await getRepository(Domain).findOne(dataSet.domainId)
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'
|
2
|
-
|
3
|
-
import { ScalarObject } from '@things-factory/shell'
|
2
|
+
import { ObjectRef, ScalarObject } from '@things-factory/shell'
|
4
3
|
|
5
4
|
import { DataSet } from './data-set'
|
6
5
|
|
@@ -12,11 +11,17 @@ export class NewDataSet {
|
|
12
11
|
@Field({ nullable: true })
|
13
12
|
description?: string
|
14
13
|
|
14
|
+
@Field(type => ObjectRef, { nullable: true })
|
15
|
+
supervisoryRole?: ObjectRef
|
16
|
+
|
15
17
|
@Field({ nullable: true })
|
16
18
|
active?: boolean
|
17
19
|
|
18
20
|
@Field({ nullable: true })
|
19
|
-
type?: string
|
21
|
+
type?: 'manual' | 'automatic' | string
|
22
|
+
|
23
|
+
@Field({ nullable: true })
|
24
|
+
useCase?: string
|
20
25
|
|
21
26
|
@Field(type => ScalarObject, { nullable: true })
|
22
27
|
partitionKeys?: ScalarObject
|
@@ -39,11 +44,17 @@ export class DataSetPatch {
|
|
39
44
|
@Field({ nullable: true })
|
40
45
|
description?: string
|
41
46
|
|
47
|
+
@Field(type => ObjectRef, { nullable: true })
|
48
|
+
supervisoryRole?: ObjectRef
|
49
|
+
|
42
50
|
@Field({ nullable: true })
|
43
51
|
active?: boolean
|
44
52
|
|
45
53
|
@Field({ nullable: true })
|
46
|
-
type?: string
|
54
|
+
type?: 'manual' | 'automatic' | string
|
55
|
+
|
56
|
+
@Field({ nullable: true })
|
57
|
+
useCase?: string
|
47
58
|
|
48
59
|
@Field(type => ScalarObject, { nullable: true })
|
49
60
|
partitionKeys?: ScalarObject
|
@@ -11,11 +11,10 @@ import {
|
|
11
11
|
UpdateDateColumn
|
12
12
|
} from 'typeorm'
|
13
13
|
|
14
|
-
import { User } from '@things-factory/auth-base'
|
14
|
+
import { Role, User } from '@things-factory/auth-base'
|
15
15
|
import { Domain, ScalarObject } from '@things-factory/shell'
|
16
16
|
|
17
17
|
import { DataItem } from '../data-item/data-item'
|
18
|
-
import { DataSample } from '../data-sample/data-sample'
|
19
18
|
|
20
19
|
@Entity()
|
21
20
|
@Index('ix_data_set_0', (dataSet: DataSet) => [dataSet.domain, dataSet.name], { unique: true })
|
@@ -48,11 +47,26 @@ export class DataSet {
|
|
48
47
|
@Field({ nullable: true })
|
49
48
|
active?: boolean
|
50
49
|
|
50
|
+
@ManyToOne(type => Role, {
|
51
|
+
nullable: true
|
52
|
+
})
|
53
|
+
@Field(type => Role, { nullable: true })
|
54
|
+
supervisoryRole?: Role
|
55
|
+
|
56
|
+
@RelationId((dataSet: DataSet) => dataSet.supervisoryRole)
|
57
|
+
supervisoryRoleId?: string
|
58
|
+
|
59
|
+
@Column({
|
60
|
+
nullable: true
|
61
|
+
})
|
62
|
+
@Field({ nullable: true })
|
63
|
+
type?: 'manual' | 'automatic' | string
|
64
|
+
|
51
65
|
@Column({
|
52
66
|
nullable: true
|
53
67
|
})
|
54
68
|
@Field({ nullable: true })
|
55
|
-
|
69
|
+
useCase?: string
|
56
70
|
|
57
71
|
@Column('simple-json', { nullable: true })
|
58
72
|
@Field(type => ScalarObject, { nullable: true })
|
@@ -68,10 +82,6 @@ export class DataSet {
|
|
68
82
|
@Field(type => [DataItem], { nullable: true })
|
69
83
|
dataItems: DataItem[]
|
70
84
|
|
71
|
-
@OneToMany(type => DataSample, dataSample => dataSample.dataSet)
|
72
|
-
@Field(type => [DataSample], { nullable: true })
|
73
|
-
dataSamples: DataSample[]
|
74
|
-
|
75
85
|
@Column({
|
76
86
|
nullable: true
|
77
87
|
})
|
package/server/service/index.ts
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
import { entities as DataItemEntities, resolvers as DataItemResolvers } from './data-item'
|
1
2
|
/* IMPORT ENTITIES AND RESOLVERS */
|
2
|
-
import { entities as
|
3
|
+
import { entities as DataOocEntities, resolvers as DataOocResolvers } from './data-ooc'
|
3
4
|
import { entities as DataSampleEntities, resolvers as DataSampleResolvers } from './data-sample'
|
4
|
-
import { entities as
|
5
|
+
import { entities as DataSensorEntities, resolvers as DataSensorResolvers } from './data-sensor'
|
5
6
|
import { entities as DataSetEntities, resolvers as DataSetResolvers } from './data-set'
|
6
7
|
import { entities as DataSpecEntities, resolvers as DataSpecResolvers } from './data-spec'
|
7
8
|
|
8
9
|
/* EXPORT ENTITY TYPES */
|
10
|
+
export * from './data-ooc/data-ooc'
|
9
11
|
export * from './data-sensor/data-sensor'
|
10
12
|
export * from './data-sample/data-sample'
|
11
13
|
export * from './data-item/data-item'
|
@@ -14,6 +16,7 @@ export * from './data-spec/data-spec'
|
|
14
16
|
|
15
17
|
export const entities = [
|
16
18
|
/* ENTITIES */
|
19
|
+
...DataOocEntities,
|
17
20
|
...DataSensorEntities,
|
18
21
|
...DataSampleEntities,
|
19
22
|
...DataItemEntities,
|
@@ -24,6 +27,7 @@ export const entities = [
|
|
24
27
|
export const schema = {
|
25
28
|
resolverClasses: [
|
26
29
|
/* RESOLVER CLASSES */
|
30
|
+
...DataOocResolvers,
|
27
31
|
...DataSensorResolvers,
|
28
32
|
...DataSampleResolvers,
|
29
33
|
...DataItemResolvers,
|
package/things-factory.config.js
CHANGED
package/translations/en.json
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"field.appliance": "appliance",
|
3
3
|
"field.collected_at": "collected at",
|
4
|
+
"field.corrective-action": "corrective action",
|
5
|
+
"field.corrector": "corrector",
|
6
|
+
"field.corrected-at": "corrected at",
|
4
7
|
"field.data": "data",
|
5
|
-
"field.
|
8
|
+
"field.data-sample": "data sample",
|
9
|
+
"field.data-set": "data set",
|
6
10
|
"field.device-id": "device id",
|
7
11
|
"field.netmask": "network mask",
|
12
|
+
"field.oos": "out of critical limit",
|
13
|
+
"field.ooc": "out of control limit",
|
8
14
|
"field.options": "options",
|
9
15
|
"field.partition-keys": "partition keys",
|
10
16
|
"field.quota": "sampling #",
|
@@ -12,11 +18,16 @@
|
|
12
18
|
"field.ref-by": "ref. by",
|
13
19
|
"field.serial-no": "serial #",
|
14
20
|
"field.spec": "spec",
|
21
|
+
"field.state": "state",
|
22
|
+
"field.supervisory-role": "supervisory role",
|
15
23
|
"field.tag": "tag name",
|
16
24
|
"field.unit": "unit",
|
25
|
+
"field.use-case": "use case",
|
26
|
+
"text.data sample created successfully": "a data sample created successfully",
|
17
27
|
"title.data-entry-form": "data entry form",
|
18
28
|
"title.data-item list": "data item list",
|
29
|
+
"title.data-ooc list": "data OOC list",
|
19
30
|
"title.data-sample list": "data sample list",
|
20
31
|
"title.data-sensor list": "data sensor list",
|
21
32
|
"title.data-set list": "data set list"
|
22
|
-
}
|
33
|
+
}
|
package/translations/ko.json
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"field.appliance": "어플라이언스",
|
3
3
|
"field.collected_at": "수집일시",
|
4
|
+
"field.corrective-action": "조치 활동",
|
5
|
+
"field.corrector": "조치자",
|
6
|
+
"field.corrected-at": "조치 시간",
|
4
7
|
"field.data": "데이타",
|
5
|
-
"field.
|
8
|
+
"field.data-sample": "데이타 샘플",
|
9
|
+
"field.data-set": "데이타셋",
|
6
10
|
"field.device-id": "디바이스 아이디",
|
7
11
|
"field.netmask": "네트워크마스크",
|
12
|
+
"field.oos": "허용한계 이탈여부",
|
13
|
+
"field.ooc": "관리한계 이탈여부",
|
8
14
|
"field.options": "선택옵션",
|
9
15
|
"field.partition-keys": "파티션 키",
|
10
16
|
"field.quota": "샘플수",
|
@@ -12,11 +18,16 @@
|
|
12
18
|
"field.ref-by": "참조아이템",
|
13
19
|
"field.serial-no": "시리얼번호",
|
14
20
|
"field.spec": "명세",
|
21
|
+
"field.state": "상태",
|
22
|
+
"field.supervisory-role": "관리자 역할",
|
15
23
|
"field.tag": "태그이름",
|
16
24
|
"field.unit": "단위",
|
25
|
+
"field.use-case": "사용 사례",
|
26
|
+
"text.data sample created successfully": "데이타 샘플이 성공적으로 생성되었습니다",
|
17
27
|
"title.data-entry-form": "데이타 입력",
|
18
28
|
"title.data-item list": "데이타 아이템 조회",
|
29
|
+
"title.data-ooc list": "데이타 이탈점 조회",
|
19
30
|
"title.data-sample list": "데이타 샘플 조회",
|
20
31
|
"title.data-sensor list": "데이타 센서 조회",
|
21
32
|
"title.data-set list": "데이타 셋 조회"
|
22
|
-
}
|
33
|
+
}
|
package/translations/ms.json
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"field.appliance": "appliance",
|
3
3
|
"field.collected_at": "collected at",
|
4
|
+
"field.corrective-action": "corrective action",
|
5
|
+
"field.corrector": "corrector",
|
6
|
+
"field.corrected-at": "corrected at",
|
4
7
|
"field.data": "data",
|
5
|
-
"field.
|
8
|
+
"field.data-sample": "data sample",
|
9
|
+
"field.data-set": "data set",
|
6
10
|
"field.device-id": "device id",
|
7
11
|
"field.netmask": "network mask",
|
12
|
+
"field.oos": "out of critical limit",
|
13
|
+
"field.ooc": "out of control limit",
|
8
14
|
"field.options": "options",
|
9
15
|
"field.partition-keys": "partition keys",
|
10
16
|
"field.quota": "sampling #",
|
@@ -12,11 +18,16 @@
|
|
12
18
|
"field.ref-by": "ref. by",
|
13
19
|
"field.serial-no": "serial #",
|
14
20
|
"field.spec": "spec",
|
21
|
+
"field.state": "state",
|
22
|
+
"field.supervisory-role": "supervisory role",
|
15
23
|
"field.tag": "tag name",
|
16
24
|
"field.unit": "unit",
|
25
|
+
"field.use-case": "use case",
|
26
|
+
"text.data sample created successfully": "a data sample created successfully",
|
17
27
|
"title.data-entry-form": "data entry form",
|
18
28
|
"title.data-item list": "data item list",
|
29
|
+
"title.data-ooc list": "data OOC list",
|
19
30
|
"title.data-sample list": "data sample list",
|
20
31
|
"title.data-sensor list": "data sensor list",
|
21
32
|
"title.data-set list": "data set list"
|
22
|
-
}
|
33
|
+
}
|
package/translations/zh.json
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"field.appliance": "appliance",
|
3
3
|
"field.collected_at": "collected at",
|
4
|
+
"field.corrective-action": "corrective action",
|
5
|
+
"field.corrector": "corrector",
|
6
|
+
"field.corrected-at": "corrected at",
|
4
7
|
"field.data": "data",
|
5
|
-
"field.
|
8
|
+
"field.data-sample": "data sample",
|
9
|
+
"field.data-set": "data set",
|
6
10
|
"field.device-id": "device id",
|
7
11
|
"field.netmask": "network mask",
|
12
|
+
"field.oos": "out of critical limit",
|
13
|
+
"field.ooc": "out of control limit",
|
8
14
|
"field.options": "options",
|
9
15
|
"field.partition-keys": "partition keys",
|
10
16
|
"field.quota": "sampling #",
|
@@ -12,11 +18,16 @@
|
|
12
18
|
"field.ref-by": "ref. by",
|
13
19
|
"field.serial-no": "serial #",
|
14
20
|
"field.spec": "spec",
|
21
|
+
"field.state": "state",
|
22
|
+
"field.supervisory-role": "supervisory role",
|
15
23
|
"field.tag": "tag name",
|
16
24
|
"field.unit": "unit",
|
25
|
+
"field.use-case": "use case",
|
26
|
+
"text.data sample created successfully": "a data sample created successfully",
|
17
27
|
"title.data-entry-form": "data entry form",
|
18
28
|
"title.data-item list": "data item list",
|
29
|
+
"title.data-ooc list": "data OOC list",
|
19
30
|
"title.data-sample list": "data sample list",
|
20
31
|
"title.data-sensor list": "data sensor list",
|
21
32
|
"title.data-set list": "data set list"
|
22
|
-
}
|
33
|
+
}
|