@things-factory/dataset 7.0.0-alpha.6 → 7.0.0-alpha.8
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/activities/activity-data-collect-view.ts +7 -0
- package/client/activities/activity-data-review-edit.ts +66 -4
- package/client/activities/activity-data-review-view.ts +78 -4
- package/client/activities/activity-ooc-resolve-view.ts +12 -0
- package/client/activities/activity-ooc-review-view.ts +12 -0
- package/client/pages/data-ooc/data-ooc-list-page.ts +50 -21
- package/client/pages/data-ooc/data-ooc-page.ts +44 -0
- package/client/pages/data-ooc/data-ooc-view.ts +158 -19
- package/client/pages/data-ooc/data-oocs-page.ts +71 -3
- package/client/pages/data-sample/data-sample-list-page.ts +33 -16
- package/client/pages/data-sample/data-sample-page.ts +7 -0
- package/client/pages/data-sample/data-sample-search-page.ts +12 -12
- package/client/pages/data-sample/data-sample-view.ts +145 -22
- package/client/pages/data-sample/data-samples-page.ts +133 -5
- package/client/pages/data-sensor/data-sensor-list-page.ts +28 -6
- package/client/pages/data-set/data-item-list.ts +2 -2
- package/client/pages/data-summary/data-summary-list-page.ts +12 -24
- package/dist-client/activities/activity-data-collect-view.js +7 -0
- package/dist-client/activities/activity-data-collect-view.js.map +1 -1
- package/dist-client/activities/activity-data-review-edit.d.ts +1 -1
- package/dist-client/activities/activity-data-review-edit.js +63 -5
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-view.d.ts +1 -1
- package/dist-client/activities/activity-data-review-view.js +75 -5
- package/dist-client/activities/activity-data-review-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.js +12 -0
- package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-view.js +12 -0
- package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +50 -21
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-page.js +44 -0
- package/dist-client/pages/data-ooc/data-ooc-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +6 -3
- package/dist-client/pages/data-ooc/data-ooc-view.js +155 -22
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.d.ts +1 -0
- package/dist-client/pages/data-ooc/data-oocs-page.js +71 -3
- package/dist-client/pages/data-ooc/data-oocs-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.js +33 -16
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-page.js +7 -0
- package/dist-client/pages/data-sample/data-sample-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.js +12 -12
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-view.d.ts +18 -0
- package/dist-client/pages/data-sample/data-sample-view.js +144 -21
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sample/data-samples-page.d.ts +2 -0
- package/dist-client/pages/data-sample/data-samples-page.js +134 -5
- package/dist-client/pages/data-sample/data-samples-page.js.map +1 -1
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +28 -6
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -1
- package/dist-client/pages/data-set/data-item-list.js +2 -2
- package/dist-client/pages/data-set/data-item-list.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-list-page.js +12 -21
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-collect.js.map +1 -1
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +3 -2
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-sample.js +27 -29
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/issue-collect-data.js +55 -0
- package/dist-server/controllers/issue-collect-data.js.map +1 -0
- package/dist-server/engine/index.js +4 -0
- package/dist-server/engine/index.js.map +1 -0
- package/dist-server/engine/task/create-data-sample.js +80 -0
- package/dist-server/engine/task/create-data-sample.js.map +1 -0
- package/dist-server/engine/task/index.js +5 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/engine/task/issue-collect-data.js +40 -0
- package/dist-server/engine/task/issue-collect-data.js.map +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/routes.js +36 -65
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-query.js +32 -0
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +15 -26
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +24 -0
- package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +17 -21
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-query.js +16 -1
- package/dist-server/service/data-sensor/data-sensor-query.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-type.js +8 -0
- package/dist-server/service/data-sensor/data-sensor-type.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor.js +15 -1
- package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
- package/dist-server/service/data-set/data-item-type.js +1 -0
- package/dist-server/service/data-set/data-item-type.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +2 -2
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-summary/data-summary.js +8 -8
- package/dist-server/service/data-summary/data-summary.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/dataset/task/create-data-sample.ja.md +28 -0
- package/helps/dataset/task/create-data-sample.ko.md +28 -0
- package/helps/dataset/task/create-data-sample.md +28 -0
- package/helps/dataset/task/create-data-sample.ms.md +30 -0
- package/helps/dataset/task/create-data-sample.zh.md +28 -0
- package/helps/dataset/task/issue-collect-data.ja.md +35 -0
- package/helps/dataset/task/issue-collect-data.ko.md +32 -0
- package/helps/dataset/task/issue-collect-data.md +32 -0
- package/helps/dataset/task/issue-collect-data.ms.md +34 -0
- package/helps/dataset/task/issue-collect-data.zh.md +32 -0
- package/package.json +11 -11
- package/server/activities/activity-data-collect.ts +3 -11
- package/server/activities/activity-data-review.ts +1 -5
- package/server/activities/activity-ooc-review.ts +6 -16
- package/server/controllers/create-data-sample.ts +31 -38
- package/server/controllers/issue-collect-data.ts +61 -0
- package/server/engine/index.ts +1 -0
- package/server/engine/task/create-data-sample.ts +92 -0
- package/server/engine/task/index.ts +2 -0
- package/server/engine/task/issue-collect-data.ts +45 -0
- package/server/index.ts +1 -0
- package/server/routes.ts +47 -76
- package/server/service/data-ooc/data-ooc-query.ts +17 -0
- package/server/service/data-ooc/data-ooc.ts +17 -28
- package/server/service/data-sample/data-sample-query.ts +17 -17
- package/server/service/data-sample/data-sample.ts +18 -23
- package/server/service/data-sensor/data-sensor-query.ts +13 -1
- package/server/service/data-sensor/data-sensor-type.ts +6 -0
- package/server/service/data-sensor/data-sensor.ts +13 -11
- package/server/service/data-set/data-item-type.ts +1 -0
- package/server/service/data-set/data-set-query.ts +7 -7
- package/server/service/data-summary/data-summary.ts +10 -23
- package/translations/en.json +14 -2
- package/translations/ja.json +11 -1
- package/translations/ko.json +13 -1
- package/translations/ms.json +10 -0
- package/translations/zh.json +11 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'
|
2
|
-
import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
|
2
|
+
import { Column, CreateDateColumn, Entity, Index, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
|
3
3
|
|
4
4
|
import { User } from '@things-factory/auth-base'
|
5
5
|
import { config } from '@things-factory/env'
|
@@ -40,12 +40,10 @@ export class DataOoc {
|
|
40
40
|
domainId?: string
|
41
41
|
|
42
42
|
@Column()
|
43
|
-
@Field()
|
44
|
-
name
|
43
|
+
@Field({ nullable: true })
|
44
|
+
name?: string
|
45
45
|
|
46
|
-
@Column({
|
47
|
-
nullable: true
|
48
|
-
})
|
46
|
+
@Column({ nullable: true })
|
49
47
|
@Field({ nullable: true })
|
50
48
|
description?: string
|
51
49
|
|
@@ -60,21 +58,15 @@ export class DataOoc {
|
|
60
58
|
@Field({ nullable: true })
|
61
59
|
dataSetVersion?: number
|
62
60
|
|
63
|
-
@Column({
|
64
|
-
nullable: true
|
65
|
-
})
|
61
|
+
@Column({ nullable: true })
|
66
62
|
@Field({ nullable: true })
|
67
63
|
ooc?: boolean
|
68
64
|
|
69
|
-
@Column({
|
70
|
-
nullable: true
|
71
|
-
})
|
65
|
+
@Column({ nullable: true })
|
72
66
|
@Field({ nullable: true })
|
73
67
|
oos?: boolean
|
74
68
|
|
75
|
-
@Column({
|
76
|
-
nullable: true
|
77
|
-
})
|
69
|
+
@Column({ nullable: true })
|
78
70
|
@Field({ nullable: true })
|
79
71
|
state?: DataOocStatus
|
80
72
|
|
@@ -92,15 +84,11 @@ export class DataOoc {
|
|
92
84
|
@Field({ nullable: true })
|
93
85
|
correctiveAction?: string
|
94
86
|
|
95
|
-
@Column({
|
96
|
-
nullable: true
|
97
|
-
})
|
87
|
+
@Column({ nullable: true })
|
98
88
|
@Field({ nullable: true })
|
99
89
|
type?: string
|
100
90
|
|
101
|
-
@Column({
|
102
|
-
nullable: true
|
103
|
-
})
|
91
|
+
@Column({ nullable: true })
|
104
92
|
@Field({ nullable: true })
|
105
93
|
useCase?: string
|
106
94
|
|
@@ -150,27 +138,28 @@ export class DataOoc {
|
|
150
138
|
@Field({ nullable: true })
|
151
139
|
rawData?: string
|
152
140
|
|
153
|
-
@Column({
|
154
|
-
nullable: true
|
155
|
-
})
|
141
|
+
@Column({ nullable: true })
|
156
142
|
@Field({ nullable: true })
|
157
143
|
source?: string
|
158
144
|
|
159
|
-
@
|
160
|
-
@
|
145
|
+
@OneToOne(type => DataSample, { nullable: true })
|
146
|
+
@JoinColumn()
|
147
|
+
@Field(type => DataSample, { nullable: true })
|
161
148
|
dataSample?: DataSample
|
162
149
|
|
163
150
|
@RelationId((dataOoc: DataOoc) => dataOoc.dataSample)
|
164
151
|
dataSampleId?: string
|
165
152
|
|
166
|
-
@
|
153
|
+
@OneToOne(type => ActivityInstance, { nullable: true })
|
154
|
+
@JoinColumn()
|
167
155
|
@Field({ nullable: true })
|
168
156
|
reviewActivityInstance?: ActivityInstance
|
169
157
|
|
170
158
|
@RelationId((dataOoc: DataOoc) => dataOoc.reviewActivityInstance)
|
171
159
|
reviewActivityInstanceId?: string
|
172
160
|
|
173
|
-
@
|
161
|
+
@OneToOne(type => ActivityInstance, { nullable: true })
|
162
|
+
@JoinColumn()
|
174
163
|
@Field({ nullable: true })
|
175
164
|
resolveActivityInstance?: ActivityInstance
|
176
165
|
|
@@ -2,18 +2,14 @@ import { In } from 'typeorm'
|
|
2
2
|
import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'
|
3
3
|
|
4
4
|
import { User } from '@things-factory/auth-base'
|
5
|
-
import {
|
6
|
-
|
7
|
-
getQueryBuilderFromListParams,
|
8
|
-
getRepository,
|
9
|
-
getISOStringsForPeriod,
|
10
|
-
ListParam
|
11
|
-
} from '@things-factory/shell'
|
5
|
+
import { Domain, getQueryBuilderFromListParams, getRepository, getISOStringsForPeriod, ListParam } from '@things-factory/shell'
|
6
|
+
import { ActivityInstance } from '@things-factory/worklist'
|
12
7
|
|
13
8
|
import { DataKeySet } from '../data-key-set/data-key-set'
|
14
9
|
import { DataSetHistory } from '../data-set-history/data-set-history'
|
15
10
|
import { DataItem } from '../data-set/data-item-type'
|
16
11
|
import { DataSet } from '../data-set/data-set'
|
12
|
+
import { DataOoc } from '../data-ooc/data-ooc'
|
17
13
|
import { DataSample } from './data-sample'
|
18
14
|
import { DataSampleList } from './data-sample-type'
|
19
15
|
|
@@ -48,11 +44,7 @@ export class DataSampleQuery {
|
|
48
44
|
|
49
45
|
@Directive('@privilege(category: "data-sample", privilege: "query", domainOwnerGranted: true)')
|
50
46
|
@Query(returns => DataSampleList, { description: 'To fetch multiple data samples by data set' })
|
51
|
-
async dataSamplesByDataSet(
|
52
|
-
@Arg('dataSetId') dataSetId: string,
|
53
|
-
@Args() params: ListParam,
|
54
|
-
@Ctx() context: ResolverContext
|
55
|
-
): Promise<DataSampleList> {
|
47
|
+
async dataSamplesByDataSet(@Arg('dataSetId') dataSetId: string, @Args() params: ListParam, @Ctx() context: ResolverContext): Promise<DataSampleList> {
|
56
48
|
const { domain } = context.state
|
57
49
|
|
58
50
|
const dataSet = await getRepository(DataSet).findOne({
|
@@ -84,11 +76,7 @@ export class DataSampleQuery {
|
|
84
76
|
|
85
77
|
@Directive('@privilege(category: "data-sample", privilege: "query", domainOwnerGranted: true)')
|
86
78
|
@Query(returns => DataSampleList, { description: 'To fetch multiple data samples by data key set' })
|
87
|
-
async dataSamplesByDataKeySet(
|
88
|
-
@Arg('dataKeySetId') dataKeySetId: string,
|
89
|
-
@Args() params: ListParam,
|
90
|
-
@Ctx() context: ResolverContext
|
91
|
-
): Promise<DataSampleList> {
|
79
|
+
async dataSamplesByDataKeySet(@Arg('dataKeySetId') dataKeySetId: string, @Args() params: ListParam, @Ctx() context: ResolverContext): Promise<DataSampleList> {
|
92
80
|
const { domain } = context.state
|
93
81
|
|
94
82
|
const dataKeySet = await getRepository(DataKeySet).findOneBy({ id: dataKeySetId })
|
@@ -178,6 +166,18 @@ export class DataSampleQuery {
|
|
178
166
|
return dataSample.dataSetId && (await getRepository(DataSet).findOneBy({ id: dataSample.dataSetId }))
|
179
167
|
}
|
180
168
|
|
169
|
+
@FieldResolver(type => DataOoc)
|
170
|
+
async dataOoc(@Root() dataSample: DataSample): Promise<DataOoc> {
|
171
|
+
if (dataSample.ooc || dataSample.oos) {
|
172
|
+
return await getRepository(DataOoc).findOneBy({ dataSample: { id: dataSample.id } })
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
@FieldResolver(type => ActivityInstance)
|
177
|
+
async reviewActivityInstance(@Root() dataSample: DataSample): Promise<ActivityInstance> {
|
178
|
+
return dataSample.reviewActivityInstanceId && (await getRepository(ActivityInstance).findOneBy({ id: dataSample.reviewActivityInstanceId }))
|
179
|
+
}
|
180
|
+
|
181
181
|
@FieldResolver(type => Domain)
|
182
182
|
async domain(@Root() dataSample: DataSample): Promise<Domain> {
|
183
183
|
return dataSample.domainId && (await getRepository(Domain).findOneBy({ id: dataSample.domainId }))
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { Field, ID, ObjectType } from 'type-graphql'
|
2
|
-
import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
|
2
|
+
import { Column, CreateDateColumn, Entity, Index, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
|
3
3
|
|
4
4
|
import { User } from '@things-factory/auth-base'
|
5
5
|
import { config } from '@things-factory/env'
|
6
|
-
import { Domain, ScalarObject } from '@things-factory/shell'
|
6
|
+
import { Domain, ScalarObject, json5Transformer } from '@things-factory/shell'
|
7
7
|
import { ActivityInstance } from '@things-factory/worklist'
|
8
8
|
|
9
9
|
import { DataItem } from '../data-set/data-item-type'
|
10
10
|
import { DataSet } from '../data-set/data-set'
|
11
|
+
import { DataOoc } from '../data-ooc/data-ooc'
|
11
12
|
|
12
13
|
const ORMCONFIG = config.get('ormconfig', {})
|
13
14
|
const DATABASE_TYPE = ORMCONFIG.type
|
@@ -30,24 +31,18 @@ export class DataSample {
|
|
30
31
|
domainId?: string
|
31
32
|
|
32
33
|
@Column()
|
33
|
-
@Field()
|
34
|
+
@Field({ nullable: true })
|
34
35
|
name: string
|
35
36
|
|
36
|
-
@Column({
|
37
|
-
nullable: true
|
38
|
-
})
|
37
|
+
@Column({ nullable: true })
|
39
38
|
@Field({ nullable: true })
|
40
39
|
description?: string
|
41
40
|
|
42
|
-
@Column({
|
43
|
-
nullable: true
|
44
|
-
})
|
41
|
+
@Column({ nullable: true })
|
45
42
|
@Field({ nullable: true })
|
46
43
|
type?: string
|
47
44
|
|
48
|
-
@Column({
|
49
|
-
nullable: true
|
50
|
-
})
|
45
|
+
@Column({ nullable: true })
|
51
46
|
@Field({ nullable: true })
|
52
47
|
useCase?: string
|
53
48
|
|
@@ -79,26 +74,21 @@ export class DataSample {
|
|
79
74
|
|
80
75
|
@Column({
|
81
76
|
nullable: true,
|
82
|
-
type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar'
|
77
|
+
type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar',
|
78
|
+
transformer: json5Transformer
|
83
79
|
})
|
84
80
|
@Field({ nullable: true })
|
85
81
|
rawData?: string
|
86
82
|
|
87
|
-
@Column({
|
88
|
-
nullable: true
|
89
|
-
})
|
83
|
+
@Column({ nullable: true })
|
90
84
|
@Field({ nullable: true })
|
91
85
|
source?: string
|
92
86
|
|
93
|
-
@Column({
|
94
|
-
nullable: true
|
95
|
-
})
|
87
|
+
@Column({ nullable: true })
|
96
88
|
@Field({ nullable: true })
|
97
89
|
ooc?: boolean
|
98
90
|
|
99
|
-
@Column({
|
100
|
-
nullable: true
|
101
|
-
})
|
91
|
+
@Column({ nullable: true })
|
102
92
|
@Field({ nullable: true })
|
103
93
|
oos?: boolean
|
104
94
|
|
@@ -130,13 +120,18 @@ export class DataSample {
|
|
130
120
|
@Field({ nullable: true })
|
131
121
|
workShift?: string
|
132
122
|
|
133
|
-
@
|
123
|
+
@OneToOne(type => ActivityInstance, { nullable: true })
|
124
|
+
@JoinColumn()
|
134
125
|
@Field({ nullable: true })
|
135
126
|
reviewActivityInstance?: ActivityInstance
|
136
127
|
|
137
128
|
@RelationId((dataSample: DataSample) => dataSample.reviewActivityInstance)
|
138
129
|
reviewActivityInstanceId?: string
|
139
130
|
|
131
|
+
@OneToOne(type => DataOoc, dataOoc => dataOoc.dataSample, { nullable: true })
|
132
|
+
@Field(type => DataOoc, { nullable: true })
|
133
|
+
dataOoc?: DataOoc
|
134
|
+
|
140
135
|
@Column({ nullable: true })
|
141
136
|
@Field({ nullable: true })
|
142
137
|
collectedAt?: Date
|
@@ -2,6 +2,7 @@ import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graph
|
|
2
2
|
|
3
3
|
import { Appliance, User } from '@things-factory/auth-base'
|
4
4
|
import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
|
5
|
+
import { Scenario } from '@things-factory/integration-base'
|
5
6
|
|
6
7
|
import { DataSet } from '../data-set/data-set'
|
7
8
|
import { DataSensor } from './data-sensor'
|
@@ -39,11 +40,22 @@ export class DataSensorQuery {
|
|
39
40
|
return dataSensor.applianceId && (await getRepository(Appliance).findOneBy({ id: dataSensor.applianceId }))
|
40
41
|
}
|
41
42
|
|
42
|
-
@FieldResolver(type =>
|
43
|
+
@FieldResolver(type => DataSet)
|
43
44
|
async dataSet(@Root() dataSensor: DataSensor): Promise<DataSet> {
|
44
45
|
return dataSensor.dataSetId && (await getRepository(DataSet).findOneBy({ id: dataSensor.dataSetId }))
|
45
46
|
}
|
46
47
|
|
48
|
+
@FieldResolver(type => Scenario)
|
49
|
+
async decoder(@Root() dataSensor: DataSensor): Promise<Scenario> {
|
50
|
+
return (
|
51
|
+
dataSensor.decoder ||
|
52
|
+
(dataSensor.decoderId &&
|
53
|
+
(await getRepository(Scenario).findOneBy({
|
54
|
+
id: dataSensor.decoderId
|
55
|
+
})))
|
56
|
+
)
|
57
|
+
}
|
58
|
+
|
47
59
|
@FieldResolver(type => Domain)
|
48
60
|
async domain(@Root() dataSensor: DataSensor): Promise<Domain> {
|
49
61
|
return dataSensor.domainId && (await getRepository(Domain).findOneBy({ id: dataSensor.domainId }))
|
@@ -41,6 +41,9 @@ export class NewDataSensor {
|
|
41
41
|
|
42
42
|
@Field(type => ObjectRef, { nullable: true })
|
43
43
|
dataSet?: ObjectRef
|
44
|
+
|
45
|
+
@Field(type => ObjectRef, { nullable: true })
|
46
|
+
decoder?: ObjectRef
|
44
47
|
}
|
45
48
|
|
46
49
|
@InputType()
|
@@ -84,6 +87,9 @@ export class DataSensorPatch {
|
|
84
87
|
@Field(type => ObjectRef, { nullable: true })
|
85
88
|
dataSet?: ObjectRef
|
86
89
|
|
90
|
+
@Field(type => ObjectRef, { nullable: true })
|
91
|
+
decoder?: ObjectRef
|
92
|
+
|
87
93
|
@Field()
|
88
94
|
cuFlag: string
|
89
95
|
}
|
@@ -1,17 +1,9 @@
|
|
1
1
|
import { Field, ID, ObjectType } from 'type-graphql'
|
2
|
-
import {
|
3
|
-
Column,
|
4
|
-
CreateDateColumn,
|
5
|
-
Entity,
|
6
|
-
Index,
|
7
|
-
ManyToOne,
|
8
|
-
PrimaryGeneratedColumn,
|
9
|
-
RelationId,
|
10
|
-
UpdateDateColumn
|
11
|
-
} from 'typeorm'
|
2
|
+
import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
|
12
3
|
|
13
|
-
import { Appliance, User } from '@things-factory/auth-base'
|
14
4
|
import { Domain } from '@things-factory/shell'
|
5
|
+
import { Appliance, User } from '@things-factory/auth-base'
|
6
|
+
import { Scenario } from '@things-factory/integration-base'
|
15
7
|
|
16
8
|
import { DataSet } from '../data-set/data-set'
|
17
9
|
|
@@ -91,6 +83,16 @@ export class DataSensor {
|
|
91
83
|
@RelationId((dataSensor: DataSensor) => dataSensor.dataSet)
|
92
84
|
dataSetId?: string
|
93
85
|
|
86
|
+
@ManyToOne(type => Scenario, { nullable: true })
|
87
|
+
@Field(type => Scenario, {
|
88
|
+
nullable: true,
|
89
|
+
description: 'The decoder scenario that automatically executes based on the trigger of raw data collection'
|
90
|
+
})
|
91
|
+
decoder?: Scenario
|
92
|
+
|
93
|
+
@RelationId((dataSensor: DataSensor) => dataSensor.decoder)
|
94
|
+
decoderId?: string
|
95
|
+
|
94
96
|
@CreateDateColumn()
|
95
97
|
@Field({ nullable: true })
|
96
98
|
createdAt?: Date
|
@@ -243,21 +243,21 @@ export class DataSetQuery {
|
|
243
243
|
}
|
244
244
|
|
245
245
|
@FieldResolver(type => Board, { nullable: true })
|
246
|
-
async entryBoard(@Root() dataSet: DataSet) {
|
246
|
+
async entryBoard(@Root() dataSet: DataSet): Promise<Board> {
|
247
247
|
if (dataSet.entryType == 'board' && dataSet.entryView) {
|
248
248
|
return await getRepository(Board).findOneBy({ id: dataSet.entryView })
|
249
249
|
}
|
250
250
|
}
|
251
251
|
|
252
252
|
@FieldResolver(type => Board, { nullable: true })
|
253
|
-
async monitorBoard(@Root() dataSet: DataSet) {
|
253
|
+
async monitorBoard(@Root() dataSet: DataSet): Promise<Board> {
|
254
254
|
if (dataSet.monitorType == 'board' && dataSet.monitorView) {
|
255
255
|
return await getRepository(Board).findOneBy({ id: dataSet.monitorView })
|
256
256
|
}
|
257
257
|
}
|
258
258
|
|
259
259
|
@FieldResolver(type => DataKeySet, { nullable: true })
|
260
|
-
async dataKeySet(@Root() dataSet: DataSet) {
|
260
|
+
async dataKeySet(@Root() dataSet: DataSet): Promise<DataKeySet> {
|
261
261
|
return (
|
262
262
|
dataSet.dataKeySet ||
|
263
263
|
(dataSet.dataKeySetId &&
|
@@ -267,8 +267,8 @@ export class DataSetQuery {
|
|
267
267
|
)
|
268
268
|
}
|
269
269
|
|
270
|
-
@FieldResolver(type =>
|
271
|
-
async normalScenario(@Root() dataSet: DataSet): Promise<
|
270
|
+
@FieldResolver(type => Scenario)
|
271
|
+
async normalScenario(@Root() dataSet: DataSet): Promise<Scenario> {
|
272
272
|
return (
|
273
273
|
dataSet.normalScenario ||
|
274
274
|
(dataSet.normalScenarioId &&
|
@@ -278,8 +278,8 @@ export class DataSetQuery {
|
|
278
278
|
)
|
279
279
|
}
|
280
280
|
|
281
|
-
@FieldResolver(type =>
|
282
|
-
async outlierScenario(@Root() dataSet: DataSet): Promise<
|
281
|
+
@FieldResolver(type => Scenario)
|
282
|
+
async outlierScenario(@Root() dataSet: DataSet): Promise<Scenario> {
|
283
283
|
return (
|
284
284
|
dataSet.outlierScenario ||
|
285
285
|
(dataSet.outlierScenarioId &&
|
@@ -1,13 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
CreateDateColumn,
|
3
|
-
UpdateDateColumn,
|
4
|
-
Entity,
|
5
|
-
Index,
|
6
|
-
Column,
|
7
|
-
RelationId,
|
8
|
-
ManyToOne,
|
9
|
-
PrimaryGeneratedColumn
|
10
|
-
} from 'typeorm'
|
1
|
+
import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
|
11
2
|
import { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'
|
12
3
|
|
13
4
|
import { Domain, ScalarObject } from '@things-factory/shell'
|
@@ -25,18 +16,14 @@ import { DataSet, DataSetSummaryPeriodType } from '../data-set/data-set'
|
|
25
16
|
dataSummary.key01,
|
26
17
|
dataSummary.key02,
|
27
18
|
dataSummary.key03,
|
28
|
-
dataSummary.key05,
|
29
19
|
dataSummary.key04,
|
20
|
+
dataSummary.key05,
|
30
21
|
dataSummary.date,
|
31
22
|
dataSummary.period
|
32
23
|
],
|
33
24
|
{ unique: true }
|
34
25
|
)
|
35
|
-
@Index(
|
36
|
-
'ix_data_summary_1',
|
37
|
-
(dataSummary: DataSummary) => [dataSummary.domain, dataSummary.dataSet, dataSummary.date, dataSummary.period],
|
38
|
-
{ unique: false }
|
39
|
-
)
|
26
|
+
@Index('ix_data_summary_1', (dataSummary: DataSummary) => [dataSummary.domain, dataSummary.dataSet, dataSummary.date, dataSummary.period], { unique: false })
|
40
27
|
@ObjectType({ description: 'Entity for DataSummary' })
|
41
28
|
export class DataSummary {
|
42
29
|
@PrimaryGeneratedColumn('uuid')
|
@@ -62,11 +49,11 @@ export class DataSummary {
|
|
62
49
|
@Field({ nullable: true })
|
63
50
|
type?: DataSetSummaryPeriodType
|
64
51
|
|
65
|
-
@Column({ nullable: true, default: '' })
|
52
|
+
@Column({ nullable: true, default: '', length: 20 })
|
66
53
|
@Field({ nullable: true })
|
67
54
|
date?: string = ''
|
68
55
|
|
69
|
-
@Column({ nullable: true, default: '' })
|
56
|
+
@Column({ nullable: true, default: '', length: 20 })
|
70
57
|
@Field({ nullable: true })
|
71
58
|
period?: string = ''
|
72
59
|
|
@@ -106,23 +93,23 @@ export class DataSummary {
|
|
106
93
|
@Field({ nullable: true })
|
107
94
|
countOos?: number
|
108
95
|
|
109
|
-
@Column({ nullable: true, default: '' })
|
96
|
+
@Column({ nullable: true, default: '', length: 100 })
|
110
97
|
@Field({ nullable: true })
|
111
98
|
key01?: string = ''
|
112
99
|
|
113
|
-
@Column({ nullable: true, default: '' })
|
100
|
+
@Column({ nullable: true, default: '', length: 100 })
|
114
101
|
@Field({ nullable: true })
|
115
102
|
key02?: string = ''
|
116
103
|
|
117
|
-
@Column({ nullable: true, default: '' })
|
104
|
+
@Column({ nullable: true, default: '', length: 100 })
|
118
105
|
@Field({ nullable: true })
|
119
106
|
key03?: string = ''
|
120
107
|
|
121
|
-
@Column({ nullable: true, default: '' })
|
108
|
+
@Column({ nullable: true, default: '', length: 100 })
|
122
109
|
@Field({ nullable: true })
|
123
110
|
key04?: string = ''
|
124
111
|
|
125
|
-
@Column({ nullable: true, default: '' })
|
112
|
+
@Column({ nullable: true, default: '', length: 100 })
|
126
113
|
@Field({ nullable: true })
|
127
114
|
key05?: string = ''
|
128
115
|
|
package/translations/en.json
CHANGED
@@ -10,7 +10,8 @@
|
|
10
10
|
"field.assignees": "assignees",
|
11
11
|
"field.collected-at": "collected at",
|
12
12
|
"field.corrected-at": "corrected at",
|
13
|
-
"field.corrective-action": "
|
13
|
+
"field.corrective-action": "action",
|
14
|
+
"field.corrective-instruction": "instruction",
|
14
15
|
"field.corrector": "corrector",
|
15
16
|
"field.count": "count",
|
16
17
|
"field.count-ooc": "oos count",
|
@@ -26,6 +27,8 @@
|
|
26
27
|
"field.data-sample": "data sample",
|
27
28
|
"field.data-set": "data set",
|
28
29
|
"field.date": "date",
|
30
|
+
"field.decoder": "decoder",
|
31
|
+
"field.decoder-scenario": "decoder scenario",
|
29
32
|
"field.device-id": "device id",
|
30
33
|
"field.download-url": "download url",
|
31
34
|
"field.entry-role": "entry role",
|
@@ -84,22 +87,28 @@
|
|
84
87
|
"label.corrective action": "corrective action",
|
85
88
|
"label.corrective instruction": "corrective instruction",
|
86
89
|
"label.critical-limits": "critical limits",
|
90
|
+
"label.data-set": "data set",
|
87
91
|
"label.data-set-type": "type",
|
92
|
+
"label.datasample review timeline": "data sample review timeline",
|
88
93
|
"label.end-date": "end date",
|
89
94
|
"label.group-by data-keys": "group by each data-keys",
|
90
95
|
"label.maximum value": "maximum value",
|
91
96
|
"label.minimum value": "minimum value",
|
97
|
+
"label.ooc resolve timeline": "OOC resolve timeline",
|
98
|
+
"label.ooc review timeline": "OOC review timeline",
|
92
99
|
"label.pass-limits": "pass limits",
|
93
100
|
"label.period-12-months": "12 months",
|
94
101
|
"label.period-30-days": "30 days",
|
95
102
|
"label.period-this-month": "this month",
|
96
103
|
"label.period-this-year": "this year",
|
97
104
|
"label.period-today": "today",
|
105
|
+
"label.raw-data": "raw data",
|
98
106
|
"label.start-date": "start date",
|
99
107
|
"label.state-corrected": "corrected",
|
100
108
|
"label.state-issued": "issued",
|
101
109
|
"label.state-reviewed": "reviewed",
|
102
110
|
"label.target-limits": "target limits",
|
111
|
+
"label.timestamp": "timestamp",
|
103
112
|
"text.automatically collected": "automatically collected",
|
104
113
|
"text.corrective action placeholder": "Please enter details for implementing corrective and preventive actions",
|
105
114
|
"text.corrective instruction placeholder": "Please enter instructions for corrective and preventive actions",
|
@@ -141,10 +150,13 @@
|
|
141
150
|
"title.edit duration": "edit duration",
|
142
151
|
"title.edit hashtag": "edit hashtag",
|
143
152
|
"title.edit json": "edit json",
|
153
|
+
"title.lookup scenario": "lookup scenario",
|
144
154
|
"title.open data sample report page": "open data sample report page",
|
145
155
|
"title.open data sample search page": "open data sample search page",
|
146
156
|
"title.open data sample view": "open data sample view",
|
147
157
|
"title.open data summary view": "open data summary view",
|
148
158
|
"title.ready": "ready",
|
149
|
-
"title.view detail ooc data": "view detail ooc data"
|
159
|
+
"title.view detail ooc data": "view detail ooc data",
|
160
|
+
"title.Data Key Set Master": "data key set master",
|
161
|
+
"menu.Data Key Set Master": "Data Key Set Master"
|
150
162
|
}
|
package/translations/ja.json
CHANGED
@@ -10,7 +10,8 @@
|
|
10
10
|
"field.assignees": "譲渡人リスト",
|
11
11
|
"field.collected-at": "取集日時",
|
12
12
|
"field.corrected-at": "措置時間",
|
13
|
-
"field.corrective-action": "
|
13
|
+
"field.corrective-action": "是正措置",
|
14
|
+
"field.corrective-instruction": "是正指示",
|
14
15
|
"field.corrector": "措置者",
|
15
16
|
"field.count": "件数",
|
16
17
|
"field.count-ooc": "管理限界離脱件数",
|
@@ -26,6 +27,8 @@
|
|
26
27
|
"field.data-sample": "データ サンプル",
|
27
28
|
"field.data-set": "データ セット",
|
28
29
|
"field.date": "日時",
|
30
|
+
"field.decoder": "デコーダー",
|
31
|
+
"field.decoder-scenario": "デコーダーシナリオ",
|
29
32
|
"field.device-id": "デバイスID",
|
30
33
|
"field.download-url": "ダウンロード アドレス",
|
31
34
|
"field.entry-role": "入力担当ロール",
|
@@ -84,22 +87,28 @@
|
|
84
87
|
"label.corrective action": "是正措置",
|
85
88
|
"label.corrective instruction": "是正指示",
|
86
89
|
"label.critical-limits": "許容限界範囲",
|
90
|
+
"label.data-set": "データ セット",
|
87
91
|
"label.data-set-type": "タイプ",
|
92
|
+
"label.datasample review timeline": "データサンプルレビュータイムライン",
|
88
93
|
"label.end-date": "終了日",
|
89
94
|
"label.group-by data-keys": "各データキーごとにグループ化",
|
90
95
|
"label.maximum value": "最大値",
|
91
96
|
"label.minimum value": "最小値",
|
97
|
+
"label.ooc resolve timeline": "OOC 解決タイムライン",
|
98
|
+
"label.ooc review timeline": "OOC レビュータイムライン",
|
92
99
|
"label.pass-limits": "通過許容範囲",
|
93
100
|
"label.period-12-months": "12ヶ月",
|
94
101
|
"label.period-30-days": "30日",
|
95
102
|
"label.period-this-month": "今月",
|
96
103
|
"label.period-this-year": "今年",
|
97
104
|
"label.period-today": "今日",
|
105
|
+
"label.raw-data": "生データ",
|
98
106
|
"label.start-date": "開始日",
|
99
107
|
"label.state-corrected": "修正済",
|
100
108
|
"label.state-issued": "発行済",
|
101
109
|
"label.state-reviewed": "審査済",
|
102
110
|
"label.target-limits": "管理目標範囲",
|
111
|
+
"label.timestamp": "タイムスタンプ",
|
103
112
|
"text.automatically collected": "自動収集",
|
104
113
|
"text.corrective action placeholder": "是正及び予防措置の実施事項を入力してください",
|
105
114
|
"text.corrective instruction placeholder": "是正及び予防措置の指示事項を入力してください",
|
@@ -140,6 +149,7 @@
|
|
140
149
|
"title.edit duration": "周期編集",
|
141
150
|
"title.edit hashtag": "ハッシュタグ編集",
|
142
151
|
"title.edit json": "JSON編集",
|
152
|
+
"title.lookup scenario": "ルックアップシナリオ",
|
143
153
|
"title.open data sample report page": "データ サンプル レポート ページを開く",
|
144
154
|
"title.open data sample search page": "データ サンプル検索ページを開く",
|
145
155
|
"title.open data sample view": "データ サンプル ビューページを開く",
|
package/translations/ko.json
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
"field.collected-at": "수집일시",
|
12
12
|
"field.corrected-at": "조치 시간",
|
13
13
|
"field.corrective-action": "조치 활동",
|
14
|
+
"field.corrective-instruction": "조치 지시",
|
14
15
|
"field.corrector": "조치자",
|
15
16
|
"field.count": "건수",
|
16
17
|
"field.count-ooc": "관리한계이탈 건수",
|
@@ -26,6 +27,8 @@
|
|
26
27
|
"field.data-sample": "데이타 샘플",
|
27
28
|
"field.data-set": "데이타셋",
|
28
29
|
"field.date": "일자",
|
30
|
+
"field.decoder": "디코더",
|
31
|
+
"field.decoder-scenario": "디코더 시나리오",
|
29
32
|
"field.device-id": "디바이스 아이디",
|
30
33
|
"field.download-url": "다운로드 주소",
|
31
34
|
"field.entry-role": "입력담당 역할",
|
@@ -84,22 +87,28 @@
|
|
84
87
|
"label.corrective action": "수정 조치",
|
85
88
|
"label.corrective instruction": "수정 지시",
|
86
89
|
"label.critical-limits": "허용 한계범위",
|
90
|
+
"label.data-set": "데이타셋",
|
87
91
|
"label.data-set-type": "유형",
|
92
|
+
"label.datasample review timeline": "데이타샘플 리뷰 타임라인",
|
88
93
|
"label.end-date": "종료일",
|
89
94
|
"label.group-by data-keys": "각 데이터 키별로 그룹화",
|
90
95
|
"label.maximum value": "최대값",
|
91
96
|
"label.minimum value": "최소값",
|
97
|
+
"label.ooc resolve timeline": "OOC 조치 타임라인",
|
98
|
+
"label.ooc review timeline": "OOC 검토 타임라인",
|
92
99
|
"label.pass-limits": "통과 허용범위",
|
93
100
|
"label.period-12-months": "최근 12개월",
|
94
101
|
"label.period-30-days": "최근 30일",
|
95
102
|
"label.period-this-month": "이번달",
|
96
103
|
"label.period-this-year": "올해",
|
97
104
|
"label.period-today": "오늘",
|
105
|
+
"label.raw-data": "원시 데이타",
|
98
106
|
"label.start-date": "시작일",
|
99
107
|
"label.state-corrected": "조치완료",
|
100
108
|
"label.state-issued": "발생",
|
101
109
|
"label.state-reviewed": "검토완료",
|
102
110
|
"label.target-limits": "관리 목표범위",
|
111
|
+
"label.timestamp": "타임스탬프",
|
103
112
|
"text.automatically collected": "자동 수집",
|
104
113
|
"text.corrective action placeholder": "시정 및 예방을 위한 조치 이행 사항을 입력해주세요",
|
105
114
|
"text.corrective instruction placeholder": "시정 및 예방을 위한 조치 지시 사항을 입력해주세요",
|
@@ -140,10 +149,13 @@
|
|
140
149
|
"title.edit duration": "주기 편집",
|
141
150
|
"title.edit hashtag": "해시태그 편집",
|
142
151
|
"title.edit json": "JSON 편집",
|
152
|
+
"title.lookup scenario": "시나리오 선택",
|
143
153
|
"title.open data sample report page": "데이타 샘플 레포트 페이지 열기",
|
144
154
|
"title.open data sample search page": "데이타 샘플 검색 페이지 열기",
|
145
155
|
"title.open data sample view": "데이타 샘플 뷰페이지 열기",
|
146
156
|
"title.open data summary view": "데이타 수집 마감 뷰페이지 열기",
|
147
157
|
"title.ready": "준비 중",
|
148
|
-
"title.view detail ooc data": "OOC 데이타 상세보기"
|
158
|
+
"title.view detail ooc data": "OOC 데이타 상세보기",
|
159
|
+
"title.Data Key Set Master": "데이타 키셋 관리",
|
160
|
+
"menu.Data Key Set Master": "데이타 키셋 관리"
|
149
161
|
}
|