add tags to monitor service
This commit is contained in:
1 parent
a7abbd60bd
commit
029f732a86
1 file changed
+9
-2
@@ -55,6 +55,7 @@ export interface IMonitorService {
|
|||||||
teamId: string;
|
teamId: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
type?: MonitorType | MonitorType[];
|
type?: MonitorType | MonitorType[];
|
||||||
|
tags?: string | string[];
|
||||||
page?: number;
|
page?: number;
|
||||||
rowsPerPage?: number;
|
rowsPerPage?: number;
|
||||||
filter?: string;
|
filter?: string;
|
||||||
@@ -65,6 +66,7 @@ export interface IMonitorService {
|
|||||||
teamId: string;
|
teamId: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
type?: MonitorType | MonitorType[];
|
type?: MonitorType | MonitorType[];
|
||||||
|
tags?: string | string[];
|
||||||
page?: number;
|
page?: number;
|
||||||
rowsPerPage?: number;
|
rowsPerPage?: number;
|
||||||
filter?: string;
|
filter?: string;
|
||||||
@@ -357,19 +359,22 @@ export class MonitorService implements IMonitorService {
|
|||||||
getMonitorsByTeamId = async ({
|
getMonitorsByTeamId = async ({
|
||||||
teamId,
|
teamId,
|
||||||
type,
|
type,
|
||||||
|
tags,
|
||||||
filter,
|
filter,
|
||||||
}: {
|
}: {
|
||||||
teamId: string;
|
teamId: string;
|
||||||
type?: MonitorType | MonitorType[];
|
type?: MonitorType | MonitorType[];
|
||||||
|
tags?: string | string[];
|
||||||
filter?: string;
|
filter?: string;
|
||||||
}): Promise<Monitor[] | null> => {
|
}): Promise<Monitor[] | null> => {
|
||||||
return await this.monitorsRepository.findByTeamId(teamId, { type, filter });
|
return await this.monitorsRepository.findByTeamId(teamId, { type, tags, filter });
|
||||||
};
|
};
|
||||||
|
|
||||||
getMonitorsWithChecksByTeamId = async ({
|
getMonitorsWithChecksByTeamId = async ({
|
||||||
teamId,
|
teamId,
|
||||||
limit,
|
limit,
|
||||||
type,
|
type,
|
||||||
|
tags,
|
||||||
page,
|
page,
|
||||||
rowsPerPage,
|
rowsPerPage,
|
||||||
filter,
|
filter,
|
||||||
@@ -379,6 +384,7 @@ export class MonitorService implements IMonitorService {
|
|||||||
teamId: string;
|
teamId: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
type?: MonitorType | MonitorType[];
|
type?: MonitorType | MonitorType[];
|
||||||
|
tags?: string | string[];
|
||||||
page?: number;
|
page?: number;
|
||||||
rowsPerPage?: number;
|
rowsPerPage?: number;
|
||||||
filter?: string;
|
filter?: string;
|
||||||
@@ -386,10 +392,11 @@ export class MonitorService implements IMonitorService {
|
|||||||
order?: "asc" | "desc";
|
order?: "asc" | "desc";
|
||||||
}): Promise<MonitorsWithChecksByTeamIdResult> => {
|
}): Promise<MonitorsWithChecksByTeamIdResult> => {
|
||||||
const summary = await this.monitorsRepository.findMonitorsSummaryByTeamId(teamId, { type });
|
const summary = await this.monitorsRepository.findMonitorsSummaryByTeamId(teamId, { type });
|
||||||
const count = await this.monitorsRepository.findMonitorCountByTeamIdAndType(teamId, { type, filter });
|
const count = await this.monitorsRepository.findMonitorCountByTeamIdAndType(teamId, { type, tags, filter });
|
||||||
const monitors = await this.monitorsRepository.findByTeamId(teamId, {
|
const monitors = await this.monitorsRepository.findByTeamId(teamId, {
|
||||||
limit,
|
limit,
|
||||||
type,
|
type,
|
||||||
|
tags,
|
||||||
page,
|
page,
|
||||||
rowsPerPage,
|
rowsPerPage,
|
||||||
filter,
|
filter,
|
||||||
|
|||||||
Reference in new issue
Block a user