@resolveio/server-lib 9.0.32 → 9.0.34
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-server-app.js +7 -48
- package/client-server-app.js.map +1 -1
- package/collections/app-status.collection.js +8 -11
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.js +8 -11
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.js +8 -11
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +9 -12
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +8 -11
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +8 -11
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +9 -12
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +8 -11
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.js +8 -11
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +11 -14
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +13 -16
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +16 -19
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +9 -12
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.js +10 -13
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.js +10 -13
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +13 -16
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.js +13 -16
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.js +15 -18
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +12 -15
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +12 -15
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +8 -11
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.js +9 -12
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.js +9 -12
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.js +9 -12
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-dashboard-builder.collection.js +10 -13
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +11 -14
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +11 -14
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +11 -14
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +8 -11
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.js +12 -15
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.js +25 -25
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +30 -80
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +9 -59
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +344 -460
- package/http/auth.js.map +1 -1
- package/http/health.js +1 -5
- package/http/health.js.map +1 -1
- package/http/home.js +7 -11
- package/http/home.js.map +1 -1
- package/index.js +36 -98
- package/index.js.map +1 -1
- package/managers/cron.manager.js +78 -157
- package/managers/cron.manager.js.map +1 -1
- package/managers/method.manager.js +323 -303
- package/managers/method.manager.js.map +1 -1
- package/managers/mongo.manager.d.ts +14 -14
- package/managers/mongo.manager.js +794 -865
- package/managers/mongo.manager.js.map +1 -1
- package/managers/monitor.manager.js +171 -254
- package/managers/monitor.manager.js.map +1 -1
- package/managers/queue-method.manager.js +69 -166
- package/managers/queue-method.manager.js.map +1 -1
- package/managers/subscription.manager.js +515 -708
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +111 -183
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +156 -262
- package/methods/aws.js.map +1 -1
- package/methods/cloudconvert.js +100 -180
- package/methods/cloudconvert.js.map +1 -1
- package/methods/collections.js +114 -530
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +29 -79
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +819 -884
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flags.js +1 -5
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +258 -313
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +289 -348
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +341 -340
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +565 -657
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +67 -185
- package/methods/support.js.map +1 -1
- package/models/app-status.model.js +1 -2
- package/models/app-version.model.js +1 -2
- package/models/billing-logged-in-users.model.js +1 -2
- package/models/collection-document.model.js +1 -2
- package/models/counter.model.js +1 -2
- package/models/cron-job-history.model.js +1 -2
- package/models/cron-job.model.js +1 -2
- package/models/dialog.model.js +1 -2
- package/models/email-history.model.js +1 -2
- package/models/email-verified.model.js +1 -2
- package/models/file.model.js +1 -2
- package/models/flag.model.js +1 -2
- package/models/log-method-latency.model.js +1 -2
- package/models/log-subscription.model.js +1 -2
- package/models/log.model.js +1 -2
- package/models/logged-in-users.model.js +1 -2
- package/models/method-call.model.js +1 -2
- package/models/method-response.model.js +1 -2
- package/models/method.model.js +1 -2
- package/models/monitor-cpu.model.js +1 -2
- package/models/monitor-https-inbound.model.js +1 -2
- package/models/monitor-https-outbound.model.js +1 -2
- package/models/monitor-memory.model.js +1 -2
- package/models/monitor-mongo.model.js +1 -2
- package/models/notification.model.js +1 -2
- package/models/pagination.model.js +2 -5
- package/models/pagination.model.js.map +1 -1
- package/models/permission.model.js +1 -2
- package/models/queue-method.model.js +1 -2
- package/models/queue-response.model.js +1 -2
- package/models/report-builder-dashboard-builder.model.js +1 -2
- package/models/report-builder-library.model.js +1 -2
- package/models/report-builder-report.model.js +1 -2
- package/models/report-builder.model.js +1 -2
- package/models/select-data-label.model.js +1 -2
- package/models/server-response.model.js +1 -2
- package/models/subscription.model.js +1 -2
- package/models/support-ticket.model.js +1 -2
- package/models/user-group.model.js +1 -2
- package/models/user-guide.model.js +1 -2
- package/models/user.model.js +1 -2
- package/package.json +1 -1
- package/public_api.js +70 -82
- package/public_api.js.map +1 -1
- package/publications/app-status.js +4 -8
- package/publications/app-status.js.map +1 -1
- package/publications/app-version.js +4 -8
- package/publications/app-version.js.map +1 -1
- package/publications/cron-jobs.js +9 -13
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +11 -15
- package/publications/files.js.map +1 -1
- package/publications/flags.js +7 -11
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +31 -35
- package/publications/logs.js.map +1 -1
- package/publications/method-calls.js +4 -8
- package/publications/method-calls.js.map +1 -1
- package/publications/method-responses.js +4 -8
- package/publications/method-responses.js.map +1 -1
- package/publications/notifications.js +4 -8
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-dashboard-builders.js +8 -12
- package/publications/report-builder-dashboard-builders.js.map +1 -1
- package/publications/report-builder-libraries.js +16 -66
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +17 -21
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +3 -7
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +4 -8
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +4 -8
- package/publications/user-guides.js.map +1 -1
- package/server-app.js +393 -534
- package/server-app.js.map +1 -1
- package/util/common.js +55 -92
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +76 -134
- package/util/schema-report-builder.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU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AC;QACxC,gBAAgB,CAAC,WAAW,CAAC,EAAC,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;QACnD,gBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACjD,gBAAgB,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,CAAC,CAAC;KAC7C;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LogSubscriptionModel } from '../models/log-subscription.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: Array\t\n\t},\n\t'subData.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nexport let LogSubscriptions: Collection<LogSubscriptionModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LogSubscriptionModel>('log-subscriptions', schema, false, false, [], true, false);\n\t\tLogSubscriptions = model.collection_main;\n\t\tLogSubscriptions.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tLogSubscriptions.createIndex({type: 1});\n\t\tLogSubscriptions.createIndex({collection_name: 1});\n\t\tLogSubscriptions.createIndex({date: 1, type: 1});\n\t\tLogSubscriptions.createIndex({createdAt: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -48,23 +45,23 @@ var schema = {
|
|
|
48
45
|
type: String
|
|
49
46
|
}
|
|
50
47
|
};
|
|
51
|
-
|
|
48
|
+
export let Logs = null;
|
|
52
49
|
initializeCollection();
|
|
53
50
|
function initializeCollection() {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
52
|
+
const model = new Model('logs', schema, false, false, [], true, false);
|
|
53
|
+
Logs = model.collection_main;
|
|
54
|
+
Logs.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 90 });
|
|
55
|
+
Logs.createIndex({ createdAt: -1, type: 1, id_document: 1 });
|
|
56
|
+
Logs.createIndex({ createdAt: -1, type: 1, user: 1 });
|
|
57
|
+
Logs.createIndex({ createdAt: -1, type: 1, method: 1 });
|
|
58
|
+
Logs.createIndex({ createdAt: -1, type: 1, route: 1 });
|
|
59
|
+
Logs.createIndex({ createdAt: -1, type: 1, collection: 1, id_document: 1 });
|
|
60
|
+
Logs.createIndex({ createdAt: -1, type: 1, collection: 1, method: 1, route: 1 });
|
|
61
|
+
Logs.createIndex({ createdAt: -1, type: 1, collection: 1, route: 1 });
|
|
65
62
|
}
|
|
66
63
|
else {
|
|
67
|
-
setTimeout(
|
|
64
|
+
setTimeout(() => {
|
|
68
65
|
initializeCollection();
|
|
69
66
|
}, 1);
|
|
70
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,IAAI,GAAyB,IAAI,CAAC;AAE7C,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,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AC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;KACpE;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tcollection: {\n\t\ttype: String\n\t},\n\tid_document: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: String\n\t},\n\troute: {\n\t\ttype: String\n\t}\n};\n\nexport let Logs: Collection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LogModel>('logs', schema, false, false, [], true, false);\n\t\tLogs = model.collection_main;\n\t\tLogs.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t\tLogs.createIndex({createdAt: -1, type: 1, id_document: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, user: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, method: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, route: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, id_document: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, method: 1, route: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, route: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -41,16 +38,16 @@ var schema = {
|
|
|
41
38
|
optional: true
|
|
42
39
|
}
|
|
43
40
|
};
|
|
44
|
-
|
|
41
|
+
export let LoggedInUsers = null;
|
|
45
42
|
initializeCollection();
|
|
46
43
|
function initializeCollection() {
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
45
|
+
const model = new Model('logged-in-users', schema, false, false, [], true, false);
|
|
46
|
+
LoggedInUsers = model.collection_main;
|
|
47
|
+
LoggedInUsers.createIndex({ id_ws: 1 });
|
|
51
48
|
}
|
|
52
49
|
else {
|
|
53
|
-
setTimeout(
|
|
50
|
+
setTimeout(() => {
|
|
54
51
|
initializeCollection();
|
|
55
52
|
}, 1);
|
|
56
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,aAAa,GAAkC,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE,EAAE;QACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAoB,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACrG,aAAa,GAAG,KAAK,CAAC,eAAe,CAAC;QACtC,aAAa,CAAC,WAAW,CAAC,EAAC,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;KACtC;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"logged-in-users.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LoggedInUserModel } from '../models/logged-in-users.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tapp_version: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlatency: {\n\t\ttype: Number,\n\t\toptional: true\n\t}\n};\n\nexport let LoggedInUsers: Collection<LoggedInUserModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LoggedInUserModel>('logged-in-users', schema, false, false, [], true, false);\n\t\tLoggedInUsers = model.collection_main;\n\t\tLoggedInUsers.createIndex({id_ws: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -33,17 +30,17 @@ var schema = {
|
|
|
33
30
|
type: Date
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
|
-
|
|
33
|
+
export let MethodCalls = null;
|
|
37
34
|
initializeCollection();
|
|
38
35
|
function initializeCollection() {
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
37
|
+
const model = new Model('method-calls', schema, false, false, [], true, false);
|
|
38
|
+
MethodCalls = model.collection_main;
|
|
39
|
+
MethodCalls.createIndex({ id_user: 1, message_id: 1 });
|
|
40
|
+
MethodCalls.createIndex({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
44
41
|
}
|
|
45
42
|
else {
|
|
46
|
-
setTimeout(
|
|
43
|
+
setTimeout(() => {
|
|
47
44
|
initializeCollection();
|
|
48
45
|
}, 1);
|
|
49
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-call.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-call.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,WAAW,GAAgC,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE,EAAE;QACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAkB,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAChG,WAAW,GAAG,KAAK,CAAC,eAAe,CAAC;QACpC,WAAW,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;QACrD,WAAW,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;KACrE;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-call.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MethodCallModel } from '../models/method-call.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodCalls: Collection<MethodCallModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MethodCallModel>('method-calls', schema, false, false, [], true, false);\n\t\tMethodCalls = model.collection_main;\n\t\tMethodCalls.createIndex({id_user: 1, message_id: 1});\n\t\tMethodCalls.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -37,17 +34,17 @@ var schema = {
|
|
|
37
34
|
type: Date
|
|
38
35
|
}
|
|
39
36
|
};
|
|
40
|
-
|
|
37
|
+
export let MethodResponses = null;
|
|
41
38
|
initializeCollection();
|
|
42
39
|
function initializeCollection() {
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
41
|
+
const model = new Model('method-responses', schema, false, false, [], true, false);
|
|
42
|
+
MethodResponses = model.collection_main;
|
|
43
|
+
MethodResponses.createIndex({ id_user: 1, message_id: 1 });
|
|
44
|
+
MethodResponses.createIndex({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
48
45
|
}
|
|
49
46
|
else {
|
|
50
|
-
setTimeout(
|
|
47
|
+
setTimeout(() => {
|
|
51
48
|
initializeCollection();
|
|
52
49
|
}, 1);
|
|
53
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,E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nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MethodResponseModel } from '../models/method-response.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodResponses: Collection<MethodResponseModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MethodResponseModel>('method-responses', schema, false, false, [], true, false);\n\t\tMethodResponses = model.collection_main;\n\t\tMethodResponses.createIndex({id_user: 1, message_id: 1});\n\t\tMethodResponses.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -36,20 +33,20 @@ var schema = {
|
|
|
36
33
|
type: Number
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
|
-
|
|
36
|
+
export let MonitorCPUs = null;
|
|
40
37
|
initializeCollection();
|
|
41
38
|
function initializeCollection() {
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
40
|
+
const model = new Model('monitor-cpus', schema, false, false, [], true, false);
|
|
41
|
+
MonitorCPUs = model.collection_main;
|
|
42
|
+
MonitorCPUs.createIndex({ client: 1, instance: 1, date: 1 });
|
|
43
|
+
MonitorCPUs.createIndex({ client: 1, date: 1 });
|
|
44
|
+
MonitorCPUs.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
45
|
+
MonitorCPUs.createIndex({ app: 1 });
|
|
46
|
+
MonitorCPUs.createIndex({ system: 1 });
|
|
50
47
|
}
|
|
51
48
|
else {
|
|
52
|
-
setTimeout(
|
|
49
|
+
setTimeout(() => {
|
|
53
50
|
initializeCollection();
|
|
54
51
|
}, 1);
|
|
55
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,WAAW,GAAgC,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE,EAAE;QACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAkB,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAChG,WAAW,GAAG,KAAK,CAAC,eAAe,CAAC;QACpC,WAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC3D,WAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC9C,WAAW,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC5E,WAAW,CAAC,WAAW,CAAC,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC;QAClC,WAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;KACrC;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-cpu.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorCPUs: Collection<MonitorCPUModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorCPUModel>('monitor-cpus', schema, false, false, [], true, false);\n\t\tMonitorCPUs = model.collection_main;\n\t\tMonitorCPUs.createIndex({client: 1, instance: 1, date: 1});\n\t\tMonitorCPUs.createIndex({client: 1, date: 1});\n\t\tMonitorCPUs.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorCPUs.createIndex({app: 1});\n\t\tMonitorCPUs.createIndex({system: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -45,20 +42,20 @@ var schema = {
|
|
|
45
42
|
type: String
|
|
46
43
|
}
|
|
47
44
|
};
|
|
48
|
-
|
|
45
|
+
export let MonitorHTTPSInbounds = null;
|
|
49
46
|
initializeCollection();
|
|
50
47
|
function initializeCollection() {
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
49
|
+
const model = new Model('monitor-https-inbounds', schema, false, false, [], true, false);
|
|
50
|
+
MonitorHTTPSInbounds = model.collection_main;
|
|
51
|
+
MonitorHTTPSInbounds.createIndex({ client: 1, instance: 1, date: 1, method: 1, url: 1 });
|
|
52
|
+
MonitorHTTPSInbounds.createIndex({ client: 1, date: 1, duration: 1 });
|
|
53
|
+
MonitorHTTPSInbounds.createIndex({ client: 1, date: 1, method: 1, url: 1 });
|
|
54
|
+
MonitorHTTPSInbounds.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
55
|
+
MonitorHTTPSInbounds.createIndex({ duration: 1 });
|
|
59
56
|
}
|
|
60
57
|
else {
|
|
61
|
-
setTimeout(
|
|
58
|
+
setTimeout(() => {
|
|
62
59
|
initializeCollection();
|
|
63
60
|
}, 1);
|
|
64
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,S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BAAoB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACrF,oBAAoB,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KAChD;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-inbound.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeader: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorHTTPSInbounds: Collection<MonitorHTTPSInboundModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorHTTPSInboundModel>('monitor-https-inbounds', schema, false, false, [], true, false);\n\t\tMonitorHTTPSInbounds = model.collection_main;\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, instance: 1, date: 1, method: 1, url: 1});\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, date: 1, duration: 1});\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, date: 1, method: 1, url: 1});\n\t\tMonitorHTTPSInbounds.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorHTTPSInbounds.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -49,22 +46,22 @@ var schema = {
|
|
|
49
46
|
blackbox: true
|
|
50
47
|
}
|
|
51
48
|
};
|
|
52
|
-
|
|
49
|
+
export let MonitorHTTPSOutbounds = null;
|
|
53
50
|
initializeCollection();
|
|
54
51
|
function initializeCollection() {
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
53
|
+
const model = new Model('monitor-https-outbounds', schema, false, false, [], true, false);
|
|
54
|
+
MonitorHTTPSOutbounds = model.collection_main;
|
|
55
|
+
MonitorHTTPSOutbounds.createIndex({ client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1 });
|
|
56
|
+
MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, duration: 1 });
|
|
57
|
+
MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, method: 1, url: 1, status: 1 });
|
|
58
|
+
MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, status: 1 });
|
|
59
|
+
MonitorHTTPSOutbounds.createIndex({ client: 1, status: 1 });
|
|
60
|
+
MonitorHTTPSOutbounds.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
61
|
+
MonitorHTTPSOutbounds.createIndex({ duration: 1 });
|
|
65
62
|
}
|
|
66
63
|
else {
|
|
67
|
-
setTimeout(
|
|
64
|
+
setTimeout(() => {
|
|
68
65
|
initializeCollection();
|
|
69
66
|
}, 1);
|
|
70
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,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E,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACtF,qBAAqB,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KACjD;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-outbound.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeaders: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nexport let MonitorHTTPSOutbounds: Collection<MonitorHTTPSOutboundModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorHTTPSOutboundModel>('monitor-https-outbounds', schema, false, false, [], true, false);\n\t\tMonitorHTTPSOutbounds = model.collection_main;\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, duration: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, method: 1, url: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorHTTPSOutbounds.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -48,19 +45,19 @@ var schema = {
|
|
|
48
45
|
type: Number
|
|
49
46
|
}
|
|
50
47
|
};
|
|
51
|
-
|
|
48
|
+
export let MonitorMemorys = null;
|
|
52
49
|
initializeCollection();
|
|
53
50
|
function initializeCollection() {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
52
|
+
const model = new Model('monitor-memorys', schema, false, false, [], true, false);
|
|
53
|
+
MonitorMemorys = model.collection_main;
|
|
54
|
+
MonitorMemorys.createIndex({ client: 1, instance: 1, date: 1 });
|
|
55
|
+
MonitorMemorys.createIndex({ client: 1, date: 1 });
|
|
56
|
+
MonitorMemorys.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
57
|
+
MonitorMemorys.createIndex({ physical_free: 1 });
|
|
61
58
|
}
|
|
62
59
|
else {
|
|
63
|
-
setTimeout(
|
|
60
|
+
setTimeout(() => {
|
|
64
61
|
initializeCollection();
|
|
65
62
|
}, 1);
|
|
66
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,cAAc,GAAmC,IAAI,CAAC;AAEjE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE,EAAE;QACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAqB,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACtG,cAAc,GAAG,KAAK,CAAC,eAAe,CAAC;QACvC,cAAc,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC9D,cAAc,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACjD,cAAc,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC/E,cAAc,CAAC,WAAW,CAAC,EAAC,aAAa,EAAE,CAAC,EAAC,CAAC,CAAC;KAC/C;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorMemorys: Collection<MonitorMemoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorMemoryModel>('monitor-memorys', schema, false, false, [], true, false);\n\t\tMonitorMemorys = model.collection_main;\n\t\tMonitorMemorys.createIndex({client: 1, instance: 1, date: 1});\n\t\tMonitorMemorys.createIndex({client: 1, date: 1});\n\t\tMonitorMemorys.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorMemorys.createIndex({physical_free: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -42,19 +39,19 @@ var schema = {
|
|
|
42
39
|
type: String
|
|
43
40
|
}
|
|
44
41
|
};
|
|
45
|
-
|
|
42
|
+
export let MonitorMongos = null;
|
|
46
43
|
initializeCollection();
|
|
47
44
|
function initializeCollection() {
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
46
|
+
const model = new Model('monitor-mongos', schema, false, false, [], true, false);
|
|
47
|
+
MonitorMongos = model.collection_main;
|
|
48
|
+
MonitorMongos.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
49
|
+
MonitorMongos.createIndex({ client: 1, date: 1, method: 1 });
|
|
50
|
+
MonitorMongos.createIndex({ client: 1, instance: 1, date: 1, method: 1 });
|
|
51
|
+
MonitorMongos.createIndex({ duration: 1 });
|
|
55
52
|
}
|
|
56
53
|
else {
|
|
57
|
-
setTimeout(
|
|
54
|
+
setTimeout(() => {
|
|
58
55
|
initializeCollection();
|
|
59
56
|
}, 1);
|
|
60
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,MAAM,CAAC,IAAI,aAAa,GAAkC,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE,EAAE;QACnD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAoB,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACpG,aAAa,GAAG,KAAK,CAAC,eAAe,CAAC;QACtC,aAAa,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC9E,aAAa,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QAC3D,aAAa,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QACxE,aAAa,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KACzC;SACI;QACJ,UAAU,CAAC,GAAG,EAAE;YACf,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-mongo.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorMongos: Collection<MonitorMongoModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorMongoModel>('monitor-mongos', schema, false, false, [], true, false);\n\t\tMonitorMongos = model.collection_main;\n\t\tMonitorMongos.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorMongos.createIndex({client: 1, date: 1, method: 1});\n\t\tMonitorMongos.createIndex({client: 1, instance: 1, date: 1, method: 1});\n\t\tMonitorMongos.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
-
var schema = {
|
|
1
|
+
import { ResolveIOServer } from '../index';
|
|
2
|
+
import { Model } from '../managers/mongo.manager';
|
|
3
|
+
let schema = {
|
|
7
4
|
_id: {
|
|
8
5
|
type: String,
|
|
9
6
|
optional: true
|
|
@@ -24,15 +21,15 @@ var schema = {
|
|
|
24
21
|
type: String
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
|
-
|
|
24
|
+
export let Notifications = null;
|
|
28
25
|
initializeCollection();
|
|
29
26
|
function initializeCollection() {
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
28
|
+
const model = new Model('notifications', schema, false, false, [], true, false);
|
|
29
|
+
Notifications = model.collection_main;
|
|
33
30
|
}
|
|
34
31
|
else {
|
|
35
|
-
setTimeout(
|
|
32
|
+
setTimeout(() => {
|
|
36
33
|
initializeCollection();
|
|
37
34
|
}, 1);
|
|
38
35
|
}
|