mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 13:08:58 +08:00
fix: ts typings and remove cypress types
This commit is contained in:
parent
747677d4b0
commit
0bcd9d8d98
@ -119,7 +119,7 @@
|
||||
"@types/copy-webpack-plugin": "^8.0.1",
|
||||
"@types/d3": "^6.2.0",
|
||||
"@types/d3-tip": "^3.5.5",
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/jest": "^27.5.1",
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/mini-css-extract-plugin": "^2.5.1",
|
||||
"@types/node": "^16.10.3",
|
||||
|
@ -12,10 +12,7 @@ export const ServiceMetricsPage = Loadable(
|
||||
);
|
||||
|
||||
export const ServiceMapPage = Loadable(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "ServiceMapPage" */ 'modules/Servicemap/ServiceMap'
|
||||
),
|
||||
() => import(/* webpackChunkName: "ServiceMapPage" */ 'modules/Servicemap'),
|
||||
);
|
||||
|
||||
export const TraceFilter = Loadable(
|
||||
@ -27,10 +24,7 @@ export const TraceDetail = Loadable(
|
||||
);
|
||||
|
||||
export const UsageExplorerPage = Loadable(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "UsageExplorerPage" */ 'modules/Usage/UsageExplorerDef'
|
||||
),
|
||||
() => import(/* webpackChunkName: "UsageExplorerPage" */ 'modules/Usage'),
|
||||
);
|
||||
|
||||
export const SignupPage = Loadable(
|
||||
|
@ -27,12 +27,7 @@ import AppReducer from 'types/reducer/app';
|
||||
|
||||
import CurrentOrganization from './CurrentOrganization';
|
||||
import SignedInAS from './SignedInAs';
|
||||
import {
|
||||
Container,
|
||||
LogoutContainer,
|
||||
MenuContainer,
|
||||
ToggleButton,
|
||||
} from './styles';
|
||||
import { Container, LogoutContainer, ToggleButton } from './styles';
|
||||
|
||||
function HeaderContainer({ toggleDarkMode }: Props): JSX.Element {
|
||||
const { isDarkMode, user, currentVersion } = useSelector<AppState, AppReducer>(
|
||||
@ -70,7 +65,7 @@ function HeaderContainer({ toggleDarkMode }: Props): JSX.Element {
|
||||
};
|
||||
|
||||
const menu = (
|
||||
<MenuContainer>
|
||||
<Menu style={{ padding: '1rem' }}>
|
||||
<Menu.ItemGroup>
|
||||
<SignedInAS />
|
||||
<Divider />
|
||||
@ -92,7 +87,7 @@ function HeaderContainer({ toggleDarkMode }: Props): JSX.Element {
|
||||
</div>
|
||||
</LogoutContainer>
|
||||
</Menu.ItemGroup>
|
||||
</MenuContainer>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
return (
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Menu, Switch, Typography } from 'antd';
|
||||
import { Switch, Typography } from 'antd';
|
||||
import styled from 'styled-components';
|
||||
|
||||
export const Container = styled.div`
|
||||
@ -48,10 +48,6 @@ export const LogoutContainer = styled.div`
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
export const MenuContainer = styled(Menu)`
|
||||
padding: 1rem;
|
||||
`;
|
||||
|
||||
export interface DarkModeProps {
|
||||
checked?: boolean;
|
||||
defaultChecked?: boolean;
|
||||
|
@ -36,6 +36,8 @@ function CustomDateTimeModal({
|
||||
style={{ position: 'absolute', top: 60, right: 40 }}
|
||||
onOk={(): void => onCreate(customDateTimeRange || null)}
|
||||
>
|
||||
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
||||
{/* @ts-ignore:next-line */}
|
||||
<RangePicker
|
||||
disabledDate={disabledDate}
|
||||
onOk={handleRangePickerOk}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Dictionary } from 'cypress/types/lodash';
|
||||
import groupBy from 'lodash-es/groupBy';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Alerts } from 'types/api/alerts/getAll';
|
||||
@ -13,7 +12,7 @@ function FilteredTable({
|
||||
allAlerts,
|
||||
selectedFilter,
|
||||
}: FilteredTableProps): JSX.Element {
|
||||
const allGroupsAlerts: Dictionary<Alerts[]> = useMemo(
|
||||
const allGroupsAlerts = useMemo(
|
||||
() =>
|
||||
groupBy(FilterAlerts(allAlerts, selectedFilter), (obj) =>
|
||||
selectedGroup.map((e) => obj.labels[`${e.value}`]).join('+'),
|
||||
|
@ -31,8 +31,3 @@ ReactDOM.render(
|
||||
</QueryClientProvider>,
|
||||
document.querySelector('#root'),
|
||||
);
|
||||
|
||||
// setting the Store for the cypress
|
||||
if (window.Cypress) {
|
||||
window.store = store;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ describe('lib/getStep', () => {
|
||||
|
||||
test('should return relevant step when the given range is greater than 1 day', () => {
|
||||
const start = dayjs();
|
||||
const end = start.add(1, 'Day').add(1, 'Second');
|
||||
const end = start.add(1, 'day').add(1, 'second');
|
||||
const startUnix = start.valueOf();
|
||||
const endUnix = end.valueOf();
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
import ServiceMap from './ServiceMap';
|
||||
|
||||
export default ServiceMap;
|
8
frontend/src/modules/Servicemap/index.tsx
Normal file
8
frontend/src/modules/Servicemap/index.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import ServiceMap from './ServiceMap';
|
||||
|
||||
function ServiceMapContainer(): JSX.Element {
|
||||
return <ServiceMap />;
|
||||
}
|
||||
export default ServiceMapContainer;
|
@ -1,3 +0,0 @@
|
||||
import { UsageExplorer } from './UsageExplorer';
|
||||
|
||||
export default UsageExplorer;
|
9
frontend/src/modules/Usage/index.tsx
Normal file
9
frontend/src/modules/Usage/index.tsx
Normal file
@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
import { UsageExplorer } from './UsageExplorer';
|
||||
|
||||
function UsageExplorerContainer(): JSX.Element {
|
||||
return <UsageExplorer />;
|
||||
}
|
||||
|
||||
export default UsageExplorerContainer;
|
@ -1,10 +1,9 @@
|
||||
import Cypress from 'cypress';
|
||||
import { compose, Store } from 'redux';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
store: Store;
|
||||
Cypress: typeof Cypress;
|
||||
|
||||
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: typeof compose;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
"baseUrl": "./src",
|
||||
"downlevelIteration": true,
|
||||
"plugins": [{ "name": "typescript-plugin-css-modules" }],
|
||||
"types": ["cypress", "@testing-library/cypress", "node"]
|
||||
"types": ["node", "jest"]
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"include": [
|
||||
|
@ -2300,7 +2300,7 @@
|
||||
dependencies:
|
||||
"@types/istanbul-lib-report" "*"
|
||||
|
||||
"@types/jest@*":
|
||||
"@types/jest@*", "@types/jest@^27.5.1":
|
||||
version "27.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.1.tgz#2c8b6dc6ff85c33bcd07d0b62cb3d19ddfdb3ab9"
|
||||
integrity sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ==
|
||||
@ -2308,14 +2308,6 @@
|
||||
jest-matcher-utils "^27.0.0"
|
||||
pretty-format "^27.0.0"
|
||||
|
||||
"@types/jest@^26.0.15":
|
||||
version "26.0.24"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a"
|
||||
integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w==
|
||||
dependencies:
|
||||
jest-diff "^26.0.0"
|
||||
pretty-format "^26.0.0"
|
||||
|
||||
"@types/js-cookie@^2.2.6":
|
||||
version "2.2.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.7.tgz#226a9e31680835a6188e887f3988e60c04d3f6a3"
|
||||
@ -5416,7 +5408,7 @@ debug@^3.1.1, debug@^3.2.6, debug@^3.2.7:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
"debug@github:ngokevin/debug#noTimestamp":
|
||||
debug@ngokevin/debug#noTimestamp:
|
||||
version "2.2.0"
|
||||
resolved "https://codeload.github.com/ngokevin/debug/tar.gz/ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a"
|
||||
|
||||
@ -5575,11 +5567,6 @@ detect-node@^2.0.4, detect-node@^2.1.0:
|
||||
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
|
||||
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
|
||||
|
||||
diff-sequences@^26.6.2:
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
|
||||
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
|
||||
|
||||
diff-sequences@^27.5.1:
|
||||
version "27.5.1"
|
||||
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327"
|
||||
@ -5623,7 +5610,7 @@ doctrine@^3.0.0:
|
||||
dependencies:
|
||||
esutils "^2.0.2"
|
||||
|
||||
"document-register-element@github:dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90":
|
||||
document-register-element@dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90:
|
||||
version "0.5.4"
|
||||
resolved "https://codeload.github.com/dmarcos/document-register-element/tar.gz/8ccc532b7f3744be954574caf3072a5fd260ca90"
|
||||
|
||||
@ -7814,16 +7801,6 @@ jest-config@^27.5.1:
|
||||
slash "^3.0.0"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
jest-diff@^26.0.0:
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394"
|
||||
integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==
|
||||
dependencies:
|
||||
chalk "^4.0.0"
|
||||
diff-sequences "^26.6.2"
|
||||
jest-get-type "^26.3.0"
|
||||
pretty-format "^26.6.2"
|
||||
|
||||
jest-diff@^27.5.1:
|
||||
version "27.5.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def"
|
||||
@ -7877,11 +7854,6 @@ jest-environment-node@^27.5.1:
|
||||
jest-mock "^27.5.1"
|
||||
jest-util "^27.5.1"
|
||||
|
||||
jest-get-type@^26.3.0:
|
||||
version "26.3.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0"
|
||||
integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==
|
||||
|
||||
jest-get-type@^27.5.1:
|
||||
version "27.5.1"
|
||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1"
|
||||
@ -10210,7 +10182,7 @@ pretty-error@^2.1.1:
|
||||
lodash "^4.17.20"
|
||||
renderkid "^2.0.4"
|
||||
|
||||
pretty-format@^26.0.0, pretty-format@^26.6.2:
|
||||
pretty-format@^26.6.2:
|
||||
version "26.6.2"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
|
||||
integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
|
||||
@ -12346,7 +12318,7 @@ text-table@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
|
||||
"three-bmfont-text@github:dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733":
|
||||
three-bmfont-text@dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733:
|
||||
version "2.4.0"
|
||||
resolved "https://codeload.github.com/dmarcos/three-bmfont-text/tar.gz/21d017046216e318362c48abd1a48bddfb6e0733"
|
||||
dependencies:
|
||||
|
Loading…
x
Reference in New Issue
Block a user