types
This commit is contained in:
1 parent
e62e4898b9
commit
36cdb20dfc
17 files changed
+159
-594
No files matched your search
@@ -4,7 +4,7 @@ import {
|
||||
MonitorTypes,
|
||||
MonitorStatus,
|
||||
MonitorStatuses,
|
||||
} from "../monitors/Monitor.js";
|
||||
} from "@/types/domain/index.js";
|
||||
import type { Response } from "got";
|
||||
export type GotTimings = Response["timings"];
|
||||
export interface ITimingPhases {
|
||||
|
||||
@@ -7,7 +7,7 @@ export type {
|
||||
IDockerContainerSummary,
|
||||
} from "./checks/Check.js";
|
||||
|
||||
export { Monitor, MonitorStatuses, MonitorTypes } from "./monitors/Monitor.js";
|
||||
export { Monitor } from "./monitors/Monitor.js";
|
||||
export type { IMonitor } from "./monitors/Monitor.js";
|
||||
|
||||
export { MonitorStats } from "./monitors/MonitorStats.js";
|
||||
|
||||
@@ -7,26 +7,8 @@ import {
|
||||
StatsDaily,
|
||||
StatsHourly,
|
||||
} from "@/db/models/index.js";
|
||||
|
||||
export const MonitorTypes = [
|
||||
"http",
|
||||
"https",
|
||||
"port",
|
||||
"ping",
|
||||
"infrastructure",
|
||||
"pagespeed",
|
||||
"docker",
|
||||
] as const;
|
||||
export type MonitorType = (typeof MonitorTypes)[number];
|
||||
|
||||
export const MonitorStatuses = [
|
||||
"up",
|
||||
"down",
|
||||
"paused",
|
||||
"initializing",
|
||||
"resuming",
|
||||
] as const;
|
||||
export type MonitorStatus = (typeof MonitorStatuses)[number];
|
||||
import type { MonitorType, MonitorStatus } from "@/types/domain/index.js";
|
||||
import { MonitorStatuses, MonitorTypes } from "@/types/domain/index.js";
|
||||
|
||||
export interface IMonitorThresholds {
|
||||
cpu?: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mongoose, { Schema, Document, Types } from "mongoose";
|
||||
import { MonitorStatus, MonitorStatuses } from "./Monitor.js";
|
||||
import mongoose, { Schema } from "mongoose";
|
||||
import { MonitorStatus, MonitorStatuses } from "@/types/domain/index.js";
|
||||
|
||||
export interface IMonitorStats extends mongoose.Document {
|
||||
monitorId: mongoose.Types.ObjectId;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import mongoose, { Schema, Types } from "mongoose";
|
||||
import type { MonitorType } from "@/db/models/monitors/Monitor.js";
|
||||
import mongoose, { Schema } from "mongoose";
|
||||
import type {
|
||||
IInfraCpu,
|
||||
IInfraDiskEntry,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mongoose, { Schema, Types } from "mongoose";
|
||||
import type { MonitorType } from "@/db/models/monitors/Monitor.js";
|
||||
import type { MonitorType } from "@/types/domain/index.js";
|
||||
|
||||
// Common/base metrics across monitor types
|
||||
export interface IStatsBase {
|
||||
|
||||
Reference in new issue
Block a user