This commit is contained in:
Simon Larsen
2023-12-25 13:22:16 +00:00
parent 5140f92b1a
commit 9512d97671
22 changed files with 395 additions and 291 deletions

View File

@@ -33,7 +33,7 @@ const DashboardFooter: () => JSX.Element = () => {
{
name: 'Dashboard',
path: '/dashboard',
}
},
];
for (const app of apps) {

View File

@@ -4,11 +4,10 @@ export default class MeteredPlan {
private pricePerUnitInUSD: number;
public constructor(data: {
priceId: string,
pricePerUnitInUSD: number,
unitName: string
}
) {
priceId: string;
pricePerUnitInUSD: number;
unitName: string;
}) {
this.priceId = data.priceId;
this.pricePerUnitInUSD = data.pricePerUnitInUSD;
this.unitName = data.unitName;

View File

@@ -1,4 +1,8 @@
import { ExpressRequest, ExpressResponse, NextFunction } from '../Utils/Express';
import {
ExpressRequest,
ExpressResponse,
NextFunction,
} from '../Utils/Express';
import Response from '../Utils/Response';
import FileService, {
Service as FileServiceType,
@@ -8,14 +12,10 @@ import ObjectID from 'Common/Types/ObjectID';
import File from 'Model/Models/File';
import NotFoundException from 'Common/Types/Exception/NotFoundException';
export default class FileAPI extends BaseAPI<
File,
FileServiceType
> {
export default class FileAPI extends BaseAPI<File, FileServiceType> {
public constructor() {
super(File, FileService);
this.router.get(
`/image/:imageId`,
async (

View File

@@ -67,7 +67,6 @@ export const RealtimeHostname: Hostname = Hostname.fromString(
}`
);
export const WorkerHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_WORKERS_HOSTNAME'] || 'localhost'}:${
process.env['WORKERS_PORT'] || 80

View File

@@ -18,7 +18,6 @@ import Errors from '../Utils/Errors';
import ProjectService from './ProjectService';
import { ProductType } from 'Model/Models/UsageBilling';
export type SubscriptionItem = Stripe.SubscriptionItem;
export type Coupon = Stripe.Coupon;
@@ -105,7 +104,7 @@ export class BillingService extends BaseService {
public async subscribeToMeteredPlan(data: {
projectId: ObjectID;
customerId: string;
serverMeteredPlans: Array<ServerMeteredPlan> ;
serverMeteredPlans: Array<ServerMeteredPlan>;
trialDate: Date | null;
defaultPaymentMethodId?: string | undefined;
promoCode?: string | undefined;
@@ -116,13 +115,11 @@ export class BillingService extends BaseService {
const meteredPlanSubscriptionParams: Stripe.SubscriptionCreateParams = {
customer: data.customerId,
items: data.serverMeteredPlans.map(
(item: ServerMeteredPlan) => {
return {
price: item.getPriceId(),
};
}
),
items: data.serverMeteredPlans.map((item: ServerMeteredPlan) => {
return {
price: item.getPriceId(),
};
}),
trial_end:
data.trialDate && OneUptimeDate.isInTheFuture(data.trialDate)
? OneUptimeDate.toUnixTimestamp(data.trialDate)
@@ -391,7 +388,7 @@ export class BillingService extends BaseService {
} catch (err) {
throw new BadDataException(
(err as Error).message ||
Errors.BillingService.PROMO_CODE_INVALID
Errors.BillingService.PROMO_CODE_INVALID
);
}
}
@@ -424,9 +421,9 @@ export class BillingService extends BaseService {
const subscriptionItemOptions: Stripe.SubscriptionItemDeleteParams =
isMeteredSubscriptionItem
? {
proration_behavior: 'create_prorations',
clear_usage: true,
}
proration_behavior: 'create_prorations',
clear_usage: true,
}
: {};
await this.stripe.subscriptionItems.del(
@@ -834,19 +831,15 @@ export class BillingService extends BaseService {
}
public getMeteredPlanPriceId(productType: ProductType): string {
if (productType === ProductType.ActiveMonitoring) {
if (this.isTestEnvironment()) {
return 'price_1N6CHFANuQdJ93r7qDaLmb7S';
}
return 'price_1N6B9EANuQdJ93r7fj3bhcWP'
return 'price_1N6B9EANuQdJ93r7fj3bhcWP';
}
if (productType === ProductType.Logs) {
if (this.isTestEnvironment()) {
return 'price_1OPnB5ANuQdJ93r7jG4NLCJG';
}
@@ -854,87 +847,77 @@ export class BillingService extends BaseService {
return 'price_1OQ8gwANuQdJ93r74Pi85UQq';
}
if (productType === ProductType.Traces) {
if (this.isTestEnvironment()) {
return 'price_1OQ8i9ANuQdJ93r75J3wr0PX';
}
return 'price_1OQ8ivANuQdJ93r7NAR8KbH3'
return 'price_1OQ8ivANuQdJ93r7NAR8KbH3';
}
if (productType === ProductType.Metrics) {
if (this.isTestEnvironment()) {
return 'price_1OQ8iqANuQdJ93r7wZ7gJ7Gb';
}
return 'price_1OQ8j0ANuQdJ93r7WGzR0p6j'
return 'price_1OQ8j0ANuQdJ93r7WGzR0p6j';
}
throw new BadDataException('Plan with productType ' + productType + ' not found');
throw new BadDataException(
'Plan with productType ' + productType + ' not found'
);
}
public async getMeteredPlan(data: {
productType: ProductType,
projectId: ObjectID
productType: ProductType;
projectId: ObjectID;
}): Promise<MeteredPlan> {
if (data.productType === ProductType.ActiveMonitoring) {
return new MeteredPlan(
{
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD: 1,
unitName: 'Active Monitor',
}
);
return new MeteredPlan({
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD: 1,
unitName: 'Active Monitor',
});
}
const dataRetentionDays = await ProjectService.getTelemetryDataRetentionInDays(data.projectId);
const dataRetentionDays: number =
await ProjectService.getTelemetryDataRetentionInDays(
data.projectId
);
const dataRetentionMultiplier: number = 0.1; // if the retention is 10 days for example, the cost per GB will be 0.01$ per GB per day (0.10 * dataRetentionDays * dataRetentionMultiplier).
if (data.productType === ProductType.Logs) {
return new MeteredPlan(
{
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD: 0.10 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
}
);
return new MeteredPlan({
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD:
0.1 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
});
}
if (data.productType === ProductType.Traces) {
return new MeteredPlan(
{
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD: 0.10 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
}
);
return new MeteredPlan({
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD:
0.1 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
});
}
if (data.productType === ProductType.Metrics) {
return new MeteredPlan(
{
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD: 0.10 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
}
);
return new MeteredPlan({
priceId: this.getMeteredPlanPriceId(data.productType),
pricePerUnitInUSD:
0.1 * dataRetentionDays * dataRetentionMultiplier,
unitName: `per GB for ${dataRetentionDays} days data retention.`,
});
}
throw new BadDataException('Plan with name ' + data.productType + ' not found');
throw new BadDataException(
'Plan with name ' + data.productType + ' not found'
);
}
}
export default new BillingService();

View File

@@ -1163,8 +1163,9 @@ export class Service extends DatabaseService<Model> {
return Boolean(project.enableSmsNotifications);
}
public async getTelemetryDataRetentionInDays(projectId: ObjectID): Promise<number> {
public async getTelemetryDataRetentionInDays(
projectId: ObjectID
): Promise<number> {
const project: Model | null = await this.findOneById({
id: projectId,
select: {

View File

@@ -8,6 +8,7 @@ import QueryHelper from '../Types/Database/QueryHelper';
import SortOrder from 'Common/Types/BaseDatabase/SortOrder';
import { MeteredPlanUtil } from '../Types/Billing/MeteredPlan/AllMeteredPlans';
import MeteredPlan from 'Common/Types/Billing/MeteredPlan';
import ServerMeteredPlan from '../Types/Billing/MeteredPlan/ServerMeteredPlan';
export class Service extends DatabaseService<Model> {
public constructor(postgresDatabase?: PostgresDatabase) {
@@ -48,12 +49,18 @@ export class Service extends DatabaseService<Model> {
productType: ProductType;
usageCount: number;
}): Promise<void> {
const serverMeteredPlan: ServerMeteredPlan =
MeteredPlanUtil.getServerMeteredPlanByProductType(data.productType);
const serverMeteredPlan = MeteredPlanUtil.getServerMeteredPlanByProductType(data.productType);
const meteredPlan: MeteredPlan = await serverMeteredPlan.getMeteredPlan(
data.projectId
);
const meteredPlan: MeteredPlan = await serverMeteredPlan.getMeteredPlan(data.projectId);
const totalCostOfThisOperationInUSD = serverMeteredPlan.getCostByMeteredPlan(meteredPlan, data.usageCount);
const totalCostOfThisOperationInUSD: number =
serverMeteredPlan.getCostByMeteredPlan(
meteredPlan,
data.usageCount
);
const usageBilling: Model | null = await this.findOneBy({
query: {
@@ -102,7 +109,9 @@ export class Service extends DatabaseService<Model> {
usageBilling.usageCount = data.usageCount;
usageBilling.isReportedToBillingProvider = false;
usageBilling.createdAt = OneUptimeDate.getCurrentDate();
usageBilling.day = OneUptimeDate.getDateString(OneUptimeDate.getCurrentDate());
usageBilling.day = OneUptimeDate.getDateString(
OneUptimeDate.getCurrentDate()
);
usageBilling.totalCostInUSD = totalCostOfThisOperationInUSD;
usageBilling.usageUnitName = meteredPlan.getUnitName(); // e.g. "GB"

View File

@@ -640,7 +640,6 @@ describe('BillingService', () => {
const quantity: number = 10;
it('should throw if billing is not enabled', async () => {
billingService = mockIsBillingEnabled(false);
await expect(
@@ -658,7 +657,7 @@ describe('BillingService', () => {
const meteredPlan: MeteredPlan = new MeteredPlan({
priceId: subscriptionItem?.price?.id || '',
pricePerUnitInUSD: 100,
unitName: 'unit'
unitName: 'unit',
});
mockSubscription.items.data = [];
@@ -721,9 +720,6 @@ describe('BillingService', () => {
});
it('should handle non-existent subscription', async () => {
const subscriptionId: string = 'sub_nonexistent';
mockStripe.subscriptions.retrieve = jest
.fn()

View File

@@ -10,7 +10,6 @@ import Project from 'Model/Models/Project';
import { ProductType } from 'Model/Models/UsageBilling';
export default class ActiveMonitoringMeteredPlan extends ServerMeteredPlan {
public override getProductType(): ProductType {
return ProductType.ActiveMonitoring;
}

View File

@@ -4,31 +4,35 @@ import TelemetryMeteredPlanType from './TelemetryMeteredPlan';
import { ProductType } from 'Model/Models/UsageBilling';
import BadDataException from 'Common/Types/Exception/BadDataException';
export const ActiveMonitoringMeteredPlan: ActiveMonitoringMeteredPlanType = new ActiveMonitoringMeteredPlanType();
export const LogDataIngestMeteredPlan: TelemetryMeteredPlanType = new TelemetryMeteredPlanType(ProductType.Logs);
export const MetricsDataIngestMeteredPlan: TelemetryMeteredPlanType = new TelemetryMeteredPlanType(ProductType.Metrics);
export const TracesDataIngestMetredPlan: TelemetryMeteredPlanType = new TelemetryMeteredPlanType(ProductType.Traces);
export const ActiveMonitoringMeteredPlan: ActiveMonitoringMeteredPlanType =
new ActiveMonitoringMeteredPlanType();
export const LogDataIngestMeteredPlan: TelemetryMeteredPlanType =
new TelemetryMeteredPlanType(ProductType.Logs);
export const MetricsDataIngestMeteredPlan: TelemetryMeteredPlanType =
new TelemetryMeteredPlanType(ProductType.Metrics);
export const TracesDataIngestMetredPlan: TelemetryMeteredPlanType =
new TelemetryMeteredPlanType(ProductType.Traces);
const AllMeteredPlans: Array<ServerMeteredPlan> = [
ActiveMonitoringMeteredPlan,
LogDataIngestMeteredPlan,
MetricsDataIngestMeteredPlan,
TracesDataIngestMetredPlan
TracesDataIngestMetredPlan,
];
export class MeteredPlanUtil {
public static getServerMeteredPlanByProductType(productType: ProductType): ServerMeteredPlan {
public static getServerMeteredPlanByProductType(
productType: ProductType
): ServerMeteredPlan {
if (productType === ProductType.Logs) {
return LogDataIngestMeteredPlan;
} else if (productType === ProductType.Metrics) {
return MetricsDataIngestMeteredPlan;
} else if (productType === ProductType.Traces) {
return TracesDataIngestMetredPlan;
} else {
throw new BadDataException(`Unknown product type ${productType}`);
}
throw new BadDataException(`Unknown product type ${productType}`);
}
}
export default AllMeteredPlans;

View File

@@ -5,21 +5,25 @@ import MeteredPlan from 'Common/Types/Billing/MeteredPlan';
import { ProductType } from 'Model/Models/UsageBilling';
export default class ServerMeteredPlan {
public getProductType(): ProductType {
throw new NotImplementedException();
}
public async getCostByProjectId(projectId: ObjectID, quantity: number): Promise<number> {
const meteredPlan = await this.getMeteredPlan(projectId);
public async getCostByProjectId(
projectId: ObjectID,
quantity: number
): Promise<number> {
const meteredPlan: MeteredPlan = await this.getMeteredPlan(projectId);
return this.getCostByMeteredPlan(meteredPlan, quantity);
}
public getCostByMeteredPlan(meteredPlan: MeteredPlan, quantity: number): number {
public getCostByMeteredPlan(
meteredPlan: MeteredPlan,
quantity: number
): number {
return meteredPlan.getPricePerUnit() * quantity;
}
public async getMeteredPlan(_projectId: ObjectID): Promise<MeteredPlan> {
throw new NotImplementedException();
}

View File

@@ -8,22 +8,19 @@ import UsageBillingService from '../../../Services/UsageBillingService';
import OneUptimeDate from 'Common/Types/Date';
export default class TelemetryMeteredPlan extends ServerMeteredPlan {
private _productType!: ProductType;
public get productType() : ProductType {
public get productType(): ProductType {
return this._productType;
}
public set productType(v : ProductType) {
public set productType(v: ProductType) {
this._productType = v;
}
public constructor(productType: ProductType) {
super();
this.productType = productType;
this.productType = productType;
}
public override getProductType(): ProductType {
return this.productType;
}

View File

@@ -33,7 +33,7 @@ const DashboardFooter: () => JSX.Element = () => {
{
name: 'Dashboard',
path: '/dashboard',
}
},
];
for (const app of apps) {

View File

@@ -40,7 +40,6 @@ const Settings: FunctionComponent<PageComponentProps> = (
]}
sideMenu={<DashboardSideMenu />}
>
<Alert
type={AlertType.DANGER}
strongTitle="Please note"
@@ -52,7 +51,8 @@ const Settings: FunctionComponent<PageComponentProps> = (
name="Data Retention"
cardProps={{
title: 'Telemetry Data Retention',
description: 'Configure how long you want to keep your telemetry data - like Logs, Metrics, and Traces.',
description:
'Configure how long you want to keep your telemetry data - like Logs, Metrics, and Traces.',
}}
isEditable={true}
formFields={[
@@ -61,7 +61,8 @@ const Settings: FunctionComponent<PageComponentProps> = (
retainTelemetryDataForDays: true,
},
title: 'Telemetry Data Retention (Days)',
description: 'How long do you want to keep your telemetry data - like Logs, Metrics, and Traces.',
description:
'How long do you want to keep your telemetry data - like Logs, Metrics, and Traces.',
fieldType: FormFieldSchemaType.Number,
required: true,
placeholder: '15',
@@ -76,10 +77,10 @@ const Settings: FunctionComponent<PageComponentProps> = (
retainTelemetryDataForDays: true,
},
title: 'Telemetry Data Retention (Days)',
description: 'How long do you want to keep your telemetry data - like Logs, Metrics, and Traces.',
description:
'How long do you want to keep your telemetry data - like Logs, Metrics, and Traces.',
fieldType: FieldType.Number,
},
],
modelId: DashboardNavigation.getProjectId()!,
}}

View File

@@ -670,11 +670,8 @@ const SettingsRoutes: FunctionComponent<ComponentProps> = (
}
/>
<PageRoute
path={
SettingsRoutePath[PageMap.SETTINGS_DATA_RETENTION] || ''
}
<PageRoute
path={SettingsRoutePath[PageMap.SETTINGS_DATA_RETENTION] || ''}
element={
<Suspense fallback={Loader}>
<SettingsDataRentention

View File

@@ -190,62 +190,74 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.MONITORS_INOPERATIONAL]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITORS_INOPERATIONAL]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITORS_INOPERATIONAL]
}`
),
[PageMap.MONITORS_DISABLED]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITORS_DISABLED]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITORS_DISABLED]
}`
),
[PageMap.MONITOR_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW]
}`
),
[PageMap.MONITOR_VIEW_INTERVAL]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_INTERVAL]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_INTERVAL]
}`
),
[PageMap.MONITOR_VIEW_OWNERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_OWNERS]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_OWNERS]
}`
),
[PageMap.MONITOR_VIEW_STATUS_TIMELINE]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_STATUS_TIMELINE]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_STATUS_TIMELINE]
}`
),
[PageMap.MONITOR_VIEW_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_CUSTOM_FIELDS]
}`
),
[PageMap.MONITOR_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_DELETE]
}`
),
[PageMap.MONITOR_VIEW_INCIDENTS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_INCIDENTS]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_INCIDENTS]
}`
),
[PageMap.MONITOR_VIEW_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_SETTINGS]
}`
),
[PageMap.MONITOR_VIEW_PROBES]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_PROBES]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_PROBES]
}`
),
[PageMap.MONITOR_VIEW_CRITERIA]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitors/${MonitorsRoutePath[PageMap.MONITOR_VIEW_CRITERIA]
`/dashboard/${RouteParams.ProjectID}/monitors/${
MonitorsRoutePath[PageMap.MONITOR_VIEW_CRITERIA]
}`
),
@@ -258,7 +270,8 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.UNRESOLVED_INCIDENTS]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.UNRESOLVED_INCIDENTS]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.UNRESOLVED_INCIDENTS]
}`
),
@@ -277,37 +290,44 @@ const RouteMap: Dictionary<Route> = {
[PageMap.PROJECT_INVITATIONS]: new Route(`/dashboard/project-invitations`),
[PageMap.INCIDENT_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_VIEW]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_VIEW]
}`
),
[PageMap.INCIDENT_VIEW_STATE_TIMELINE]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_VIEW_STATE_TIMELINE]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_VIEW_STATE_TIMELINE]
}`
),
[PageMap.INCIDENT_VIEW_OWNERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_VIEW_OWNERS]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_VIEW_OWNERS]
}`
),
[PageMap.INCIDENT_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_VIEW_DELETE]
}`
),
[PageMap.INCIDENT_VIEW_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_VIEW_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_VIEW_CUSTOM_FIELDS]
}`
),
[PageMap.INCIDENT_INTERNAL_NOTE]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_INTERNAL_NOTE]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_INTERNAL_NOTE]
}`
),
[PageMap.INCIDENT_PUBLIC_NOTE]: new Route(
`/dashboard/${RouteParams.ProjectID}/incidents/${IncidentsRoutePath[PageMap.INCIDENT_PUBLIC_NOTE]
`/dashboard/${RouteParams.ProjectID}/incidents/${
IncidentsRoutePath[PageMap.INCIDENT_PUBLIC_NOTE]
}`
),
@@ -324,51 +344,58 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.SCHEDULED_MAINTENANCE_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_VIEW_OWNERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_OWNERS
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_OWNERS
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_DELETE
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_DELETE
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_VIEW_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_CUSTOM_FIELDS
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_VIEW_CUSTOM_FIELDS
]
}`
),
[PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE]: new Route(
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
]
`/dashboard/${RouteParams.ProjectID}/scheduled-maintenance-events/${
ScheduledMaintenanceEventsRoutePath[
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
]
}`
),
@@ -381,124 +408,148 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.STATUS_PAGE_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW]
}`
),
[PageMap.STATUS_PAGE_VIEW_BRANDING]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_BRANDING]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_BRANDING]
}`
),
[PageMap.STATUS_PAGE_VIEW_OWNERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_OWNERS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_OWNERS]
}`
),
[PageMap.STATUS_PAGE_VIEW_GROUPS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_GROUPS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_GROUPS]
}`
),
[PageMap.STATUS_PAGE_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_DELETE]
}`
),
[PageMap.STATUS_PAGE_VIEW_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_FIELDS]
}`
),
[PageMap.STATUS_PAGE_VIEW_DOMAINS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_DOMAINS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_DOMAINS]
}`
),
[PageMap.STATUS_PAGE_VIEW_CUSTOM_SMTP]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_SMTP]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_SMTP]
}`
),
[PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS]
}`
),
[PageMap.STATUS_PAGE_VIEW_SMS_SUBSCRIBERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SMS_SUBSCRIBERS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SMS_SUBSCRIBERS]
}`
),
[PageMap.STATUS_PAGE_VIEW_WEBHOOK_SUBSCRIBERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_WEBHOOK_SUBSCRIBERS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_WEBHOOK_SUBSCRIBERS]
}`
),
[PageMap.STATUS_PAGE_VIEW_HEADER_STYLE]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_HEADER_STYLE]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_HEADER_STYLE]
}`
),
[PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE]
}`
),
[PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS]
}`
),
[PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE]
}`
),
[PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS]
}`
),
[PageMap.STATUS_PAGE_VIEW_EMBEDDED]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_EMBEDDED]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_EMBEDDED]
}`
),
[PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS]
}`
),
[PageMap.STATUS_PAGE_VIEW_SSO]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SSO]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SSO]
}`
),
[PageMap.STATUS_PAGE_VIEW_CUSTOM_HTML_CSS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_HTML_CSS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_CUSTOM_HTML_CSS]
}`
),
[PageMap.STATUS_PAGE_VIEW_RESOURCES]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_RESOURCES]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_RESOURCES]
}`
),
[PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS]
}`
),
[PageMap.STATUS_PAGE_VIEW_AUTHENTICATION_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[
PageMap.STATUS_PAGE_VIEW_AUTHENTICATION_SETTINGS
]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[
PageMap.STATUS_PAGE_VIEW_AUTHENTICATION_SETTINGS
]
}`
),
[PageMap.STATUS_PAGE_VIEW_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/status-pages/${StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/status-pages/${
StatusPagesRoutePath[PageMap.STATUS_PAGE_VIEW_SETTINGS]
}`
),
@@ -517,22 +568,26 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.ON_CALL_DUTY_SCHEDULES]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULES]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULES]
}`
),
[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW]
}`
),
[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_DELETE]
}`
),
[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_LAYERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_LAYERS]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_SCHEDULE_VIEW_LAYERS]
}`
),
@@ -541,44 +596,52 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.ON_CALL_DUTY_EXECUTION_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_EXECUTION_LOGS]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_EXECUTION_LOGS]
}`
),
[PageMap.ON_CALL_DUTY_EXECUTION_LOGS_TIMELINE]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_EXECUTION_LOGS_TIMELINE]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_EXECUTION_LOGS_TIMELINE]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_DELETE]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOGS]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOGS]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_CUSTOM_FIELDS]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOG_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[
PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOG_VIEW
]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[
PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOG_VIEW
]
}`
),
[PageMap.ON_CALL_DUTY_POLICY_VIEW_ESCALATION]: new Route(
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_ESCALATION]
`/dashboard/${RouteParams.ProjectID}/on-call-duty/${
OnCallDutyRoutePath[PageMap.ON_CALL_DUTY_POLICY_VIEW_ESCALATION]
}`
),
@@ -603,36 +666,42 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.TELEMETRY_SERVICES_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW]
}`
),
[PageMap.TELEMETRY_SERVICES_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_DELETE]
}`
),
//TELEMETRY_SERVICE_VIEW_LOGS
[PageMap.TELEMETRY_SERVICES_VIEW_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_LOGS]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_LOGS]
}`
),
//TELEMETRY_SERVICE_VIEW_TRACES
[PageMap.TELEMETRY_SERVICES_VIEW_TRACES]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_TRACES]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_TRACES]
}`
),
// Metrics
[PageMap.TELEMETRY_SERVICES_VIEW_METRICS]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_METRICS]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_METRICS]
}`
),
// Dashboard
[PageMap.TELEMETRY_SERVICES_VIEW_DASHBOARDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_DASHBOARDS]
`/dashboard/${RouteParams.ProjectID}/telemetry/services/${
TelemetryRouthPath[PageMap.TELEMETRY_SERVICES_VIEW_DASHBOARDS]
}`
),
@@ -642,32 +711,38 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.USER_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS]
}`
),
[PageMap.USER_SETTINGS_NOTIFICATION_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS_NOTIFICATION_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS_NOTIFICATION_SETTINGS]
}`
),
[PageMap.USER_SETTINGS_NOTIFICATION_METHODS]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS_NOTIFICATION_METHODS]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS_NOTIFICATION_METHODS]
}`
),
[PageMap.USER_SETTINGS_ON_CALL_RULES]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_RULES]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_RULES]
}`
),
[PageMap.USER_SETTINGS_ON_CALL_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_LOGS]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_LOGS]
}`
),
[PageMap.USER_SETTINGS_ON_CALL_LOGS_TIMELINE]: new Route(
`/dashboard/${RouteParams.ProjectID}/user-settings/${UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_LOGS_TIMELINE]
`/dashboard/${RouteParams.ProjectID}/user-settings/${
UserSettingsRoutePath[PageMap.USER_SETTINGS_ON_CALL_LOGS_TIMELINE]
}`
),
@@ -680,152 +755,181 @@ const RouteMap: Dictionary<Route> = {
`/dashboard/${RouteParams.ProjectID}/settings/`
),
[PageMap.SETTINGS_DANGERZONE]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_DANGERZONE]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_DANGERZONE]
}`
),
[PageMap.SETTINGS_CALL_SMS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_CALL_SMS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_CALL_SMS]
}`
),
[PageMap.SETTINGS_SMS_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_SMS_LOGS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_SMS_LOGS]
}`
),
[PageMap.SETTINGS_EMAIL_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_EMAIL_LOGS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_EMAIL_LOGS]
}`
),
[PageMap.SETTINGS_CALL_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_CALL_LOGS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_CALL_LOGS]
}`
),
[PageMap.SETTINGS_APIKEYS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_APIKEYS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_APIKEYS]
}`
),
[PageMap.SETTINGS_APIKEY_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_APIKEY_VIEW]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_APIKEY_VIEW]
}`
),
[PageMap.SETTINGS_CUSTOM_SMTP]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_CUSTOM_SMTP]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_CUSTOM_SMTP]
}`
),
[PageMap.SETTINGS_MONITORS_STATUS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_MONITORS_STATUS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_MONITORS_STATUS]
}`
),
[PageMap.SETTINGS_INCIDENTS_STATE]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENTS_STATE]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENTS_STATE]
}`
),
[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_STATE]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_STATE]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_STATE]
}`
),
[PageMap.SETTINGS_INCIDENTS_SEVERITY]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENTS_SEVERITY]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENTS_SEVERITY]
}`
),
[PageMap.SETTINGS_DOMAINS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_DOMAINS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_DOMAINS]
}`
),
[PageMap.SETTINGS_FEATURE_FLAGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_FEATURE_FLAGS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_FEATURE_FLAGS]
}`
),
[PageMap.SETTINGS_SSO]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_SSO]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_SSO]
}`
),
[PageMap.SETTINGS_TEAMS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_TEAMS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_TEAMS]
}`
),
[PageMap.SETTINGS_INCIDENT_TEMPLATES]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENT_TEMPLATES]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENT_TEMPLATES]
}`
),
[PageMap.SETTINGS_INCIDENT_TEMPLATES_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENT_TEMPLATES_VIEW]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENT_TEMPLATES_VIEW]
}`
),
[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES]
}`
),
[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES_VIEW]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENT_NOTE_TEMPLATES_VIEW]
}`
),
[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES
]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES
]
}`
),
[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES_VIEW
]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_NOTE_TEMPLATES_VIEW
]
}`
),
[PageMap.SETTINGS_BILLING]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_BILLING]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_BILLING]
}`
),
[PageMap.SETTINGS_DATA_RETENTION]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_DATA_RETENTION]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_DATA_RETENTION]
}`
),
[PageMap.SETTINGS_BILLING_INVOICES]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_BILLING_INVOICES]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_BILLING_INVOICES]
}`
),
[PageMap.SETTINGS_USAGE_HISTORY]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_USAGE_HISTORY]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_USAGE_HISTORY]
}`
),
[PageMap.SETTINGS_TEAM_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_TEAM_VIEW]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_TEAM_VIEW]
}`
),
// labels.
[PageMap.SETTINGS_LABELS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_LABELS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_LABELS]
}`
),
// Probes.
[PageMap.SETTINGS_PROBES]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_PROBES]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_PROBES]
}`
),
@@ -838,72 +942,85 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.WORKFLOWS_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOWS_LOGS]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOWS_LOGS]
}`
),
[PageMap.WORKFLOWS_VARIABLES]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOWS_VARIABLES]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOWS_VARIABLES]
}`
),
[PageMap.WORKFLOW_VARIABLES]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_VARIABLES]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_VARIABLES]
}`
),
[PageMap.WORKFLOW_BUILDER]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_BUILDER]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_BUILDER]
}`
),
[PageMap.WORKFLOW_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_VIEW]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_VIEW]
}`
),
[PageMap.WORKFLOW_LOGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_LOGS]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_LOGS]
}`
),
[PageMap.WORKFLOW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_DELETE]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_DELETE]
}`
),
[PageMap.WORKFLOW_VIEW_SETTINGS]: new Route(
`/dashboard/${RouteParams.ProjectID}/workflows/${WorkflowRoutePath[PageMap.WORKFLOW_VIEW_SETTINGS]
`/dashboard/${RouteParams.ProjectID}/workflows/${
WorkflowRoutePath[PageMap.WORKFLOW_VIEW_SETTINGS]
}`
),
/// custom fields settings.
[PageMap.SETTINGS_MONITOR_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_MONITOR_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_MONITOR_CUSTOM_FIELDS]
}`
),
[PageMap.SETTINGS_ON_CALL_DUTY_POLICY_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[
PageMap.SETTINGS_ON_CALL_DUTY_POLICY_CUSTOM_FIELDS
]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[
PageMap.SETTINGS_ON_CALL_DUTY_POLICY_CUSTOM_FIELDS
]
}`
),
[PageMap.SETTINGS_INCIDENT_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_INCIDENT_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_INCIDENT_CUSTOM_FIELDS]
}`
),
[PageMap.SETTINGS_SCHEDULED_MAINTENANCE_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_CUSTOM_FIELDS
]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_CUSTOM_FIELDS
]
}`
),
[PageMap.SETTINGS_STATUS_PAGE_CUSTOM_FIELDS]: new Route(
`/dashboard/${RouteParams.ProjectID}/settings/${SettingsRoutePath[PageMap.SETTINGS_STATUS_PAGE_CUSTOM_FIELDS]
`/dashboard/${RouteParams.ProjectID}/settings/${
SettingsRoutePath[PageMap.SETTINGS_STATUS_PAGE_CUSTOM_FIELDS]
}`
),
@@ -919,27 +1036,32 @@ const RouteMap: Dictionary<Route> = {
),
[PageMap.MONITOR_GROUP_VIEW]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW]
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${
MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW]
}`
),
[PageMap.MONITOR_GROUP_VIEW_DELETE]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_DELETE]
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${
MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_DELETE]
}`
),
[PageMap.MONITOR_GROUP_VIEW_MONITORS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_MONITORS]
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${
MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_MONITORS]
}`
),
[PageMap.MONITOR_GROUP_VIEW_OWNERS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_OWNERS]
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${
MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_OWNERS]
}`
),
[PageMap.MONITOR_GROUP_VIEW_INCIDENTS]: new Route(
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_INCIDENTS]
`/dashboard/${RouteParams.ProjectID}/monitor-groups/${
MonitorGroupRoutePath[PageMap.MONITOR_GROUP_VIEW_INCIDENTS]
}`
),
};
@@ -948,13 +1070,13 @@ export class RouteUtil {
public static isGlobalRoute(route: Route): boolean {
if (
route.toString() ===
RouteMap[PageMap.USER_PROFILE_OVERVIEW]?.toString() ||
RouteMap[PageMap.USER_PROFILE_OVERVIEW]?.toString() ||
route.toString() ===
RouteMap[PageMap.USER_PROFILE_PASSWORD]?.toString() ||
RouteMap[PageMap.USER_PROFILE_PASSWORD]?.toString() ||
route.toString() ===
RouteMap[PageMap.USER_PROFILE_PICTURE]?.toString() ||
RouteMap[PageMap.USER_PROFILE_PICTURE]?.toString() ||
route.toString() ===
RouteMap[PageMap.PROJECT_INVITATIONS]?.toString() ||
RouteMap[PageMap.PROJECT_INVITATIONS]?.toString() ||
route.toString() === RouteMap[PageMap.ACTIVE_INCIDENTS]?.toString()
) {
return true;

View File

@@ -150,7 +150,6 @@ import StatusPageHeaderLinkService, {
Service as StatusPageHeaderLinkServiceType,
} from 'CommonServer/Services/StatusPageHeaderLinkService';
import File from 'Model/Models/File';
import FileService, {
Service as FileServiceType,
@@ -425,7 +424,6 @@ import LogService, {
LogService as LogServiceType,
} from 'CommonServer/Services/LogService';
import UsageBilling from 'Model/Models/UsageBilling';
import UsageBillingService, {
Service as UsageBillingServiceType,
@@ -705,10 +703,7 @@ app.use(
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<File, FileServiceType>(
File,
FileService
).getRouter()
new BaseAPI<File, FileServiceType>(File, FileService).getRouter()
);
app.use(
@@ -1149,4 +1144,4 @@ app.use(
).getRouter()
);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, NotificationAPI);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, NotificationAPI);

View File

@@ -6,7 +6,6 @@ import ResellerAPI from './API/Reseller';
import StatusPageSsoAPI from './API/StatusPageSSO';
import StatusPageAuthenticationAPI from './API/StatusPageAuthentication';
const app: ExpressApplication = Express.getExpressApp();
const APP_NAME: string = 'api/identity';
@@ -23,4 +22,3 @@ app.use(
[`/${APP_NAME}/status-page`, '/status-page'],
StatusPageAuthenticationAPI
);

View File

@@ -8,11 +8,10 @@ import CallAPI from './API/Call';
import SMTPConfigAPI from './API/SMTPConfig';
import './Utils/Handlebars';
const APP_NAME: string = 'api/notification';
const app: ExpressApplication = Express.getExpressApp();
app.use([`/${APP_NAME}/email`, '/email'], MailAPI);
app.use([`/${APP_NAME}/sms`, '/sms'], SmsAPI);
app.use([`/${APP_NAME}/call`, '/call'], CallAPI);
app.use([`/${APP_NAME}/smtp-config`, '/smtp-config'], SMTPConfigAPI);
app.use([`/${APP_NAME}/smtp-config`, '/smtp-config'], SMTPConfigAPI);

View File

@@ -6,15 +6,13 @@ import { PostgresAppInstance } from 'CommonServer/Infrastructure/PostgresDatabas
import { ClickhouseAppInstance } from 'CommonServer/Infrastructure/ClickhouseDatabase';
import Realtime from 'CommonServer/Utils/Realtime';
// import featuresets.
// import featuresets.
import './FeatureSet/Identity/Index';
import './FeatureSet/Notification/Index';
import './FeatureSet/Base/Index';
const APP_NAME: string = 'api';
const init: () => Promise<void> = async (): Promise<void> => {
try {
// init the app

View File

@@ -529,7 +529,6 @@ export default class Model extends TenantModel {
})
public workflowRunsInLast30Days?: number = undefined;
@ColumnAccessControl({
create: [],
read: [

View File

@@ -8,7 +8,11 @@ import LIMIT_MAX from 'Common/Types/Database/LimitMax';
import logger from 'CommonServer/Utils/Logger';
import Project from 'Model/Models/Project';
import ProjectService from 'CommonServer/Services/ProjectService';
import { LogDataIngestMeteredPlan, TracesDataIngestMetredPlan, MetricsDataIngestMeteredPlan } from 'CommonServer/Types/Billing/MeteredPlan/AllMeteredPlans';
import {
LogDataIngestMeteredPlan,
TracesDataIngestMetredPlan,
MetricsDataIngestMeteredPlan,
} from 'CommonServer/Types/Billing/MeteredPlan/AllMeteredPlans';
import Sleep from 'Common/Types/Sleep';
RunCron(
@@ -39,7 +43,7 @@ RunCron(
await LogDataIngestMeteredPlan.reportQuantityToBillingProvider(
project.id
);
await Sleep.sleep(1000);
await MetricsDataIngestMeteredPlan.reportQuantityToBillingProvider(