@sedni/cloud_common 2.1.0 → 3.0.0
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/dist/browser-index.cjs +885 -0
- package/dist/browser-index.d.cts +377 -0
- package/dist/browser-index.d.ts +377 -0
- package/dist/browser-index.js +245 -0
- package/dist/chunk-FO3TASV6.js +805 -0
- package/dist/index.cjs +1665 -57
- package/dist/index.d.cts +923 -181
- package/dist/index.d.ts +923 -181
- package/dist/index.js +1080 -43
- package/dist/unit.types-BhezeBWA.d.cts +737 -0
- package/dist/unit.types-BhezeBWA.d.ts +737 -0
- package/package.json +8 -6
- package/dist/chunk-AOC7BD5E.js +0 -153
- package/dist/chunk-NCUZ3O3P.js +0 -152
- package/dist/node-entry.cjs +0 -1191
- package/dist/node-entry.d.cts +0 -53
- package/dist/node-entry.d.ts +0 -53
- package/dist/node-entry.js +0 -1078
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,15 +17,289 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// app/index.ts
|
|
21
31
|
var index_exports = {};
|
|
22
32
|
__export(index_exports, {
|
|
23
|
-
|
|
33
|
+
default: () => index_default
|
|
24
34
|
});
|
|
25
35
|
module.exports = __toCommonJS(index_exports);
|
|
26
36
|
|
|
37
|
+
// app/models/Channel.ts
|
|
38
|
+
var import_mongoose = __toESM(require("mongoose"), 1);
|
|
39
|
+
var import_mongoose_autopopulate = __toESM(require("mongoose-autopopulate"), 1);
|
|
40
|
+
var import_mongoose_paginate_v2 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
41
|
+
var import_mongoose_aggregate_paginate_v2 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
42
|
+
var channelSchema = new import_mongoose.default.Schema({
|
|
43
|
+
channel_tag: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
channel_description: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
channel_unit_id: {
|
|
52
|
+
type: import_mongoose.default.Schema.Types.ObjectId,
|
|
53
|
+
ref: "Unit",
|
|
54
|
+
required: true,
|
|
55
|
+
autopopulate: true
|
|
56
|
+
},
|
|
57
|
+
channel_parsed: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: true
|
|
60
|
+
},
|
|
61
|
+
channel_last_bucket_sync: {
|
|
62
|
+
type: Date,
|
|
63
|
+
required: false
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
timestamps: {
|
|
67
|
+
createdAt: true,
|
|
68
|
+
updatedAt: true
|
|
69
|
+
},
|
|
70
|
+
collection: "channels",
|
|
71
|
+
toJSON: {
|
|
72
|
+
transform: function(doc, ret) {
|
|
73
|
+
ret.id = ret._id;
|
|
74
|
+
ret.channel_unit = ret.channel_unit_id;
|
|
75
|
+
ret.channel_unit_id = ret.channel_unit_id.unit_id;
|
|
76
|
+
delete ret._id;
|
|
77
|
+
delete ret.__v;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
channelSchema.index({ "channel_tag": 1 }, { unique: true });
|
|
82
|
+
channelSchema.index({ "channel_description": 1 });
|
|
83
|
+
channelSchema.plugin(import_mongoose_paginate_v2.default);
|
|
84
|
+
channelSchema.plugin(import_mongoose_aggregate_paginate_v2.default);
|
|
85
|
+
channelSchema.plugin(import_mongoose_autopopulate.default);
|
|
86
|
+
var Channel_default = channelSchema;
|
|
87
|
+
|
|
88
|
+
// app/models/ChannelDataBucket.ts
|
|
89
|
+
var import_mongoose2 = __toESM(require("mongoose"), 1);
|
|
90
|
+
var import_mongoose_paginate_v22 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
91
|
+
var import_mongoose_aggregate_paginate_v22 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
92
|
+
var dataPointSchema = new import_mongoose2.default.Schema({
|
|
93
|
+
channel_id: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: true,
|
|
96
|
+
index: true
|
|
97
|
+
},
|
|
98
|
+
timestamp: {
|
|
99
|
+
type: Number,
|
|
100
|
+
required: true
|
|
101
|
+
},
|
|
102
|
+
value: {
|
|
103
|
+
type: Number,
|
|
104
|
+
required: true
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
_id: false
|
|
108
|
+
});
|
|
109
|
+
var channeldataBucketSchema = new import_mongoose2.default.Schema({
|
|
110
|
+
start_date: {
|
|
111
|
+
type: Date,
|
|
112
|
+
required: true,
|
|
113
|
+
default: Date.now
|
|
114
|
+
},
|
|
115
|
+
end_date: {
|
|
116
|
+
type: Date,
|
|
117
|
+
required: true,
|
|
118
|
+
default: function() {
|
|
119
|
+
return new Date(Date.now() + 1e3 * 60 * 60);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
data: {
|
|
123
|
+
type: [dataPointSchema],
|
|
124
|
+
required: true,
|
|
125
|
+
default: []
|
|
126
|
+
},
|
|
127
|
+
size: {
|
|
128
|
+
type: Number,
|
|
129
|
+
required: true,
|
|
130
|
+
default: 0
|
|
131
|
+
},
|
|
132
|
+
synced: {
|
|
133
|
+
type: Number,
|
|
134
|
+
required: true,
|
|
135
|
+
default: 0
|
|
136
|
+
},
|
|
137
|
+
sum: {
|
|
138
|
+
type: Number,
|
|
139
|
+
required: true,
|
|
140
|
+
default: 0
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
toJSON: {
|
|
144
|
+
transform: function(doc, ret) {
|
|
145
|
+
ret.id = ret._id;
|
|
146
|
+
delete ret._id;
|
|
147
|
+
delete ret.__v;
|
|
148
|
+
ret.start_date = ret.start_date.getTime();
|
|
149
|
+
ret.end_date = ret.end_date.getTime();
|
|
150
|
+
ret.avg = ret.sum / ret.size;
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
versionKey: false
|
|
154
|
+
});
|
|
155
|
+
channeldataBucketSchema.index({ start_date: 1, end_date: 1 }, { background: true });
|
|
156
|
+
channeldataBucketSchema.index({ start_date: 1, end_date: 1, "data.channel_id": 1 }, { background: true });
|
|
157
|
+
channeldataBucketSchema.index({ start_date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 365, background: true });
|
|
158
|
+
channeldataBucketSchema.plugin(import_mongoose_paginate_v22.default);
|
|
159
|
+
channeldataBucketSchema.plugin(import_mongoose_aggregate_paginate_v22.default);
|
|
160
|
+
var ChannelDataBucket_default = channeldataBucketSchema;
|
|
161
|
+
|
|
162
|
+
// app/models/ChannelDataPoint.ts
|
|
163
|
+
var import_mongoose3 = __toESM(require("mongoose"), 1);
|
|
164
|
+
var import_mongoose_paginate_v23 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
165
|
+
var import_mongoose_aggregate_paginate_v23 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
166
|
+
var channelDataPointSchema = new import_mongoose3.default.Schema({
|
|
167
|
+
c: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: true,
|
|
170
|
+
index: true,
|
|
171
|
+
alias: "channel_id"
|
|
172
|
+
},
|
|
173
|
+
t: {
|
|
174
|
+
type: Date,
|
|
175
|
+
required: true,
|
|
176
|
+
alias: "timestamp"
|
|
177
|
+
},
|
|
178
|
+
v: {
|
|
179
|
+
type: Number,
|
|
180
|
+
required: true,
|
|
181
|
+
alias: "value"
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
collection: "channel_data_points",
|
|
185
|
+
timestamps: false,
|
|
186
|
+
timeseries: {
|
|
187
|
+
timeField: "t",
|
|
188
|
+
metaField: "c",
|
|
189
|
+
granularity: "seconds"
|
|
190
|
+
},
|
|
191
|
+
toJSON: { getters: true },
|
|
192
|
+
toObject: { getters: true },
|
|
193
|
+
versionKey: false
|
|
194
|
+
});
|
|
195
|
+
channelDataPointSchema.index({ c: 1, t: 1 });
|
|
196
|
+
var oneYear = 60 * 60 * 24 * 365;
|
|
197
|
+
channelDataPointSchema.addTTLIndex = function(expirationTimeInSeconds = oneYear, ttlField = "t", metaField = "c") {
|
|
198
|
+
this.index({
|
|
199
|
+
[ttlField]: 1
|
|
200
|
+
}, {
|
|
201
|
+
expireAfterSeconds: expirationTimeInSeconds,
|
|
202
|
+
partialFilterExpression: {
|
|
203
|
+
[metaField]: {
|
|
204
|
+
$exists: true
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
name: "ttl_index_" + ttlField
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
channelDataPointSchema.plugin(import_mongoose_paginate_v23.default);
|
|
211
|
+
channelDataPointSchema.plugin(import_mongoose_aggregate_paginate_v23.default);
|
|
212
|
+
var ChannelDataPoint_default = channelDataPointSchema;
|
|
213
|
+
|
|
214
|
+
// app/models/Event.ts
|
|
215
|
+
var import_mongoose4 = __toESM(require("mongoose"), 1);
|
|
216
|
+
var import_mongoose_paginate_v24 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
217
|
+
var import_mongoose_aggregate_paginate_v24 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
218
|
+
|
|
219
|
+
// app/types/event.types.ts
|
|
220
|
+
var EventCategories = {
|
|
221
|
+
ACCESS_CONTROL: "AccessControl",
|
|
222
|
+
REQUEST_ERROR: "RequestErrors",
|
|
223
|
+
OS: "OperatingSystemEvents",
|
|
224
|
+
CONTROL: "ControlSystemEvents",
|
|
225
|
+
BACKUP: "BackupAndRestoreEvents",
|
|
226
|
+
CONFIG_CHANGE: "ConfigurationChanges",
|
|
227
|
+
LOGS: "AuditLogEvents",
|
|
228
|
+
POTENTIAL_ATTACK: "PotentialAttackActivity"
|
|
229
|
+
};
|
|
230
|
+
var EventCriticalities = {
|
|
231
|
+
VERBOSE: "Verbose",
|
|
232
|
+
INFO: "Info",
|
|
233
|
+
WARNING: "Warning",
|
|
234
|
+
ERROR: "Error",
|
|
235
|
+
CRITICAL: "Critical"
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// app/models/Event.ts
|
|
239
|
+
var eventSchema = new import_mongoose4.default.Schema({
|
|
240
|
+
event_message: {
|
|
241
|
+
type: String,
|
|
242
|
+
required: true
|
|
243
|
+
},
|
|
244
|
+
event_source: {
|
|
245
|
+
type: String,
|
|
246
|
+
required: true
|
|
247
|
+
},
|
|
248
|
+
event_user: {
|
|
249
|
+
type: String,
|
|
250
|
+
required: false
|
|
251
|
+
},
|
|
252
|
+
event_category: {
|
|
253
|
+
type: String,
|
|
254
|
+
required: true,
|
|
255
|
+
enum: Object.values(EventCategories)
|
|
256
|
+
},
|
|
257
|
+
event_criticality: {
|
|
258
|
+
type: String,
|
|
259
|
+
required: true,
|
|
260
|
+
enum: Object.values(EventCriticalities)
|
|
261
|
+
},
|
|
262
|
+
event_type: {
|
|
263
|
+
type: String,
|
|
264
|
+
required: true
|
|
265
|
+
},
|
|
266
|
+
event_timestamp: {
|
|
267
|
+
type: Date,
|
|
268
|
+
default: Date.now
|
|
269
|
+
},
|
|
270
|
+
event_data: {
|
|
271
|
+
type: Object
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
timestamps: {
|
|
275
|
+
createdAt: true,
|
|
276
|
+
updatedAt: false
|
|
277
|
+
},
|
|
278
|
+
versionKey: false,
|
|
279
|
+
toJSON: {
|
|
280
|
+
transform: function(doc, ret) {
|
|
281
|
+
ret.id = ret._id;
|
|
282
|
+
delete ret._id;
|
|
283
|
+
delete ret.createdAt;
|
|
284
|
+
ret.event_timestamp = ret.event_timestamp.getTime();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
eventSchema.index({ "event_type": 1 });
|
|
289
|
+
eventSchema.index({ "event_category": 1 });
|
|
290
|
+
var oneYear2 = 60 * 60 * 24 * 365;
|
|
291
|
+
eventSchema.addTTLIndex = function(expirationTimeInSeconds = oneYear2, ttlField = "event_timestamp") {
|
|
292
|
+
this.index({ [ttlField]: 1 }, { expireAfterSeconds: expirationTimeInSeconds });
|
|
293
|
+
};
|
|
294
|
+
eventSchema.plugin(import_mongoose_paginate_v24.default);
|
|
295
|
+
eventSchema.plugin(import_mongoose_aggregate_paginate_v24.default);
|
|
296
|
+
var Event_default = eventSchema;
|
|
297
|
+
|
|
298
|
+
// app/models/History.ts
|
|
299
|
+
var import_mongoose5 = __toESM(require("mongoose"), 1);
|
|
300
|
+
var import_mongoose_paginate_v25 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
301
|
+
var import_mongoose_aggregate_paginate_v25 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
302
|
+
|
|
27
303
|
// app/types/alarm.types.ts
|
|
28
304
|
var AlarmPriorities = {
|
|
29
305
|
CRITICAL: "Critical",
|
|
@@ -64,56 +340,85 @@ var AlarmTypes = {
|
|
|
64
340
|
ALARM_UNK: "AlarmUnk"
|
|
65
341
|
};
|
|
66
342
|
|
|
67
|
-
// app/
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
343
|
+
// app/models/History.ts
|
|
344
|
+
var historySchema = new import_mongoose5.default.Schema({
|
|
345
|
+
channel_tag: {
|
|
346
|
+
type: String,
|
|
347
|
+
required: true
|
|
348
|
+
},
|
|
349
|
+
alarm_timestamp: {
|
|
350
|
+
type: Date,
|
|
351
|
+
required: true,
|
|
352
|
+
default: Date.now
|
|
353
|
+
},
|
|
354
|
+
alarm_priority: {
|
|
355
|
+
type: String,
|
|
356
|
+
required: true,
|
|
357
|
+
enum: Object.values(AlarmPriorities)
|
|
358
|
+
},
|
|
359
|
+
alarm_original_state: {
|
|
360
|
+
type: String,
|
|
361
|
+
required: true,
|
|
362
|
+
enum: Object.values(DiamarAlarmStates)
|
|
363
|
+
},
|
|
364
|
+
alarm_state: {
|
|
365
|
+
type: String,
|
|
366
|
+
required: true,
|
|
367
|
+
enum: Object.values(CloudAlarmStates)
|
|
368
|
+
},
|
|
369
|
+
alarm_type: {
|
|
370
|
+
type: String,
|
|
371
|
+
required: true,
|
|
372
|
+
enum: Object.values(AlarmTypes)
|
|
373
|
+
},
|
|
374
|
+
alarm_value: {
|
|
375
|
+
type: Number,
|
|
376
|
+
required: false
|
|
377
|
+
},
|
|
378
|
+
alarm_message: {
|
|
379
|
+
type: String,
|
|
380
|
+
required: false
|
|
381
|
+
},
|
|
382
|
+
alarm_data: {
|
|
383
|
+
type: Object,
|
|
384
|
+
required: false
|
|
385
|
+
}
|
|
386
|
+
}, {
|
|
387
|
+
timestamps: {
|
|
388
|
+
createdAt: false,
|
|
389
|
+
updatedAt: false
|
|
390
|
+
},
|
|
391
|
+
versionKey: false,
|
|
392
|
+
collection: "history",
|
|
393
|
+
toJSON: {
|
|
394
|
+
transform: function(doc, ret) {
|
|
395
|
+
ret.id = ret._id;
|
|
396
|
+
delete ret._id;
|
|
397
|
+
delete ret.__v;
|
|
398
|
+
ret.alarm_timestamp = new Date(ret.alarm_timestamp).getTime();
|
|
399
|
+
ret.alarm = {
|
|
400
|
+
alarm_priority: ret.alarm_priority,
|
|
401
|
+
alarm_state: ret.alarm_original_state ?? "Inactive",
|
|
402
|
+
alarm_type: ret.alarm_type,
|
|
403
|
+
alarm_value: ret.alarm_value === null ? "inf" : `${ret.alarm_value}`,
|
|
404
|
+
alarm_timestamp: new Date(ret.alarm_timestamp).getTime()
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
historySchema.index({ "channel_tag": 1 });
|
|
410
|
+
var oneYear3 = 60 * 60 * 24 * 365;
|
|
411
|
+
historySchema.addTTLIndex = function(expirationTimeInSeconds = oneYear3, ttlField = "alarm_timestamp") {
|
|
412
|
+
this.index({ [ttlField]: 1 }, { expireAfterSeconds: expirationTimeInSeconds });
|
|
97
413
|
};
|
|
414
|
+
historySchema.plugin(import_mongoose_paginate_v25.default);
|
|
415
|
+
historySchema.plugin(import_mongoose_aggregate_paginate_v25.default);
|
|
416
|
+
var History_default = historySchema;
|
|
98
417
|
|
|
99
|
-
// app/
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
OS: "OperatingSystemEvents",
|
|
104
|
-
CONTROL: "ControlSystemEvents",
|
|
105
|
-
BACKUP: "BackupAndRestoreEvents",
|
|
106
|
-
CONFIG_CHANGE: "ConfigurationChanges",
|
|
107
|
-
LOGS: "AuditLogEvents",
|
|
108
|
-
POTENTIAL_ATTACK: "PotentialAttackActivity"
|
|
109
|
-
};
|
|
110
|
-
var EventCriticalities = {
|
|
111
|
-
VERBOSE: "Verbose",
|
|
112
|
-
INFO: "Info",
|
|
113
|
-
WARNING: "Warning",
|
|
114
|
-
ERROR: "Error",
|
|
115
|
-
CRITICAL: "Critical"
|
|
116
|
-
};
|
|
418
|
+
// app/models/Unit.ts
|
|
419
|
+
var import_mongoose6 = __toESM(require("mongoose"), 1);
|
|
420
|
+
var import_mongoose_paginate_v26 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
421
|
+
var import_mongoose_aggregate_paginate_v26 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
117
422
|
|
|
118
423
|
// app/types/unit.types.ts
|
|
119
424
|
var UnitTypes = {
|
|
@@ -127,19 +432,1322 @@ var UnitTypes = {
|
|
|
127
432
|
TIM28: "Tim28"
|
|
128
433
|
};
|
|
129
434
|
|
|
435
|
+
// app/models/Unit.ts
|
|
436
|
+
var unitSchema = new import_mongoose6.default.Schema({
|
|
437
|
+
unit_id: {
|
|
438
|
+
type: String,
|
|
439
|
+
required: true
|
|
440
|
+
},
|
|
441
|
+
unit_enabled: {
|
|
442
|
+
type: Boolean,
|
|
443
|
+
required: true
|
|
444
|
+
},
|
|
445
|
+
unit_type: {
|
|
446
|
+
type: String,
|
|
447
|
+
required: true,
|
|
448
|
+
enum: Object.values(UnitTypes)
|
|
449
|
+
},
|
|
450
|
+
unit_internal_description: {
|
|
451
|
+
type: String,
|
|
452
|
+
required: true
|
|
453
|
+
},
|
|
454
|
+
unit_cabinet_id: {
|
|
455
|
+
type: String,
|
|
456
|
+
required: false
|
|
457
|
+
}
|
|
458
|
+
}, {
|
|
459
|
+
timestamps: true,
|
|
460
|
+
collection: "units",
|
|
461
|
+
toJSON: {
|
|
462
|
+
transform: function(doc, ret) {
|
|
463
|
+
ret.id = ret._id;
|
|
464
|
+
delete ret._id;
|
|
465
|
+
delete ret.__v;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
unitSchema.index({ "unit_id": 1 }, { unique: true });
|
|
470
|
+
unitSchema.index({ "unit_internal_description": 1 });
|
|
471
|
+
unitSchema.plugin(import_mongoose_paginate_v26.default);
|
|
472
|
+
unitSchema.plugin(import_mongoose_aggregate_paginate_v26.default);
|
|
473
|
+
var Unit_default = unitSchema;
|
|
474
|
+
|
|
475
|
+
// app/models/docs/Channel.json
|
|
476
|
+
var Channel_default2 = {
|
|
477
|
+
components: {
|
|
478
|
+
schemas: {
|
|
479
|
+
Channel: {
|
|
480
|
+
type: "object",
|
|
481
|
+
properties: {
|
|
482
|
+
id: {
|
|
483
|
+
type: "string",
|
|
484
|
+
format: "ObjectId",
|
|
485
|
+
description: "MongoDB ObjectId",
|
|
486
|
+
example: "507f1f77bcf86cd799439011",
|
|
487
|
+
readOnly: true
|
|
488
|
+
},
|
|
489
|
+
channel_tag: {
|
|
490
|
+
type: "string",
|
|
491
|
+
description: "Channel tag",
|
|
492
|
+
example: "MOTOR_PS_TEMP",
|
|
493
|
+
readOnly: true
|
|
494
|
+
},
|
|
495
|
+
channel_description: {
|
|
496
|
+
type: "string",
|
|
497
|
+
description: "Channel description",
|
|
498
|
+
example: "Motor Power Supply Temperature",
|
|
499
|
+
readOnly: true
|
|
500
|
+
},
|
|
501
|
+
channel_unit_id: {
|
|
502
|
+
type: "string",
|
|
503
|
+
format: "ObjectId",
|
|
504
|
+
description: "Unit of the channel",
|
|
505
|
+
example: "507f1f77bcf86cd799439011",
|
|
506
|
+
readOnly: true
|
|
507
|
+
},
|
|
508
|
+
channel_parsed: {
|
|
509
|
+
type: "object",
|
|
510
|
+
description: "Parsed channel data",
|
|
511
|
+
readOnly: true
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
required: [
|
|
515
|
+
"channel_tag",
|
|
516
|
+
"channel_description",
|
|
517
|
+
"channel_unit_id",
|
|
518
|
+
"channel_parsed"
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
examples: {
|
|
523
|
+
Channel: {
|
|
524
|
+
value: {
|
|
525
|
+
id: "507f1f77bcf86cd799439011",
|
|
526
|
+
channel_tag: "MOTOR_PS_TEMP",
|
|
527
|
+
channel_description: "Motor Power Supply Temperature",
|
|
528
|
+
channel_type: "Analogic"
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
// app/models/docs/ChannelDataBucket.json
|
|
536
|
+
var ChannelDataBucket_default2 = {
|
|
537
|
+
components: {
|
|
538
|
+
schemas: {
|
|
539
|
+
ChannelData: {
|
|
540
|
+
type: "object",
|
|
541
|
+
description: "ChannelData object. This is the bucket where the data is stored, in batches of 1 hour.",
|
|
542
|
+
properties: {
|
|
543
|
+
id: {
|
|
544
|
+
type: "string",
|
|
545
|
+
format: "ObjectId",
|
|
546
|
+
description: "MongoDB ObjectId",
|
|
547
|
+
example: "507f1f77bcf86cd799439011",
|
|
548
|
+
readOnly: true
|
|
549
|
+
},
|
|
550
|
+
start_date: {
|
|
551
|
+
type: "string",
|
|
552
|
+
format: "date-time",
|
|
553
|
+
description: "Start date of the data",
|
|
554
|
+
example: "2024-07-03T10:15:30Z",
|
|
555
|
+
readOnly: true
|
|
556
|
+
},
|
|
557
|
+
end_date: {
|
|
558
|
+
type: "string",
|
|
559
|
+
format: "date-time",
|
|
560
|
+
description: "End date of the data",
|
|
561
|
+
example: "2024-07-03T11:15:30Z",
|
|
562
|
+
readOnly: true
|
|
563
|
+
},
|
|
564
|
+
data: {
|
|
565
|
+
type: "array",
|
|
566
|
+
description: "Data array of DataPoint objects",
|
|
567
|
+
items: {
|
|
568
|
+
$ref: "#/components/schemas/DataPoint"
|
|
569
|
+
},
|
|
570
|
+
readOnly: false
|
|
571
|
+
},
|
|
572
|
+
size: {
|
|
573
|
+
type: "integer",
|
|
574
|
+
format: "int64",
|
|
575
|
+
description: "Size of the data array",
|
|
576
|
+
example: 60,
|
|
577
|
+
readOnly: true
|
|
578
|
+
},
|
|
579
|
+
synced: {
|
|
580
|
+
type: "TODO",
|
|
581
|
+
description: "TODO",
|
|
582
|
+
example: "TODO",
|
|
583
|
+
readOnly: true
|
|
584
|
+
},
|
|
585
|
+
sum: {
|
|
586
|
+
type: "number",
|
|
587
|
+
format: "double",
|
|
588
|
+
description: "Sum of the data",
|
|
589
|
+
example: 69.42,
|
|
590
|
+
readOnly: true
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
examples: {
|
|
596
|
+
ChannelData: {
|
|
597
|
+
id: "507f1f77bcf86cd799439011",
|
|
598
|
+
start_date: "2024-07-03T10:15:30Z",
|
|
599
|
+
end_date: "2024-07-03T11:15:30Z",
|
|
600
|
+
data: [
|
|
601
|
+
{
|
|
602
|
+
t: 1710251647e3,
|
|
603
|
+
v: 69.42
|
|
604
|
+
}
|
|
605
|
+
],
|
|
606
|
+
size: 60,
|
|
607
|
+
synced: "TODO",
|
|
608
|
+
sum: 69.42
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
// app/models/docs/ChannelWithData.json
|
|
615
|
+
var ChannelWithData_default = {
|
|
616
|
+
components: {
|
|
617
|
+
schemas: {
|
|
618
|
+
ChannelWithData: {
|
|
619
|
+
allOf: [
|
|
620
|
+
{
|
|
621
|
+
$ref: "#/components/schemas/Channel"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
type: "object",
|
|
625
|
+
properties: {
|
|
626
|
+
channel_latest_value: {
|
|
627
|
+
type: "string",
|
|
628
|
+
description: "Latest value of the channel",
|
|
629
|
+
example: "25.0",
|
|
630
|
+
readOnly: true
|
|
631
|
+
},
|
|
632
|
+
channel_latest_timestamp: {
|
|
633
|
+
type: "string",
|
|
634
|
+
format: "date-time",
|
|
635
|
+
description: "Timestamp of the latest value",
|
|
636
|
+
example: 1700034034,
|
|
637
|
+
readOnly: true
|
|
638
|
+
},
|
|
639
|
+
channel_alarm_state: {
|
|
640
|
+
type: "string",
|
|
641
|
+
description: "Alarm state of the channel",
|
|
642
|
+
example: "NoAlarm",
|
|
643
|
+
readOnly: true
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
],
|
|
648
|
+
required: [
|
|
649
|
+
"channel_tag",
|
|
650
|
+
"channel_description",
|
|
651
|
+
"channel_type",
|
|
652
|
+
"channel_latest_value",
|
|
653
|
+
"channel_latest_timestamp",
|
|
654
|
+
"channel_alarm_state"
|
|
655
|
+
]
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
examples: {
|
|
659
|
+
ChannelWithData: {
|
|
660
|
+
value: {
|
|
661
|
+
id: "507f1f77bcf86cd799439011",
|
|
662
|
+
channel_tag: "MOTOR_PS_TEMP",
|
|
663
|
+
channel_description: "Motor Power Supply Temperature",
|
|
664
|
+
channel_type: "Analogic",
|
|
665
|
+
channel_latest_value: 420.69,
|
|
666
|
+
channel_latest_timestamp: 1700034034,
|
|
667
|
+
channel_alarm_state: "NoAlarm"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// app/models/docs/ChannelDataPoint.json
|
|
675
|
+
var ChannelDataPoint_default2 = {
|
|
676
|
+
components: {
|
|
677
|
+
schemas: {
|
|
678
|
+
ChannelDataPoint: {
|
|
679
|
+
type: "object",
|
|
680
|
+
description: "ChannelDataPoint object. This is the object that is sent to and from the API. It includes only the timestamp and the value. No id is included because the data is stored inside a larger bucket in the database.",
|
|
681
|
+
properties: {
|
|
682
|
+
c: {
|
|
683
|
+
type: "string",
|
|
684
|
+
description: "Channel ID associated with the data point",
|
|
685
|
+
example: "U001_001",
|
|
686
|
+
readOnly: true
|
|
687
|
+
},
|
|
688
|
+
t: {
|
|
689
|
+
type: "integer",
|
|
690
|
+
format: "int64",
|
|
691
|
+
description: "Timestamp of the data",
|
|
692
|
+
example: 1710251647e3,
|
|
693
|
+
readOnly: true
|
|
694
|
+
},
|
|
695
|
+
v: {
|
|
696
|
+
type: "number",
|
|
697
|
+
format: "double",
|
|
698
|
+
description: "Value of the data",
|
|
699
|
+
example: 69.42,
|
|
700
|
+
readOnly: true
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
examples: {
|
|
706
|
+
ChannelDataPoint: {
|
|
707
|
+
c: "U001_001",
|
|
708
|
+
t: 1710251647e3,
|
|
709
|
+
v: 69.42
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
// app/models/docs/Event.json
|
|
716
|
+
var Event_default2 = {
|
|
717
|
+
components: {
|
|
718
|
+
schemas: {
|
|
719
|
+
Event: {
|
|
720
|
+
type: "object",
|
|
721
|
+
description: "Event object. This is the object that is sent to and from the API. It includes the id as a string, the timestamp as a number and the creation timestamp is not included.",
|
|
722
|
+
properties: {
|
|
723
|
+
id: {
|
|
724
|
+
type: "string",
|
|
725
|
+
format: "ObjectId",
|
|
726
|
+
description: "MongoDB ObjectId",
|
|
727
|
+
example: "507f1f77bcf86cd799439011",
|
|
728
|
+
readOnly: true
|
|
729
|
+
},
|
|
730
|
+
event_message: {
|
|
731
|
+
type: "string",
|
|
732
|
+
format: "text",
|
|
733
|
+
description: "Event message",
|
|
734
|
+
example: "Event message"
|
|
735
|
+
},
|
|
736
|
+
event_source: {
|
|
737
|
+
type: "string",
|
|
738
|
+
format: "text",
|
|
739
|
+
description: "Hostname of the source of the event",
|
|
740
|
+
example: "RMS1"
|
|
741
|
+
},
|
|
742
|
+
event_category: {
|
|
743
|
+
type: "string",
|
|
744
|
+
format: "text",
|
|
745
|
+
description: "Event category",
|
|
746
|
+
example: "Login",
|
|
747
|
+
enum: "%%EVENT_CATEGORY_ENUM%%"
|
|
748
|
+
},
|
|
749
|
+
event_type: {
|
|
750
|
+
type: "string",
|
|
751
|
+
format: "text",
|
|
752
|
+
description: "Event type",
|
|
753
|
+
example: "Login"
|
|
754
|
+
},
|
|
755
|
+
event_timestamp: {
|
|
756
|
+
type: "number",
|
|
757
|
+
format: "timestamp",
|
|
758
|
+
description: "Event timestamp",
|
|
759
|
+
example: 1709899759
|
|
760
|
+
},
|
|
761
|
+
event_data: {
|
|
762
|
+
type: "object",
|
|
763
|
+
description: "Event data. Not validated, just stored"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
required: [
|
|
767
|
+
"event_message",
|
|
768
|
+
"event_source",
|
|
769
|
+
"event_category",
|
|
770
|
+
"event_type",
|
|
771
|
+
"event_timestamp"
|
|
772
|
+
]
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
examples: {
|
|
776
|
+
Event: {
|
|
777
|
+
value: {
|
|
778
|
+
id: "507f1f77bcf86cd799439011",
|
|
779
|
+
event_message: "Profile Root logged in for the next 600 seconds, replacing profile Root.",
|
|
780
|
+
event_source: "RMS1",
|
|
781
|
+
event_category: "Login",
|
|
782
|
+
event_type: "LoiginSuccessful",
|
|
783
|
+
event_timestamp: 1709899759,
|
|
784
|
+
event_data: {
|
|
785
|
+
profile: "Root",
|
|
786
|
+
duration: 600,
|
|
787
|
+
replaced_profile: "Monitor"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
// app/models/docs/History.json
|
|
796
|
+
var History_default2 = {
|
|
797
|
+
components: {
|
|
798
|
+
schemas: {
|
|
799
|
+
History: {
|
|
800
|
+
type: "object",
|
|
801
|
+
properties: {
|
|
802
|
+
id: {
|
|
803
|
+
type: "string",
|
|
804
|
+
format: "ObjectId",
|
|
805
|
+
description: "MongoDB ObjectId",
|
|
806
|
+
example: "507f1f77bcf86cd799439011",
|
|
807
|
+
readOnly: true
|
|
808
|
+
},
|
|
809
|
+
channel_tag: {
|
|
810
|
+
type: "string",
|
|
811
|
+
format: "text",
|
|
812
|
+
description: "Channel tag",
|
|
813
|
+
example: "Channel tag",
|
|
814
|
+
readOnly: true
|
|
815
|
+
},
|
|
816
|
+
alarm_timestamp: {
|
|
817
|
+
type: "string",
|
|
818
|
+
format: "date-time",
|
|
819
|
+
description: "Alarm timestamp",
|
|
820
|
+
example: "2020-12-31T23:59:59Z",
|
|
821
|
+
readOnly: true
|
|
822
|
+
},
|
|
823
|
+
alarm_priority: {
|
|
824
|
+
type: "string",
|
|
825
|
+
format: "text",
|
|
826
|
+
description: "Alarm priority",
|
|
827
|
+
example: "Alarm",
|
|
828
|
+
enum: "%%ALARM_PRIORITY_ENUM%%",
|
|
829
|
+
readOnly: true
|
|
830
|
+
},
|
|
831
|
+
alarm_original_state: {
|
|
832
|
+
type: "string",
|
|
833
|
+
format: "text",
|
|
834
|
+
description: "Alarm original state",
|
|
835
|
+
example: "Inactive",
|
|
836
|
+
enum: "%%DIAMAR_ALARM_STATE_ENUM%%",
|
|
837
|
+
readOnly: true
|
|
838
|
+
},
|
|
839
|
+
alarm_state: {
|
|
840
|
+
type: "string",
|
|
841
|
+
format: "text",
|
|
842
|
+
description: "Alarm new state",
|
|
843
|
+
example: "Inactive",
|
|
844
|
+
enum: "%%CLOUD_ALARM_STATE_ENUM%%",
|
|
845
|
+
readOnly: true
|
|
846
|
+
},
|
|
847
|
+
alarm_type: {
|
|
848
|
+
type: "string",
|
|
849
|
+
format: "text",
|
|
850
|
+
description: "Alarm type",
|
|
851
|
+
example: "AlarmOpen",
|
|
852
|
+
enum: "%%ALARM_TYPE_ENUM%%",
|
|
853
|
+
readOnly: true
|
|
854
|
+
},
|
|
855
|
+
alarm_value: {
|
|
856
|
+
type: "number",
|
|
857
|
+
format: "double",
|
|
858
|
+
description: "Alarm value",
|
|
859
|
+
example: 0,
|
|
860
|
+
readOnly: true
|
|
861
|
+
},
|
|
862
|
+
alarm_message: {
|
|
863
|
+
type: "string",
|
|
864
|
+
format: "text",
|
|
865
|
+
description: "Alarm message",
|
|
866
|
+
example: "Alarm message",
|
|
867
|
+
readOnly: true
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
required: [
|
|
871
|
+
"channel_tag",
|
|
872
|
+
"alarm_timestamp",
|
|
873
|
+
"alarm_priority",
|
|
874
|
+
"alarm_original_state",
|
|
875
|
+
"alarm_state",
|
|
876
|
+
"alarm_type",
|
|
877
|
+
"alarm_value",
|
|
878
|
+
"alarm_message"
|
|
879
|
+
]
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
examples: {
|
|
883
|
+
History: {
|
|
884
|
+
value: {
|
|
885
|
+
id: "507f1f77bcf86cd799439011",
|
|
886
|
+
channel_tag: "Channel tag",
|
|
887
|
+
alarm_timestamp: "2020-12-31T23:59:59Z",
|
|
888
|
+
alarm_priority: "Alarm",
|
|
889
|
+
alarm_original_state: "Inactive",
|
|
890
|
+
alarm_state: "Inactive",
|
|
891
|
+
alarm_type: "AlarmOpen",
|
|
892
|
+
alarm_value: 0,
|
|
893
|
+
alarm_message: "AlarmOpen Value: [OP]"
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
// app/models/docs/Unit.json
|
|
901
|
+
var Unit_default2 = {
|
|
902
|
+
components: {
|
|
903
|
+
schemas: {
|
|
904
|
+
Unit: {
|
|
905
|
+
type: "object",
|
|
906
|
+
properties: {
|
|
907
|
+
id: {
|
|
908
|
+
type: "string",
|
|
909
|
+
format: "ObjectId",
|
|
910
|
+
description: "MongoDB ObjectId",
|
|
911
|
+
example: "507f1f77bcf86cd799439011",
|
|
912
|
+
readOnly: true
|
|
913
|
+
},
|
|
914
|
+
unit_id: {
|
|
915
|
+
type: "string",
|
|
916
|
+
description: "Unit identifier in Diamar",
|
|
917
|
+
example: "127",
|
|
918
|
+
readOnly: true
|
|
919
|
+
},
|
|
920
|
+
unit_internal_description: {
|
|
921
|
+
type: "string",
|
|
922
|
+
description: "Unit description",
|
|
923
|
+
example: "Motor Power Supply",
|
|
924
|
+
readOnly: true
|
|
925
|
+
},
|
|
926
|
+
unit_enabled: {
|
|
927
|
+
type: "boolean",
|
|
928
|
+
description: "Unit enabled",
|
|
929
|
+
example: true,
|
|
930
|
+
readOnly: true
|
|
931
|
+
},
|
|
932
|
+
unit_type: {
|
|
933
|
+
type: "string",
|
|
934
|
+
description: "Unit type",
|
|
935
|
+
example: "DIM36",
|
|
936
|
+
readOnly: true
|
|
937
|
+
},
|
|
938
|
+
unit_cabinet_id: {
|
|
939
|
+
type: "string",
|
|
940
|
+
description: "Cabinet identifier",
|
|
941
|
+
example: "Cabinet 1",
|
|
942
|
+
readOnly: true
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
required: [
|
|
946
|
+
"unit_id",
|
|
947
|
+
"unit_internal_description",
|
|
948
|
+
"unit_enabled",
|
|
949
|
+
"unit_type",
|
|
950
|
+
"unit_cabinet_id"
|
|
951
|
+
]
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
examples: {
|
|
955
|
+
Unit: {
|
|
956
|
+
value: {
|
|
957
|
+
id: "507f1f77bcf86cd799439011",
|
|
958
|
+
unit_id: "127",
|
|
959
|
+
unit_internal_description: "Motor Power Supply",
|
|
960
|
+
unit_enabled: true,
|
|
961
|
+
unit_type: "DIM36",
|
|
962
|
+
unit_cabinet_id: "Cabinet 1"
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
// app/models/docs/index.ts
|
|
970
|
+
History_default2.components.schemas.History.properties.alarm_priority.enum = Object.values(AlarmPriorities);
|
|
971
|
+
History_default2.components.schemas.History.properties.alarm_state.enum = Object.values(CloudAlarmStates);
|
|
972
|
+
History_default2.components.schemas.History.properties.alarm_original_state.enum = Object.values(DiamarAlarmStates);
|
|
973
|
+
History_default2.components.schemas.History.properties.alarm_type.enum = Object.values(AlarmTypes);
|
|
974
|
+
Event_default2.components.schemas.Event.properties.event_category.enum = Object.values(EventCategories);
|
|
975
|
+
var Docs = {
|
|
976
|
+
ChannelDocs: Channel_default2,
|
|
977
|
+
ChannelDataBucketDocs: ChannelDataBucket_default2,
|
|
978
|
+
ChannelWithDataDocs: ChannelWithData_default,
|
|
979
|
+
ChannelDataPointDocs: ChannelDataPoint_default2,
|
|
980
|
+
EventDocs: Event_default2,
|
|
981
|
+
HistoryDocs: History_default2,
|
|
982
|
+
UnitDocs: Unit_default2
|
|
983
|
+
};
|
|
984
|
+
var docs_default = Docs;
|
|
985
|
+
|
|
986
|
+
// app/types/mimics.types.ts
|
|
987
|
+
var MimicElementTypes = {
|
|
988
|
+
// Auxiliary
|
|
989
|
+
IMAGE: "Image",
|
|
990
|
+
LINE: "Line",
|
|
991
|
+
SQUARE: "Square",
|
|
992
|
+
LINK: "Link",
|
|
993
|
+
POLYLINE: "Polyline",
|
|
994
|
+
TEXT: "Text",
|
|
995
|
+
// Elements
|
|
996
|
+
ALARM_INDICATOR: "AlarmIndicator",
|
|
997
|
+
BREAKER: "Breaker",
|
|
998
|
+
COMMAND: "Command",
|
|
999
|
+
COMPRESSOR: "Compressor",
|
|
1000
|
+
DAMPER: "Damper",
|
|
1001
|
+
DIAL: "Dial",
|
|
1002
|
+
DIGITAL: "Digital",
|
|
1003
|
+
DISPLAY: "Display",
|
|
1004
|
+
FAN: "Fan",
|
|
1005
|
+
GENERATOR: "Generator",
|
|
1006
|
+
LEVEL_BAR: "LevelBar",
|
|
1007
|
+
PUMP: "Pump",
|
|
1008
|
+
SHAFT: "Shaft",
|
|
1009
|
+
TEXT_CHANNEL: "TextChannel",
|
|
1010
|
+
DYNAMIC_TEXT: "DynamicText",
|
|
1011
|
+
TANK: "Tank",
|
|
1012
|
+
VALVE: "Valve",
|
|
1013
|
+
SLIDER: "Slider",
|
|
1014
|
+
TOGGLE: "Toggle",
|
|
1015
|
+
// IAS
|
|
1016
|
+
UNIT: "Unit",
|
|
1017
|
+
REPEATER: "Repeater",
|
|
1018
|
+
STATION: "Station",
|
|
1019
|
+
CABINET: "Cabinet",
|
|
1020
|
+
// ElementsPms
|
|
1021
|
+
BREAKER_PMS: "BreakerPms",
|
|
1022
|
+
GENERATOR_PMS: "GeneratorPms",
|
|
1023
|
+
OPERATION_MODES_PMS: "OperationModesPms",
|
|
1024
|
+
PMS_PRIORITIES: "PmsPriorities",
|
|
1025
|
+
// ElementsAutomated
|
|
1026
|
+
VALVE_AUTOMATED: "ValveAutomated",
|
|
1027
|
+
DAMPER_AUTOMATED: "DamperAutomated",
|
|
1028
|
+
PUMP_AUTOMATED: "PumpAutomated"
|
|
1029
|
+
};
|
|
1030
|
+
var ZDepths = {
|
|
1031
|
+
BACKGROUND: "Background",
|
|
1032
|
+
LOW: "Low",
|
|
1033
|
+
NORMAL: "Normal",
|
|
1034
|
+
HIGH: "High"
|
|
1035
|
+
};
|
|
1036
|
+
var TitleAligns = {
|
|
1037
|
+
BOTTOM: "Bottom",
|
|
1038
|
+
LEFT: "Left",
|
|
1039
|
+
RIGHT: "Right",
|
|
1040
|
+
TOP: "Top"
|
|
1041
|
+
};
|
|
1042
|
+
var DigitalStates = {
|
|
1043
|
+
NO_VALUE: "NoValue",
|
|
1044
|
+
OPEN: "Open",
|
|
1045
|
+
CLOSE: "Close",
|
|
1046
|
+
UNDEFINED: "Undefined"
|
|
1047
|
+
};
|
|
1048
|
+
var DigitalAlarmStates = {
|
|
1049
|
+
NO_ALARM: "NoAlarm",
|
|
1050
|
+
ALARM: "Alarm",
|
|
1051
|
+
UNDEFINED: "Undefined"
|
|
1052
|
+
};
|
|
1053
|
+
var AlarmStates = {
|
|
1054
|
+
ALARM: 1,
|
|
1055
|
+
WARNING: 2,
|
|
1056
|
+
UNACKNOWLEDGED_ALARM: 3,
|
|
1057
|
+
UNACKNOWLEDGED_WARNING: 4,
|
|
1058
|
+
ACKNOWLEDGED_ALARM: 5,
|
|
1059
|
+
ACKNOWLEDGED_WARNING: 6,
|
|
1060
|
+
INHIBITED: 7,
|
|
1061
|
+
OFF_SCAN: 8,
|
|
1062
|
+
NORMAL: 9,
|
|
1063
|
+
OFFLINE: 10
|
|
1064
|
+
};
|
|
1065
|
+
var ActivationModes = {
|
|
1066
|
+
ALARM: "Alarm",
|
|
1067
|
+
LOGIC: "Logic",
|
|
1068
|
+
VALUE: "Value"
|
|
1069
|
+
};
|
|
1070
|
+
var TextAnchorPoints = {
|
|
1071
|
+
LEFT: "Left",
|
|
1072
|
+
CENTER: "Center",
|
|
1073
|
+
RIGHT: "Right"
|
|
1074
|
+
};
|
|
1075
|
+
var ValveDesigns = {
|
|
1076
|
+
MECHANIC: "Mechanic",
|
|
1077
|
+
NORMAL: "Normal"
|
|
1078
|
+
};
|
|
1079
|
+
var FanDesigns = {
|
|
1080
|
+
NORMAL: "Normal",
|
|
1081
|
+
BLADED: "Bladed"
|
|
1082
|
+
};
|
|
1083
|
+
var FanRunStates = {
|
|
1084
|
+
NO_VALUE: "NoValue",
|
|
1085
|
+
UNDEFINED: "Undefined",
|
|
1086
|
+
STOPPED: "Stopped",
|
|
1087
|
+
RUNNING: "Running",
|
|
1088
|
+
RUNNING_FAST: "RunningFast"
|
|
1089
|
+
};
|
|
1090
|
+
var FanDirections = {
|
|
1091
|
+
NO_VALUE: "NoValue",
|
|
1092
|
+
UNDEFINED: "Undefined",
|
|
1093
|
+
SUPPLY: "Supply",
|
|
1094
|
+
EXHAUST: "Exhaust"
|
|
1095
|
+
};
|
|
1096
|
+
var FanTypes = {
|
|
1097
|
+
SIMPLE: "Simple",
|
|
1098
|
+
SIMPLE_WITH_FAST: "SimpleWithFast",
|
|
1099
|
+
REVERSIBLE: "Reversible",
|
|
1100
|
+
REVERSIBLE_WITH_FAST: "ReversibleWithFast"
|
|
1101
|
+
};
|
|
1102
|
+
var LevelBarOrientations = {
|
|
1103
|
+
VERTICAL: "Vertical",
|
|
1104
|
+
HORIZONTAL: "Horizontal"
|
|
1105
|
+
};
|
|
1106
|
+
var SliderOrientations = {
|
|
1107
|
+
VERTICAL: "Vertical",
|
|
1108
|
+
HORIZONTAL: "Horizontal"
|
|
1109
|
+
};
|
|
1110
|
+
var CompressorDesigns = {
|
|
1111
|
+
CENTRIFUGAL: "Centrifugal",
|
|
1112
|
+
MECHANIC: "Mechanic",
|
|
1113
|
+
NORMAL: "Normal",
|
|
1114
|
+
PISTONS: "Pistons",
|
|
1115
|
+
ROTATORY_SCREW: "RotatoryScrew",
|
|
1116
|
+
SCROLL: "Scroll",
|
|
1117
|
+
VANES: "Vanes"
|
|
1118
|
+
};
|
|
1119
|
+
var LedTypes = {
|
|
1120
|
+
CIRCLE: "Circle",
|
|
1121
|
+
SQUARE: "Square"
|
|
1122
|
+
};
|
|
1123
|
+
var InfoLocations = {
|
|
1124
|
+
BOTTOM: "Bottom",
|
|
1125
|
+
LEFT: "Left",
|
|
1126
|
+
RIGHT: "Right",
|
|
1127
|
+
TOP: "Top"
|
|
1128
|
+
};
|
|
1129
|
+
var MarkTypes = {
|
|
1130
|
+
LARGE_LINE: "LargeLine",
|
|
1131
|
+
SHORT_LINE: "ShortLine",
|
|
1132
|
+
TRIANGLE: "Triangle"
|
|
1133
|
+
};
|
|
1134
|
+
var ScalePositions = {
|
|
1135
|
+
LEFT: "Left",
|
|
1136
|
+
RIGHT: "Right"
|
|
1137
|
+
};
|
|
1138
|
+
var ValueTypes = {
|
|
1139
|
+
PERCENTAGE: "Percentage",
|
|
1140
|
+
RAW: "Raw"
|
|
1141
|
+
};
|
|
1142
|
+
var OperationModeStates = {
|
|
1143
|
+
ACTIVE: 0,
|
|
1144
|
+
INACTIVE: 1,
|
|
1145
|
+
IN_TRANSITION: 2,
|
|
1146
|
+
FAILED: 3
|
|
1147
|
+
};
|
|
1148
|
+
var UnitDesigns = {
|
|
1149
|
+
IMAGE: "Image",
|
|
1150
|
+
MODERN: "Modern"
|
|
1151
|
+
};
|
|
1152
|
+
var StationDesigns = {
|
|
1153
|
+
IMAGE: "Image",
|
|
1154
|
+
MONITOR: "Monitor",
|
|
1155
|
+
SCREEN: "Screen"
|
|
1156
|
+
};
|
|
1157
|
+
var RepeaterDesigns = {
|
|
1158
|
+
IMAGE: "Image",
|
|
1159
|
+
SLIM: "SLim",
|
|
1160
|
+
DIAMAR_REPEATER: "DiamarRepeater"
|
|
1161
|
+
};
|
|
1162
|
+
var CabinetDesigns = {
|
|
1163
|
+
IMAGE: "Image",
|
|
1164
|
+
MODERN: "Modern"
|
|
1165
|
+
};
|
|
1166
|
+
var LinkDesigns = {
|
|
1167
|
+
BUTTON: "Button",
|
|
1168
|
+
IMAGE: "Image"
|
|
1169
|
+
};
|
|
1170
|
+
var OpClStates = {
|
|
1171
|
+
NO_VALUE: "NoValue",
|
|
1172
|
+
OPEN: "Open",
|
|
1173
|
+
CLOSE: "Close",
|
|
1174
|
+
UNDEFINED: "Undefined"
|
|
1175
|
+
};
|
|
1176
|
+
var RunningStoppedStates = {
|
|
1177
|
+
NO_VALUE: "NoValue",
|
|
1178
|
+
RUNNING: "Running",
|
|
1179
|
+
STOPPED: "Stopped",
|
|
1180
|
+
UNDEFINED: "Undefined"
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
// app/models/mimics/MimicSupport.ts
|
|
1184
|
+
var AddedAlarmsJson = {
|
|
1185
|
+
Channels: []
|
|
1186
|
+
};
|
|
1187
|
+
var BackgroundJson = {
|
|
1188
|
+
Show: false
|
|
1189
|
+
};
|
|
1190
|
+
var LineJson = {
|
|
1191
|
+
Color: "#000000",
|
|
1192
|
+
Width: 1,
|
|
1193
|
+
Start: { X: 0, Y: 0 },
|
|
1194
|
+
End: { X: 0, Y: 0 }
|
|
1195
|
+
};
|
|
1196
|
+
var LocalizedTextJson = {
|
|
1197
|
+
English: "",
|
|
1198
|
+
Spanish: "",
|
|
1199
|
+
French: "",
|
|
1200
|
+
German: ""
|
|
1201
|
+
};
|
|
1202
|
+
var LocationJson = {
|
|
1203
|
+
X: 0,
|
|
1204
|
+
Y: 0,
|
|
1205
|
+
Z: 0,
|
|
1206
|
+
Rotation: 0
|
|
1207
|
+
};
|
|
1208
|
+
var LogicExpressionJson = {
|
|
1209
|
+
Expression: "",
|
|
1210
|
+
Value: void 0,
|
|
1211
|
+
Variables: []
|
|
1212
|
+
};
|
|
1213
|
+
var LogicExpressionsJson = {
|
|
1214
|
+
LogicExpressions: []
|
|
1215
|
+
};
|
|
1216
|
+
var ScaleJson = {
|
|
1217
|
+
Show: false,
|
|
1218
|
+
TextHeight: 12,
|
|
1219
|
+
Color: "#000000",
|
|
1220
|
+
Position: "Bottom",
|
|
1221
|
+
LineWidth: 1,
|
|
1222
|
+
DivisionsNumber: 3,
|
|
1223
|
+
SubdivisionsNumber: 2
|
|
1224
|
+
};
|
|
1225
|
+
var TextAttributesJson = {
|
|
1226
|
+
AnchorPoint: TextAnchorPoints.LEFT,
|
|
1227
|
+
Color: "#000000",
|
|
1228
|
+
HasUnderline: false,
|
|
1229
|
+
UnderlineColor: "#000000",
|
|
1230
|
+
UnderlineLength: 10,
|
|
1231
|
+
UnderlineWidth: 1
|
|
1232
|
+
};
|
|
1233
|
+
var TitleJson = {
|
|
1234
|
+
Show: false,
|
|
1235
|
+
Height: 20,
|
|
1236
|
+
Padding: 5,
|
|
1237
|
+
Align: TitleAligns.LEFT,
|
|
1238
|
+
Color: "#000000",
|
|
1239
|
+
Text: LocalizedTextJson,
|
|
1240
|
+
Location: LocationJson
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
// app/models/mimics/AuxiliaryElements.ts
|
|
1244
|
+
var ImageAuxiliaryJson = {
|
|
1245
|
+
DefaultImageName: "image.png",
|
|
1246
|
+
ImageLogic: LogicExpressionsJson
|
|
1247
|
+
};
|
|
1248
|
+
var LineAuxiliaryJson = {
|
|
1249
|
+
Line: LineJson,
|
|
1250
|
+
LineColorLogic: LogicExpressionsJson
|
|
1251
|
+
};
|
|
1252
|
+
var LinkAuxiliaryJson = {
|
|
1253
|
+
DefaultImageName: "default.png",
|
|
1254
|
+
MimicId: "",
|
|
1255
|
+
ImageLogic: LogicExpressionsJson,
|
|
1256
|
+
Design: "Default",
|
|
1257
|
+
ButtonColor: "#FFFFFF",
|
|
1258
|
+
TextColor: "#000000",
|
|
1259
|
+
TextHeight: 12,
|
|
1260
|
+
ButtonTexts: LocalizedTextJson
|
|
1261
|
+
};
|
|
1262
|
+
var PolylineAuxiliaryJson = {
|
|
1263
|
+
Lines: [],
|
|
1264
|
+
LineColorLogic: LogicExpressionsJson
|
|
1265
|
+
};
|
|
1266
|
+
var SquareAuxiliaryJson = {
|
|
1267
|
+
Lines: [],
|
|
1268
|
+
ColorBorder: "#000000",
|
|
1269
|
+
ColorFill: "#FFFFFF",
|
|
1270
|
+
LineColorLogic: LogicExpressionsJson
|
|
1271
|
+
};
|
|
1272
|
+
var TextAuxiliaryJson = {
|
|
1273
|
+
TextAttributes: TextAttributesJson,
|
|
1274
|
+
Text: LocalizedTextJson
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
// app/models/mimics/ChannelMimic.ts
|
|
1278
|
+
var ChannelJson = {
|
|
1279
|
+
WithBackup: false,
|
|
1280
|
+
Main: null,
|
|
1281
|
+
Backup: null,
|
|
1282
|
+
Max: 100,
|
|
1283
|
+
Min: 0,
|
|
1284
|
+
Units: ""
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
// app/models/mimics/MimicTraits.ts
|
|
1288
|
+
var AutomaticSemiAutoJson = {
|
|
1289
|
+
withAutomatic: false,
|
|
1290
|
+
automaticCommand: ChannelJson,
|
|
1291
|
+
semiAutoCommand: ChannelJson,
|
|
1292
|
+
automaticFeedback: ChannelJson,
|
|
1293
|
+
hasSemiAutoFeedback: false,
|
|
1294
|
+
semiAutoFeedback: ChannelJson
|
|
1295
|
+
};
|
|
1296
|
+
var CommandsOpClJson = {
|
|
1297
|
+
commandOpen: ChannelJson,
|
|
1298
|
+
commandClose: ChannelJson
|
|
1299
|
+
};
|
|
1300
|
+
var CommandsStartStopJson = {
|
|
1301
|
+
commandStart: ChannelJson,
|
|
1302
|
+
commandStop: ChannelJson
|
|
1303
|
+
};
|
|
1304
|
+
var ControlLockJson = {
|
|
1305
|
+
hasControlLock: false,
|
|
1306
|
+
controlLock: ChannelJson
|
|
1307
|
+
};
|
|
1308
|
+
var FeedbackOpClJson = {
|
|
1309
|
+
openFeedback: ChannelJson,
|
|
1310
|
+
closeFeedback: ChannelJson
|
|
1311
|
+
};
|
|
1312
|
+
var FeedbackRunningStoppedJson = {
|
|
1313
|
+
runFeedback: ChannelJson,
|
|
1314
|
+
hasStoppedFeedback: false,
|
|
1315
|
+
stoppedFeedback: ChannelJson
|
|
1316
|
+
};
|
|
1317
|
+
var OrderOpClJson = {
|
|
1318
|
+
openOrder: ChannelJson,
|
|
1319
|
+
closeOrder: ChannelJson
|
|
1320
|
+
};
|
|
1321
|
+
var OrderStartStopJson = {
|
|
1322
|
+
startOrder: ChannelJson,
|
|
1323
|
+
stopOrder: ChannelJson
|
|
1324
|
+
};
|
|
1325
|
+
var RemoteLocalJson = {
|
|
1326
|
+
remoteFeedback: ChannelJson,
|
|
1327
|
+
hasLocalFeedback: false,
|
|
1328
|
+
localFeedback: ChannelJson
|
|
1329
|
+
};
|
|
1330
|
+
var TripResetJson = {
|
|
1331
|
+
tripFeedback: ChannelJson,
|
|
1332
|
+
withCommandReset: false,
|
|
1333
|
+
resetCommand: ChannelJson
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
// app/models/mimics/ControlElements.ts
|
|
1337
|
+
var CompressorJson = {
|
|
1338
|
+
AutomaticSemiAuto: AutomaticSemiAutoJson,
|
|
1339
|
+
CommandsStartStop: CommandsStartStopJson,
|
|
1340
|
+
ControlLock: ControlLockJson,
|
|
1341
|
+
FeedbackRunningStopped: FeedbackRunningStoppedJson,
|
|
1342
|
+
OrderStartStop: OrderStartStopJson,
|
|
1343
|
+
RemoteLocal: RemoteLocalJson,
|
|
1344
|
+
TripReset: TripResetJson,
|
|
1345
|
+
IsControl: false,
|
|
1346
|
+
CompressorDesign: CompressorDesigns.NORMAL
|
|
1347
|
+
};
|
|
1348
|
+
var DamperJson = {
|
|
1349
|
+
FeedbackAutoSemiAuto: AutomaticSemiAutoJson,
|
|
1350
|
+
FeedbackOpCl: FeedbackOpClJson,
|
|
1351
|
+
CommandsOpCl: CommandsOpClJson,
|
|
1352
|
+
ControlLock: ControlLockJson,
|
|
1353
|
+
OrderOpCl: OrderOpClJson,
|
|
1354
|
+
RemoteLocal: RemoteLocalJson,
|
|
1355
|
+
TripReset: TripResetJson,
|
|
1356
|
+
IsControl: false
|
|
1357
|
+
};
|
|
1358
|
+
var DamperAutomatedJson = {
|
|
1359
|
+
Damper: "",
|
|
1360
|
+
CommandsOpClTrait: CommandsOpClJson,
|
|
1361
|
+
TripResetTrait: TripResetJson
|
|
1362
|
+
};
|
|
1363
|
+
var FanJson = {
|
|
1364
|
+
AutomaticSemiAuto: AutomaticSemiAutoJson,
|
|
1365
|
+
ControlLock: ControlLockJson,
|
|
1366
|
+
RemoteLocal: RemoteLocalJson,
|
|
1367
|
+
TripReset: TripResetJson,
|
|
1368
|
+
FanMode: FanTypes.SIMPLE,
|
|
1369
|
+
FanDesign: FanDesigns.NORMAL,
|
|
1370
|
+
SpeedFeedback: ChannelJson,
|
|
1371
|
+
ConsignedSpeed: ChannelJson,
|
|
1372
|
+
UserConsignedSpeed: ChannelJson,
|
|
1373
|
+
RunFeedbackSupply: ChannelJson,
|
|
1374
|
+
RunFeedbackSupplyFast: ChannelJson,
|
|
1375
|
+
RunFeedbackExhaust: ChannelJson,
|
|
1376
|
+
RunFeedbackExhaustFast: ChannelJson,
|
|
1377
|
+
StoppedFeedback: ChannelJson,
|
|
1378
|
+
StartOrderSupply: ChannelJson,
|
|
1379
|
+
StartOrderSupplyFast: ChannelJson,
|
|
1380
|
+
StartOrderExhaust: ChannelJson,
|
|
1381
|
+
StartOrderExhaustFast: ChannelJson,
|
|
1382
|
+
StopOrder: ChannelJson,
|
|
1383
|
+
StartCommandSupply: ChannelJson,
|
|
1384
|
+
StartCommandSupplyFast: ChannelJson,
|
|
1385
|
+
StartCommandExhaust: ChannelJson,
|
|
1386
|
+
StartCommandExhaustFast: ChannelJson,
|
|
1387
|
+
StopCommand: ChannelJson,
|
|
1388
|
+
StartCommandSupplyConfirmation: LocalizedTextJson,
|
|
1389
|
+
StartCommandSupplyFastConfirmation: LocalizedTextJson,
|
|
1390
|
+
StartCommandExhaustConfirmation: LocalizedTextJson,
|
|
1391
|
+
StartCommandExhaustFastConfirmation: LocalizedTextJson,
|
|
1392
|
+
StopCommandConfirmation: LocalizedTextJson
|
|
1393
|
+
};
|
|
1394
|
+
var PumpJson = {
|
|
1395
|
+
AutomaticSemiAuto: AutomaticSemiAutoJson,
|
|
1396
|
+
ControlLock: ControlLockJson,
|
|
1397
|
+
CommandsStartStop: CommandsStartStopJson,
|
|
1398
|
+
FeedbackRunningStopped: FeedbackRunningStoppedJson,
|
|
1399
|
+
OrderStartStop: OrderStartStopJson,
|
|
1400
|
+
RemoteLocal: RemoteLocalJson,
|
|
1401
|
+
TripReset: TripResetJson,
|
|
1402
|
+
IsControl: false,
|
|
1403
|
+
PumpDesign: CompressorDesigns.NORMAL
|
|
1404
|
+
};
|
|
1405
|
+
var PumpAutomatedJson = {
|
|
1406
|
+
Pump: "",
|
|
1407
|
+
PumpDesign: CompressorDesigns.NORMAL,
|
|
1408
|
+
AutomaticSemiAuto: AutomaticSemiAutoJson,
|
|
1409
|
+
TripReset: TripResetJson
|
|
1410
|
+
};
|
|
1411
|
+
var TankJson = {
|
|
1412
|
+
TankName: "",
|
|
1413
|
+
LocationInfo: InfoLocations.RIGHT,
|
|
1414
|
+
ShowVolume: true,
|
|
1415
|
+
ShowVolumeInPercent: false,
|
|
1416
|
+
ShowVolumeInMeters: false,
|
|
1417
|
+
ShowVolumeInLitres: false,
|
|
1418
|
+
ShowWeight: false,
|
|
1419
|
+
ShowSounding: false,
|
|
1420
|
+
TextValueHeight: 12,
|
|
1421
|
+
TextValuePadding: 2,
|
|
1422
|
+
BackgroundColor: "#FFFFFF",
|
|
1423
|
+
ContentColor: "#000000",
|
|
1424
|
+
ShowAlarmLimits: false,
|
|
1425
|
+
MarkType: MarkTypes.SHORT_LINE,
|
|
1426
|
+
Scale: ScaleJson
|
|
1427
|
+
};
|
|
1428
|
+
var ValveJson = {
|
|
1429
|
+
IsControl: false,
|
|
1430
|
+
ValveDesign: ValveDesigns.NORMAL,
|
|
1431
|
+
FeedbackOpCl: FeedbackOpClJson,
|
|
1432
|
+
CommandsOpCl: CommandsOpClJson,
|
|
1433
|
+
OrderOpCl: OrderOpClJson,
|
|
1434
|
+
ControlLock: ControlLockJson,
|
|
1435
|
+
RemoteLocal: RemoteLocalJson,
|
|
1436
|
+
TripReset: TripResetJson
|
|
1437
|
+
};
|
|
1438
|
+
var ValveAutomatedJson = {
|
|
1439
|
+
Valve: "",
|
|
1440
|
+
ValveDesign: ValveDesigns.NORMAL,
|
|
1441
|
+
CommandsOpCl: CommandsOpClJson,
|
|
1442
|
+
TripReset: TripResetJson
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
// app/models/mimics/Elements.ts
|
|
1446
|
+
var AlarmIndicatorJson = {
|
|
1447
|
+
TextHeight: 12,
|
|
1448
|
+
TextColor: "#FFFFFF",
|
|
1449
|
+
Texts: LocalizedTextJson,
|
|
1450
|
+
AlarmFeedback: ChannelJson
|
|
1451
|
+
};
|
|
1452
|
+
var CommandJson = {
|
|
1453
|
+
TextHeight: 12,
|
|
1454
|
+
MessageColor: "#FFFFFF",
|
|
1455
|
+
TimeoutCommandCheck: 5,
|
|
1456
|
+
CommandCheckColor: "#00FF00",
|
|
1457
|
+
TimeoutCommandResult: 10,
|
|
1458
|
+
CommandOkColor: "#00FF00",
|
|
1459
|
+
CommandErrorColor: "#FF0000",
|
|
1460
|
+
HasConfirmation: false,
|
|
1461
|
+
HasPassword: false,
|
|
1462
|
+
CommandChannel: ChannelJson,
|
|
1463
|
+
CloseChannel: ChannelJson,
|
|
1464
|
+
Messages: LocalizedTextJson,
|
|
1465
|
+
ConfirmationMessages: LocalizedTextJson
|
|
1466
|
+
};
|
|
1467
|
+
var DialJson = {
|
|
1468
|
+
Color: "#FFFFFF",
|
|
1469
|
+
ShowTextValue: false,
|
|
1470
|
+
Factor: 100,
|
|
1471
|
+
ShowAlarmLimits: false,
|
|
1472
|
+
ShowFactor: false,
|
|
1473
|
+
DivisionsNumber: 3,
|
|
1474
|
+
SubdivisionsNumber: 2,
|
|
1475
|
+
Channel: ChannelJson
|
|
1476
|
+
};
|
|
1477
|
+
var DigitalJson = {
|
|
1478
|
+
TextHeight: 12,
|
|
1479
|
+
LedType: LedTypes.CIRCLE,
|
|
1480
|
+
OpenLedColor: "#00FF00",
|
|
1481
|
+
CloseLedColor: "#FF0000",
|
|
1482
|
+
OpenTexts: LocalizedTextJson,
|
|
1483
|
+
CloseTexts: LocalizedTextJson,
|
|
1484
|
+
FeedbackOpCl: FeedbackOpClJson
|
|
1485
|
+
};
|
|
1486
|
+
var DisplayJson = {
|
|
1487
|
+
HeightText: 12,
|
|
1488
|
+
TextColor: "#FFFFFF",
|
|
1489
|
+
ShowMeasureUnit: false,
|
|
1490
|
+
NumCharactersDisplay: 8,
|
|
1491
|
+
Channel: ChannelJson
|
|
1492
|
+
};
|
|
1493
|
+
var DynamicTextJson = {
|
|
1494
|
+
TextAttributes: TextAttributesJson,
|
|
1495
|
+
DefaultTextColor: "#FFFFFF",
|
|
1496
|
+
DefaultText: LocalizedTextJson,
|
|
1497
|
+
TextLogic: LogicExpressionsJson
|
|
1498
|
+
};
|
|
1499
|
+
var LevelBarJson = {
|
|
1500
|
+
Orientation: LevelBarOrientations.VERTICAL,
|
|
1501
|
+
BackgroundColor: "#000000",
|
|
1502
|
+
ForegroundColor: "#00FF00",
|
|
1503
|
+
ShowTextValue: false,
|
|
1504
|
+
TextValueHeight: 12,
|
|
1505
|
+
ValueType: ValueTypes.RAW,
|
|
1506
|
+
ShowAlarmLimits: false,
|
|
1507
|
+
MarkType: MarkTypes.LARGE_LINE,
|
|
1508
|
+
Scale: ScaleJson,
|
|
1509
|
+
LevelChannel: ChannelJson
|
|
1510
|
+
};
|
|
1511
|
+
var SliderJson = {
|
|
1512
|
+
Orientation: SliderOrientations.VERTICAL,
|
|
1513
|
+
Steps: 10,
|
|
1514
|
+
ColorBackground: "#FFFFFF",
|
|
1515
|
+
ColorValue: "#00FF00",
|
|
1516
|
+
ColorValueCircle: "#0000FF",
|
|
1517
|
+
HasTextValue: false,
|
|
1518
|
+
ColorTextValue: "#000000",
|
|
1519
|
+
TextValueFontSize: 12,
|
|
1520
|
+
IsVisualizationOnly: false,
|
|
1521
|
+
Channel: ChannelJson
|
|
1522
|
+
};
|
|
1523
|
+
var TextChannelJson = {
|
|
1524
|
+
TextAttributes: TextAttributesJson,
|
|
1525
|
+
Channel: ChannelJson
|
|
1526
|
+
};
|
|
1527
|
+
var ToggleJson = {
|
|
1528
|
+
ColorCircle: "#FFFFFF",
|
|
1529
|
+
ColorOnBackground: "#00FF00",
|
|
1530
|
+
ColorOffBackground: "#FF0000",
|
|
1531
|
+
DisplayValue: false,
|
|
1532
|
+
OnTextValue: "ON",
|
|
1533
|
+
OnTextValueColor: "#00FF00",
|
|
1534
|
+
OffTextValue: "OFF",
|
|
1535
|
+
OffTextValueColor: "#FF0000",
|
|
1536
|
+
IsVisualizationOnly: false,
|
|
1537
|
+
Channel: ChannelJson,
|
|
1538
|
+
CommandOnChannel: ChannelJson,
|
|
1539
|
+
CommandOffChannel: ChannelJson
|
|
1540
|
+
};
|
|
1541
|
+
|
|
1542
|
+
// app/models/mimics/IasElements.ts
|
|
1543
|
+
var CabinetJson = {
|
|
1544
|
+
Design: CabinetDesigns.IMAGE,
|
|
1545
|
+
ImageName: "cabinet.png",
|
|
1546
|
+
CabinetId: ""
|
|
1547
|
+
};
|
|
1548
|
+
var RepeaterJson = {
|
|
1549
|
+
Design: RepeaterDesigns.IMAGE,
|
|
1550
|
+
ImageName: "repeater.png",
|
|
1551
|
+
RepeaterId: ""
|
|
1552
|
+
};
|
|
1553
|
+
var StationJson = {
|
|
1554
|
+
Design: StationDesigns.IMAGE,
|
|
1555
|
+
ImageName: "station.png",
|
|
1556
|
+
StationId: ""
|
|
1557
|
+
};
|
|
1558
|
+
var UnitJson = {
|
|
1559
|
+
Design: UnitDesigns.IMAGE,
|
|
1560
|
+
ImageName: "unit.png",
|
|
1561
|
+
UnitId: ""
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
// app/models/mimics/PmsElements.ts
|
|
1565
|
+
var BreakerJson = {
|
|
1566
|
+
FeedbackOpCl: FeedbackOpClJson,
|
|
1567
|
+
CommandsOpCl: CommandsOpClJson,
|
|
1568
|
+
ControlLock: ControlLockJson,
|
|
1569
|
+
OrderOpCl: OrderOpClJson,
|
|
1570
|
+
RemoteLocal: RemoteLocalJson,
|
|
1571
|
+
TripReset: TripResetJson,
|
|
1572
|
+
AutomaticManual: AutomaticSemiAutoJson,
|
|
1573
|
+
IsControl: false,
|
|
1574
|
+
RemoteIconSize: 24
|
|
1575
|
+
};
|
|
1576
|
+
var BreakerPmsJson = {
|
|
1577
|
+
Breaker: "",
|
|
1578
|
+
RemoteIconSize: 24,
|
|
1579
|
+
CommandsOpCl: CommandsOpClJson,
|
|
1580
|
+
TripReset: TripResetJson
|
|
1581
|
+
};
|
|
1582
|
+
var GeneratorJson = {
|
|
1583
|
+
AutomaticSemiAuto: AutomaticSemiAutoJson,
|
|
1584
|
+
CommandsStartStop: CommandsStartStopJson,
|
|
1585
|
+
FeedbackRunningStopped: FeedbackRunningStoppedJson,
|
|
1586
|
+
OrderStartStop: OrderStartStopJson,
|
|
1587
|
+
RemoteLocal: RemoteLocalJson,
|
|
1588
|
+
TripReset: TripResetJson,
|
|
1589
|
+
OrderAuto: ChannelJson,
|
|
1590
|
+
OrderSemiAuto: ChannelJson,
|
|
1591
|
+
IsControl: false
|
|
1592
|
+
};
|
|
1593
|
+
var GeneratorPmsJson = {
|
|
1594
|
+
Generator: "",
|
|
1595
|
+
GeneratorNameColor: "#FFFFFF",
|
|
1596
|
+
AutomaticSemiAutoTrait: AutomaticSemiAutoJson,
|
|
1597
|
+
CommandsStartStopTrait: CommandsStartStopJson,
|
|
1598
|
+
TripResetTrait: TripResetJson
|
|
1599
|
+
};
|
|
1600
|
+
var OperationModesJson = {
|
|
1601
|
+
TextHeight: 12,
|
|
1602
|
+
ModeToReach: "",
|
|
1603
|
+
Messages: LocalizedTextJson
|
|
1604
|
+
};
|
|
1605
|
+
var PriorityDataJson = {
|
|
1606
|
+
Name: "",
|
|
1607
|
+
ChannelPriority: "",
|
|
1608
|
+
ChannelPriorityFeedback: ""
|
|
1609
|
+
};
|
|
1610
|
+
var PrioritiesJson = {
|
|
1611
|
+
TextHeight: 12,
|
|
1612
|
+
HasPassword: false,
|
|
1613
|
+
Texts: LocalizedTextJson,
|
|
1614
|
+
Priorities: []
|
|
1615
|
+
};
|
|
1616
|
+
var ShaftJson = {
|
|
1617
|
+
WithFeedbackOpen: false,
|
|
1618
|
+
ActivationMode: "",
|
|
1619
|
+
ActivationValue: false,
|
|
1620
|
+
OpenFeedback: ChannelJson,
|
|
1621
|
+
CloseFeedback: ChannelJson
|
|
1622
|
+
};
|
|
1623
|
+
|
|
130
1624
|
// app/index.ts
|
|
1625
|
+
var import_mongoose7 = __toESM(require("mongoose"), 1);
|
|
1626
|
+
var import_mongoose_autopopulate2 = __toESM(require("mongoose-autopopulate"), 1);
|
|
1627
|
+
var import_mongoose_paginate_v27 = __toESM(require("mongoose-paginate-v2"), 1);
|
|
1628
|
+
var import_mongoose_aggregate_paginate_v27 = __toESM(require("mongoose-aggregate-paginate-v2"), 1);
|
|
1629
|
+
var Schemas = {
|
|
1630
|
+
Channel: Channel_default,
|
|
1631
|
+
ChannelDataBucket: ChannelDataBucket_default,
|
|
1632
|
+
ChannelDataPoint: ChannelDataPoint_default,
|
|
1633
|
+
Event: Event_default,
|
|
1634
|
+
History: History_default,
|
|
1635
|
+
Unit: Unit_default
|
|
1636
|
+
};
|
|
1637
|
+
var Mimics = {
|
|
1638
|
+
// Auxiliary
|
|
1639
|
+
ImageAuxiliaryJson,
|
|
1640
|
+
LineAuxiliaryJson,
|
|
1641
|
+
LinkAuxiliaryJson,
|
|
1642
|
+
PolylineAuxiliaryJson,
|
|
1643
|
+
SquareAuxiliaryJson,
|
|
1644
|
+
TextAuxiliaryJson,
|
|
1645
|
+
// Channel
|
|
1646
|
+
ChannelJson,
|
|
1647
|
+
// Control elements
|
|
1648
|
+
CompressorJson,
|
|
1649
|
+
DamperJson,
|
|
1650
|
+
DamperAutomatedJson,
|
|
1651
|
+
FanJson,
|
|
1652
|
+
PumpJson,
|
|
1653
|
+
PumpAutomatedJson,
|
|
1654
|
+
TankJson,
|
|
1655
|
+
ValveJson,
|
|
1656
|
+
ValveAutomatedJson,
|
|
1657
|
+
// Elements
|
|
1658
|
+
AlarmIndicatorJson,
|
|
1659
|
+
CommandJson,
|
|
1660
|
+
DialJson,
|
|
1661
|
+
DigitalJson,
|
|
1662
|
+
DisplayJson,
|
|
1663
|
+
DynamicTextJson,
|
|
1664
|
+
LevelBarJson,
|
|
1665
|
+
SliderJson,
|
|
1666
|
+
TextChannelJson,
|
|
1667
|
+
ToggleJson,
|
|
1668
|
+
// IAS elements
|
|
1669
|
+
CabinetJson,
|
|
1670
|
+
RepeaterJson,
|
|
1671
|
+
StationJson,
|
|
1672
|
+
UnitJson,
|
|
1673
|
+
// Support
|
|
1674
|
+
AddedAlarmsJson,
|
|
1675
|
+
BackgroundJson,
|
|
1676
|
+
LineJson,
|
|
1677
|
+
LocalizedTextJson,
|
|
1678
|
+
LocationJson,
|
|
1679
|
+
LogicExpressionJson,
|
|
1680
|
+
LogicExpressionsJson,
|
|
1681
|
+
ScaleJson,
|
|
1682
|
+
TextAttributesJson,
|
|
1683
|
+
TitleJson,
|
|
1684
|
+
// Traits
|
|
1685
|
+
AutomaticSemiAutoJson,
|
|
1686
|
+
CommandsOpClJson,
|
|
1687
|
+
CommandsStartStopJson,
|
|
1688
|
+
ControlLockJson,
|
|
1689
|
+
FeedbackOpClJson,
|
|
1690
|
+
FeedbackRunningStoppedJson,
|
|
1691
|
+
OrderOpClJson,
|
|
1692
|
+
OrderStartStopJson,
|
|
1693
|
+
RemoteLocalJson,
|
|
1694
|
+
TripResetJson,
|
|
1695
|
+
// PMS elements
|
|
1696
|
+
BreakerJson,
|
|
1697
|
+
BreakerPmsJson,
|
|
1698
|
+
GeneratorJson,
|
|
1699
|
+
GeneratorPmsJson,
|
|
1700
|
+
OperationModesJson,
|
|
1701
|
+
PriorityDataJson,
|
|
1702
|
+
PrioritiesJson,
|
|
1703
|
+
ShaftJson
|
|
1704
|
+
};
|
|
1705
|
+
var MimicsTypes = {
|
|
1706
|
+
MimicElementTypes,
|
|
1707
|
+
ZDepths,
|
|
1708
|
+
TitleAligns,
|
|
1709
|
+
DigitalStates,
|
|
1710
|
+
DigitalAlarmStates,
|
|
1711
|
+
AlarmStates,
|
|
1712
|
+
ActivationModes,
|
|
1713
|
+
TextAnchorPoints,
|
|
1714
|
+
ValveDesigns,
|
|
1715
|
+
FanDesigns,
|
|
1716
|
+
FanRunStates,
|
|
1717
|
+
FanDirections,
|
|
1718
|
+
FanTypes,
|
|
1719
|
+
LevelBarOrientations,
|
|
1720
|
+
SliderOrientations,
|
|
1721
|
+
CompressorDesigns,
|
|
1722
|
+
LedTypes,
|
|
1723
|
+
InfoLocations,
|
|
1724
|
+
MarkTypes,
|
|
1725
|
+
ScalePositions,
|
|
1726
|
+
ValueTypes,
|
|
1727
|
+
OperationModeStates,
|
|
1728
|
+
UnitDesigns,
|
|
1729
|
+
StationDesigns,
|
|
1730
|
+
RepeaterDesigns,
|
|
1731
|
+
CabinetDesigns,
|
|
1732
|
+
LinkDesigns,
|
|
1733
|
+
OpClStates,
|
|
1734
|
+
RunningStoppedStates
|
|
1735
|
+
};
|
|
131
1736
|
var Types = {
|
|
132
1737
|
AlarmTypes,
|
|
133
1738
|
AlarmPriorities,
|
|
134
1739
|
CloudAlarmStates,
|
|
135
1740
|
DiamarAlarmStates,
|
|
136
|
-
ChannelBaseTypes,
|
|
137
|
-
ChannelSpecificTypes,
|
|
138
1741
|
EventCategories,
|
|
139
|
-
|
|
140
|
-
|
|
1742
|
+
Mimics: MimicsTypes
|
|
1743
|
+
};
|
|
1744
|
+
var index_default = {
|
|
1745
|
+
Schemas,
|
|
1746
|
+
Docs: docs_default,
|
|
1747
|
+
Mimics,
|
|
1748
|
+
Types,
|
|
1749
|
+
mongoose: import_mongoose7.default,
|
|
1750
|
+
mongoosePaginate: import_mongoose_paginate_v27.default,
|
|
1751
|
+
mongooseAggregatePaginate: import_mongoose_aggregate_paginate_v27.default,
|
|
1752
|
+
mongooseAutopopulate: import_mongoose_autopopulate2.default
|
|
141
1753
|
};
|
|
142
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
-
0 && (module.exports = {
|
|
144
|
-
Types
|
|
145
|
-
});
|