Add changes to various files

This commit is contained in:
Simon Larsen 2023-11-14 15:14:58 +00:00
parent 3023e22de3
commit 4ec5c0d7f1
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
14 changed files with 26 additions and 15 deletions

View File

@ -6,8 +6,8 @@ import Name from 'Common/Types/Name';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import { JSONObject } from 'Common/Types/JSON';
import User from 'Model/Models/User';
import JSONFunctions from 'Common/Types/JSONFunctions';
import Analytics from 'CommonUI/src/Utils/Analytics';
import BaseModel from 'Common/Models/BaseModel';
export default abstract class LoginUtil {
public static login(value: JSONObject): void {

View File

@ -13,7 +13,6 @@ import HTTPResponse from 'Common/Types/API/HTTPResponse';
import Route from 'Common/Types/API/Route';
import Navigation from '../../Utils/Navigation';
import BasicFormModal from '../FormModal/BasicFormModal';
import JSONFunctions from 'Common/Types/JSONFunctions';
export interface ComponentProps<TBaseModel extends BaseModel> {
modelType: { new (): TBaseModel };

View File

@ -30,7 +30,6 @@ import TableColumnType from 'Common/Types/Database/TableColumnType';
import Typeof from 'Common/Types/Typeof';
import { TableColumnMetadata } from 'Common/Types/Database/TableColumn';
import { ButtonStyleType } from '../Button/Button';
import JSONFunctions from 'Common/Types/JSONFunctions';
import API from '../../Utils/API/API';
import { FormStep } from './Types/FormStep';
import Field from './Types/Field';

View File

@ -23,7 +23,7 @@ const LogItem: FunctionComponent<ComponentProps> = (
return (
<div className='color-gray-100'>
{props.log.body}
</div>
);
};

View File

@ -1,15 +1,31 @@
import React, { FunctionComponent, ReactElement } from 'react';
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
import Input from '../Input/Input';
export interface FiterOptions {
searchText?: string | undefined;
}
export interface ComponentProps {
onFilterChanged: (filterOptions: FiterOptions) => void;
}
const LogsFilter: FunctionComponent<ComponentProps> = (
props: ComponentProps
): ReactElement => {
const [filterOptions, setFilterOptions] = React.useState<FiterOptions>({});
useEffect(() => {
props.onFilterChanged(filterOptions);
}, [filterOptions]);
return (
<div>
<Input onChange={(value: string) => {
setFilterOptions({
searchText: value
})
}} />
</div>
);
};

View File

@ -14,7 +14,6 @@ import Field from './Field';
import DetailField from '../Detail/Field';
import Detail from '../Detail/Detail';
import API from '../../Utils/API/API';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ErrorMessage from '../ErrorMessage/ErrorMessage';
import { useAsyncEffect } from 'use-async-effect';
import User from '../../Utils/User';

View File

@ -10,7 +10,6 @@ import { JSONObject } from 'Common/Types/JSON';
import ObjectID from 'Common/Types/ObjectID';
import Alert, { AlertType } from '../Alerts/Alert';
import FormValues from '../Forms/Types/FormValues';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ModelAPI from '../../Utils/ModelAPI/ModelAPI';
export interface ComponentProps<TBaseModel extends BaseModel> {

View File

@ -15,7 +15,6 @@ import API from '../../Utils/API/API';
import URL from 'Common/Types/API/URL';
import { JSONArray } from 'Common/Types/JSON';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import JSONFunctions from 'Common/Types/JSONFunctions';
export interface ComponentProps<TBaseModel extends BaseModel> {
query?: Query<TBaseModel>;

View File

@ -52,7 +52,6 @@ import SubscriptionPlan, {
} from 'Common/Types/Billing/SubscriptionPlan';
import Pill from '../Pill/Pill';
import { Yellow } from 'Common/Types/BrandColors';
import JSONFunctions from 'Common/Types/JSONFunctions';
import { ModalWidth } from '../Modal/Modal';
import ProjectUtil from '../../Utils/Project';
import API from '../../Utils/API/API';

View File

@ -1,5 +1,4 @@
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import React, { FunctionComponent, ReactElement } from 'react';
import Image from '../Image/Image';
import URL from 'Common/Types/API/URL';
@ -7,6 +6,7 @@ import { FILE_URL } from '../../Config';
import Probe from 'Model/Models/Probe';
import Icon from '../Icon/Icon';
import IconProp from 'Common/Types/Icon/IconProp';
import BaseModel from 'Common/Models/BaseModel';
export interface ComponentProps {
probe?: Probe | JSONObject | undefined | null;

View File

@ -1,12 +1,12 @@
import LocalStorage from './LocalStorage';
import { JSONObject } from 'Common/Types/JSON';
import Project from 'Model/Models/Project';
import JSONFunctions from 'Common/Types/JSONFunctions';
import SubscriptionPlan, {
PlanSelect,
} from 'Common/Types/Billing/SubscriptionPlan';
import { BILLING_ENABLED, getAllEnvVars } from '../Config';
import ObjectID from 'Common/Types/ObjectID';
import BaseModel from 'Common/Models/BaseModel';
export default class ProjectUtil {
public static getCurrentProject(): Project | null {

View File

@ -15,7 +15,6 @@ import LabelsElement from '../../Components/Label/Labels';
import IncidentSeverity from 'Model/Models/IncidentSeverity';
import Query from 'CommonUI/src/Utils/ModelAPI/Query';
import Route from 'Common/Types/API/Route';
import JSONFunctions from 'Common/Types/JSONFunctions';
import GlobalEvents from 'CommonUI/src/Utils/GlobalEvents';
import EventName from '../../Utils/EventName';
import DashboardNavigation from '../../Utils/Navigation';
@ -34,6 +33,7 @@ import IncidentTemplateOwnerUser from 'Model/Models/IncidentTemplateOwnerUser';
import IncidentTemplateOwnerTeam from 'Model/Models/IncidentTemplateOwnerTeam';
import ObjectID from 'Common/Types/ObjectID';
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import BaseModel from 'Common/Models/BaseModel';
export interface ComponentProps {
query?: Query<Incident> | undefined;

View File

@ -26,7 +26,6 @@ import OneUptimeDate from 'Common/Types/Date';
import PositiveNumber from 'Common/Types/PositiveNumber';
import Route from 'Common/Types/API/Route';
import logger from 'CommonServer/Utils/Logger';
import JSONFunctions from 'Common/Types/JSONFunctions';
import PartialEntity from 'Common/Types/Database/PartialEntity';
import Email from 'Common/Types/Email';
import Name from 'Common/Types/Name';
@ -36,6 +35,7 @@ import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import CookieUtil from 'CommonServer/Utils/Cookie';
import BaseModel from 'Common/Models/BaseModel';
const router: ExpressRouter = Express.getRouter();

View File

@ -26,6 +26,7 @@ import Protocol from 'Common/Types/API/Protocol';
import Hostname from 'Common/Types/API/Hostname';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import CookieUtil from 'CommonServer/Utils/Cookie';
import BaseModel from 'Common/Models/BaseModel';
const router: ExpressRouter = Express.getRouter();