@antelopejs/dms-api 0.0.1
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/LICENSE +190 -0
- package/README.md +61 -0
- package/dist/automation/get-api-health.d.ts +10 -0
- package/dist/automation/get-api-health.js +53 -0
- package/dist/automation/get-api-health.js.map +1 -0
- package/dist/automation/index.d.ts +2 -0
- package/dist/automation/index.js +19 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/query-request-logs.d.ts +18 -0
- package/dist/automation/query-request-logs.js +50 -0
- package/dist/automation/query-request-logs.js.map +1 -0
- package/dist/automation/route-unhealthy.d.ts +9 -0
- package/dist/automation/route-unhealthy.js +102 -0
- package/dist/automation/route-unhealthy.js.map +1 -0
- package/dist/automation/scope.d.ts +2 -0
- package/dist/automation/scope.js +18 -0
- package/dist/automation/scope.js.map +1 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.js +38 -0
- package/dist/config.js.map +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.js +19 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/models/api_settings.model.d.ts +23 -0
- package/dist/db/models/api_settings.model.js +13 -0
- package/dist/db/models/api_settings.model.js.map +1 -0
- package/dist/db/models/index.d.ts +4 -0
- package/dist/db/models/index.js +21 -0
- package/dist/db/models/index.js.map +1 -0
- package/dist/db/models/request_log.model.d.ts +47 -0
- package/dist/db/models/request_log.model.js +127 -0
- package/dist/db/models/request_log.model.js.map +1 -0
- package/dist/db/models/routes.model.d.ts +22 -0
- package/dist/db/models/routes.model.js +9 -0
- package/dist/db/models/routes.model.js.map +1 -0
- package/dist/db/models/routes_statistics.model.d.ts +23 -0
- package/dist/db/models/routes_statistics.model.js +13 -0
- package/dist/db/models/routes_statistics.model.js.map +1 -0
- package/dist/db/tables/api_settings.table.d.ts +10 -0
- package/dist/db/tables/api_settings.table.js +47 -0
- package/dist/db/tables/api_settings.table.js.map +1 -0
- package/dist/db/tables/index.d.ts +4 -0
- package/dist/db/tables/index.js +21 -0
- package/dist/db/tables/index.js.map +1 -0
- package/dist/db/tables/request_log.table.d.ts +29 -0
- package/dist/db/tables/request_log.table.js +107 -0
- package/dist/db/tables/request_log.table.js.map +1 -0
- package/dist/db/tables/routes.table.d.ts +11 -0
- package/dist/db/tables/routes.table.js +50 -0
- package/dist/db/tables/routes.table.js.map +1 -0
- package/dist/db/tables/routes_statistics.table.d.ts +9 -0
- package/dist/db/tables/routes_statistics.table.js +38 -0
- package/dist/db/tables/routes_statistics.table.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/index.d.ts +1 -0
- package/dist/middlewares/index.js +18 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/request-log-capture.d.ts +1 -0
- package/dist/middlewares/request-log-capture.js +6 -0
- package/dist/middlewares/request-log-capture.js.map +1 -0
- package/dist/pages/all.d.ts +4 -0
- package/dist/pages/all.js +21 -0
- package/dist/pages/all.js.map +1 -0
- package/dist/pages/index.d.ts +4 -0
- package/dist/pages/index.js +21 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/logs/page.d.ts +9 -0
- package/dist/pages/logs/page.js +29 -0
- package/dist/pages/logs/page.js.map +1 -0
- package/dist/pages/module.d.ts +1 -0
- package/dist/pages/module.js +12 -0
- package/dist/pages/module.js.map +1 -0
- package/dist/pages/routes/page.d.ts +9 -0
- package/dist/pages/routes/page.js +29 -0
- package/dist/pages/routes/page.js.map +1 -0
- package/dist/pages/settings/form.d.ts +3 -0
- package/dist/pages/settings/form.js +80 -0
- package/dist/pages/settings/form.js.map +1 -0
- package/dist/pages/settings/page.d.ts +9 -0
- package/dist/pages/settings/page.js +26 -0
- package/dist/pages/settings/page.js.map +1 -0
- package/dist/pages/summary/page.d.ts +9 -0
- package/dist/pages/summary/page.js +29 -0
- package/dist/pages/summary/page.js.map +1 -0
- package/dist/routes/index.d.ts +5 -0
- package/dist/routes/index.js +22 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/logs.d.ts +7 -0
- package/dist/routes/logs.js +128 -0
- package/dist/routes/logs.js.map +1 -0
- package/dist/routes/monitoring.d.ts +17 -0
- package/dist/routes/monitoring.js +101 -0
- package/dist/routes/monitoring.js.map +1 -0
- package/dist/routes/routes.d.ts +37 -0
- package/dist/routes/routes.js +153 -0
- package/dist/routes/routes.js.map +1 -0
- package/dist/routes/settings.d.ts +24 -0
- package/dist/routes/settings.js +92 -0
- package/dist/routes/settings.js.map +1 -0
- package/dist/routes/summary.d.ts +32 -0
- package/dist/routes/summary.js +181 -0
- package/dist/routes/summary.js.map +1 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/index.js +28 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/introspection/auth.d.ts +4 -0
- package/dist/services/introspection/auth.js +33 -0
- package/dist/services/introspection/auth.js.map +1 -0
- package/dist/services/introspection/errors.d.ts +6 -0
- package/dist/services/introspection/errors.js +50 -0
- package/dist/services/introspection/errors.js.map +1 -0
- package/dist/services/introspection/index.d.ts +53 -0
- package/dist/services/introspection/index.js +141 -0
- package/dist/services/introspection/index.js.map +1 -0
- package/dist/services/introspection/probe.d.ts +18 -0
- package/dist/services/introspection/probe.js +155 -0
- package/dist/services/introspection/probe.js.map +1 -0
- package/dist/services/period.d.ts +11 -0
- package/dist/services/period.js +68 -0
- package/dist/services/period.js.map +1 -0
- package/dist/services/request-log/capture.d.ts +10 -0
- package/dist/services/request-log/capture.js +189 -0
- package/dist/services/request-log/capture.js.map +1 -0
- package/dist/services/request-log/index.d.ts +3 -0
- package/dist/services/request-log/index.js +12 -0
- package/dist/services/request-log/index.js.map +1 -0
- package/dist/services/request-log/prune.d.ts +2 -0
- package/dist/services/request-log/prune.js +10 -0
- package/dist/services/request-log/prune.js.map +1 -0
- package/dist/services/request-log/read.d.ts +6 -0
- package/dist/services/request-log/read.js +26 -0
- package/dist/services/request-log/read.js.map +1 -0
- package/dist/services/request-log/redaction.d.ts +4 -0
- package/dist/services/request-log/redaction.js +53 -0
- package/dist/services/request-log/redaction.js.map +1 -0
- package/dist/services/request-log/util.d.ts +13 -0
- package/dist/services/request-log/util.js +114 -0
- package/dist/services/request-log/util.js.map +1 -0
- package/dist/services/routes-sync.d.ts +5 -0
- package/dist/services/routes-sync.js +63 -0
- package/dist/services/routes-sync.js.map +1 -0
- package/dist/services/scope.d.ts +7 -0
- package/dist/services/scope.js +40 -0
- package/dist/services/scope.js.map +1 -0
- package/dist/services/settings.d.ts +20 -0
- package/dist/services/settings.js +86 -0
- package/dist/services/settings.js.map +1 -0
- package/dist/services/statistics-aggregate.d.ts +67 -0
- package/dist/services/statistics-aggregate.js +340 -0
- package/dist/services/statistics-aggregate.js.map +1 -0
- package/dist/services/statistics-prune.d.ts +2 -0
- package/dist/services/statistics-prune.js +25 -0
- package/dist/services/statistics-prune.js.map +1 -0
- package/dist/services/statistics-read.d.ts +4 -0
- package/dist/services/statistics-read.js +48 -0
- package/dist/services/statistics-read.js.map +1 -0
- package/dist/services/statistics-utils.d.ts +14 -0
- package/dist/services/statistics-utils.js +65 -0
- package/dist/services/statistics-utils.js.map +1 -0
- package/dist/services/statistics-write.d.ts +3 -0
- package/dist/services/statistics-write.js +84 -0
- package/dist/services/statistics-write.js.map +1 -0
- package/dist/services/tree.d.ts +10 -0
- package/dist/services/tree.js +128 -0
- package/dist/services/tree.js.map +1 -0
- package/dist/types/charts.d.ts +9 -0
- package/dist/types/charts.js +3 -0
- package/dist/types/charts.js.map +1 -0
- package/dist/types/constants.d.ts +31 -0
- package/dist/types/constants.js +49 -0
- package/dist/types/constants.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/statistics.d.ts +17 -0
- package/dist/types/statistics.js +3 -0
- package/dist/types/statistics.js.map +1 -0
- package/frontend-vue/.editorconfig +12 -0
- package/frontend-vue/.prettierrc +12 -0
- package/frontend-vue/.vscode/settings.json +26 -0
- package/frontend-vue/app/components/ConfigurationView.vue +187 -0
- package/frontend-vue/app/components/DocumentationView.vue +224 -0
- package/frontend-vue/app/components/LogDetailDrawer.vue +178 -0
- package/frontend-vue/app/components/LogsView.vue +347 -0
- package/frontend-vue/app/components/RouteDetailTabs.vue +179 -0
- package/frontend-vue/app/components/RouteTree.vue +196 -0
- package/frontend-vue/app/components/RoutesView.vue +82 -0
- package/frontend-vue/app/components/StatsView.vue +268 -0
- package/frontend-vue/app/components/SummaryView.vue +657 -0
- package/frontend-vue/app/components/TesterPanel.vue +499 -0
- package/frontend-vue/app/components/internal/ApiMethodBadge.vue +33 -0
- package/frontend-vue/app/components/internal/ApiStatusBadge.vue +28 -0
- package/frontend-vue/app/components/internal/PeriodSelect.vue +58 -0
- package/frontend-vue/app/components/internal/RouteTreeNode.vue +168 -0
- package/frontend-vue/app/components/internal/StatusBreakdownBars.vue +162 -0
- package/frontend-vue/app/components/internal/StatusDonut.vue +84 -0
- package/frontend-vue/app/components/internal/UnitAreaChart.vue +73 -0
- package/frontend-vue/app/composables/useApiIntrospection.ts +344 -0
- package/frontend-vue/app/composables/useLogDetailDrawer.ts +50 -0
- package/frontend-vue/app/composables/useSelectedPeriod.ts +107 -0
- package/frontend-vue/app/composables/useStatsPeriods.ts +139 -0
- package/frontend-vue/app/custom-layouts/.gitkeep +0 -0
- package/frontend-vue/app/custom-pages/.gitkeep +0 -0
- package/frontend-vue/app/utils/httpMethod.ts +49 -0
- package/frontend-vue/app/utils/statusClass.ts +49 -0
- package/frontend-vue/app/utils/testerRequest.ts +50 -0
- package/frontend-vue/dms.frontend.ts +25 -0
- package/frontend-vue/eslint.config.mjs +16 -0
- package/frontend-vue/i18n/locales/en-GB.json +240 -0
- package/frontend-vue/i18n/locales/fr-FR.json +240 -0
- package/frontend-vue/package.json +35 -0
- package/frontend-vue/pnpm-lock.yaml +5796 -0
- package/frontend-vue/pnpm-workspace.yaml +2 -0
- package/frontend-vue/public/.gitkeep +0 -0
- package/frontend-vue/server/.gitkeep +0 -0
- package/frontend-vue/tests/periods.test.ts +145 -0
- package/frontend-vue/tests/persistence.test.ts +45 -0
- package/frontend-vue/tests/registration.test.ts +28 -0
- package/frontend-vue/tests/testerRequest.test.ts +95 -0
- package/frontend-vue/tsconfig.json +13 -0
- package/frontend-vue/vitest.config.ts +8 -0
- package/package.json +67 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Route = exports.routesTableName = void 0;
|
|
13
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
14
|
+
const constants_1 = require("../../types/constants");
|
|
15
|
+
exports.routesTableName = "routes";
|
|
16
|
+
let Route = class Route extends interface_database_decorators_1.Table {
|
|
17
|
+
};
|
|
18
|
+
exports.Route = Route;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Route.prototype, "uri", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Route.prototype, "method", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], Route.prototype, "module", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, interface_database_decorators_1.Field)("boolean"),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], Route.prototype, "own", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, interface_database_decorators_1.CreationTime)(),
|
|
37
|
+
(0, interface_database_decorators_1.Index)(),
|
|
38
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], Route.prototype, "createdAt", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, interface_database_decorators_1.UpdateTime)(),
|
|
43
|
+
(0, interface_database_decorators_1.Index)(),
|
|
44
|
+
(0, interface_database_decorators_1.Field)("date"),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], Route.prototype, "updatedAt", void 0);
|
|
47
|
+
exports.Route = Route = __decorate([
|
|
48
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.routesTableName, constants_1.SCHEMA_NAME)
|
|
49
|
+
], Route);
|
|
50
|
+
//# sourceMappingURL=routes.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.table.js","sourceRoot":"","sources":["../../../src/db/tables/routes.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FAOmD;AAEnD,qDAAoD;AAEvC,QAAA,eAAe,GAAG,QAAQ,CAAC;AAGjC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qCAAK;CAwB/B,CAAA;AAxBY,sBAAK;AAER;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;kCACI;AAGZ;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qCACW;AAInB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;qCACc;AAItB;IADP,IAAA,qCAAK,EAAC,SAAS,CAAC;;kCACI;AAKb;IAHP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;wCAAC;AAKhB;IAHP,IAAA,0CAAU,GAAE;IACZ,IAAA,qCAAK,GAAE;IACP,IAAA,qCAAK,EAAC,MAAM,CAAC;8BACK,IAAI;wCAAC;gBAvBb,KAAK;IADjB,IAAA,6CAAa,EAAC,uBAAe,EAAE,uBAAW,CAAC;GAC/B,KAAK,CAwBjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
+
import type { DayStatistics, HttpMethod } from "@/types";
|
|
3
|
+
export declare const routesStatisticsTableName = "routes_statistics";
|
|
4
|
+
export declare function getRouteStatsKey(method: string, uri: string): string;
|
|
5
|
+
export declare class RouteStatistics extends Table {
|
|
6
|
+
method: HttpMethod;
|
|
7
|
+
uri: string;
|
|
8
|
+
statistics: DayStatistics[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RouteStatistics = exports.routesStatisticsTableName = void 0;
|
|
13
|
+
exports.getRouteStatsKey = getRouteStatsKey;
|
|
14
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
15
|
+
const constants_1 = require("../../types/constants");
|
|
16
|
+
exports.routesStatisticsTableName = "routes_statistics";
|
|
17
|
+
function getRouteStatsKey(method, uri) {
|
|
18
|
+
return `${method.toUpperCase()}:${uri}`;
|
|
19
|
+
}
|
|
20
|
+
let RouteStatistics = class RouteStatistics extends interface_database_decorators_1.Table {
|
|
21
|
+
};
|
|
22
|
+
exports.RouteStatistics = RouteStatistics;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], RouteStatistics.prototype, "method", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, interface_database_decorators_1.Field)("string"),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], RouteStatistics.prototype, "uri", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, interface_database_decorators_1.Field)(["any"]),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], RouteStatistics.prototype, "statistics", void 0);
|
|
35
|
+
exports.RouteStatistics = RouteStatistics = __decorate([
|
|
36
|
+
(0, interface_database_decorators_1.RegisterTable)(exports.routesStatisticsTableName, constants_1.SCHEMA_NAME)
|
|
37
|
+
], RouteStatistics);
|
|
38
|
+
//# sourceMappingURL=routes_statistics.table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes_statistics.table.js","sourceRoot":"","sources":["../../../src/db/tables/routes_statistics.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAeA,4CAEC;AAjBD,6FAImD;AAEnD,qDAAoD;AAEvC,QAAA,yBAAyB,GAAG,mBAAmB,CAAC;AAO7D,SAAgB,gBAAgB,CAAC,MAAc,EAAE,GAAW;IAC1D,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,GAAG,EAAE,CAAC;AAC1C,CAAC;AAGM,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qCAAK;CASzC,CAAA;AATY,0CAAe;AAElB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;+CACW;AAGnB;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;4CACI;AAGZ;IADP,IAAA,qCAAK,EAAC,CAAC,KAAK,CAAC,CAAC;;mDACqB;0BARzB,eAAe;IAD3B,IAAA,6CAAa,EAAC,iCAAyB,EAAE,uBAAW,CAAC;GACzC,eAAe,CAS3B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./db";
|
|
2
|
+
import "./routes";
|
|
3
|
+
import "./middlewares";
|
|
4
|
+
import "./pages";
|
|
5
|
+
import { type DmsApiConfig } from "./config";
|
|
6
|
+
export declare function construct(config?: Partial<DmsApiConfig>): Promise<void>;
|
|
7
|
+
export declare function start(): Promise<void>;
|
|
8
|
+
export declare function destroy(): void;
|
|
9
|
+
export declare function stop(): Promise<void>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.construct = construct;
|
|
7
|
+
exports.start = start;
|
|
8
|
+
exports.destroy = destroy;
|
|
9
|
+
exports.stop = stop;
|
|
10
|
+
require("./db");
|
|
11
|
+
require("./routes");
|
|
12
|
+
require("./middlewares");
|
|
13
|
+
require("./pages");
|
|
14
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
15
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
16
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
17
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
18
|
+
const node_cron_1 = __importDefault(require("node-cron"));
|
|
19
|
+
const automation_1 = require("./automation");
|
|
20
|
+
const config_1 = require("./config");
|
|
21
|
+
const db_1 = require("./db");
|
|
22
|
+
const services_1 = require("./services");
|
|
23
|
+
const constants_1 = require("./types/constants");
|
|
24
|
+
let pruneTask = null;
|
|
25
|
+
async function construct(config) {
|
|
26
|
+
(0, config_1.setConfig)(config);
|
|
27
|
+
await (0, page_1.AddFrontendModule)({
|
|
28
|
+
name: "@antelopejs/dms-api",
|
|
29
|
+
sourcePath: node_path_1.default.join(__dirname, "../frontend-vue"),
|
|
30
|
+
renderer: { name: "vue", version: "3" },
|
|
31
|
+
configKey: "dmsApi",
|
|
32
|
+
priority: 0,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async function start() {
|
|
36
|
+
await (0, interface_database_decorators_1.RegisterSchema)(constants_1.SCHEMA_NAME);
|
|
37
|
+
await (0, services_1.loadSettings)((0, interface_database_decorators_1.GetModel)(db_1.ApiSettingsModel));
|
|
38
|
+
const routesModel = (0, interface_database_decorators_1.GetModel)(db_1.RouteModel);
|
|
39
|
+
await (0, services_1.syncRoutes)(routesModel, (0, interface_api_1.getRegisteredRoutes)());
|
|
40
|
+
const statsModel = (0, interface_database_decorators_1.GetModel)(db_1.RouteStatisticsModel);
|
|
41
|
+
const logModel = (0, interface_database_decorators_1.GetModel)(db_1.RequestLogModel);
|
|
42
|
+
pruneTask = node_cron_1.default.schedule("0 * * * *", () => {
|
|
43
|
+
void (0, services_1.pruneAllStatistics)(statsModel);
|
|
44
|
+
void (0, services_1.pruneRequestLogs)(logModel);
|
|
45
|
+
});
|
|
46
|
+
(0, automation_1.registerAutomationNodes)();
|
|
47
|
+
}
|
|
48
|
+
function destroy() { }
|
|
49
|
+
async function stop() {
|
|
50
|
+
(0, automation_1.unregisterAutomationNodes)();
|
|
51
|
+
if (pruneTask) {
|
|
52
|
+
await pruneTask.stop();
|
|
53
|
+
pruneTask = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAqCA,8BAUC;AAED,sBAgBC;AAED,0BAAkC;AAElC,oBAMC;AAxED,gBAAc;AACd,oBAAkB;AAClB,yBAAuB;AACvB,mBAAiB;AAEjB,0DAA6B;AAC7B,6DAAgE;AAChE,6FAGmD;AACnD,yDAAmE;AACnE,0DAAqD;AACrD,6CAGsB;AACtB,qCAAwD;AACxD,6BAKc;AACd,yCAKoB;AACpB,iDAAgD;AAEhD,IAAI,SAAS,GAAyB,IAAI,CAAC;AAEpC,KAAK,UAAU,SAAS,CAAC,MAA8B;IAC5D,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;IAElB,MAAM,IAAA,wBAAiB,EAAC;QACtB,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;QACnD,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE;QACvC,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,CAAC;KACZ,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,KAAK;IACzB,MAAM,IAAA,8CAAc,EAAC,uBAAW,CAAC,CAAC;IAClC,MAAM,IAAA,uBAAY,EAAC,IAAA,wCAAQ,EAAC,qBAAgB,CAAC,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAA,wCAAQ,EAAC,eAAU,CAAC,CAAC;IACzC,MAAM,IAAA,qBAAU,EAAC,WAAW,EAAE,IAAA,mCAAmB,GAAE,CAAC,CAAC;IAErD,MAAM,UAAU,GAAG,IAAA,wCAAQ,EAAC,yBAAoB,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,IAAA,wCAAQ,EAAC,oBAAe,CAAC,CAAC;IAG3C,SAAS,GAAG,mBAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QAC1C,KAAK,IAAA,6BAAkB,EAAC,UAAU,CAAC,CAAC;QACpC,KAAK,IAAA,2BAAgB,EAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAA,oCAAuB,GAAE,CAAC;AAC5B,CAAC;AAED,SAAgB,OAAO,KAAU,CAAC;AAE3B,KAAK,UAAU,IAAI;IACxB,IAAA,sCAAyB,GAAE,CAAC;IAC5B,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,SAAS,GAAG,IAAI,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./request-log-capture";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./request-log-capture"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/middlewares/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RequestLogCapture } from "@/services/request-log/capture";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestLogCapture = void 0;
|
|
4
|
+
var capture_1 = require("@/services/request-log/capture");
|
|
5
|
+
Object.defineProperty(exports, "RequestLogCapture", { enumerable: true, get: function () { return capture_1.RequestLogCapture; } });
|
|
6
|
+
//# sourceMappingURL=request-log-capture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-log-capture.js","sourceRoot":"","sources":["../../src/middlewares/request-log-capture.ts"],"names":[],"mappings":";;;AAIA,0DAAmE;AAA1D,4GAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./logs/page"), exports);
|
|
18
|
+
__exportStar(require("./routes/page"), exports);
|
|
19
|
+
__exportStar(require("./settings/page"), exports);
|
|
20
|
+
__exportStar(require("./summary/page"), exports);
|
|
21
|
+
//# sourceMappingURL=all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/pages/all.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,gDAA8B;AAC9B,kDAAgC;AAChC,iDAA+B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
require("./module");
|
|
18
|
+
require("./all");
|
|
19
|
+
__exportStar(require("./all"), exports);
|
|
20
|
+
__exportStar(require("./module"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pages/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,oBAAkB;AAClB,iBAAe;AAEf,wCAAsB;AACtB,2CAAyB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const LogsPage_base: {
|
|
2
|
+
new (...args: any[]): {};
|
|
3
|
+
extend: <T extends import("@antelopejs/interface-api").ControllerClass>(this: T, location: string) => T;
|
|
4
|
+
location: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class LogsPage extends LogsPage_base {
|
|
7
|
+
static content: import("@antelopejs/interface-dms").ComponentBuilder<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.LogsPage = void 0;
|
|
10
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
11
|
+
const custom_1 = require("@antelopejs/interface-dms/base/custom");
|
|
12
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
13
|
+
let LogsPage = class LogsPage extends (0, page_1.PageController)("logs", {
|
|
14
|
+
displayName: "$page.api.logs.title",
|
|
15
|
+
description: "$page.api.logs.description",
|
|
16
|
+
icon: "i-ph-list-magnifying-glass",
|
|
17
|
+
module: "api",
|
|
18
|
+
order: 2,
|
|
19
|
+
}, (0, layouts_1.DefaultLayout)({ hideHeader: true, fullWidth: true })) {
|
|
20
|
+
static content = (0, custom_1.CustomComponent)("DmsApiLogsView").meta({
|
|
21
|
+
name: "$page.api.logs.title",
|
|
22
|
+
icon: "i-ph-list-magnifying-glass",
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.LogsPage = LogsPage;
|
|
26
|
+
exports.LogsPage = LogsPage = __decorate([
|
|
27
|
+
(0, page_1.RegisterPage)()
|
|
28
|
+
], LogsPage);
|
|
29
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/logs/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AAYhE,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,IAAA,qBAAc,EAC1C,MAAM,EACN;IACE,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,4BAA4B;IACzC,IAAI,EAAE,4BAA4B;IAClC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACrD;IACC,MAAM,CAAC,OAAO,GAAG,IAAA,wBAAe,EAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC;QACtD,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,4BAA4B;KACnC,CAAC,CAAC;;AAdQ,4BAAQ;mBAAR,QAAQ;IADpB,IAAA,mBAAY,GAAE;GACF,QAAQ,CAepB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const apiModule: import("@antelopejs/interface-dms/page").CategoryInfo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiModule = void 0;
|
|
4
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
5
|
+
exports.apiModule = (0, page_1.RegisterModule)({
|
|
6
|
+
id: "api",
|
|
7
|
+
title: "$page.api.category_name",
|
|
8
|
+
description: "$page.api.summary.description",
|
|
9
|
+
icon: "i-ph-brackets-curly",
|
|
10
|
+
landingPage: "summary",
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/pages/module.ts"],"names":[],"mappings":";;;AAAA,yDAAgE;AAEnD,QAAA,SAAS,GAAG,IAAA,qBAAc,EAAC;IACtC,EAAE,EAAE,KAAK;IACT,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+BAA+B;IAC5C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,SAAS;CACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const RoutesPage_base: {
|
|
2
|
+
new (...args: any[]): {};
|
|
3
|
+
extend: <T extends import("@antelopejs/interface-api").ControllerClass>(this: T, location: string) => T;
|
|
4
|
+
location: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class RoutesPage extends RoutesPage_base {
|
|
7
|
+
static content: import("@antelopejs/interface-dms").ComponentBuilder<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RoutesPage = void 0;
|
|
10
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
11
|
+
const custom_1 = require("@antelopejs/interface-dms/base/custom");
|
|
12
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
13
|
+
let RoutesPage = class RoutesPage extends (0, page_1.PageController)("routes", {
|
|
14
|
+
displayName: "$page.api.routes.title",
|
|
15
|
+
description: "$page.api.routes.description",
|
|
16
|
+
icon: "i-ph-tree-structure",
|
|
17
|
+
module: "api",
|
|
18
|
+
order: 1,
|
|
19
|
+
}, (0, layouts_1.DefaultLayout)({ hideHeader: true, fullWidth: true })) {
|
|
20
|
+
static content = (0, custom_1.CustomComponent)("DmsApiRoutesView").meta({
|
|
21
|
+
name: "$page.api.routes.title",
|
|
22
|
+
icon: "i-ph-tree-structure",
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.RoutesPage = RoutesPage;
|
|
26
|
+
exports.RoutesPage = RoutesPage = __decorate([
|
|
27
|
+
(0, page_1.RegisterPage)()
|
|
28
|
+
], RoutesPage);
|
|
29
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/routes/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AAYhE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,IAAA,qBAAc,EAC5C,QAAQ,EACR;IACE,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,8BAA8B;IAC3C,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACrD;IACC,MAAM,CAAC,OAAO,GAAG,IAAA,wBAAe,EAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC;QACxD,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,qBAAqB;KAC5B,CAAC,CAAC;;AAdQ,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAY,GAAE;GACF,UAAU,CAetB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiSettingsFormSchema = exports.apiSettingsForm = void 0;
|
|
4
|
+
const base_1 = require("@antelopejs/interface-dms/base");
|
|
5
|
+
const default_types_1 = require("@antelopejs/interface-dms/base/data-types/default-types");
|
|
6
|
+
const types_1 = require("@antelopejs/interface-dms/base/types");
|
|
7
|
+
exports.apiSettingsForm = (0, base_1.Form)({
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
id: "scope-group",
|
|
11
|
+
label: "$page.api.settings.scope.title",
|
|
12
|
+
description: "$page.api.settings.scope.subtitle",
|
|
13
|
+
fields: [
|
|
14
|
+
{
|
|
15
|
+
id: "scope",
|
|
16
|
+
label: "$page.api.settings.scope.label",
|
|
17
|
+
description: "$page.api.settings.scope.description",
|
|
18
|
+
type: new default_types_1.DefaultDataTypes.SelectType({
|
|
19
|
+
items: [
|
|
20
|
+
{ value: "own", label: "Own routes" },
|
|
21
|
+
{ value: "modules", label: "Module routes" },
|
|
22
|
+
{ value: "all", label: "All routes" },
|
|
23
|
+
],
|
|
24
|
+
deselectable: false,
|
|
25
|
+
}),
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "requestLogRetentionDays",
|
|
32
|
+
label: "$page.api.settings.retention.log_retention",
|
|
33
|
+
description: "$page.api.settings.retention.log_retention_description",
|
|
34
|
+
type: new default_types_1.DefaultDataTypes.NumberType({
|
|
35
|
+
min: 1,
|
|
36
|
+
max: 366,
|
|
37
|
+
step: 1,
|
|
38
|
+
placeholder: "30",
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "statisticsLifetimeDays",
|
|
43
|
+
label: "$page.api.settings.retention.stats_retention",
|
|
44
|
+
description: "$page.api.settings.retention.stats_retention_description",
|
|
45
|
+
type: new default_types_1.DefaultDataTypes.NumberType({
|
|
46
|
+
min: 1,
|
|
47
|
+
max: 366,
|
|
48
|
+
step: 1,
|
|
49
|
+
placeholder: "30",
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "requestSlownessThresholdMs",
|
|
54
|
+
label: "$page.api.settings.retention.slowness",
|
|
55
|
+
description: "$page.api.settings.retention.slowness_description",
|
|
56
|
+
type: new default_types_1.DefaultDataTypes.NumberType({
|
|
57
|
+
min: 1,
|
|
58
|
+
max: 600_000,
|
|
59
|
+
step: 50,
|
|
60
|
+
placeholder: "1000",
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "requestLogMaxBodyKb",
|
|
65
|
+
label: "$page.api.settings.retention.max_body",
|
|
66
|
+
description: "$page.api.settings.retention.max_body_description",
|
|
67
|
+
type: new default_types_1.DefaultDataTypes.NumberType({
|
|
68
|
+
min: 0,
|
|
69
|
+
max: 10_240,
|
|
70
|
+
step: 1,
|
|
71
|
+
placeholder: "64",
|
|
72
|
+
}),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
fetchUrl: "/api/monitoring/settings",
|
|
76
|
+
submitUrl: "/api/monitoring/settings",
|
|
77
|
+
submitUrlMethod: types_1.HttpMethod.post,
|
|
78
|
+
});
|
|
79
|
+
exports.apiSettingsFormSchema = (0, base_1.formSchema)(exports.apiSettingsForm);
|
|
80
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/pages/settings/form.ts"],"names":[],"mappings":";;;AAAA,yDAAkE;AAClE,2FAA2F;AAC3F,gEAAkE;AAarD,QAAA,eAAe,GAAG,IAAA,WAAI,EAAC;IAClC,MAAM,EAAE;QACN;YACE,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,gCAAgC;YACvC,WAAW,EAAE,mCAAmC;YAChD,MAAM,EAAE;gBACN;oBACE,EAAE,EAAE,OAAO;oBACX,KAAK,EAAE,gCAAgC;oBACvC,WAAW,EAAE,sCAAsC;oBACnD,IAAI,EAAE,IAAI,gCAAgB,CAAC,UAAU,CAAC;wBACpC,KAAK,EAAE;4BACL,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE;4BACrC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE;4BAC5C,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE;yBACtC;wBACD,YAAY,EAAE,KAAK;qBACpB,CAAC;oBACF,QAAQ,EAAE,IAAI;iBACf;aACF;SACF;QACD;YACE,EAAE,EAAE,yBAAyB;YAC7B,KAAK,EAAE,4CAA4C;YACnD,WAAW,EAAE,wDAAwD;YACrE,IAAI,EAAE,IAAI,gCAAgB,CAAC,UAAU,CAAC;gBACpC,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,GAAG;gBACR,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,IAAI;aAClB,CAAC;SACH;QACD;YACE,EAAE,EAAE,wBAAwB;YAC5B,KAAK,EAAE,8CAA8C;YACrD,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,IAAI,gCAAgB,CAAC,UAAU,CAAC;gBACpC,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,GAAG;gBACR,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,IAAI;aAClB,CAAC;SACH;QACD;YACE,EAAE,EAAE,4BAA4B;YAChC,KAAK,EAAE,uCAAuC;YAC9C,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE,IAAI,gCAAgB,CAAC,UAAU,CAAC;gBACpC,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,OAAO;gBACZ,IAAI,EAAE,EAAE;gBACR,WAAW,EAAE,MAAM;aACpB,CAAC;SACH;QACD;YACE,EAAE,EAAE,qBAAqB;YACzB,KAAK,EAAE,uCAAuC;YAC9C,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE,IAAI,gCAAgB,CAAC,UAAU,CAAC;gBACpC,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,MAAM;gBACX,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,IAAI;aAClB,CAAC;SACH;KACF;IACD,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,0BAA0B;IACrC,eAAe,EAAE,kBAAU,CAAC,IAAI;CACjC,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAChC,IAAA,iBAAU,EAAC,uBAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const ApiSettingsPage_base: {
|
|
2
|
+
new (...args: any[]): {};
|
|
3
|
+
extend: <T extends import("@antelopejs/interface-api").ControllerClass>(this: T, location: string) => T;
|
|
4
|
+
location: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class ApiSettingsPage extends ApiSettingsPage_base {
|
|
7
|
+
static content: import("@antelopejs/interface-dms/dist/base").FormBuilder;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ApiSettingsPage = void 0;
|
|
10
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
11
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
12
|
+
const form_1 = require("./form");
|
|
13
|
+
let ApiSettingsPage = class ApiSettingsPage extends (0, page_1.PageController)("settings", {
|
|
14
|
+
displayName: "$page.api.settings.title",
|
|
15
|
+
description: "$page.api.settings.description",
|
|
16
|
+
icon: "i-ph-gear",
|
|
17
|
+
module: "api",
|
|
18
|
+
order: 3,
|
|
19
|
+
}, (0, layouts_1.DefaultLayout)()) {
|
|
20
|
+
static content = form_1.apiSettingsForm;
|
|
21
|
+
};
|
|
22
|
+
exports.ApiSettingsPage = ApiSettingsPage;
|
|
23
|
+
exports.ApiSettingsPage = ApiSettingsPage = __decorate([
|
|
24
|
+
(0, page_1.RegisterPage)()
|
|
25
|
+
], ApiSettingsPage);
|
|
26
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/settings/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,oEAAuE;AACvE,iCAAyC;AAWlC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,IAAA,qBAAc,EACjD,UAAU,EACV;IACE,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,gCAAgC;IAC7C,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,GAAE,CAChB;IACC,MAAM,CAAC,OAAO,GAAG,sBAAe,CAAC;;AAXtB,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAY,GAAE;GACF,eAAe,CAY3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const SummaryPage_base: {
|
|
2
|
+
new (...args: any[]): {};
|
|
3
|
+
extend: <T extends import("@antelopejs/interface-api").ControllerClass>(this: T, location: string) => T;
|
|
4
|
+
location: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class SummaryPage extends SummaryPage_base {
|
|
7
|
+
static content: import("@antelopejs/interface-dms").ComponentBuilder<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SummaryPage = void 0;
|
|
10
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
11
|
+
const custom_1 = require("@antelopejs/interface-dms/base/custom");
|
|
12
|
+
const layouts_1 = require("@antelopejs/interface-dms/base/layouts");
|
|
13
|
+
let SummaryPage = class SummaryPage extends (0, page_1.PageController)("summary", {
|
|
14
|
+
displayName: "$page.api.summary.title",
|
|
15
|
+
description: "$page.api.summary.description",
|
|
16
|
+
icon: "i-ph-chart-line",
|
|
17
|
+
module: "api",
|
|
18
|
+
order: 0,
|
|
19
|
+
}, (0, layouts_1.DefaultLayout)({ hideHeader: true, fullWidth: true })) {
|
|
20
|
+
static content = (0, custom_1.CustomComponent)("DmsApiSummaryView").meta({
|
|
21
|
+
name: "$page.api.summary.title",
|
|
22
|
+
icon: "i-ph-chart-line",
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.SummaryPage = SummaryPage;
|
|
26
|
+
exports.SummaryPage = SummaryPage = __decorate([
|
|
27
|
+
(0, page_1.RegisterPage)()
|
|
28
|
+
], SummaryPage);
|
|
29
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/summary/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AAYhE,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAA,qBAAc,EAC7C,SAAS,EACT;IACE,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,+BAA+B;IAC5C,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACrD;IACC,MAAM,CAAC,OAAO,GAAG,IAAA,wBAAe,EAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC;QACzD,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,iBAAiB;KACxB,CAAC,CAAC;;AAdQ,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAY,GAAE;GACF,WAAW,CAevB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./logs"), exports);
|
|
18
|
+
__exportStar(require("./monitoring"), exports);
|
|
19
|
+
__exportStar(require("./routes"), exports);
|
|
20
|
+
__exportStar(require("./settings"), exports);
|
|
21
|
+
__exportStar(require("./summary"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,4CAA0B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
2
|
+
declare const LogsController_base: import("@antelopejs/interface-api").ControllerClass<object>;
|
|
3
|
+
export declare class LogsController extends LogsController_base {
|
|
4
|
+
listLogs(_user: User, tab?: string, period?: string, method?: string, status?: string, search?: string, cursor?: string, limit?: string): Promise<import("@/db").RequestLogPage>;
|
|
5
|
+
getLog(_user: User, id: string): Promise<import("@/db").RequestLog>;
|
|
6
|
+
}
|
|
7
|
+
export {};
|