SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore: Eslint fix config (#882)
palash-signozf1f606844a6f
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.jsindex a8bba218a5..13c64cf523 100644--- a/frontend/.eslintrc.js+++ b/frontend/.eslintrc.js@@ -3,17 +3,23 @@ module.exports = {browser: true,es2021: true,node: true,+ 'jest/globals': true,},extends: [+ 'airbnb',+ 'airbnb-typescript','eslint:recommended','plugin:react/recommended','plugin:@typescript-eslint/recommended','plugin:@typescript-eslint/eslint-recommended','plugin:prettier/recommended','plugin:sonarjs/recommended',+ 'plugin:import/errors',+ 'plugin:import/warnings',],parser: '@typescript-eslint/parser',parserOptions: {+ project: './tsconfig.json',ecmaFeatures: {jsx: true,},@@ -26,10 +32,17 @@ module.exports = {'simple-import-sort','react-hooks','prettier',+ 'jest',],settings: {react: {- version: 'latest',+ version: 'detect',+ },+ 'import/resolver': {+ node: {+ paths: ['src'],+ extensions: ['.js', '.jsx', '.ts', '.tsx'],+ },},},rules: {@@ -41,12 +54,13 @@ module.exports = {],'react/prop-types': 'off','@typescript-eslint/explicit-function-return-type': 'error',- '@typescript-eslint/no-var-requires': 0,- 'react/no-array-index-key': 2,+ '@typescript-eslint/no-var-requires': 'error',+ 'react/no-array-index-key': 'error','linebreak-style': ['error',process.platform === 'win32' ? 'windows' : 'unix',],+ '@typescript-eslint/default-param-last': 'off',// simple sort error'simple-import-sort/imports': 'error',@@ -54,7 +68,29 @@ module.exports = {// hooks'react-hooks/rules-of-hooks': 'error',- 'react-hooks/exhaustive-deps': 'warn',+ 'react-hooks/exhaustive-deps': 'error',++ // airbnb+ 'no-underscore-dangle': 'off',+ 'no-console': 'off',+ 'import/prefer-default-export': 'off',+ 'import/extensions': [+ 'error',+ 'ignorePackages',+ {+ js: 'never',+ jsx: 'never',+ ts: 'never',+ tsx: 'never',+ },+ ],++ // eslint rules need to remove+ 'no-shadow': 'off',+ '@typescript-eslint/no-shadow': 'off',+ 'global-require': 'off',+ '@typescript-eslint/no-var-requires': 'off',+ 'import/no-cycle': 'off','prettier/prettier': ['error',diff --git a/frontend/package.json b/frontend/package.jsonindex 7b8c78ebd5..0912807ab5 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -7,8 +7,8 @@"dev": "cross-env NODE_ENV=development webpack serve --progress","build": "webpack --config=webpack.config.prod.js --progress","prettify": "prettier --write .",- "lint": "eslint . --debug",- "lint:fix": "eslint . --fix --debug",+ "lint": "eslint ./src",+ "lint:fix": "eslint ./src --fix","cypress:open": "cypress open","cypress:run": "cypress run","jest": "jest",@@ -22,11 +22,12 @@"license": "ISC","dependencies": {"@ant-design/icons": "^4.6.2",- "@monaco-editor/react": "^4.3.1","@grafana/data": "^8.4.3",+ "@monaco-editor/react": "^4.3.1","@testing-library/jest-dom": "^5.11.4","@testing-library/react": "^11.1.0","@testing-library/user-event": "^12.1.10",+ "@welldone-software/why-did-you-render": "^6.2.1","antd": "4.19.2","axios": "^0.21.0","babel-eslint": "^10.1.0",@@ -74,7 +75,9 @@"uuid": "^8.3.2","web-vitals": "^0.2.4","webpack": "^5.23.0",- "webpack-dev-server": "^4.3.1"+ "webpack-dev-server": "^4.3.1",+ "cypress": "^8.3.0",+ "lodash-es": "^4.17.21"},"browserslist": {"production": [@@ -103,6 +106,7 @@"@types/d3-tip": "^3.5.5","@types/jest": "^26.0.15","@types/lodash-es": "^4.17.4",+ "@types/mini-css-extract-plugin": "^2.5.1","@types/node": "^16.10.3","@types/react": "^17.0.0","@types/react-dom": "^16.9.9",@@ -117,17 +121,19 @@"@types/webpack-dev-server": "^4.3.0","@typescript-eslint/eslint-plugin": "^4.28.2","@typescript-eslint/parser": "^4.28.2",- "@welldone-software/why-did-you-render": "^6.2.1","autoprefixer": "^9.0.0","babel-plugin-styled-components": "^1.12.0","compression-webpack-plugin": "^9.0.0","copy-webpack-plugin": "^8.1.0","critters-webpack-plugin": "^3.0.1",- "cypress": "^8.3.0","eslint": "^7.30.0",+ "eslint-config-airbnb": "^19.0.4",+ "eslint-config-airbnb-typescript": "^16.1.4","eslint-config-prettier": "^8.3.0","eslint-config-standard": "^16.0.3",- "eslint-plugin-import": "^2.23.4",+ "eslint-plugin-import": "^2.25.4",+ "eslint-plugin-jest": "^26.1.2",+ "eslint-plugin-jsx-a11y": "^6.5.1","eslint-plugin-node": "^11.1.0","eslint-plugin-prettier": "^4.0.0","eslint-plugin-promise": "^5.1.0",@@ -138,7 +144,6 @@"husky": "4.3.8","less-plugin-npm-import": "^2.1.0","lint-staged": "10.5.3",- "lodash-es": "^4.17.21","portfinder-sync": "^0.0.2","prettier": "2.2.1","react-hot-loader": "^4.13.0",diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsxindex 7c7b60d90d..018708c1d0 100644--- a/frontend/src/AppRoutes/index.tsx+++ b/frontend/src/AppRoutes/index.tsx@@ -11,7 +11,7 @@ import AppReducer from 'types/reducer/app';import routes from './routes';-const App = (): JSX.Element => {+function App(): JSX.Element {const { isLoggedIn } = useSelector<AppState, AppReducer>((state) => state.app);return (@@ -39,6 +39,6 @@ const App = (): JSX.Element => {</AppLayout></Router>);-};+}export default App;diff --git a/frontend/src/api/ErrorResponseHandler.ts b/frontend/src/api/ErrorResponseHandler.tsindex 277510146a..5ece49e730 100644--- a/frontend/src/api/ErrorResponseHandler.ts+++ b/frontend/src/api/ErrorResponseHandler.ts@@ -2,7 +2,7 @@ import { AxiosError } from 'axios';import { ErrorResponse } from 'types/api';import { ErrorStatusCode } from 'types/common';-export const ErrorResponseHandler = (error: AxiosError): ErrorResponse => {+export function ErrorResponseHandler(error: AxiosError): ErrorResponse {if (error.response) {// client received an error response (5xx, 4xx)// making the error status code as standard Error Status Code@@ -54,4 +54,4 @@ export const ErrorResponseHandler = (error: AxiosError): ErrorResponse => {error: error.toString(),message: null,};-};+}diff --git a/frontend/src/api/trace/getFilters.ts b/frontend/src/api/trace/getFilters.tsindex 1d18752961..1173fde10c 100644--- a/frontend/src/api/trace/getFilters.ts+++ b/frontend/src/api/trace/getFilters.ts@@ -29,9 +29,9 @@ const getFilters = async (end: props.end,getFilters: props.getFilters,...nonDuration,- maxDuration: String((duration['duration'] || [])[0] || ''),- minDuration: String((duration['duration'] || [])[1] || ''),- exclude: exclude,+ maxDuration: String((duration.duration || [])[0] || ''),+ minDuration: String((duration.duration || [])[1] || ''),+ exclude,});return {diff --git a/frontend/src/api/trace/getSpans.ts b/frontend/src/api/trace/getSpans.tsindex 8527eb2732..ffd8915563 100644--- a/frontend/src/api/trace/getSpans.ts+++ b/frontend/src/api/trace/getSpans.ts@@ -39,8 +39,8 @@ const getSpans = async (step: props.step,tags: updatedSelectedTags,...nonDuration,- maxDuration: String((duration['duration'] || [])[0] || ''),- minDuration: String((duration['duration'] || [])[1] || ''),+ maxDuration: String((duration.duration || [])[0] || ''),+ minDuration: String((duration.duration || [])[1] || ''),exclude,},);diff --git a/frontend/src/api/trace/getSpansAggregate.ts b/frontend/src/api/trace/getSpansAggregate.tsindex b630e8ce30..ad18cb2143 100644--- a/frontend/src/api/trace/getSpansAggregate.ts+++ b/frontend/src/api/trace/getSpansAggregate.ts@@ -42,8 +42,8 @@ const getSpanAggregate = async (...preProps,tags: updatedSelectedTags,...nonDuration,- maxDuration: String((duration['duration'] || [])[0] || ''),- minDuration: String((duration['duration'] || [])[1] || ''),+ maxDuration: String((duration.duration || [])[0] || ''),+ minDuration: String((duration.duration || [])[1] || ''),exclude,});diff --git a/frontend/src/api/trace/getTagFilter.ts b/frontend/src/api/trace/getTagFilter.tsindex d54ceb8905..746765c4bf 100644--- a/frontend/src/api/trace/getTagFilter.ts+++ b/frontend/src/api/trace/getTagFilter.ts@@ -20,8 +20,8 @@ const getTagFilters = async (start: String(props.start),end: String(props.end),...nonDuration,- maxDuration: String((duration['duration'] || [])[0] || ''),- minDuration: String((duration['duration'] || [])[1] || ''),+ maxDuration: String((duration.duration || [])[0] || ''),+ minDuration: String((duration.duration || [])[1] || ''),});return {diff --git a/frontend/src/assets/Dashboard/TimeSeries.tsx b/frontend/src/assets/Dashboard/TimeSeries.tsxindex 81d9e5de76..46e30e29fc 100644--- a/frontend/src/assets/Dashboard/TimeSeries.tsx+++ b/frontend/src/assets/Dashboard/TimeSeries.tsx@@ -1,7 +1,7 @@import React from 'react';-const TimeSeries = (): JSX.Element => (- <React.Fragment>+function TimeSeries(): JSX.Element {+ return (<svgwidth="81"height="46"@@ -31,7 +31,7 @@ const TimeSeries = (): JSX.Element => (/></defs></svg>- </React.Fragment>-);+ );+}export default TimeSeries;diff --git a/frontend/src/assets/Dashboard/Value.tsx b/frontend/src/assets/Dashboard/Value.tsxindex b8bf1d9572..27718c0c0d 100644--- a/frontend/src/assets/Dashboard/Value.tsx+++ b/frontend/src/assets/Dashboard/Value.tsx@@ -1,23 +1,21 @@import React from 'react';-const Value = (props: ValueProps): JSX.Element => {+function Value(props: ValueProps): JSX.Element {return (- <React.Fragment>- <svg- width="78"- height="32"- viewBox="0 0 78 32"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M15.0215 17.875C14.2285 18.8184 13.2783 19.5771 12.1709 20.1514C11.0771 20.7256 9.87402 21.0127 8.56152 21.0127C6.83887 21.0127 5.33496 20.5889 4.0498 19.7412C2.77832 18.8936 1.79395 17.7041 1.09668 16.1729C0.399414 14.6279 0.0507812 12.9258 0.0507812 11.0664C0.0507812 9.07031 0.426758 7.27246 1.17871 5.67285C1.94434 4.07324 3.02441 2.84961 4.41895 2.00195C5.81348 1.1543 7.44043 0.730469 9.2998 0.730469C12.2529 0.730469 14.5771 1.83789 16.2725 4.05273C17.9814 6.25391 18.8359 9.26172 18.8359 13.0762V14.1836C18.8359 19.9941 17.6875 24.2393 15.3906 26.9189C13.0938 29.585 9.62793 30.9521 4.99316 31.0205H4.25488V27.8213H5.05469C8.18555 27.7666 10.5918 26.9531 12.2734 25.3809C13.9551 23.7949 14.8711 21.293 15.0215 17.875ZM9.17676 17.875C10.4482 17.875 11.6172 17.4854 12.6836 16.7061C13.7637 15.9268 14.5498 14.9629 15.042 13.8145V12.2969C15.042 9.80859 14.502 7.78516 13.4219 6.22656C12.3418 4.66797 10.9746 3.88867 9.32031 3.88867C7.65234 3.88867 6.3125 4.53125 5.30078 5.81641C4.28906 7.08789 3.7832 8.76953 3.7832 10.8613C3.7832 12.8984 4.26855 14.5801 5.23926 15.9062C6.22363 17.2188 7.53613 17.875 9.17676 17.875ZM24.5371 29.0107C24.5371 28.3545 24.7285 27.8076 25.1113 27.3701C25.5078 26.9326 26.0957 26.7139 26.875 26.7139C27.6543 26.7139 28.2422 26.9326 28.6387 27.3701C29.0488 27.8076 29.2539 28.3545 29.2539 29.0107C29.2539 29.6396 29.0488 30.166 28.6387 30.5898C28.2422 31.0137 27.6543 31.2256 26.875 31.2256C26.0957 31.2256 25.5078 31.0137 25.1113 30.5898C24.7285 30.166 24.5371 29.6396 24.5371 29.0107ZM51.1562 20.9717H55.2988V24.0684H51.1562V31H47.3418V24.0684H33.7451V21.833L47.1162 1.14062H51.1562V20.9717ZM38.0518 20.9717H47.3418V6.3291L46.8906 7.14941L38.0518 20.9717ZM73.6123 1.12012V4.33984H72.915C69.9619 4.39453 67.6104 5.26953 65.8604 6.96484C64.1104 8.66016 63.0986 11.0459 62.8252 14.1221C64.3975 12.3174 66.5439 11.415 69.2646 11.415C71.8623 11.415 73.9336 12.3311 75.4785 14.1631C77.0371 15.9951 77.8164 18.3604 77.8164 21.2588C77.8164 24.335 76.9756 26.7959 75.2939 28.6416C73.626 30.4873 71.3838 31.4102 68.5674 31.4102C65.71 31.4102 63.3926 30.3164 61.6152 28.1289C59.8379 25.9277 58.9492 23.0977 58.9492 19.6387V18.1826C58.9492 12.6865 60.1182 8.48926 62.4561 5.59082C64.8076 2.67871 68.3008 1.18848 72.9355 1.12012H73.6123ZM68.6289 14.5732C67.3301 14.5732 66.1338 14.9629 65.04 15.7422C63.9463 16.5215 63.1875 17.499 62.7637 18.6748V20.0693C62.7637 22.5303 63.3174 24.5127 64.4248 26.0166C65.5322 27.5205 66.9131 28.2725 68.5674 28.2725C70.2764 28.2725 71.6162 27.6436 72.5869 26.3857C73.5713 25.1279 74.0635 23.4805 74.0635 21.4434C74.0635 19.3926 73.5645 17.7383 72.5664 16.4805C71.582 15.209 70.2695 14.5732 68.6289 14.5732Z"- fill={props.fillColor}- />- </svg>- </React.Fragment>+ <svg+ width="78"+ height="32"+ viewBox="0 0 78 32"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M15.0215 17.875C14.2285 18.8184 13.2783 19.5771 12.1709 20.1514C11.0771 20.7256 9.87402 21.0127 8.56152 21.0127C6.83887 21.0127 5.33496 20.5889 4.0498 19.7412C2.77832 18.8936 1.79395 17.7041 1.09668 16.1729C0.399414 14.6279 0.0507812 12.9258 0.0507812 11.0664C0.0507812 9.07031 0.426758 7.27246 1.17871 5.67285C1.94434 4.07324 3.02441 2.84961 4.41895 2.00195C5.81348 1.1543 7.44043 0.730469 9.2998 0.730469C12.2529 0.730469 14.5771 1.83789 16.2725 4.05273C17.9814 6.25391 18.8359 9.26172 18.8359 13.0762V14.1836C18.8359 19.9941 17.6875 24.2393 15.3906 26.9189C13.0938 29.585 9.62793 30.9521 4.99316 31.0205H4.25488V27.8213H5.05469C8.18555 27.7666 10.5918 26.9531 12.2734 25.3809C13.9551 23.7949 14.8711 21.293 15.0215 17.875ZM9.17676 17.875C10.4482 17.875 11.6172 17.4854 12.6836 16.7061C13.7637 15.9268 14.5498 14.9629 15.042 13.8145V12.2969C15.042 9.80859 14.502 7.78516 13.4219 6.22656C12.3418 4.66797 10.9746 3.88867 9.32031 3.88867C7.65234 3.88867 6.3125 4.53125 5.30078 5.81641C4.28906 7.08789 3.7832 8.76953 3.7832 10.8613C3.7832 12.8984 4.26855 14.5801 5.23926 15.9062C6.22363 17.2188 7.53613 17.875 9.17676 17.875ZM24.5371 29.0107C24.5371 28.3545 24.7285 27.8076 25.1113 27.3701C25.5078 26.9326 26.0957 26.7139 26.875 26.7139C27.6543 26.7139 28.2422 26.9326 28.6387 27.3701C29.0488 27.8076 29.2539 28.3545 29.2539 29.0107C29.2539 29.6396 29.0488 30.166 28.6387 30.5898C28.2422 31.0137 27.6543 31.2256 26.875 31.2256C26.0957 31.2256 25.5078 31.0137 25.1113 30.5898C24.7285 30.166 24.5371 29.6396 24.5371 29.0107ZM51.1562 20.9717H55.2988V24.0684H51.1562V31H47.3418V24.0684H33.7451V21.833L47.1162 1.14062H51.1562V20.9717ZM38.0518 20.9717H47.3418V6.3291L46.8906 7.14941L38.0518 20.9717ZM73.6123 1.12012V4.33984H72.915C69.9619 4.39453 67.6104 5.26953 65.8604 6.96484C64.1104 8.66016 63.0986 11.0459 62.8252 14.1221C64.3975 12.3174 66.5439 11.415 69.2646 11.415C71.8623 11.415 73.9336 12.3311 75.4785 14.1631C77.0371 15.9951 77.8164 18.3604 77.8164 21.2588C77.8164 24.335 76.9756 26.7959 75.2939 28.6416C73.626 30.4873 71.3838 31.4102 68.5674 31.4102C65.71 31.4102 63.3926 30.3164 61.6152 28.1289C59.8379 25.9277 58.9492 23.0977 58.9492 19.6387V18.1826C58.9492 12.6865 60.1182 8.48926 62.4561 5.59082C64.8076 2.67871 68.3008 1.18848 72.9355 1.12012H73.6123ZM68.6289 14.5732C67.3301 14.5732 66.1338 14.9629 65.04 15.7422C63.9463 16.5215 63.1875 17.499 62.7637 18.6748V20.0693C62.7637 22.5303 63.3174 24.5127 64.4248 26.0166C65.5322 27.5205 66.9131 28.2725 68.5674 28.2725C70.2764 28.2725 71.6162 27.6436 72.5869 26.3857C73.5713 25.1279 74.0635 23.4805 74.0635 21.4434C74.0635 19.3926 73.5645 17.7383 72.5664 16.4805C71.582 15.209 70.2695 14.5732 68.6289 14.5732Z"+ fill={props.fillColor}+ />+ </svg>);-};+}interface ValueProps {fillColor: React.CSSProperties['color'];diff --git a/frontend/src/assets/NotFound.tsx b/frontend/src/assets/NotFound.tsxindex 0313ea2571..3294076e20 100644--- a/frontend/src/assets/NotFound.tsx+++ b/frontend/src/assets/NotFound.tsx@@ -1,6 +1,6 @@import React from 'react';-const NotFound = (): JSX.Element => {+function NotFound(): JSX.Element {return (<svgwidth="360"@@ -261,6 +261,6 @@ const NotFound = (): JSX.Element => {</defs></svg>);-};+}export default NotFound;diff --git a/frontend/src/components/Editor/index.tsx b/frontend/src/components/Editor/index.tsxindex df11085a9d..790b99c9f9 100644--- a/frontend/src/components/Editor/index.tsx+++ b/frontend/src/components/Editor/index.tsx@@ -1,17 +1,17 @@import MEditor from '@monaco-editor/react';import React from 'react';-const Editor = ({ value }: EditorProps): JSX.Element => {+function Editor({ value }: EditorProps): JSX.Element {return (<MEditortheme="vs-dark"defaultLanguage="yaml"value={value.current}options={{ fontSize: 16, automaticLayout: true }}- height={'40vh'}+ height="40vh"/>);-};+}interface EditorProps {value: React.MutableRefObject<string>;diff --git a/frontend/src/components/Graph/Plugin/Legend.ts b/frontend/src/components/Graph/Plugin/Legend.tsindex a2fc684f30..2f03db40ac 100644--- a/frontend/src/components/Graph/Plugin/Legend.ts+++ b/frontend/src/components/Graph/Plugin/Legend.ts@@ -68,7 +68,7 @@ export const legend = (id: string, isLonger: boolean): Plugin<ChartType> => {const boxSpan = document.createElement('span');boxSpan.style.background = item.strokeStyle || colors[0];boxSpan.style.borderColor = item?.strokeStyle;- boxSpan.style.borderWidth = item.lineWidth + 'px';+ boxSpan.style.borderWidth = `${item.lineWidth}px`;boxSpan.style.display = 'inline-block';boxSpan.style.minHeight = '20px';boxSpan.style.marginRight = '10px';diff --git a/frontend/src/components/Graph/index.tsx b/frontend/src/components/Graph/index.tsxindex f24be5bd65..703b77c3d5 100644--- a/frontend/src/components/Graph/index.tsx+++ b/frontend/src/components/Graph/index.tsx@@ -27,6 +27,8 @@ import { useSelector } from 'react-redux';import { AppState } from 'store/reducers';import AppReducer from 'types/reducer/app';+import { legend } from './Plugin';+import { LegendsContainer } from './styles';import { useXAxisTimeUnit } from './xAxisConfig';import { getYAxisFormattedValue } from './yAxisConfig';@@ -47,10 +49,8 @@ Chart.register(BarController,BarElement,);-import { legend } from './Plugin';-import { LegendsContainer } from './styles';-const Graph = ({+function Graph({data,type,title,@@ -58,7 +58,7 @@ const Graph = ({onClickHandler,name,yAxisUnit = 'short',-}: GraphProps): JSX.Element => {+}: GraphProps): JSX.Element {const { isDarkMode } = useSelector<AppState, AppReducer>((state) => state.app);const chartRef = useRef<HTMLCanvasElement>(null);const currentTheme = isDarkMode ? 'dark' : 'light';@@ -94,7 +94,7 @@ const Graph = ({},plugins: {title: {- display: title === undefined ? false : true,+ display: title !== undefined,text: title,},legend: {@@ -137,7 +137,7 @@ const Graph = ({},ticks: {// Include a dollar sign in the ticks- callback: function (value, index, ticks) {+ callback(value, index, ticks) {return getYAxisFormattedValue(value, yAxisUnit);},},@@ -160,8 +160,8 @@ const Graph = ({};lineChartRef.current = new Chart(chartRef.current, {- type: type,- data: data,+ type,+ data,options,plugins: [legend(name, data.datasets.length > 3)],});@@ -178,7 +178,7 @@ const Graph = ({<LegendsContainer id={name} /></div>);-};+}interface GraphProps {type: ChartType;diff --git a/frontend/src/components/Graph/xAxisConfig.ts b/frontend/src/components/Graph/xAxisConfig.tsindex ae99a49a23..6b2dbeb1ea 100644--- a/frontend/src/components/Graph/xAxisConfig.ts+++ b/frontend/src/components/Graph/xAxisConfig.ts@@ -104,12 +104,11 @@ export const useXAxisTimeUnit = (data: Chart['data']): IAxisTimeConfig => {minTime: localTime.minTime,maxTime: localTime.maxTime,};- } else {- return {- minTime: globalTime.minTime / 1e6,- maxTime: globalTime.maxTime / 1e6,- };}+ return {+ minTime: globalTime.minTime / 1e6,+ maxTime: globalTime.maxTime / 1e6,+ };}, [globalTime, localTime]);return convertTimeRange(minTime, maxTime);diff --git a/frontend/src/components/Input/index.tsx b/frontend/src/components/Input/index.tsxindex 939d59455f..210c8b8bfe 100644--- a/frontend/src/components/Input/index.tsx+++ b/frontend/src/components/Input/index.tsx@@ -1,7 +1,7 @@import { Form, Input, InputProps } from 'antd';import React from 'react';-const InputComponent = ({+function InputComponent({value,type = 'text',onChangeHandler,@@ -14,22 +14,24 @@ const InputComponent = ({labelOnTop,addonBefore,...props-}: InputComponentProps): JSX.Element => (- <Form.Item labelCol={{ span: labelOnTop ? 24 : 4 }} label={label}>- <Input- placeholder={placeholder}- type={type}- onChange={onChangeHandler}- value={value}- ref={ref}- size={size}- addonBefore={addonBefore}- onBlur={onBlurHandler}- onPressEnter={onPressEnterHandler}- {...props}- />- </Form.Item>-);+}: InputComponentProps): JSX.Element {+ return (+ <Form.Item labelCol={{ span: labelOnTop ? 24 : 4 }} label={label}>+ <Input+ placeholder={placeholder}+ type={type}+ onChange={onChangeHandler}+ value={value}+ ref={ref}+ size={size}+ addonBefore={addonBefore}+ onBlur={onBlurHandler}+ onPressEnter={onPressEnterHandler}+ {...props}+ />+ </Form.Item>+ );+}interface InputComponentProps extends InputProps {value: InputProps['value'];diff --git a/frontend/src/components/Modal.tsx b/frontend/src/components/Modal.tsxindex 8d7df61d78..9ab4761896 100644--- a/frontend/src/components/Modal.tsx+++ b/frontend/src/components/Modal.tsx@@ -1,26 +1,24 @@import { Modal, ModalProps as Props } from 'antd';import React, { ReactElement } from 'react';-const CustomModal = ({+function CustomModal({title,children,isModalVisible,footer,closable = true,-}: ModalProps): JSX.Element => {+}: ModalProps): JSX.Element {return (- <>- <Modal- title={title}- visible={isModalVisible}- footer={footer}- closable={closable}- >- {children}- </Modal>- </>+ <Modal+ title={title}+ visible={isModalVisible}+ footer={footer}+ closable={closable}+ >+ {children}+ </Modal>);-};+}interface ModalProps {isModalVisible: boolean;diff --git a/frontend/src/components/NotFound/index.tsx b/frontend/src/components/NotFound/index.tsxindex 1618484b24..85be7276b8 100644--- a/frontend/src/components/NotFound/index.tsx+++ b/frontend/src/components/NotFound/index.tsx@@ -4,7 +4,7 @@ import React from 'react';import { Button, Container, Text, TextContainer } from './styles';-const NotFound = (): JSX.Element => {+function NotFound(): JSX.Element {return (<Container><NotFoundImage />@@ -19,6 +19,6 @@ const NotFound = (): JSX.Element => {</Button></Container>);-};+}export default NotFound;diff --git a/frontend/src/components/RouteTab/index.tsx b/frontend/src/components/RouteTab/index.tsxindex 2ed51b65b8..4d6f42d6d9 100644--- a/frontend/src/components/RouteTab/index.tsx+++ b/frontend/src/components/RouteTab/index.tsx@@ -1,15 +1,15 @@import { Tabs, TabsProps } from 'antd';+import history from 'lib/history';import React from 'react';const { TabPane } = Tabs;-import history from 'lib/history';-const RouteTab = ({+function RouteTab({routes,activeKey,onChangeHandler,...rest-}: RouteTabProps & TabsProps): JSX.Element => {+}: RouteTabProps & TabsProps): JSX.Element {const onChange = (activeRoute: string) => {onChangeHandler && onChangeHandler();@@ -36,7 +36,7 @@ const RouteTab = ({)}</Tabs>);-};+}interface RouteTabProps {routes: {diff --git a/frontend/src/components/Spinner/index.tsx b/frontend/src/components/Spinner/index.tsxindex affb7712d4..622e8e2d43 100644--- a/frontend/src/components/Spinner/index.tsx+++ b/frontend/src/components/Spinner/index.tsx@@ -4,11 +4,13 @@ import React from 'react';import { SpinerStyle } from './styles';-const Spinner = ({ size, tip, height }: SpinnerProps): JSX.Element => (- <SpinerStyle height={height}>- <Spin spinning size={size} tip={tip} indicator={<LoadingOutlined spin />} />- </SpinerStyle>-);+function Spinner({ size, tip, height }: SpinnerProps): JSX.Element {+ return (+ <SpinerStyle height={height}>+ <Spin spinning size={size} tip={tip} indicator={<LoadingOutlined spin />} />+ </SpinerStyle>+ );+}interface SpinnerProps {size?: SpinProps['size'];diff --git a/frontend/src/components/Styled/index.ts b/frontend/src/components/Styled/index.tsindex bff30f653e..317a0f660e 100644--- a/frontend/src/components/Styled/index.ts+++ b/frontend/src/components/Styled/index.ts@@ -2,9 +2,7 @@ import * as AntD from 'antd';import { TextProps } from 'antd/lib/typography/Text';import { TitleProps } from 'antd/lib/typography/Title';import React from 'react';-import styled, {- FlattenSimpleInterpolation,-} from 'styled-components';+import styled, { FlattenSimpleInterpolation } from 'styled-components';import { IStyledClass } from './types';diff --git a/frontend/src/components/TextToolTip/index.tsx b/frontend/src/components/TextToolTip/index.tsxindex 470e61a642..25edbf9b00 100644--- a/frontend/src/components/TextToolTip/index.tsx+++ b/frontend/src/components/TextToolTip/index.tsx@@ -2,22 +2,24 @@ import { QuestionCircleFilled } from '@ant-design/icons';import { Tooltip } from 'antd';import React from 'react';-const TextToolTip = ({ text, url }: TextToolTipProps) => (- <Tooltip- overlay={() => {- return (- <div>- {`${text} `}- <a href={url} rel="noopener noreferrer" target={'_blank'}>- here- </a>- </div>- );- }}- >- <QuestionCircleFilled style={{ fontSize: '1.3125rem' }} />- </Tooltip>-);+function TextToolTip({ text, url }: TextToolTipProps) {+ return (+ <Tooltip+ overlay={() => {+ return (+ <div>+ {`${text} `}+ <a href={url} rel="noopener noreferrer" target="_blank">+ here+ </a>+ </div>+ );+ }}+ >+ <QuestionCircleFilled style={{ fontSize: '1.3125rem' }} />+ </Tooltip>+ );+}interface TextToolTipProps {url: string;diff --git a/frontend/src/components/TimePreferenceDropDown/index.tsx b/frontend/src/components/TimePreferenceDropDown/index.tsxindex 02b75c1e2b..497ae9e616 100644--- a/frontend/src/components/TimePreferenceDropDown/index.tsx+++ b/frontend/src/components/TimePreferenceDropDown/index.tsx@@ -7,10 +7,10 @@ import React, { useCallback } from 'react';import { TextContainer } from './styles';-const TimePreference = ({+function TimePreference({setSelectedTime,selectedTime,-}: TimePreferenceDropDownProps): JSX.Element => {+}: TimePreferenceDropDownProps): JSX.Element {const timeMenuItemOnChangeHandler = useCallback((event: TimeMenuItemOnChangeHandlerEvent) => {const selectedTime = timeItems.find((e) => e.enum === event.key);@@ -38,7 +38,7 @@ const TimePreference = ({</Dropdown></TextContainer>);-};+}interface TimeMenuItemOnChangeHandlerEvent {key: timePreferenceType | string;diff --git a/frontend/src/components/ValueGraph/index.tsx b/frontend/src/components/ValueGraph/index.tsxindex c25fd60e15..c5de1785c6 100644--- a/frontend/src/components/ValueGraph/index.tsx+++ b/frontend/src/components/ValueGraph/index.tsx@@ -2,9 +2,9 @@ import React from 'react';import { Value } from './styles';-const ValueGraph = ({ value }: ValueGraphProps): JSX.Element => (- <Value>{value}</Value>-);+function ValueGraph({ value }: ValueGraphProps): JSX.Element {+ return <Value>{value}</Value>;+}interface ValueGraphProps {value: string;diff --git a/frontend/src/container/AllAlertChannels/AlertChannels.tsx b/frontend/src/container/AllAlertChannels/AlertChannels.tsxindex c83bb1f9fa..e88ed0276d 100644--- a/frontend/src/container/AllAlertChannels/AlertChannels.tsx+++ b/frontend/src/container/AllAlertChannels/AlertChannels.tsx@@ -9,7 +9,7 @@ import { Channels, PayloadProps } from 'types/api/channels/getAll';import Delete from './Delete';-const AlertChannels = ({ allChannels }: AlertChannelsProps): JSX.Element => {+function AlertChannels({ allChannels }: AlertChannelsProps): JSX.Element {const [notifications, Element] = notification.useNotification();const [channels, setChannels] = useState<Channels[]>(allChannels);@@ -55,7 +55,7 @@ const AlertChannels = ({ allChannels }: AlertChannelsProps): JSX.Element => {<Table rowKey="id" dataSource={channels} columns={columns} /></>);-};+}interface AlertChannelsProps {allChannels: PayloadProps;diff --git a/frontend/src/container/AllAlertChannels/Delete.tsx b/frontend/src/container/AllAlertChannels/Delete.tsxindex 2b08892ff8..6f767d8bd1 100644--- a/frontend/src/container/AllAlertChannels/Delete.tsx+++ b/frontend/src/container/AllAlertChannels/Delete.tsx@@ -4,11 +4,7 @@ import deleteAlert from 'api/channels/delete';import React, { useState } from 'react';import { Channels } from 'types/api/channels/getAll';-const Delete = ({- notifications,- setChannels,- id,-}: DeleteProps): JSX.Element => {+function Delete({ notifications, setChannels, id }: DeleteProps): JSX.Element {const [loading, setLoading] = useState(false);const onClickHandler = async (): Promise<void> => {@@ -50,7 +46,7 @@ const Delete = ({Delete</Button>);-};+}interface DeleteProps {notifications: NotificationInstance;diff --git a/frontend/src/container/AllAlertChannels/index.tsx b/frontend/src/container/AllAlertChannels/index.tsxindex ca40c78254..4aeaba3354 100644--- a/frontend/src/container/AllAlertChannels/index.tsx+++ b/frontend/src/container/AllAlertChannels/index.tsx@@ -7,12 +7,13 @@ import ROUTES from 'constants/routes';import useFetch from 'hooks/useFetch';import history from 'lib/history';import React, { useCallback } from 'react';-const { Paragraph } = Typography;import AlertChannlesComponent from './AlertChannels';import { Button, ButtonContainer } from './styles';-const AlertChannels = (): JSX.Element => {+const { Paragraph } = Typography;++function AlertChannels(): JSX.Element {const onToggleHandler = useCallback(() => {history.push(ROUTES.CHANNELS_NEW);}, []);@@ -24,7 +25,7 @@ const AlertChannels = (): JSX.Element => {}if (loading || payload === undefined) {- return <Spinner tip="Loading Channels.." height={'90vh'} />;+ return <Spinner tip="Loading Channels.." height="90vh" />;}return (@@ -36,7 +37,7 @@ const AlertChannels = (): JSX.Element => {<div><TextToolTip- text={`More details on how to setting notification channels`}+ text="More details on how to setting notification channels"url="https://signoz.io/docs/userguide/alerts-management/#setting-notification-channel"/>@@ -49,6 +50,6 @@ const AlertChannels = (): JSX.Element => {<AlertChannlesComponent allChannels={payload} /></>);-};+}export default AlertChannels;diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsxindex 5e0163b355..09a431e2d8 100644--- a/frontend/src/container/AppLayout/index.tsx+++ b/frontend/src/container/AppLayout/index.tsx@@ -20,10 +20,8 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {if (!isLoggedIn) {setIsSignUpPage(true);history.push(ROUTES.SIGN_UP);- } else {- if (isSignUpPage) {- setIsSignUpPage(false);- }+ } else if (isSignUpPage) {+ setIsSignUpPage(false);}}, [isLoggedIn, isSignUpPage]);diff --git a/frontend/src/container/CreateAlertChannels/index.tsx b/frontend/src/container/CreateAlertChannels/index.tsxindex a317d934a8..416f9e4cc4 100644--- a/frontend/src/container/CreateAlertChannels/index.tsx+++ b/frontend/src/container/CreateAlertChannels/index.tsx@@ -7,9 +7,9 @@ import React, { useCallback, useState } from 'react';import { ChannelType, SlackChannel } from './config';-const CreateAlertChannels = ({+function CreateAlertChannels({preType = 'slack',-}: CreateAlertChannelsProps): JSX.Element => {+}: CreateAlertChannelsProps): JSX.Element {const [formInstance] = Form.useForm();const [selectedConfig, setSelectedConfig] = useState<Partial<SlackChannel>>({text: ` {{ range .Alerts -}}@@ -87,27 +87,25 @@ const CreateAlertChannels = ({);return (- <>- <FormAlertChannels- {...{- formInstance,- onTypeChangeHandler,- setSelectedConfig,+ <FormAlertChannels+ {...{+ formInstance,+ onTypeChangeHandler,+ setSelectedConfig,+ type,+ onTestHandler,+ onSaveHandler,+ savingState,+ NotificationElement,+ title: 'New Notification Channels',+ initialValue: {type,- onTestHandler,- onSaveHandler,- savingState,- NotificationElement,- title: 'New Notification Channels',- initialValue: {- type: type,- ...selectedConfig,- },- }}- />- </>+ ...selectedConfig,+ },+ }}+ />);-};+}interface CreateAlertChannelsProps {preType?: ChannelType;diff --git a/frontend/src/container/EditAlertChannels/index.tsx b/frontend/src/container/EditAlertChannels/index.tsxindex 033b861a4a..dfe46f4971 100644--- a/frontend/src/container/EditAlertChannels/index.tsx+++ b/frontend/src/container/EditAlertChannels/index.tsx@@ -11,9 +11,9 @@ import { Store } from 'rc-field-form/lib/interface';import React, { useCallback, useState } from 'react';import { useParams } from 'react-router';-const EditAlertChannels = ({+function EditAlertChannels({initialValue,-}: EditAlertChannelsProps): JSX.Element => {+}: EditAlertChannelsProps): JSX.Element {const [formInstance] = Form.useForm();const [selectedConfig, setSelectedConfig] = useState<Partial<SlackChannel>>({...initialValue,@@ -72,25 +72,23 @@ const EditAlertChannels = ({}, []);return (- <>- <FormAlertChannels- {...{- formInstance,- onTypeChangeHandler,- setSelectedConfig,- type,- onTestHandler,- onSaveHandler,- savingState,- NotificationElement,- title: 'Edit Notification Channels',- initialValue,- nameDisable: true,- }}- />- </>+ <FormAlertChannels+ {...{+ formInstance,+ onTypeChangeHandler,+ setSelectedConfig,+ type,+ onTestHandler,+ onSaveHandler,+ savingState,+ NotificationElement,+ title: 'Edit Notification Channels',+ initialValue,+ nameDisable: true,+ }}+ />);-};+}interface EditAlertChannelsProps {initialValue: Store;diff --git a/frontend/src/container/EditRules/index.tsx b/frontend/src/container/EditRules/index.tsxindex 78eb4438a8..342fd5c494 100644--- a/frontend/src/container/EditRules/index.tsx+++ b/frontend/src/container/EditRules/index.tsx@@ -1,6 +1,5 @@import { SaveFilled } from '@ant-design/icons';-import { Button } from 'antd';-import { notification } from 'antd';+import { Button, notification } from 'antd';import put from 'api/alerts/put';import Editor from 'components/Editor';import ROUTES from 'constants/routes';@@ -12,7 +11,7 @@ import { PayloadProps as PutPayloadProps } from 'types/api/alerts/put';import { ButtonContainer } from './styles';-const EditRules = ({ initialData, ruleId }: EditRulesProps): JSX.Element => {+function EditRules({ initialData, ruleId }: EditRulesProps): JSX.Element {const value = useRef<string>(initialData);const [notifications, Element] = notification.useNotification();const [editButtonState, setEditButtonState] = useState<State<PutPayloadProps>>(@@ -93,7 +92,7 @@ const EditRules = ({ initialData, ruleId }: EditRulesProps): JSX.Element => {</ButtonContainer></>);-};+}interface EditRulesProps {initialData: PayloadProps['data'];diff --git a/frontend/src/container/FormAlertChannels/Settings/Slack.tsx b/frontend/src/container/FormAlertChannels/Settings/Slack.tsxindex bd16bd0fcd..738546c58e 100644--- a/frontend/src/container/FormAlertChannels/Settings/Slack.tsx+++ b/frontend/src/container/FormAlertChannels/Settings/Slack.tsx@@ -6,62 +6,62 @@ import { SlackChannel } from '../../CreateAlertChannels/config';const { TextArea } = Input;-const Slack = ({ setSelectedConfig }: SlackProps): JSX.Element => (- <>- <FormItem name="api_url" label="Webhook URL">- <Input- onChange={(event): void => {- setSelectedConfig((value) => ({- ...value,- api_url: event.target.value,- }));- }}- />- </FormItem>+function Slack({ setSelectedConfig }: SlackProps): JSX.Element {+ return (+ <>+ <FormItem name="api_url" label="Webhook URL">+ <Input+ onChange={(event): void => {+ setSelectedConfig((value) => ({+ ...value,+ api_url: event.target.value,+ }));+ }}+ />+ </FormItem>- <FormItem- name="channel"- help={- 'Specify channel or user, use #channel-name, @username (has to be all lowercase, no whitespace),'- }- label="Recipient"- >- <Input- onChange={(event): void =>- setSelectedConfig((value) => ({- ...value,- channel: event.target.value,- }))- }- />- </FormItem>+ <FormItem+ name="channel"+ help="Specify channel or user, use #channel-name, @username (has to be all lowercase, no whitespace),"+ label="Recipient"+ >+ <Input+ onChange={(event): void =>+ setSelectedConfig((value) => ({+ ...value,+ channel: event.target.value,+ }))+ }+ />+ </FormItem>- <FormItem name="title" label="Title">- <TextArea- rows={4}- // value={`[{{ .Status | toUpper }}{{ if eq .Status \"firing\" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}\n{{- if gt (len .CommonLabels) (len .GroupLabels) -}}\n{{\" \"}}(\n{{- with .CommonLabels.Remove .GroupLabels.Names }}\n {{- range $index, $label := .SortedPairs -}}\n {{ if $index }}, {{ end }}\n {{- $label.Name }}=\"{{ $label.Value -}}\"\n {{- end }}\n{{- end -}}\n)\n{{- end }}`}- onChange={(event): void =>- setSelectedConfig((value) => ({- ...value,- title: event.target.value,- }))- }- />- </FormItem>+ <FormItem name="title" label="Title">+ <TextArea+ rows={4}+ // value={`[{{ .Status | toUpper }}{{ if eq .Status \"firing\" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}\n{{- if gt (len .CommonLabels) (len .GroupLabels) -}}\n{{\" \"}}(\n{{- with .CommonLabels.Remove .GroupLabels.Names }}\n {{- range $index, $label := .SortedPairs -}}\n {{ if $index }}, {{ end }}\n {{- $label.Name }}=\"{{ $label.Value -}}\"\n {{- end }}\n{{- end -}}\n)\n{{- end }}`}+ onChange={(event): void =>+ setSelectedConfig((value) => ({+ ...value,+ title: event.target.value,+ }))+ }+ />+ </FormItem>- <FormItem name="text" label="Description">- <TextArea- onChange={(event): void =>- setSelectedConfig((value) => ({- ...value,- text: event.target.value,- }))- }- placeholder="description"- />- </FormItem>- </>-);+ <FormItem name="text" label="Description">+ <TextArea+ onChange={(event): void =>+ setSelectedConfig((value) => ({+ ...value,+ text: event.target.value,+ }))+ }+ placeholder="description"+ />+ </FormItem>+ </>+ );+}interface SlackProps {setSelectedConfig: React.Dispatch<React.SetStateAction<Partial<SlackChannel>>>;diff --git a/frontend/src/container/FormAlertChannels/index.tsx b/frontend/src/container/FormAlertChannels/index.tsxindex a4f71e8e7e..9db1261c42 100644--- a/frontend/src/container/FormAlertChannels/index.tsx+++ b/frontend/src/container/FormAlertChannels/index.tsx@@ -1,20 +1,21 @@import { Form, FormInstance, Input, Select, Typography } from 'antd';import FormItem from 'antd/lib/form/FormItem';+import ROUTES from 'constants/routes';import {ChannelType,SlackChannel,} from 'container/CreateAlertChannels/config';-import React from 'react';-const { Option } = Select;-const { Title } = Typography;-import ROUTES from 'constants/routes';import history from 'lib/history';import { Store } from 'rc-field-form/lib/interface';+import React from 'react';import SlackSettings from './Settings/Slack';import { Button } from './styles';-const FormAlertChannels = ({+const { Option } = Select;+const { Title } = Typography;++function FormAlertChannels({formInstance,type,setSelectedConfig,@@ -26,7 +27,7 @@ const FormAlertChannels = ({title,initialValue,nameDisable = false,-}: FormAlertChannelsProps): JSX.Element => {+}: FormAlertChannelsProps): JSX.Element {return (<>{NotificationElement}@@ -81,7 +82,7 @@ const FormAlertChannels = ({</Form></>);-};+}interface FormAlertChannelsProps {formInstance: FormInstance;diff --git a/frontend/src/container/GantChart/SpanLength/index.tsx b/frontend/src/container/GantChart/SpanLength/index.tsxindex 890577f379..b34784cc51 100644--- a/frontend/src/container/GantChart/SpanLength/index.tsx+++ b/frontend/src/container/GantChart/SpanLength/index.tsx@@ -8,6 +8,7 @@ import React from 'react';import { toFixed } from 'utils/toFixed';import { SpanBorder, SpanLine, SpanText, SpanWrapper } from './styles';+interface SpanLengthProps {width: string;leftOffset: string;@@ -18,7 +19,7 @@ interface SpanLengthProps {intervalUnit: IIntervalUnit;}-const SpanLength = (props: SpanLengthProps): JSX.Element => {+function SpanLength(props: SpanLengthProps): JSX.Element {const { width, leftOffset, bgColor, intervalUnit } = props;const { isDarkMode } = useThemeMode();return (@@ -31,6 +32,6 @@ const SpanLength = (props: SpanLengthProps): JSX.Element => {)} ${intervalUnit.name}`}</SpanText></SpanWrapper>);-};+}export default SpanLength;diff --git a/frontend/src/container/GantChart/SpanName/index.tsx b/frontend/src/container/GantChart/SpanName/index.tsxindex 13e220554a..f9496c12b1 100644--- a/frontend/src/container/GantChart/SpanName/index.tsx+++ b/frontend/src/container/GantChart/SpanName/index.tsx@@ -9,10 +9,10 @@ import {SpanWrapper,} from './styles';-const SpanNameComponent = ({+function SpanNameComponent({name,serviceName,-}: SpanNameComponent): JSX.Element => {+}: SpanNameComponent): JSX.Element {return (<Container title={`${name} ${serviceName}`}><SpanWrapper>@@ -21,7 +21,7 @@ const SpanNameComponent = ({</SpanWrapper></Container>);-};+}interface SpanNameComponent {name: string;diff --git a/frontend/src/container/GantChart/Trace/index.tsx b/frontend/src/container/GantChart/Trace/index.tsxindex 1feecac85b..06f356677f 100644--- a/frontend/src/container/GantChart/Trace/index.tsx+++ b/frontend/src/container/GantChart/Trace/index.tsx@@ -20,7 +20,7 @@ import {Wrapper,} from './styles';-const Trace = (props: TraceProps): JSX.Element => {+function Trace(props: TraceProps): JSX.Element {const {name,activeHoverId,@@ -108,74 +108,72 @@ const Trace = (props: TraceProps): JSX.Element => {const panelWidth = SPAN_DETAILS_LEFT_COL_WIDTH - level * (16 + 1) - 48;return (- <>- <Wrapper- onMouseEnter={onMouseEnterHandler}- onMouseLeave={onMouseLeaveHandler}- isOnlyChild={isOnlyChild}- ref={ref}- >- <HoverCard- top={top}- isHovered={activeHoverId === id}- isSelected={activeSelectedId === id}- isDarkMode={isDarkMode}- />-- <CardContainer onClick={onClick}>- <StyledCol flex={`${panelWidth}px`} styledclass={[styles.overFlowHidden]}>- <StyledRow styledclass={[styles.flexNoWrap]}>- <Col>- {totalSpans !== 1 && (- <CardComponent isDarkMode={isDarkMode} onClick={onClickTreeExpansion}>- {totalSpans}- <CaretContainer>- {isOpen ? <CaretDownFilled /> : <CaretRightFilled />}- </CaretContainer>- </CardComponent>- )}- </Col>- <Col>- <SpanName name={name} serviceName={serviceName} />- </Col>- </StyledRow>- </StyledCol>- <Col flex={'1'}>- <SpanLength- leftOffset={nodeLeftOffset.toString()}- width={width.toString()}- bgColor={serviceColour}- id={id}- inMsCount={inMsCount / 1e6}+ <Wrapper+ onMouseEnter={onMouseEnterHandler}+ onMouseLeave={onMouseLeaveHandler}+ isOnlyChild={isOnlyChild}+ ref={ref}+ >+ <HoverCard+ top={top}+ isHovered={activeHoverId === id}+ isSelected={activeSelectedId === id}+ isDarkMode={isDarkMode}+ />++ <CardContainer onClick={onClick}>+ <StyledCol flex={`${panelWidth}px`} styledclass={[styles.overFlowHidden]}>+ <StyledRow styledclass={[styles.flexNoWrap]}>+ <Col>+ {totalSpans !== 1 && (+ <CardComponent isDarkMode={isDarkMode} onClick={onClickTreeExpansion}>+ {totalSpans}+ <CaretContainer>+ {isOpen ? <CaretDownFilled /> : <CaretRightFilled />}+ </CaretContainer>+ </CardComponent>+ )}+ </Col>+ <Col>+ <SpanName name={name} serviceName={serviceName} />+ </Col>+ </StyledRow>+ </StyledCol>+ <Col flex="1">+ <SpanLength+ leftOffset={nodeLeftOffset.toString()}+ width={width.toString()}+ bgColor={serviceColour}+ id={id}+ inMsCount={inMsCount / 1e6}+ intervalUnit={intervalUnit}+ />+ </Col>+ </CardContainer>++ {isOpen && (+ <>+ {props.children.map((child) => (+ <Trace+ key={child.id}+ activeHoverId={props.activeHoverId}+ setActiveHoverId={props.setActiveHoverId}+ {...child}+ globalSpread={globalSpread}+ globalStart={globalStart}+ setActiveSelectedId={setActiveSelectedId}+ activeSelectedId={activeSelectedId}+ level={level + 1}+ activeSpanPath={activeSpanPath}+ isExpandAll={isExpandAll}intervalUnit={intervalUnit}/>- </Col>- </CardContainer>-- {isOpen && (- <>- {props.children.map((child) => (- <Trace- key={child.id}- activeHoverId={props.activeHoverId}- setActiveHoverId={props.setActiveHoverId}- {...child}- globalSpread={globalSpread}- globalStart={globalStart}- setActiveSelectedId={setActiveSelectedId}- activeSelectedId={activeSelectedId}- level={level + 1}- activeSpanPath={activeSpanPath}- isExpandAll={isExpandAll}- intervalUnit={intervalUnit}- />- ))}- </>- )}- </Wrapper>- </>+ ))}+ </>+ )}+ </Wrapper>);-};+}interface ITraceGlobal {globalSpread: ITraceMetaData['spread'];diff --git a/frontend/src/container/GantChart/index.tsx b/frontend/src/container/GantChart/index.tsxindex 575f22d7a5..32cd54c3d2 100644--- a/frontend/src/container/GantChart/index.tsx+++ b/frontend/src/container/GantChart/index.tsx@@ -7,7 +7,7 @@ import { CardContainer, CardWrapper, CollapseButton, Wrapper } from './styles';import Trace from './Trace';import { getSpanPath } from './utils';-const GanttChart = (props: GanttChartProps): JSX.Element => {+function GanttChart(props: GanttChartProps): JSX.Element {const {data,traceMetaData,@@ -36,38 +36,36 @@ const GanttChart = (props: GanttChartProps): JSX.Element => {setIsExpandAll((prev) => !prev);};return (- <>- <Wrapper>- <CardContainer>- <CollapseButton- onClick={handleCollapse}- title={isExpandAll ? 'Collapse All' : 'Expand All'}- >- {isExpandAll ? <MinusSquareOutlined /> : <PlusSquareOutlined />}- </CollapseButton>- <CardWrapper>- <Trace- activeHoverId={activeHoverId}- activeSpanPath={activeSpanPath}- setActiveHoverId={setActiveHoverId}- key={data.id}- {...{- ...data,- globalSpread,- globalStart,- setActiveSelectedId,- activeSelectedId,- }}- level={0}- isExpandAll={isExpandAll}- intervalUnit={intervalUnit}- />- </CardWrapper>- </CardContainer>- </Wrapper>- </>+ <Wrapper>+ <CardContainer>+ <CollapseButton+ onClick={handleCollapse}+ title={isExpandAll ? 'Collapse All' : 'Expand All'}+ >+ {isExpandAll ? <MinusSquareOutlined /> : <PlusSquareOutlined />}+ </CollapseButton>+ <CardWrapper>+ <Trace+ activeHoverId={activeHoverId}+ activeSpanPath={activeSpanPath}+ setActiveHoverId={setActiveHoverId}+ key={data.id}+ {...{+ ...data,+ globalSpread,+ globalStart,+ setActiveSelectedId,+ activeSelectedId,+ }}+ level={0}+ isExpandAll={isExpandAll}+ intervalUnit={intervalUnit}+ />+ </CardWrapper>+ </CardContainer>+ </Wrapper>);-};+}export interface ITraceMetaData {globalEnd: number;diff --git a/frontend/src/container/GantChart/utils.ts b/frontend/src/container/GantChart/utils.tsindex 7fe4b2b1e9..c5aa327844 100644--- a/frontend/src/container/GantChart/utils.ts+++ b/frontend/src/container/GantChart/utils.ts@@ -11,7 +11,7 @@ export const getMetaDataFromSpanTree = (treeData: ITraceTree) => {}totalSpans++;levels = Math.max(levels, level);- const startTime = treeNode.startTime;+ const { startTime } = treeNode;const endTime = startTime + treeNode.value;globalStart = Math.min(globalStart, startTime);globalEnd = Math.max(globalEnd, endTime);@@ -22,8 +22,8 @@ export const getMetaDataFromSpanTree = (treeData: ITraceTree) => {};traverse(treeData, 1);- globalStart = globalStart * 1e6;- globalEnd = globalEnd * 1e6;+ globalStart *= 1e6;+ globalEnd *= 1e6;return {globalStart,@@ -37,7 +37,7 @@ export const getMetaDataFromSpanTree = (treeData: ITraceTree) => {export function getTopLeftFromBody(elem: HTMLElement) {const box = elem.getBoundingClientRect();- const body = document.body;+ const { body } = document;const docEl = document.documentElement;const scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;@@ -56,7 +56,7 @@ export const getNodeById = (searchingId: string,treeData: ITraceTree,): ITraceTree | undefined => {- let foundNode: ITraceTree | undefined = undefined;+ let foundNode: ITraceTree | undefined;const traverse = (treeNode: ITraceTree, level = 0) => {if (!treeNode) {return;diff --git a/frontend/src/container/GeneralSettings/Retention.tsx b/frontend/src/container/GeneralSettings/Retention.tsxindex 5f711e8cd4..93892b8251 100644--- a/frontend/src/container/GeneralSettings/Retention.tsx+++ b/frontend/src/container/GeneralSettings/Retention.tsx@@ -12,13 +12,13 @@ import {Typography,} from './styles';-const Retention = ({+function Retention({retentionValue,setRentionValue,selectedRetentionPeroid,setSelectedRetentionPeroid,text,-}: RetentionProps): JSX.Element => {+}: RetentionProps): JSX.Element {const options: Option[] = [{key: 'hr',@@ -58,7 +58,7 @@ const Retention = ({e: React.ChangeEvent<HTMLInputElement>,func: React.Dispatch<React.SetStateAction<string>>,): void => {- const value = e.target.value;+ const { value } = e.target;const integerValue = parseInt(value, 10);if (value.length > 0 && integerValue.toString() === value) {@@ -89,7 +89,7 @@ const Retention = ({</Dropdown></RetentionContainer>);-};+}interface Option {key: SettingPeroid;diff --git a/frontend/src/container/GeneralSettings/index.tsx b/frontend/src/container/GeneralSettings/index.tsxindex 5a9311adae..fa68fced4d 100644--- a/frontend/src/container/GeneralSettings/index.tsx+++ b/frontend/src/container/GeneralSettings/index.tsx@@ -18,7 +18,7 @@ import {ToolTipContainer,} from './styles';-const GeneralSettings = (): JSX.Element => {+function GeneralSettings(): JSX.Element {const [selectedMetricsPeroid,setSelectedMetricsPeroid,@@ -207,7 +207,7 @@ const GeneralSettings = (): JSX.Element => {)}<Retention- text={'Retention Period for Metrics'}+ text="Retention Period for Metrics"selectedRetentionPeroid={selectedMetricsPeroid}setRentionValue={setRetentionPeroidMetrics}retentionValue={retentionPeroidMetrics}@@ -215,7 +215,7 @@ const GeneralSettings = (): JSX.Element => {/><Retention- text={'Retention Period for Traces'}+ text="Retention Period for Traces"selectedRetentionPeroid={selectedTracePeroid}setRentionValue={setRetentionPeroidTrace}retentionValue={retentionPeroidTrace}@@ -250,7 +250,7 @@ const GeneralSettings = (): JSX.Element => {</ButtonContainer></Container>);-};+}export type SettingPeroid = 'hr' | 'day' | 'month';diff --git a/frontend/src/container/GridGraphComponent/index.tsx b/frontend/src/container/GridGraphComponent/index.tsxindex 97593f2483..7c1572fae1 100644--- a/frontend/src/container/GridGraphComponent/index.tsx+++ b/frontend/src/container/GridGraphComponent/index.tsx@@ -8,7 +8,7 @@ import React from 'react';import { TitleContainer, ValueContainer } from './styles';-const GridGraphComponent = ({+function GridGraphComponent({GRAPH_TYPES,data,title,@@ -17,7 +17,7 @@ const GridGraphComponent = ({onClickHandler,name,yAxisUnit,-}: GridGraphComponentProps): JSX.Element | null => {+}: GridGraphComponentProps): JSX.Element | null {const location = history.location.pathname;const isDashboardPage = location.split('/').length === 3;@@ -32,9 +32,9 @@ const GridGraphComponent = ({isStacked,opacity,xAxisType: 'time',- onClickHandler: onClickHandler,+ onClickHandler,name,- yAxisUnit: yAxisUnit,+ yAxisUnit,}}/>);@@ -64,7 +64,7 @@ const GridGraphComponent = ({}return null;-};+}export interface GridGraphComponentProps {GRAPH_TYPES: GRAPH_TYPES;diff --git a/frontend/src/container/GridGraphLayout/AddWidget/index.tsx b/frontend/src/container/GridGraphLayout/AddWidget/index.tsxindex 39f8c32448..cbe6116aaf 100644--- a/frontend/src/container/GridGraphLayout/AddWidget/index.tsx+++ b/frontend/src/container/GridGraphLayout/AddWidget/index.tsx@@ -14,7 +14,7 @@ import DashboardReducer from 'types/reducer/dashboards';import { Button, Container } from './styles';-const AddWidget = ({ toggleAddWidget }: Props): JSX.Element => {+function AddWidget({ toggleAddWidget }: Props): JSX.Element {const { isAddWidget } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -26,17 +26,15 @@ const AddWidget = ({ toggleAddWidget }: Props): JSX.Element => {return (<Container>{!isAddWidget ? (- <>- <Button onClick={onToggleHandler} icon={<PlusOutlined />}>- Add Widgets- </Button>- </>+ <Button onClick={onToggleHandler} icon={<PlusOutlined />}>+ Add Widgets+ </Button>) : (<Typography>Click a widget icon to add it here</Typography>)}</Container>);-};+}interface DispatchProps {toggleAddWidget: (diff --git a/frontend/src/container/GridGraphLayout/Graph/Bar/index.tsx b/frontend/src/container/GridGraphLayout/Graph/Bar/index.tsxindex 3c3cce7064..82c36c878c 100644--- a/frontend/src/container/GridGraphLayout/Graph/Bar/index.tsx+++ b/frontend/src/container/GridGraphLayout/Graph/Bar/index.tsx@@ -9,11 +9,11 @@ import { Widgets } from 'types/api/dashboard/getAll';import { Container } from './styles';-const Bar = ({+function Bar({widget,onViewFullScreenHandler,onDeleteHandler,-}: BarProps): JSX.Element => {+}: BarProps): JSX.Element {const { push } = useHistory();const { pathname } = useLocation();@@ -29,7 +29,7 @@ const Bar = ({<DeleteOutlined onClick={onDeleteHandler} /></Container>);-};+}interface BarProps {widget: Widgets;diff --git a/frontend/src/container/GridGraphLayout/Graph/FullView/EmptyGraph.tsx b/frontend/src/container/GridGraphLayout/Graph/FullView/EmptyGraph.tsxindex 3a6144ac9f..9f2cfc3e69 100644--- a/frontend/src/container/GridGraphLayout/Graph/FullView/EmptyGraph.tsx+++ b/frontend/src/container/GridGraphLayout/Graph/FullView/EmptyGraph.tsx@@ -10,11 +10,11 @@ import { AppState } from 'store/reducers';import { Widgets } from 'types/api/dashboard/getAll';import { GlobalReducer } from 'types/reducer/globalTime';-const EmptyGraph = ({+function EmptyGraph({selectedTime,widget,onClickHandler,-}: EmptyGraphProps): JSX.Element => {+}: EmptyGraphProps): JSX.Element {const { minTime, maxTime, loading } = useSelector<AppState, GlobalReducer>((state) => state.globalTime,);@@ -47,7 +47,7 @@ const EmptyGraph = ({while (endDate >= startDate) {const newDate = new Date(startDate);- startDate = startDate + 20000;+ startDate += 20000;dates.push(newDate);}@@ -62,7 +62,7 @@ const EmptyGraph = ({<Graph{...{type: 'line',- onClickHandler: onClickHandler,+ onClickHandler,data: {datasets: [{@@ -79,7 +79,7 @@ const EmptyGraph = ({}}/>);-};+}interface EmptyGraphProps {selectedTime: timePreferance;diff --git a/frontend/src/container/GridGraphLayout/Graph/FullView/index.tsx b/frontend/src/container/GridGraphLayout/Graph/FullView/index.tsxindex b6e32f9aed..174caac5ac 100644--- a/frontend/src/container/GridGraphLayout/Graph/FullView/index.tsx+++ b/frontend/src/container/GridGraphLayout/Graph/FullView/index.tsx@@ -26,14 +26,14 @@ import { GlobalReducer } from 'types/reducer/globalTime';import EmptyGraph from './EmptyGraph';import { NotFoundContainer, TimeContainer } from './styles';-const FullView = ({+function FullView({widget,fullViewOptions = true,onClickHandler,noDataGraph = false,name,yAxisUnit,-}: FullViewProps): JSX.Element => {+}: FullViewProps): JSX.Element {const { minTime, maxTime, selectedTime: globalSelectedTime } = useSelector<AppState,GlobalReducer@@ -220,7 +220,7 @@ const FullView = ({isStacked: widget.isStacked,opacity: widget.opacity,title: widget.title,- onClickHandler: onClickHandler,+ onClickHandler,name,yAxisUnit,}}@@ -228,7 +228,7 @@ const FullView = ({{/* </GraphContainer> */}</>);-};+}interface FullViewState {loading: boolean;diff --git a/frontend/src/container/GridGraphLayout/Graph/index.tsx b/frontend/src/container/GridGraphLayout/Graph/index.tsxindex 40a4db6ea7..9559a3f7d6 100644--- a/frontend/src/container/GridGraphLayout/Graph/index.tsx+++ b/frontend/src/container/GridGraphLayout/Graph/index.tsx@@ -8,8 +8,7 @@ import getChartData from 'lib/getChartData';import GetMaxMinTime from 'lib/getMaxMinTime';import GetStartAndEndTime from 'lib/getStartAndEndTime';import React, { useCallback, useEffect, useState } from 'react';-import { useSelector } from 'react-redux';-import { connect } from 'react-redux';+import { connect, useSelector } from 'react-redux';import { bindActionCreators, Dispatch } from 'redux';import { ThunkDispatch } from 'redux-thunk';import {@@ -25,13 +24,13 @@ import Bar from './Bar';import FullView from './FullView';import { ErrorContainer, FullViewContainer, Modal } from './styles';-const GridCardGraph = ({+function GridCardGraph({widget,deleteWidget,isDeleted,name,- yAxisUnit-}: GridCardGraphProps): JSX.Element => {+ yAxisUnit,+}: GridCardGraphProps): JSX.Element {const [state, setState] = useState<GridCardGraphState>({loading: true,errorMessage: '',@@ -66,7 +65,7 @@ const GridCardGraph = ({const result = await getQueryResult({end,query: query.query,- start: start,+ start,step: '60',});@@ -150,7 +149,11 @@ const GridCardGraph = ({destroyOnClose><FullViewContainer>- <FullView name={name + 'expanded'} widget={widget} yAxisUnit={yAxisUnit} />+ <FullView+ name={`${name}expanded`}+ widget={widget}+ yAxisUnit={yAxisUnit}+ /></FullViewContainer></Modal></>@@ -205,7 +208,7 @@ const GridCardGraph = ({/></>);-};+}interface GridCardGraphState {loading: boolean;diff --git a/frontend/src/container/GridGraphLayout/index.tsx b/frontend/src/container/GridGraphLayout/index.tsxindex 4ce2f73aeb..7bb6e4a5cf 100644--- a/frontend/src/container/GridGraphLayout/index.tsx+++ b/frontend/src/container/GridGraphLayout/index.tsx@@ -22,7 +22,7 @@ import {} from './styles';import { updateDashboard } from './utils';-const GridGraph = (): JSX.Element => {+function GridGraph(): JSX.Element {const { dashboards, loading } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -59,7 +59,7 @@ const GridGraph = (): JSX.Element => {x: (index % 2) * 6,Component: (): JSX.Element => (<Graph- name={e.id + index + 'non-expanded'}+ name={`${e.id + index}non-expanded`}isDeleted={isDeleted}widget={widgets[index]}yAxisUnit={e.yAxisUnit}@@ -67,26 +67,25 @@ const GridGraph = (): JSX.Element => {),};});- } else {- return data.layout- .filter((_, index) => widgets[index])- .map((e, index) => ({- ...e,- Component: (): JSX.Element => {- if (widgets[index]) {- return (- <Graph- name={e.i + index}- isDeleted={isDeleted}- widget={widgets[index]}- yAxisUnit={widgets[index].yAxisUnit}- />- );- }- return <></>;- },- }));}+ return data.layout+ .filter((_, index) => widgets[index])+ .map((e, index) => ({+ ...e,+ Component: (): JSX.Element => {+ if (widgets[index]) {+ return (+ <Graph+ name={e.i + index}+ isDeleted={isDeleted}+ widget={widgets[index]}+ yAxisUnit={widgets[index].yAxisUnit}+ />+ );+ }+ return <></>;+ },+ }));}, [widgets, data.layout]);useEffect(() => {@@ -142,7 +141,7 @@ const GridGraph = (): JSX.Element => {data,generateWidgetId,graphType,- selectedDashboard: selectedDashboard,+ selectedDashboard,layout: allLayouts.map((e, index) => ({...e,@@ -253,7 +252,7 @@ const GridGraph = (): JSX.Element => {</ReactGridLayout></>);-};+}interface LayoutProps extends Layout {Component: () => JSX.Element;diff --git a/frontend/src/container/GridGraphLayout/utils.ts b/frontend/src/container/GridGraphLayout/utils.tsindex 2f56057b32..a3d5f9ee1f 100644--- a/frontend/src/container/GridGraphLayout/utils.ts+++ b/frontend/src/container/GridGraphLayout/utils.ts@@ -43,7 +43,7 @@ export const updateDashboard = async ({title: '',},],- layout: layout,+ layout,});if (response.statusCode === 200) {diff --git a/frontend/src/container/Header/Breadcrumbs/index.tsx b/frontend/src/container/Header/Breadcrumbs/index.tsxindex b28a933af4..ef4581e0c5 100644--- a/frontend/src/container/Header/Breadcrumbs/index.tsx+++ b/frontend/src/container/Header/Breadcrumbs/index.tsx@@ -1,6 +1,7 @@import { Breadcrumb } from 'antd';import ROUTES from 'constants/routes';import React from 'react';+import { RouteComponentProps, withRouter } from 'react-router';import { Link } from 'react-router-dom';const breadcrumbNameMap = {@@ -13,9 +14,7 @@ const breadcrumbNameMap = {[ROUTES.DASHBOARD]: 'Dashboard',};-import { RouteComponentProps, withRouter } from 'react-router';--const ShowBreadcrumbs = (props: RouteComponentProps): JSX.Element => {+function ShowBreadcrumbs(props: RouteComponentProps): JSX.Element {const pathArray = props.location.pathname.split('/').filter((i) => i);const extraBreadcrumbItems = pathArray.map((_, index) => {@@ -27,13 +26,12 @@ const ShowBreadcrumbs = (props: RouteComponentProps): JSX.Element => {<Link to={url}>{url.split('/').slice(-1)[0]}</Link></Breadcrumb.Item>);- } else {- return (- <Breadcrumb.Item key={url}>- <Link to={url}>{breadcrumbNameMap[url]}</Link>- </Breadcrumb.Item>- );}+ return (+ <Breadcrumb.Item key={url}>+ <Link to={url}>{breadcrumbNameMap[url]}</Link>+ </Breadcrumb.Item>+ );});const breadcrumbItems = [@@ -43,6 +41,6 @@ const ShowBreadcrumbs = (props: RouteComponentProps): JSX.Element => {].concat(extraBreadcrumbItems);return <Breadcrumb>{breadcrumbItems}</Breadcrumb>;-};+}export default withRouter(ShowBreadcrumbs);diff --git a/frontend/src/container/Header/CustomDateTimeModal/index.tsx b/frontend/src/container/Header/CustomDateTimeModal/index.tsxindex 168a0c8117..8e7d34ad5a 100644--- a/frontend/src/container/Header/CustomDateTimeModal/index.tsx+++ b/frontend/src/container/Header/CustomDateTimeModal/index.tsx@@ -1,16 +1,17 @@import { Modal } from 'antd';-import React, { useState } from 'react';-export type DateTimeRangeType = [Dayjs | null, Dayjs | null] | null;import DatePicker from 'components/DatePicker';import dayjs, { Dayjs } from 'dayjs';+import React, { useState } from 'react';++export type DateTimeRangeType = [Dayjs | null, Dayjs | null] | null;const { RangePicker } = DatePicker;-const CustomDateTimeModal = ({+function CustomDateTimeModal({visible,onCreate,onCancel,-}: CustomDateTimeModalProps): JSX.Element => {+}: CustomDateTimeModalProps): JSX.Element {const [customDateTimeRange,setCustomDateTimeRange,@@ -23,9 +24,8 @@ const CustomDateTimeModal = ({function disabledDate(current: Dayjs): boolean {if (current > dayjs()) {return true;- } else {- return false;}+ return false;}return (@@ -36,7 +36,7 @@ const CustomDateTimeModal = ({cancelText="Cancel"onCancel={onCancel}style={{ position: 'absolute', top: 60, right: 40 }}- onOk={(): void => onCreate(customDateTimeRange ? customDateTimeRange : null)}+ onOk={(): void => onCreate(customDateTimeRange || null)}><RangePickerdisabledDate={disabledDate}@@ -45,7 +45,7 @@ const CustomDateTimeModal = ({/></Modal>);-};+}interface CustomDateTimeModalProps {visible: boolean;diff --git a/frontend/src/container/Header/DateTimeSelection/Refresh.tsx b/frontend/src/container/Header/DateTimeSelection/Refresh.tsxindex 647b91070d..36b1163dda 100644--- a/frontend/src/container/Header/DateTimeSelection/Refresh.tsx+++ b/frontend/src/container/Header/DateTimeSelection/Refresh.tsx@@ -2,9 +2,7 @@ import React, { useEffect, useState } from 'react';import { RefreshTextContainer, Typography } from './styles';-const RefreshText = ({- onLastRefreshHandler,-}: RefreshTextProps): JSX.Element => {+function RefreshText({ onLastRefreshHandler }: RefreshTextProps): JSX.Element {const [refreshText, setRefreshText] = useState<string>('');// this is to update the refresh text@@ -25,7 +23,7 @@ const RefreshText = ({<Typography>{refreshText}</Typography></RefreshTextContainer>);-};+}interface RefreshTextProps {onLastRefreshHandler: () => string;diff --git a/frontend/src/container/Header/DateTimeSelection/index.tsx b/frontend/src/container/Header/DateTimeSelection/index.tsxindex fce010e9e7..34af09422c 100644--- a/frontend/src/container/Header/DateTimeSelection/index.tsx+++ b/frontend/src/container/Header/DateTimeSelection/index.tsx@@ -1,14 +1,10 @@import { Button, Select as DefaultSelect } from 'antd';-import React, { useCallback, useEffect, useState } from 'react';--import { getDefaultOption, getOptions, Time } from './config';-import { Container, Form, FormItem } from './styles';-const { Option } = DefaultSelect;import getLocalStorageKey from 'api/browser/localstorage/get';import setLocalStorageKey from 'api/browser/localstorage/set';import { LOCAL_STORAGE } from 'constants/localStorage';import dayjs, { Dayjs } from 'dayjs';import getTimeString from 'lib/getTimeString';+import React, { useCallback, useEffect, useState } from 'react';import { connect, useSelector } from 'react-redux';import { RouteComponentProps, withRouter } from 'react-router';import { bindActionCreators, Dispatch } from 'redux';@@ -19,13 +15,17 @@ import AppActions from 'types/actions';import { GlobalReducer } from 'types/reducer/globalTime';import CustomDateTimeModal, { DateTimeRangeType } from '../CustomDateTimeModal';+import { getDefaultOption, getOptions, Time } from './config';import RefreshText from './Refresh';+import { Container, Form, FormItem } from './styles';-const DateTimeSelection = ({+const { Option } = DefaultSelect;++function DateTimeSelection({location,updateTimeInterval,globalTimeLoading,-}: Props): JSX.Element => {+}: Props): JSX.Element {const [form_dtselector] = Form.useForm();const params = new URLSearchParams(location.search);@@ -290,7 +290,7 @@ const DateTimeSelection = ({/></Container>);-};+}interface DispatchProps {updateTimeInterval: (diff --git a/frontend/src/container/Header/index.tsx b/frontend/src/container/Header/index.tsxindex 12d9ada60c..2835d217ab 100644--- a/frontend/src/container/Header/index.tsx+++ b/frontend/src/container/Header/index.tsx@@ -15,7 +15,7 @@ const routesToSkip = [ROUTES.ALL_CHANNELS,];-const TopNav = (): JSX.Element | null => {+function TopNav(): JSX.Element | null {const { pathname } = useLocation();if (history.location.pathname === ROUTES.SIGN_UP) {@@ -46,6 +46,6 @@ const TopNav = (): JSX.Element | null => {)}</Container>);-};+}export default TopNav;diff --git a/frontend/src/container/ListAlertRules/DeleteAlert.tsx b/frontend/src/container/ListAlertRules/DeleteAlert.tsxindex aad4a46d6b..b571183e12 100644--- a/frontend/src/container/ListAlertRules/DeleteAlert.tsx+++ b/frontend/src/container/ListAlertRules/DeleteAlert.tsx@@ -6,11 +6,11 @@ import React, { useState } from 'react';import { PayloadProps as DeleteAlertPayloadProps } from 'types/api/alerts/delete';import { Alerts } from 'types/api/alerts/getAll';-const DeleteAlert = ({+function DeleteAlert({id,setData,notifications,-}: DeleteAlertProps): JSX.Element => {+}: DeleteAlertProps): JSX.Element {const [deleteAlertState, setDeleteAlertState] = useState<State<DeleteAlertPayloadProps>>({@@ -70,18 +70,16 @@ const DeleteAlert = ({};return (- <>- <Button- disabled={deleteAlertState.loading || false}- loading={deleteAlertState.loading || false}- onClick={(): Promise<void> => onDeleteHandler(id)}- type="link"- >- Delete- </Button>- </>+ <Button+ disabled={deleteAlertState.loading || false}+ loading={deleteAlertState.loading || false}+ onClick={(): Promise<void> => onDeleteHandler(id)}+ type="link"+ >+ Delete+ </Button>);-};+}interface DeleteAlertProps {id: Alerts['id'];diff --git a/frontend/src/container/ListAlertRules/ListAlert.tsx b/frontend/src/container/ListAlertRules/ListAlert.tsxindex 1a0f09b609..98099add31 100644--- a/frontend/src/container/ListAlertRules/ListAlert.tsx+++ b/frontend/src/container/ListAlertRules/ListAlert.tsx@@ -15,7 +15,7 @@ import DeleteAlert from './DeleteAlert';import { Button, ButtonContainer } from './styles';import Status from './TableComponents/Status';-const ListAlert = ({ allAlertRules }: ListAlertProps): JSX.Element => {+function ListAlert({ allAlertRules }: ListAlertProps): JSX.Element {const [data, setData] = useState<Alerts[]>(allAlertRules || []);useInterval(() => {@@ -62,7 +62,7 @@ const ListAlert = ({ allAlertRules }: ListAlertProps): JSX.Element => {dataIndex: 'labels',key: 'severity',sorter: (a, b): number =>- a.labels['severity'].length - b.labels['severity'].length,+ a.labels.severity.length - b.labels.severity.length,render: (value): JSX.Element => {const objectKeys = Object.keys(value);const withSeverityKey = objectKeys.find((e) => e === 'severity') || '';@@ -144,7 +144,7 @@ const ListAlert = ({ allAlertRules }: ListAlertProps): JSX.Element => {<Table rowKey="id" columns={columns} dataSource={data} /></>);-};+}interface ListAlertProps {allAlertRules: Alerts[];diff --git a/frontend/src/container/ListAlertRules/TableComponents/Status.tsx b/frontend/src/container/ListAlertRules/TableComponents/Status.tsxindex e728164a62..33de5fb1db 100644--- a/frontend/src/container/ListAlertRules/TableComponents/Status.tsx+++ b/frontend/src/container/ListAlertRules/TableComponents/Status.tsx@@ -2,7 +2,7 @@ import { Tag } from 'antd';import React from 'react';import { Alerts } from 'types/api/alerts/getAll';-const Status = ({ status }: StatusProps): JSX.Element => {+function Status({ status }: StatusProps): JSX.Element {switch (status) {case 'inactive': {return <Tag color="green">OK</Tag>;@@ -20,7 +20,7 @@ const Status = ({ status }: StatusProps): JSX.Element => {return <Tag color="default">Unknown Status</Tag>;}}-};+}interface StatusProps {status: Alerts['state'];diff --git a/frontend/src/container/ListAlertRules/index.tsx b/frontend/src/container/ListAlertRules/index.tsxindex 5220b872d3..ce44e871e9 100644--- a/frontend/src/container/ListAlertRules/index.tsx+++ b/frontend/src/container/ListAlertRules/index.tsx@@ -6,7 +6,7 @@ import { PayloadProps } from 'types/api/alerts/getAll';import ListAlert from './ListAlert';-const ListAlertRules = (): JSX.Element => {+function ListAlertRules(): JSX.Element {const { loading, payload, error, errorMessage } = useFetch<PayloadProps,undefined@@ -27,6 +27,6 @@ const ListAlertRules = (): JSX.Element => {}}/>);-};+}export default ListAlertRules;diff --git a/frontend/src/container/ListOfDashboard/TableComponents/CreatedBy.tsx b/frontend/src/container/ListOfDashboard/TableComponents/CreatedBy.tsxindex 33240935d1..faa5d45e32 100644--- a/frontend/src/container/ListOfDashboard/TableComponents/CreatedBy.tsx+++ b/frontend/src/container/ListOfDashboard/TableComponents/CreatedBy.tsx@@ -5,7 +5,7 @@ import React from 'react';import { Data } from '..';-const Created = (createdBy: Data['createdBy']): JSX.Element => {+function Created(createdBy: Data['createdBy']): JSX.Element {const time = new Date(createdBy);const date = getFormattedDate(time);@@ -13,6 +13,6 @@ const Created = (createdBy: Data['createdBy']): JSX.Element => {const timeString = `${date} ${convertDateToAmAndPm(time)}`;return <Typography>{`${timeString}`}</Typography>;-};+}export default Created;diff --git a/frontend/src/container/ListOfDashboard/TableComponents/Date.tsx b/frontend/src/container/ListOfDashboard/TableComponents/Date.tsxindex 464119f5c4..6b93b4b220 100644--- a/frontend/src/container/ListOfDashboard/TableComponents/Date.tsx+++ b/frontend/src/container/ListOfDashboard/TableComponents/Date.tsx@@ -5,9 +5,7 @@ import React from 'react';import { Data } from '..';-const DateComponent = (- lastUpdatedTime: Data['lastUpdatedTime'],-): JSX.Element => {+function DateComponent(lastUpdatedTime: Data['lastUpdatedTime']): JSX.Element {const time = new Date(lastUpdatedTime);const date = getFormattedDate(time);@@ -15,6 +13,6 @@ const DateComponent = (const timeString = `${date} ${convertDateToAmAndPm(time)}`;return <Typography>{timeString}</Typography>;-};+}export default DateComponent;diff --git a/frontend/src/container/ListOfDashboard/TableComponents/DeleteButton.tsx b/frontend/src/container/ListOfDashboard/TableComponents/DeleteButton.tsxindex 726ccf0253..854deefd3a 100644--- a/frontend/src/container/ListOfDashboard/TableComponents/DeleteButton.tsx+++ b/frontend/src/container/ListOfDashboard/TableComponents/DeleteButton.tsx@@ -1,18 +1,14 @@import { Button } from 'antd';import React, { useCallback } from 'react';import { connect } from 'react-redux';-import { bindActionCreators } from 'redux';-import { Dispatch } from 'redux';+import { bindActionCreators, Dispatch } from 'redux';import { ThunkDispatch } from 'redux-thunk';import { DeleteDashboard, DeleteDashboardProps } from 'store/actions';import AppActions from 'types/actions';import { Data } from '../index';-const DeleteButton = ({- deleteDashboard,- id,-}: DeleteButtonProps): JSX.Element => {+function DeleteButton({ deleteDashboard, id }: DeleteButtonProps): JSX.Element {const onClickHandler = useCallback(() => {deleteDashboard({uuid: id,@@ -24,7 +20,7 @@ const DeleteButton = ({Delete</Button>);-};+}interface DispatchProps {deleteDashboard: ({@@ -43,7 +39,7 @@ type DeleteButtonProps = Data & DispatchProps;const WrapperDeleteButton = connect(null, mapDispatchToProps)(DeleteButton);// This is to avoid the type collision-const Wrapper = (props: Data): JSX.Element => {+function Wrapper(props: Data): JSX.Element {return (<WrapperDeleteButton{...{@@ -51,6 +47,6 @@ const Wrapper = (props: Data): JSX.Element => {}}/>);-};+}export default Wrapper;diff --git a/frontend/src/container/ListOfDashboard/TableComponents/Name.tsx b/frontend/src/container/ListOfDashboard/TableComponents/Name.tsxindex aea20a766b..342dcac336 100644--- a/frontend/src/container/ListOfDashboard/TableComponents/Name.tsx+++ b/frontend/src/container/ListOfDashboard/TableComponents/Name.tsx@@ -6,7 +6,7 @@ import { generatePath } from 'react-router-dom';import { Data } from '..';-const Name = (name: Data['name'], data: Data): JSX.Element => {+function Name(name: Data['name'], data: Data): JSX.Element {const onClickHandler = () => {history.push(generatePath(ROUTES.DASHBOARD, {@@ -20,6 +20,6 @@ const Name = (name: Data['name'], data: Data): JSX.Element => {{name}</Button>);-};+}export default Name;diff --git a/frontend/src/container/ListOfDashboard/TableComponents/Tags.tsx b/frontend/src/container/ListOfDashboard/TableComponents/Tags.tsxindex 7831409a7c..781e688e0a 100644--- a/frontend/src/container/ListOfDashboard/TableComponents/Tags.tsx+++ b/frontend/src/container/ListOfDashboard/TableComponents/Tags.tsx@@ -3,7 +3,7 @@ import React from 'react';import { Data } from '../index';-const Tags = (props: Data['tags']): JSX.Element => {+function Tags(props: Data['tags']): JSX.Element {return (<>{props.map((e) => (@@ -11,6 +11,6 @@ const Tags = (props: Data['tags']): JSX.Element => {))}</>);-};+}export default Tags;diff --git a/frontend/src/container/ListOfDashboard/index.tsx b/frontend/src/container/ListOfDashboard/index.tsxindex a7009a4bad..448a11bc5b 100644--- a/frontend/src/container/ListOfDashboard/index.tsx+++ b/frontend/src/container/ListOfDashboard/index.tsx@@ -18,7 +18,7 @@ import DeleteButton from './TableComponents/DeleteButton';import Name from './TableComponents/Name';import Tags from './TableComponents/Tags';-const ListOfAllDashboard = (): JSX.Element => {+function ListOfAllDashboard(): JSX.Element {const { dashboards } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -179,7 +179,7 @@ const ListOfAllDashboard = (): JSX.Element => {/></TableContainer>);-};+}export interface Data {key: React.Key;diff --git a/frontend/src/container/MetricsApplication/Tabs/Application.tsx b/frontend/src/container/MetricsApplication/Tabs/Application.tsxindex ac7cb51798..7303065544 100644--- a/frontend/src/container/MetricsApplication/Tabs/Application.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/Application.tsx@@ -17,7 +17,7 @@ import { Card, Col, GraphContainer, GraphTitle, Row } from '../styles';import TopEndpointsTable from '../TopEndpointsTable';import { Button } from './styles';-const Application = ({ getWidget }: DashboardProps): JSX.Element => {+function Application({ getWidget }: DashboardProps): JSX.Element {const { servicename } = useParams<{ servicename?: string }>();const selectedTimeStamp = useRef(0);@@ -34,7 +34,8 @@ const Application = ({ getWidget }: DashboardProps): JSX.Element => {urlParams.set(METRICS_PAGE_QUERY_PARAM.endTime, tPlusOne.toString());history.replace(- `${ROUTES.TRACE+ `${+ ROUTES.TRACE}?${urlParams.toString()}&selected={"serviceName":["${servicename}"],"status":["ok","error"]}&filterToFetchData=["duration","status","serviceName"]&userSelectedFilter={"status":["error","ok"],"serviceName":["${servicename}"]}&isSelectedFilterSkipped=true`,);};@@ -70,10 +71,8 @@ const Application = ({ getWidget }: DashboardProps): JSX.Element => {selectedTimeStamp.current = time.getTime();}}- } else {- if (buttonElement && buttonElement.style.display === 'block') {- buttonElement.style.display = 'none';- }+ } else if (buttonElement && buttonElement.style.display === 'block') {+ buttonElement.style.display = 'none';}}};@@ -87,7 +86,8 @@ const Application = ({ getWidget }: DashboardProps): JSX.Element => {urlParams.set(METRICS_PAGE_QUERY_PARAM.endTime, tPlusOne.toString());history.replace(- `${ROUTES.TRACE+ `${+ ROUTES.TRACE}?${urlParams.toString()}&selected={"serviceName":["${servicename}"],"status":["error"]}&filterToFetchData=["duration","status","serviceName"]&userSelectedFilter={"status":["error"],"serviceName":["${servicename}"]}&isSelectedFilterSkipped=true`,);};@@ -239,7 +239,7 @@ const Application = ({ getWidget }: DashboardProps): JSX.Element => {</Row></>);-};+}interface DashboardProps {getWidget: (query: Widgets['query']) => Widgets;diff --git a/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx b/frontend/src/container/MetricsApplication/Tabs/DBCall.tsxindex c883333bdd..1619db2114 100644--- a/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx@@ -6,55 +6,53 @@ import { Widgets } from 'types/api/dashboard/getAll';import { Card, GraphContainer, GraphTitle, Row } from '../styles';-const DBCall = ({ getWidget }: DBCallProps): JSX.Element => {+function DBCall({ getWidget }: DBCallProps): JSX.Element {const { servicename } = useParams<{ servicename?: string }>();return (- <>- <Row gutter={24}>- <Col span={12}>- <Card>- <GraphTitle>Database Calls RPS</GraphTitle>- <GraphContainer>- <FullView- name="database_call_rps"- noDataGraph- fullViewOptions={false}- widget={getWidget([- {- query: `sum(rate(signoz_db_latency_count{service_name="${servicename}"}[1m])) by (db_system)`,- legend: '{{db_system}}',- },- ])}- yAxisUnit="short"- />- </GraphContainer>- </Card>- </Col>+ <Row gutter={24}>+ <Col span={12}>+ <Card>+ <GraphTitle>Database Calls RPS</GraphTitle>+ <GraphContainer>+ <FullView+ name="database_call_rps"+ noDataGraph+ fullViewOptions={false}+ widget={getWidget([+ {+ query: `sum(rate(signoz_db_latency_count{service_name="${servicename}"}[1m])) by (db_system)`,+ legend: '{{db_system}}',+ },+ ])}+ yAxisUnit="short"+ />+ </GraphContainer>+ </Card>+ </Col>- <Col span={12}>- <Card>- <GraphTitle>Database Calls Avg Duration (in ms)</GraphTitle>- <GraphContainer>- <FullView- name="database_call_avg_duration"- noDataGraph- fullViewOptions={false}- widget={getWidget([- {- query: `sum(rate(signoz_db_latency_sum{service_name="${servicename}"}[5m]))/sum(rate(signoz_db_latency_count{service_name="${servicename}"}[5m]))`,- legend: '',- },- ])}- yAxisUnit="ms"- />- </GraphContainer>- </Card>- </Col>- </Row>- </>+ <Col span={12}>+ <Card>+ <GraphTitle>Database Calls Avg Duration (in ms)</GraphTitle>+ <GraphContainer>+ <FullView+ name="database_call_avg_duration"+ noDataGraph+ fullViewOptions={false}+ widget={getWidget([+ {+ query: `sum(rate(signoz_db_latency_sum{service_name="${servicename}"}[5m]))/sum(rate(signoz_db_latency_count{service_name="${servicename}"}[5m]))`,+ legend: '',+ },+ ])}+ yAxisUnit="ms"+ />+ </GraphContainer>+ </Card>+ </Col>+ </Row>);-};+}interface DBCallProps {getWidget: (query: Widgets['query']) => Widgets;diff --git a/frontend/src/container/MetricsApplication/Tabs/External.tsx b/frontend/src/container/MetricsApplication/Tabs/External.tsxindex b0d6cc0312..d88acdac14 100644--- a/frontend/src/container/MetricsApplication/Tabs/External.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/External.tsx@@ -6,7 +6,7 @@ import { Widgets } from 'types/api/dashboard/getAll';import { Card, GraphContainer, GraphTitle, Row } from '../styles';-const External = ({ getWidget }: ExternalProps): JSX.Element => {+function External({ getWidget }: ExternalProps): JSX.Element {const { servicename } = useParams<{ servicename?: string }>();return (@@ -96,7 +96,7 @@ const External = ({ getWidget }: ExternalProps): JSX.Element => {</Row></>);-};+}interface ExternalProps {getWidget: (query: Widgets['query']) => Widgets;diff --git a/frontend/src/container/MetricsApplication/TopEndpointsTable.tsx b/frontend/src/container/MetricsApplication/TopEndpointsTable.tsxindex 9cd8f54821..97a546cf1b 100644--- a/frontend/src/container/MetricsApplication/TopEndpointsTable.tsx+++ b/frontend/src/container/MetricsApplication/TopEndpointsTable.tsx@@ -9,7 +9,7 @@ import { topEndpointListItem } from 'store/actions/MetricsActions';import { AppState } from 'store/reducers';import { GlobalReducer } from 'types/reducer/globalTime';-const TopEndpointsTable = (props: TopEndpointsTableProps): JSX.Element => {+function TopEndpointsTable(props: TopEndpointsTableProps): JSX.Element {const { minTime, maxTime } = useSelector<AppState, GlobalReducer>((state) => state.globalTime,);@@ -97,7 +97,7 @@ const TopEndpointsTable = (props: TopEndpointsTableProps): JSX.Element => {rowKey="name"/>);-};+}type DataProps = topEndpointListItem;diff --git a/frontend/src/container/MetricsApplication/index.tsx b/frontend/src/container/MetricsApplication/index.tsxindex 6fcda7c9e9..ceedaa5018 100644--- a/frontend/src/container/MetricsApplication/index.tsx+++ b/frontend/src/container/MetricsApplication/index.tsx@@ -8,7 +8,7 @@ import External from './Tabs/External';const { TabPane } = Tabs;-const ServiceMetrics = (): JSX.Element => {+function ServiceMetrics(): JSX.Element {const getWidget = (query: Widgets['query']): Widgets => {return {description: '',@@ -17,7 +17,7 @@ const ServiceMetrics = (): JSX.Element => {nullZeroValues: '',opacity: '0',panelTypes: 'TIME_SERIES',- query: query,+ query,queryData: {data: [],error: false,@@ -45,6 +45,6 @@ const ServiceMetrics = (): JSX.Element => {</TabPane></Tabs>);-};+}export default ServiceMetrics;diff --git a/frontend/src/container/MetricsTable/SkipOnBoardModal/index.tsx b/frontend/src/container/MetricsTable/SkipOnBoardModal/index.tsxindex a63440022a..2e9328bd0f 100644--- a/frontend/src/container/MetricsTable/SkipOnBoardModal/index.tsx+++ b/frontend/src/container/MetricsTable/SkipOnBoardModal/index.tsx@@ -2,11 +2,11 @@ import { Button, Typography } from 'antd';import Modal from 'components/Modal';import React from 'react';-const SkipOnBoardingModal = ({ onContinueClick }: Props): JSX.Element => {+function SkipOnBoardingModal({ onContinueClick }: Props): JSX.Element {return (<Modal- title={'Setup instrumentation'}- isModalVisible={true}+ title="Setup instrumentation"+ isModalVisibleclosable={false}footer={[<Button key="submit" type="primary" onClick={onContinueClick}>@@ -22,14 +22,14 @@ const SkipOnBoardingModal = ({ onContinueClick }: Props): JSX.Element => {frameBorder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowFullScreen- ></iframe>+ /><div><Typography>No instrumentation data.</Typography><Typography>Please instrument your application as mentioned <a- href={'https://signoz.io/docs/instrumentation/overview'}- target={'_blank'}+ href="https://signoz.io/docs/instrumentation/overview"+ target="_blank"rel="noreferrer">here@@ -39,7 +39,7 @@ const SkipOnBoardingModal = ({ onContinueClick }: Props): JSX.Element => {</></Modal>);-};+}interface Props {onContinueClick: () => void;diff --git a/frontend/src/container/MetricsTable/index.tsx b/frontend/src/container/MetricsTable/index.tsxindex 48d1eb2d7b..9f0630d54e 100644--- a/frontend/src/container/MetricsTable/index.tsx+++ b/frontend/src/container/MetricsTable/index.tsx@@ -12,7 +12,7 @@ import MetricReducer from 'types/reducer/metrics';import SkipBoardModal from './SkipOnBoardModal';import { Container, Name } from './styles';-const Metrics = (): JSX.Element => {+function Metrics(): JSX.Element {const [skipOnboarding, setSkipOnboarding] = useState(localStorageGet(SKIP_ONBOARDING) === 'true',);@@ -46,7 +46,7 @@ const Metrics = (): JSX.Element => {key: 'serviceName',// eslint-disable-next-line react/display-namerender: (text: string): JSX.Element => (- <div onClick={(): void => onClickHandler(ROUTES.APPLICATION + '/' + text)}>+ <div onClick={(): void => onClickHandler(`${ROUTES.APPLICATION}/${text}`)}><Name>{text}</Name></div>),@@ -85,7 +85,7 @@ const Metrics = (): JSX.Element => {/></Container>);-};+}type DataProps = servicesListItem;diff --git a/frontend/src/container/NewDashboard/ComponentsSlider/index.tsx b/frontend/src/container/NewDashboard/ComponentsSlider/index.tsxindex 2e127f9297..5f98ba75c7 100644--- a/frontend/src/container/NewDashboard/ComponentsSlider/index.tsx+++ b/frontend/src/container/NewDashboard/ComponentsSlider/index.tsx@@ -10,7 +10,7 @@ import { v4 } from 'uuid';import menuItems, { ITEMS } from './menuItems';import { Card, Container, Text } from './styles';-const DashboardGraphSlider = (): JSX.Element => {+function DashboardGraphSlider(): JSX.Element {const { dashboards } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -81,7 +81,7 @@ const DashboardGraphSlider = (): JSX.Element => {))}</Container>);-};+}export type GRAPH_TYPES = ITEMS;diff --git a/frontend/src/container/NewDashboard/ComponentsSlider/menuItems.ts b/frontend/src/container/NewDashboard/ComponentsSlider/menuItems.tsindex 36adfe1385..c8ee593185 100644--- a/frontend/src/container/NewDashboard/ComponentsSlider/menuItems.ts+++ b/frontend/src/container/NewDashboard/ComponentsSlider/menuItems.ts@@ -1,5 +1,6 @@-import TimeSeries from 'assets/Dashboard/TimeSeries';-import { TimeSeriesProps as IconProps } from 'assets/Dashboard/TimeSeries';+import TimeSeries, {+ TimeSeriesProps as IconProps,+} from 'assets/Dashboard/TimeSeries';import ValueIcon from 'assets/Dashboard/Value';const Items: ItemsProps[] = [diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/AddTags/index.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/AddTags/index.tsxindex b16d15e7be..ef00393dc3 100644--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/AddTags/index.tsx+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/AddTags/index.tsx@@ -5,7 +5,7 @@ import React, { useState } from 'react';import { InputContainer, NewTagContainer, TagsContainer } from './styles';-const AddTags = ({ tags, setTags }: AddTagsProps): JSX.Element => {+function AddTags({ tags, setTags }: AddTagsProps): JSX.Element {const [inputValue, setInputValue] = useState<string>('');const [inputVisible, setInputVisible] = useState<boolean>(false);const [editInputIndex, setEditInputIndex] = useState(-1);@@ -110,7 +110,7 @@ const AddTags = ({ tags, setTags }: AddTagsProps): JSX.Element => {)}</TagsContainer>);-};+}interface AddTagsProps {tags: string[];diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/Description/index.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/Description/index.tsxindex b368de2403..aad663d7a3 100644--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/Description/index.tsx+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/Description/index.tsx@@ -2,12 +2,13 @@ import { Input } from 'antd';import React, { useCallback } from 'react';import { Container } from './styles';+const { TextArea } = Input;-const Description = ({+function Description({description,setDescription,-}: DescriptionProps): JSX.Element => {+}: DescriptionProps): JSX.Element {const onChangeHandler = useCallback((e: React.ChangeEvent<HTMLTextAreaElement>) => {setDescription(e.target.value);@@ -18,13 +19,13 @@ const Description = ({return (<Container><TextArea- placeholder={'Description of the dashboard'}+ placeholder="Description of the dashboard"onChange={onChangeHandler}value={description}- ></TextArea>+ /></Container>);-};+}interface DescriptionProps {description: string;diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/NameOfTheDashboard/index.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/NameOfTheDashboard/index.tsxindex 528028bffb..a8b8871190 100644--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/NameOfTheDashboard/index.tsx+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/NameOfTheDashboard/index.tsx@@ -1,10 +1,10 @@import Input from 'components/Input';import React, { useCallback } from 'react';-const NameOfTheDashboard = ({+function NameOfTheDashboard({setName,name,-}: NameOfTheDashboardProps): JSX.Element => {+}: NameOfTheDashboardProps): JSX.Element {const onChangeHandler = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {setName(e.target.value);@@ -20,7 +20,7 @@ const NameOfTheDashboard = ({onChangeHandler={onChangeHandler}/>);-};+}interface NameOfTheDashboardProps {name: string;diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/index.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/index.tsxindex 797ae3e383..7ee3132d37 100644--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/index.tsx+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/index.tsx@@ -18,19 +18,19 @@ import DashboardReducer from 'types/reducer/dashboards';import Description from './Description';import { Button, Container } from './styles';-const DescriptionOfDashboard = ({+function DescriptionOfDashboard({updateDashboardTitleDescriptionTags,toggleEditMode,-}: DescriptionOfDashboardProps): JSX.Element => {+}: DescriptionOfDashboardProps): JSX.Element {const { dashboards, isEditMode } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);const [selectedDashboard] = dashboards;const selectedData = selectedDashboard.data;- const title = selectedData.title;- const tags = selectedData.tags;- const description = selectedData.description;+ const { title } = selectedData;+ const { tags } = selectedData;+ const { description } = selectedData;const [updatedTitle, setUpdatedTitle] = useState<string>(title);const [updatedTags, setUpdatedTags] = useState<string[]>(tags || []);@@ -67,46 +67,42 @@ const DescriptionOfDashboard = ({]);return (- <>- <Card>- <Row align="top" justify="space-between">- {!isEditMode ? (- <>- <Col>- <Typography>{title}</Typography>- <Container>- {tags?.map((e) => (- <Tag key={e}>{e}</Tag>- ))}- </Container>- <Container>- <Typography>{description}</Typography>- </Container>- </Col>- </>- ) : (- <Col lg={8}>- <NameOfTheDashboard name={updatedTitle} setName={setUpdatedTitle} />- <AddTags tags={updatedTags} setTags={setUpdatedTags} />- <Description- description={updatedDescription}- setDescription={setUpdtatedDescription}- />- </Col>- )}+ <Card>+ <Row align="top" justify="space-between">+ {!isEditMode ? (<Col>- <Button- icon={!isEditMode ? <EditOutlined /> : <SaveOutlined />}- onClick={onClickEditHandler}- >- {isEditMode ? 'Save' : 'Edit'}- </Button>+ <Typography>{title}</Typography>+ <Container>+ {tags?.map((e) => (+ <Tag key={e}>{e}</Tag>+ ))}+ </Container>+ <Container>+ <Typography>{description}</Typography>+ </Container></Col>- </Row>- </Card>- </>+ ) : (+ <Col lg={8}>+ <NameOfTheDashboard name={updatedTitle} setName={setUpdatedTitle} />+ <AddTags tags={updatedTags} setTags={setUpdatedTags} />+ <Description+ description={updatedDescription}+ setDescription={setUpdtatedDescription}+ />+ </Col>+ )}+ <Col>+ <Button+ icon={!isEditMode ? <EditOutlined /> : <SaveOutlined />}+ onClick={onClickEditHandler}+ >+ {isEditMode ? 'Save' : 'Edit'}+ </Button>+ </Col>+ </Row>+ </Card>);-};+}interface DispatchProps {updateDashboardTitleDescriptionTags: (diff --git a/frontend/src/container/NewDashboard/GridGraphs/index.tsx b/frontend/src/container/NewDashboard/GridGraphs/index.tsxindex 569a50968e..5436f43704 100644--- a/frontend/src/container/NewDashboard/GridGraphs/index.tsx+++ b/frontend/src/container/NewDashboard/GridGraphs/index.tsx@@ -7,20 +7,18 @@ import DashboardReducer from 'types/reducer/dashboards';import { GridComponentSliderContainer } from './styles';-const GridGraphs = (): JSX.Element => {+function GridGraphs(): JSX.Element {const { isAddWidget } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);return (- <>- <GridComponentSliderContainer>- {isAddWidget && <ComponentsSlider />}+ <GridComponentSliderContainer>+ {isAddWidget && <ComponentsSlider />}- <GridGraphLayout />- </GridComponentSliderContainer>- </>+ <GridGraphLayout />+ </GridComponentSliderContainer>);-};+}export default GridGraphs;diff --git a/frontend/src/container/NewDashboard/index.tsx b/frontend/src/container/NewDashboard/index.tsxindex a4607fbc1d..8fbe49de84 100644--- a/frontend/src/container/NewDashboard/index.tsx+++ b/frontend/src/container/NewDashboard/index.tsx@@ -3,13 +3,13 @@ import React from 'react';import Description from './DescriptionOfDashboard';import GridGraphs from './GridGraphs';-const NewDashboard = (): JSX.Element => {+function NewDashboard(): JSX.Element {return (<><Description /><GridGraphs /></>);-};+}export default NewDashboard;diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsxindex 1a7a70aaba..1bc4a2ba90 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx@@ -22,13 +22,13 @@ import {QueryWrapper,} from './styles';-const Query = ({+function Query({currentIndex,preLegend,preQuery,updateQuery,deleteQuery,-}: QueryProps): JSX.Element => {+}: QueryProps): JSX.Element {const [promqlQuery, setPromqlQuery] = useState(preQuery);const [legendFormat, setLegendFormat] = useState(preLegend);const { search } = useLocation();@@ -54,7 +54,7 @@ const Query = ({const onDeleteQueryHandler = (): void => {deleteQuery({- widgetId: widgetId,+ widgetId,currentIndex,});};@@ -70,7 +70,7 @@ const Query = ({}size="middle"value={promqlQuery}- addonBefore={'PromQL Query'}+ addonBefore="PromQL Query"onBlur={(): void => onBlurHandler()}/></InputContainer>@@ -82,7 +82,7 @@ const Query = ({}size="middle"value={legendFormat}- addonBefore={'Legend Format'}+ addonBefore="Legend Format"onBlur={(): void => onBlurHandler()}/></InputContainer>@@ -102,7 +102,7 @@ const Query = ({<Divider /></>);-};+}interface DispatchProps {updateQuery: (diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsxindex 61fcc1b4d2..f4935ba533 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx@@ -14,16 +14,13 @@ import DashboardReducer from 'types/reducer/dashboards';import Query from './Query';import { QueryButton } from './styles';-const QuerySection = ({- selectedTime,- createQuery,-}: QueryProps): JSX.Element => {+function QuerySection({ selectedTime, createQuery }: QueryProps): JSX.Element {const { dashboards } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);const [selectedDashboards] = dashboards;const { search } = useLocation();- const widgets = selectedDashboards.data.widgets;+ const { widgets } = selectedDashboards.data;const urlQuery = useMemo(() => {return new URLSearchParams(search);@@ -63,7 +60,7 @@ const QuerySection = ({</QueryButton></>);-};+}interface DispatchProps {createQuery: ({diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.tsxindex 9f334ff25e..9c11b15bc4 100644--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.tsx@@ -10,7 +10,10 @@ import DashboardReducer from 'types/reducer/dashboards';import { NotFoundContainer } from './styles';-const WidgetGraph = ({ selectedGraph,yAxisUnit }: WidgetGraphProps): JSX.Element => {+function WidgetGraph({+ selectedGraph,+ yAxisUnit,+}: WidgetGraphProps): JSX.Element {const { dashboards } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -54,7 +57,7 @@ const WidgetGraph = ({ selectedGraph,yAxisUnit }: WidgetGraphProps): JSX.ElementyAxisUnit={yAxisUnit}/>);-};+}type WidgetGraphProps = NewWidgetProps;diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsxindex c84c5e6bb1..df58ca6cf1 100644--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx@@ -11,7 +11,10 @@ import { NewWidgetProps } from '../../index';import { AlertIconContainer, Container, NotFoundContainer } from './styles';import WidgetGraphComponent from './WidgetGraph';-const WidgetGraph = ({ selectedGraph, yAxisUnit }: WidgetGraphProps): JSX.Element => {+function WidgetGraph({+ selectedGraph,+ yAxisUnit,+}: WidgetGraphProps): JSX.Element {const { dashboards, isQueryFired } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -47,10 +50,12 @@ const WidgetGraph = ({ selectedGraph, yAxisUnit }: WidgetGraphProps): JSX.Elemen</NotFoundContainer>)}- {isQueryFired && <WidgetGraphComponent selectedGraph={selectedGraph} yAxisUnit={yAxisUnit} />}+ {isQueryFired && (+ <WidgetGraphComponent selectedGraph={selectedGraph} yAxisUnit={yAxisUnit} />+ )}</Container>);-};+}type WidgetGraphProps = NewWidgetProps;diff --git a/frontend/src/container/NewWidget/LeftContainer/index.tsx b/frontend/src/container/NewWidget/LeftContainer/index.tsxindex 6ca056d68d..33c1bcaeaa 100644--- a/frontend/src/container/NewWidget/LeftContainer/index.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/index.tsx@@ -6,11 +6,11 @@ import QuerySection from './QuerySection';import { QueryContainer } from './styles';import WidgetGraph from './WidgetGraph';-const LeftContainer = ({+function LeftContainer({selectedGraph,selectedTime,yAxisUnit,-}: LeftContainerProps): JSX.Element => {+}: LeftContainerProps): JSX.Element {return (<><WidgetGraph selectedGraph={selectedGraph} yAxisUnit={yAxisUnit} />@@ -20,7 +20,7 @@ const LeftContainer = ({</QueryContainer></>);-};+}interface LeftContainerProps extends NewWidgetProps {selectedTime: timePreferance;diff --git a/frontend/src/container/NewWidget/RightContainer/YAxisUnitSelector.tsx b/frontend/src/container/NewWidget/RightContainer/YAxisUnitSelector.tsxindex 4d8687e074..d8202d6fdb 100644--- a/frontend/src/container/NewWidget/RightContainer/YAxisUnitSelector.tsx+++ b/frontend/src/container/NewWidget/RightContainer/YAxisUnitSelector.tsx@@ -9,7 +9,7 @@ const findCategoryById = (searchValue) =>const findCategoryByName = (searchValue) =>find(flattenedCategories, (option) => option.name == searchValue);-const YAxisUnitSelector = ({ defaultValue, onSelect }): JSX.Element => {+function YAxisUnitSelector({ defaultValue, onSelect }): JSX.Element {const onSelectHandler = (selectedValue: string): void => {onSelect(findCategoryByName(selectedValue)?.id);};@@ -34,6 +34,6 @@ const YAxisUnitSelector = ({ defaultValue, onSelect }): JSX.Element => {</AutoComplete></Col>);-};+}export default YAxisUnitSelector;diff --git a/frontend/src/container/NewWidget/RightContainer/dataFormatCategories.ts b/frontend/src/container/NewWidget/RightContainer/dataFormatCategories.tsindex e308ac0175..fce3f9361c 100644--- a/frontend/src/container/NewWidget/RightContainer/dataFormatCategories.ts+++ b/frontend/src/container/NewWidget/RightContainer/dataFormatCategories.ts@@ -382,7 +382,6 @@ export const dataTypeCategories = [},];-export const flattenedCategories = flattenDeep(dataTypeCategories.map((category) => {return category.formats;diff --git a/frontend/src/container/NewWidget/RightContainer/index.tsx b/frontend/src/container/NewWidget/RightContainer/index.tsxindex c3cf3af033..660451b439 100644--- a/frontend/src/container/NewWidget/RightContainer/index.tsx+++ b/frontend/src/container/NewWidget/RightContainer/index.tsx@@ -6,25 +6,24 @@ import {// Typography,} from 'antd';import InputComponent from 'components/Input';+import TimePreference from 'components/TimePreferenceDropDown';import { GRAPH_TYPES } from 'container/NewDashboard/ComponentsSlider';import GraphTypes from 'container/NewDashboard/ComponentsSlider/menuItems';import React, { useCallback } from 'react';import { dataTypeCategories } from './dataFormatCategories';-// import {ca} from '@grafana/data'-import { timePreferance } from './timeItems';-import YAxisUnitSelector from './YAxisUnitSelector';--const { TextArea } = Input;-import TimePreference from 'components/TimePreferenceDropDown';-import {Container,// NullButtonContainer, TextContainer,Title,} from './styles';+// import {ca} from '@grafana/data'+import { timePreferance } from './timeItems';+import YAxisUnitSelector from './YAxisUnitSelector';-const RightContainer = ({+const { TextArea } = Input;++function RightContainer({description,// opacity,// selectedNullZeroValue,@@ -40,7 +39,7 @@ const RightContainer = ({selectedTime,yAxisUnit,setYAxisUnit,-}: RightContainerProps): JSX.Element => {+}: RightContainerProps): JSX.Element {const onChangeHandler = useCallback((setFunc: React.Dispatch<React.SetStateAction<string>>, value: string) => {setFunc(value);@@ -89,7 +88,7 @@ const RightContainer = ({value={title}/>- <Title light={'true'}>Description</Title>+ <Title light="true">Description</Title><TextAreaplaceholder="Write something describing the panel"@@ -141,7 +140,7 @@ const RightContainer = ({))}</NullButtonContainer> */}- <Title light={'true'}>Panel Time Preference</Title>+ <Title light="true">Panel Time Preference</Title><TimePreference{...{@@ -152,7 +151,7 @@ const RightContainer = ({<YAxisUnitSelector defaultValue={yAxisUnit} onSelect={setYAxisUnit} /></Container>);-};+}interface RightContainerProps {title: string;diff --git a/frontend/src/container/NewWidget/index.tsx b/frontend/src/container/NewWidget/index.tsxindex 7c40e968d7..1ab05d76bd 100644--- a/frontend/src/container/NewWidget/index.tsx+++ b/frontend/src/container/NewWidget/index.tsx@@ -38,13 +38,13 @@ import {RightContainerWrapper,} from './styles';-const NewWidget = ({+function NewWidget({selectedGraph,applySettingsToPanel,saveSettingOfPanel,getQueryResults,updateQuery,-}: Props): JSX.Element => {+}: Props): JSX.Element {const { dashboards } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -55,7 +55,7 @@ const NewWidget = ({const [selectedDashboard] = dashboards;- const widgets = selectedDashboard.data.widgets;+ const { widgets } = selectedDashboard.data;const { push } = useHistory();const { search } = useLocation();@@ -114,7 +114,7 @@ const NewWidget = ({title,yAxisUnit,widgetId: query.get('widgetId') || '',- dashboardId: dashboardId,+ dashboardId,});}, [opacity,@@ -221,7 +221,7 @@ const NewWidget = ({</PanelContainer></Container>);-};+}export interface NewWidgetProps {selectedGraph: GRAPH_TYPES;diff --git a/frontend/src/container/SideNav/Slack.tsx b/frontend/src/container/SideNav/Slack.tsxindex d0cc536e38..c0abe5d3ba 100644--- a/frontend/src/container/SideNav/Slack.tsx+++ b/frontend/src/container/SideNav/Slack.tsx@@ -1,6 +1,6 @@import React from 'react';-const Slack = (): JSX.Element => {+function Slack(): JSX.Element {return (<svgwidth="28"@@ -43,6 +43,6 @@ const Slack = (): JSX.Element => {/></svg>);-};+}export default Slack;diff --git a/frontend/src/container/SideNav/index.tsx b/frontend/src/container/SideNav/index.tsxindex 687bf2639b..3279da587c 100644--- a/frontend/src/container/SideNav/index.tsx+++ b/frontend/src/container/SideNav/index.tsx@@ -4,8 +4,7 @@ import history from 'lib/history';import setTheme from 'lib/theme/setTheme';import React, { useCallback, useState } from 'react';import { connect, useSelector } from 'react-redux';-import { NavLink } from 'react-router-dom';-import { useLocation } from 'react-router-dom';+import { NavLink, useLocation } from 'react-router-dom';import { bindActionCreators } from 'redux';import { ThunkDispatch } from 'redux-thunk';import { ToggleDarkMode } from 'store/actions';@@ -15,10 +14,16 @@ import AppReducer from 'types/reducer/app';import menus from './menuItems';import Slack from './Slack';-import { SlackButton, SlackMenuItemContainer, ToggleButton } from './styles';-import { Logo, Sider, ThemeSwitcherWrapper } from './styles';+import {+ Logo,+ Sider,+ SlackButton,+ SlackMenuItemContainer,+ ThemeSwitcherWrapper,+ ToggleButton,+} from './styles';-const SideNav = ({ toggleDarkMode }: Props): JSX.Element => {+function SideNav({ toggleDarkMode }: Props): JSX.Element {const [collapsed, setCollapsed] = useState<boolean>(false);const { pathname } = useLocation();const { isDarkMode } = useSelector<AppState, AppReducer>((state) => state.app);@@ -28,7 +33,7 @@ const SideNav = ({ toggleDarkMode }: Props): JSX.Element => {setTheme(preMode);const id: appMode = preMode;- const head = document.head;+ const { head } = document;const link = document.createElement('link');link.rel = 'stylesheet';link.type = 'text/css';@@ -71,7 +76,7 @@ const SideNav = ({ toggleDarkMode }: Props): JSX.Element => {/></ThemeSwitcherWrapper><NavLink to={ROUTES.APPLICATION}>- <Logo src={'/signoz.svg'} alt="SigNoz" collapsed={collapsed} />+ <Logo src="/signoz.svg" alt="SigNoz" collapsed={collapsed} /></NavLink><Menu@@ -97,7 +102,7 @@ const SideNav = ({ toggleDarkMode }: Props): JSX.Element => {</Menu></Sider>);-};+}type appMode = 'darkMode' | 'lightMode';diff --git a/frontend/src/container/SideNav/styles.ts b/frontend/src/container/SideNav/styles.tsindex 534d02183a..33792a2904 100644--- a/frontend/src/container/SideNav/styles.ts+++ b/frontend/src/container/SideNav/styles.ts@@ -1,5 +1,6 @@import { Layout, Menu, Switch, Typography } from 'antd';import styled, { css } from 'styled-components';+const { Sider: SiderComponent } = Layout;export const ThemeSwitcherWrapper = styled.div`diff --git a/frontend/src/container/Timeline/index.tsx b/frontend/src/container/Timeline/index.tsxindex 5f8dbe7ffa..19aa63e15a 100644--- a/frontend/src/container/Timeline/index.tsx+++ b/frontend/src/container/Timeline/index.tsx@@ -11,11 +11,11 @@ import { getIntervals, getIntervalSpread } from './utils';const Timeline_Height = 22;const Timeline_H_Spacing = 0;-const Timeline = ({+function Timeline({traceMetaData,globalTraceMetadata,setIntervalUnit,-}: TimelineProps): JSX.Element => {+}: TimelineProps): JSX.Element {const [ref, { width }] = useMeasure<HTMLDivElement>();const { isDarkMode } = useThemeMode();@@ -27,7 +27,7 @@ const Timeline = ({baseSpread,intervalSpreadNormalized,} = getIntervalSpread({- globalTraceMetadata: globalTraceMetadata,+ globalTraceMetadata,localTraceMetaData: traceMetaData,});@@ -90,7 +90,7 @@ const Timeline = ({</Svg></StyledDiv>);-};+}interface TimelineProps {traceMetaData: {diff --git a/frontend/src/container/Timeline/utils.ts b/frontend/src/container/Timeline/utils.tsindex 2248187b5d..cf2509bc4a 100644--- a/frontend/src/container/Timeline/utils.ts+++ b/frontend/src/container/Timeline/utils.ts@@ -32,9 +32,8 @@ export const getIntervalSpread = ({const intervalSpreadNormalized =intervalSpread < 1.0? intervalSpread- : Math.floor(- Number(integerPartString) / Math.pow(10, integerPartLength - 1),- ) * Math.pow(10, integerPartLength - 1);+ : Math.floor(Number(integerPartString) / 10 ** (integerPartLength - 1)) *+ 10 ** (integerPartLength - 1);return {baseInterval,baseSpread,diff --git a/frontend/src/container/Trace/Filters/Panel/PanelBody/Common/Checkbox.tsx b/frontend/src/container/Trace/Filters/Panel/PanelBody/Common/Checkbox.tsxindex a5d01a2822..d2b588066e 100644--- a/frontend/src/container/Trace/Filters/Panel/PanelBody/Common/Checkbox.tsx+++ b/frontend/src/container/Trace/Filters/Panel/PanelBody/Common/Checkbox.tsx@@ -15,7 +15,7 @@ import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';import { CheckBoxContainer } from './styles';-const CheckBoxComponent = (props: CheckBoxProps): JSX.Element => {+function CheckBoxComponent(props: CheckBoxProps): JSX.Element {const {selectedFilter,filterLoading,@@ -167,7 +167,7 @@ const CheckBoxComponent = (props: CheckBoxProps): JSX.Element => {)}</CheckBoxContainer>);-};+}interface DispatchProps {selectedTraceFilter: (props: {diff --git a/frontend/src/container/Trace/Filters/Panel/PanelBody/CommonCheckBox/index.tsx b/frontend/src/container/Trace/Filters/Panel/PanelBody/CommonCheckBox/index.tsxindex 2502e21e07..82e20c4ecc 100644--- a/frontend/src/container/Trace/Filters/Panel/PanelBody/CommonCheckBox/index.tsx+++ b/frontend/src/container/Trace/Filters/Panel/PanelBody/CommonCheckBox/index.tsx@@ -5,7 +5,7 @@ import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';import CheckBoxComponent from '../Common/Checkbox';-const CommonCheckBox = (props: CommonCheckBoxProps): JSX.Element => {+function CommonCheckBox(props: CommonCheckBoxProps): JSX.Element {const { filter } = useSelector<AppState, TraceReducer>((state) => state.traces,);@@ -28,7 +28,7 @@ const CommonCheckBox = (props: CommonCheckBoxProps): JSX.Element => {))}</>);-};+}interface CommonCheckBoxProps {name: TraceFilterEnum;diff --git a/frontend/src/container/Trace/Filters/Panel/PanelBody/Duration/index.tsx b/frontend/src/container/Trace/Filters/Panel/PanelBody/Duration/index.tsxindex c6f42c4656..2c495bb36e 100644--- a/frontend/src/container/Trace/Filters/Panel/PanelBody/Duration/index.tsx+++ b/frontend/src/container/Trace/Filters/Panel/PanelBody/Duration/index.tsx@@ -26,7 +26,7 @@ const getMs = (value: string) => {.format('SSS');};-const Duration = (): JSX.Element => {+function Duration(): JSX.Element {const {filter,selectedFilter,@@ -57,8 +57,8 @@ const Duration = (): JSX.Element => {const duration = getDuration();- const maxDuration = duration['maxDuration'] || '0';- const minDuration = duration['minDuration'] || '0';+ const maxDuration = duration.maxDuration || '0';+ const minDuration = duration.minDuration || '0';const [localMax, setLocalMax] = useState<string>(maxDuration);const [localMin, setLocalMin] = useState<string>(minDuration);@@ -134,7 +134,7 @@ const Duration = (): JSX.Element => {const onChangeMaxHandler: React.ChangeEventHandler<HTMLInputElement> = (event,) => {- const value = event.target.value;+ const { value } = event.target;const min = parseFloat(localMin);const max = parseFloat(value) * 1000000;@@ -147,7 +147,7 @@ const Duration = (): JSX.Element => {const onChangeMinHandler: React.ChangeEventHandler<HTMLInputElement> = (event,) => {- const value = event.target.value;+ const { value } = event.target;const min = parseFloat(value) * 1000000;const max = parseFloat(localMax);onRangeSliderHandler([min, max]);@@ -184,8 +184,8 @@ const Duration = (): JSX.Element => {<Container><SliderdefaultValue={[defaultValue[0], defaultValue[1]]}- min={parseFloat((filter.get('duration') || {})['minDuration'])}- max={parseFloat((filter.get('duration') || {})['maxDuration'])}+ min={parseFloat((filter.get('duration') || {}).minDuration)}+ max={parseFloat((filter.get('duration') || {}).maxDuration)}rangetipFormatter={(value) => {if (value === undefined) {@@ -207,6 +207,6 @@ const Duration = (): JSX.Element => {</Container></div>);-};+}export default Duration;diff --git a/frontend/src/container/Trace/Filters/Panel/PanelBody/index.tsx b/frontend/src/container/Trace/Filters/Panel/PanelBody/index.tsxindex 3afcd0fbcd..5782a02f04 100644--- a/frontend/src/container/Trace/Filters/Panel/PanelBody/index.tsx+++ b/frontend/src/container/Trace/Filters/Panel/PanelBody/index.tsx@@ -8,7 +8,7 @@ import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';import CommonCheckBox from './CommonCheckBox';import Duration from './Duration';-const PanelBody = (props: PanelBodyProps): JSX.Element => {+function PanelBody(props: PanelBodyProps): JSX.Element {const { type } = props;const { filterLoading } = useSelector<AppState, TraceReducer>(@@ -28,7 +28,7 @@ const PanelBody = (props: PanelBodyProps): JSX.Element => {{type === 'duration' ? <Duration /> : <CommonCheckBox name={type} />}</Card>);-};+}interface PanelBodyProps {type: TraceFilterEnum;diff --git a/frontend/src/container/Trace/Filters/Panel/PanelHeading/index.tsx b/frontend/src/container/Trace/Filters/Panel/PanelHeading/index.tsxindex 6ee390b60c..26ba4f899f 100644--- a/frontend/src/container/Trace/Filters/Panel/PanelHeading/index.tsx+++ b/frontend/src/container/Trace/Filters/Panel/PanelHeading/index.tsx@@ -1,9 +1,20 @@import { DownOutlined, RightOutlined } from '@ant-design/icons';import { Card, Divider, notification, Typography } from 'antd';+import getFilters from 'api/trace/getFilters';+import { AxiosError } from 'axios';import React, { useState } from 'react';import { useDispatch, useSelector } from 'react-redux';+import { Dispatch } from 'redux';+import { getFilter, updateURL } from 'store/actions/trace/util';import { AppState } from 'store/reducers';-import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';+import AppActions from 'types/actions';+import { UPDATE_ALL_FILTERS } from 'types/actions/trace';+import { GlobalReducer } from 'types/reducer/globalTime';+import {+ AllPanelHeading,+ TraceFilterEnum,+ TraceReducer,+} from 'types/reducer/trace';import {ButtonComponent,@@ -12,18 +23,10 @@ import {IconContainer,TextCotainer,} from './styles';-const { Text } = Typography;-import getFilters from 'api/trace/getFilters';-import { AxiosError } from 'axios';-import { Dispatch } from 'redux';-import { getFilter, updateURL } from 'store/actions/trace/util';-import AppActions from 'types/actions';-import { UPDATE_ALL_FILTERS } from 'types/actions/trace';-import { GlobalReducer } from 'types/reducer/globalTime';-import { AllPanelHeading } from 'types/reducer/trace';+const { Text } = Typography;-const PanelHeading = (props: PanelHeadingProps): JSX.Element => {+function PanelHeading(props: PanelHeadingProps): JSX.Element {const {filterLoading,filterToFetchData,@@ -307,7 +310,7 @@ const PanelHeading = (props: PanelHeadingProps): JSX.Element => {</Card></>);-};+}interface PanelHeadingProps {name: TraceFilterEnum;diff --git a/frontend/src/container/Trace/Filters/Panel/index.tsx b/frontend/src/container/Trace/Filters/Panel/index.tsxindex a6aee59c2d..d46db26091 100644--- a/frontend/src/container/Trace/Filters/Panel/index.tsx+++ b/frontend/src/container/Trace/Filters/Panel/index.tsx@@ -6,7 +6,7 @@ import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';import PanelBody from './PanelBody';import PanelHeading from './PanelHeading';-const Panel = (props: PanelProps): JSX.Element => {+function Panel(props: PanelProps): JSX.Element {const traces = useSelector<AppState, TraceReducer>((state) => state.traces);const isDefaultOpen =@@ -19,7 +19,7 @@ const Panel = (props: PanelProps): JSX.Element => {{isDefaultOpen && <PanelBody type={props.name} />}</>);-};+}interface PanelProps {name: TraceFilterEnum;diff --git a/frontend/src/container/Trace/Filters/index.tsx b/frontend/src/container/Trace/Filters/index.tsxindex 0090e29726..276b69b227 100644--- a/frontend/src/container/Trace/Filters/index.tsx+++ b/frontend/src/container/Trace/Filters/index.tsx@@ -16,12 +16,14 @@ export const AllTraceFilterEnum: TraceFilterEnum[] = ['httpUrl',];-const Filters = (): JSX.Element => (- <React.Fragment>- {AllTraceFilterEnum.map((panelName) => (- <Panel key={panelName} name={panelName} />- ))}- </React.Fragment>-);+function Filters(): JSX.Element {+ return (+ <>+ {AllTraceFilterEnum.map((panelName) => (+ <Panel key={panelName} name={panelName} />+ ))}+ </>+ );+}export default Filters;diff --git a/frontend/src/container/Trace/Graph/config.ts b/frontend/src/container/Trace/Graph/config.tsindex b0b500c06d..08744821cb 100644--- a/frontend/src/container/Trace/Graph/config.ts+++ b/frontend/src/container/Trace/Graph/config.ts@@ -56,7 +56,7 @@ export const getChartData = (export const getChartDataforGroupBy = (props: TraceReducer['spansGraph']['payload'],): ChartData => {- const items = props.items;+ const { items } = props;const chartData: ChartData = {datasets: [],@@ -68,7 +68,7 @@ export const getChartDataforGroupBy = (const allGroupBy = Object.keys(items).map((e) => items[e].groupBy);Object.keys(allGroupBy).map((e) => {- const length = Object.keys(allGroupBy[e]).length;+ const { length } = Object.keys(allGroupBy[e]);if (length >= max) {max = length;@@ -90,7 +90,7 @@ export const getChartDataforGroupBy = (chartData.labels?.push(date);- const groupBy = spanData.groupBy;+ const { groupBy } = spanData;const preData: number[] = [];if (groupBy) {diff --git a/frontend/src/container/Trace/Graph/index.tsx b/frontend/src/container/Trace/Graph/index.tsxindex e4ab7c49ea..0181907901 100644--- a/frontend/src/container/Trace/Graph/index.tsx+++ b/frontend/src/container/Trace/Graph/index.tsx@@ -9,7 +9,7 @@ import { TraceReducer } from 'types/reducer/trace';import { getChartData, getChartDataforGroupBy } from './config';import { Container } from './styles';-const TraceGraph = (): JSX.Element => {+function TraceGraph(): JSX.Element {const { spansGraph, selectedGroupBy, yAxisUnit } = useSelector<AppState,TraceReducer@@ -34,7 +34,7 @@ const TraceGraph = (): JSX.Element => {if (loading || payload === undefined) {return (<Container>- <Spinner height={'20vh'} size="small" tip="Loading..." />+ <Spinner height="20vh" size="small" tip="Loading..." /></Container>);}@@ -49,6 +49,6 @@ const TraceGraph = (): JSX.Element => {/></Container>);-};+}export default TraceGraph;diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/TagKey.tsx b/frontend/src/container/Trace/Search/AllTags/Tag/TagKey.tsxindex a9dacda144..e8ed0a97c7 100644--- a/frontend/src/container/Trace/Search/AllTags/Tag/TagKey.tsx+++ b/frontend/src/container/Trace/Search/AllTags/Tag/TagKey.tsx@@ -6,7 +6,7 @@ import { AppState } from 'store/reducers';import { GlobalReducer } from 'types/reducer/globalTime';import { TraceReducer } from 'types/reducer/trace';-const TagsKey = (props: TagsKeysProps): JSX.Element => {+function TagsKey(props: TagsKeysProps): JSX.Element {const [selectLoading, setSelectLoading] = useState<boolean>(false);const globalTime = useSelector<AppState, GlobalReducer>((state) => state.globalTime,@@ -94,7 +94,7 @@ const TagsKey = (props: TagsKeysProps): JSX.Element => {<Input disabled={selectLoading} placeholder="Please select" /></AutoComplete>);-};+}interface TagsKeysProps {index: number;diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx b/frontend/src/container/Trace/Search/AllTags/Tag/index.tsxindex 004e1f96a0..74bfca6906 100644--- a/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx+++ b/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx@@ -17,6 +17,7 @@ import {ValueSelect,} from './styles';import TagsKey from './TagKey';+const { Option } = Select;type Tags = FlatArray<TraceReducer['selectedTags'], 1>['Operator'];@@ -37,7 +38,7 @@ interface AllMenu {value: string;}-const SingleTags = (props: AllTagsProps): JSX.Element => {+function SingleTags(props: AllTagsProps): JSX.Element {const traces = useSelector<AppState, TraceReducer>((state) => state.traces);const {Key: selectedKey,@@ -62,51 +63,49 @@ const SingleTags = (props: AllTagsProps): JSX.Element => {};return (- <>- <Container>- <TagsKey- index={props.index}- tag={props.tag}- setLocalSelectedTags={props.setLocalSelectedTags}- />-- <SelectComponent- onChange={onChangeOperatorHandler}- value={AllMenu.find((e) => e.key === selectedOperator)?.value || ''}- >- {AllMenu.map((e) => (- <Option key={e.value} value={e.key}>- {e.value}- </Option>- ))}- </SelectComponent>-- <ValueSelect- value={selectedValues}- onChange={(value): void => {- props.setLocalSelectedTags((tags) => [- ...tags.slice(0, props.index),- {- Key: selectedKey,- Operator: selectedOperator,- Values: value as string[],- },- ...tags.slice(props.index + 1, tags.length),- ]);- }}- mode="tags"- />-- <IconContainer- role={'button'}- onClick={(): void => onDeleteTagHandler(props.index)}- >- <CloseOutlined />- </IconContainer>- </Container>- </>+ <Container>+ <TagsKey+ index={props.index}+ tag={props.tag}+ setLocalSelectedTags={props.setLocalSelectedTags}+ />++ <SelectComponent+ onChange={onChangeOperatorHandler}+ value={AllMenu.find((e) => e.key === selectedOperator)?.value || ''}+ >+ {AllMenu.map((e) => (+ <Option key={e.value} value={e.key}>+ {e.value}+ </Option>+ ))}+ </SelectComponent>++ <ValueSelect+ value={selectedValues}+ onChange={(value): void => {+ props.setLocalSelectedTags((tags) => [+ ...tags.slice(0, props.index),+ {+ Key: selectedKey,+ Operator: selectedOperator,+ Values: value as string[],+ },+ ...tags.slice(props.index + 1, tags.length),+ ]);+ }}+ mode="tags"+ />++ <IconContainer+ role="button"+ onClick={(): void => onDeleteTagHandler(props.index)}+ >+ <CloseOutlined />+ </IconContainer>+ </Container>);-};+}interface DispatchProps {updateSelectedTags: (props: TraceReducer['selectedTags']) => void;diff --git a/frontend/src/container/Trace/Search/AllTags/index.tsx b/frontend/src/container/Trace/Search/AllTags/index.tsxindex 95083efb47..a5c93f2c81 100644--- a/frontend/src/container/Trace/Search/AllTags/index.tsx+++ b/frontend/src/container/Trace/Search/AllTags/index.tsx@@ -1,18 +1,7 @@-import { CaretRightFilled } from '@ant-design/icons';+import { CaretRightFilled, PlusOutlined } from '@ant-design/icons';import { Button, Space, Typography } from 'antd';-import React, { useEffect, useState } from 'react';--import {- ButtonContainer,- Container,- CurrentTagsContainer,- ErrorContainer,- Wrapper,-} from './styles';-import Tags from './Tag';-const { Text } = Typography;-import { PlusOutlined } from '@ant-design/icons';import { isEqual } from 'lodash-es';+import React, { useEffect, useState } from 'react';import { connect, useSelector } from 'react-redux';import { bindActionCreators } from 'redux';import { ThunkDispatch } from 'redux-thunk';@@ -23,15 +12,25 @@ import AppActions from 'types/actions';import { TraceReducer } from 'types/reducer/trace';import { parseTagsToQuery } from '../util';+import {+ ButtonContainer,+ Container,+ CurrentTagsContainer,+ ErrorContainer,+ Wrapper,+} from './styles';+import Tags from './Tag';++const { Text } = Typography;const { Paragraph } = Typography;-const AllTags = ({+function AllTags({updateTagIsError,onChangeHandler,updateTagVisiblity,updateFilters,-}: AllTagsProps): JSX.Element => {+}: AllTagsProps): JSX.Element {const traces = useSelector<AppState, TraceReducer>((state) => state.traces);const [localSelectedTags, setLocalSelectedTags] = useState<@@ -95,49 +94,47 @@ const AllTags = ({}return (- <>- <Container>- <Wrapper>- <Typography>Tags</Typography>-- <CurrentTagsContainer>- {localSelectedTags.map((tags, index) => (- <Tags- key={tags.Key.join(',')}- tag={tags}- index={index}- onCloseHandler={(): void => onCloseHandler(index)}- setLocalSelectedTags={setLocalSelectedTags}- />- ))}- </CurrentTagsContainer>-- <Space wrap direction="horizontal">- <Button type="primary" onClick={onTagAddHandler} icon={<PlusOutlined />}>- Add Tags Filter- </Button>-- <Text ellipsis>- Results will include spans with ALL the specified tags ( Rows are `anded`- )- </Text>- </Space>- </Wrapper>-- <ButtonContainer>- <Button onClick={onResetHandler}>Reset</Button>- <Button- type="primary"- onClick={onRunQueryHandler}- icon={<CaretRightFilled />}- >- Run Query+ <Container>+ <Wrapper>+ <Typography>Tags</Typography>++ <CurrentTagsContainer>+ {localSelectedTags.map((tags, index) => (+ <Tags+ key={tags.Key.join(',')}+ tag={tags}+ index={index}+ onCloseHandler={(): void => onCloseHandler(index)}+ setLocalSelectedTags={setLocalSelectedTags}+ />+ ))}+ </CurrentTagsContainer>++ <Space wrap direction="horizontal">+ <Button type="primary" onClick={onTagAddHandler} icon={<PlusOutlined />}>+ Add Tags Filter</Button>- </ButtonContainer>- </Container>- </>++ <Text ellipsis>+ Results will include spans with ALL the specified tags ( Rows are `anded`+ )+ </Text>+ </Space>+ </Wrapper>++ <ButtonContainer>+ <Button onClick={onResetHandler}>Reset</Button>+ <Button+ type="primary"+ onClick={onRunQueryHandler}+ icon={<CaretRightFilled />}+ >+ Run Query+ </Button>+ </ButtonContainer>+ </Container>);-};+}interface DispatchProps {updateTagIsError: (value: boolean) => void;diff --git a/frontend/src/container/Trace/Search/index.tsx b/frontend/src/container/Trace/Search/index.tsxindex df919e3134..cb8fdd453d 100644--- a/frontend/src/container/Trace/Search/index.tsx+++ b/frontend/src/container/Trace/Search/index.tsx@@ -17,10 +17,10 @@ import Tags from './AllTags';import { Container, SearchComponent } from './styles';import { parseQueryToTags, parseTagsToQuery } from './util';-const Search = ({+function Search({updateTagVisiblity,updateTagIsError,-}: SearchProps): JSX.Element => {+}: SearchProps): JSX.Element {const traces = useSelector<AppState, TraceReducer>((state) => state.traces);const [value, setValue] = useState<string>('');@@ -120,7 +120,7 @@ const Search = ({disabled={traces.filterLoading}onFocus={onFocusHandler}placeholder="Click to filter by tags"- type={'search'}+ type="search"enterButton={<CaretRightFilled />}onSearch={(string): void => {if (string.length === 0) {@@ -147,7 +147,7 @@ const Search = ({</Container></Space>);-};+}interface DispatchProps {updateTagVisiblity: (value: boolean) => void;diff --git a/frontend/src/container/Trace/TraceGraphFilter/index.tsx b/frontend/src/container/Trace/TraceGraphFilter/index.tsxindex 2d676b0682..c7b97c6dc4 100644--- a/frontend/src/container/Trace/TraceGraphFilter/index.tsx+++ b/frontend/src/container/Trace/TraceGraphFilter/index.tsx@@ -16,7 +16,7 @@ import { SelectComponent } from './styles';const { Option } = SelectComponent;-const TraceGraphFilter = (): JSX.Element => {+function TraceGraphFilter(): JSX.Element {const { selectedFunction, selectedGroupBy } = useSelector<AppState,TraceReducer@@ -86,6 +86,6 @@ const TraceGraphFilter = (): JSX.Element => {</SelectComponent></Space>);-};+}export default TraceGraphFilter;diff --git a/frontend/src/container/Trace/TraceTable/index.tsx b/frontend/src/container/Trace/TraceTable/index.tsxindex 1aae8018b7..309ed9a374 100644--- a/frontend/src/container/Trace/TraceTable/index.tsx+++ b/frontend/src/container/Trace/TraceTable/index.tsx@@ -16,9 +16,10 @@ import { AppState } from 'store/reducers';import AppActions from 'types/actions';import { GlobalReducer } from 'types/reducer/globalTime';import { TraceReducer } from 'types/reducer/trace';+dayjs.extend(duration);-const TraceTable = ({ getSpansAggregate }: TraceProps): JSX.Element => {+function TraceTable({ getSpansAggregate }: TraceProps): JSX.Element {const {spansAggregate,selectedFilter,@@ -123,7 +124,7 @@ const TraceTable = ({ getSpansAggregate }: TraceProps): JSX.Element => {},})}size="middle"- rowKey={'timestamp'}+ rowKey="timestamp"style={{cursor: 'pointer',}}@@ -132,11 +133,11 @@ const TraceTable = ({ getSpansAggregate }: TraceProps): JSX.Element => {pageSize: spansAggregate.pageSize,responsive: true,position: ['bottomLeft'],- total: total,+ total,}}/>);-};+}interface DispatchProps {getSpansAggregate: (props: GetSpansAggregateProps) => void;diff --git a/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx b/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsxindex 4ad7f069c3..d4e163cb93 100644--- a/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx+++ b/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx@@ -10,7 +10,7 @@ import { CustomSubText, CustomSubTitle, styles } from './styles';const { Panel } = Collapse;-const ErrorTag = ({ event }: ErrorTagProps): JSX.Element => {+function ErrorTag({ event }: ErrorTagProps): JSX.Element {const [isOpen, setIsOpen] = useState(false);const { isDarkMode } = useThemeMode();@@ -85,7 +85,7 @@ const ErrorTag = ({ event }: ErrorTagProps): JSX.Element => {</Modal></>);-};+}interface ErrorTagProps {event: ITraceTree['event'];diff --git a/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx b/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsxindex 704405fed6..afbac47ab4 100644--- a/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx+++ b/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx@@ -16,7 +16,7 @@ import {const { TabPane } = Tabs;-const SelectedSpanDetails = (props: SelectedSpanDetailsProps): JSX.Element => {+function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element {const { tree } = props;const { isDarkMode } = useThemeMode();if (!tree) {@@ -73,7 +73,7 @@ const SelectedSpanDetails = (props: SelectedSpanDetailsProps): JSX.Element => {</Tabs></CardContainer>);-};+}interface SelectedSpanDetailsProps {tree?: ITraceTree;diff --git a/frontend/src/container/TraceDetail/SelectedSpanDetails/styles.ts b/frontend/src/container/TraceDetail/SelectedSpanDetails/styles.tsindex b93e1f5647..17a00d09f7 100644--- a/frontend/src/container/TraceDetail/SelectedSpanDetails/styles.ts+++ b/frontend/src/container/TraceDetail/SelectedSpanDetails/styles.ts@@ -1,5 +1,6 @@import { Typography } from 'antd';import styled, { css } from 'styled-components';+const { Text, Title, Paragraph } = Typography;export const CustomTitle = styled(Title)`diff --git a/frontend/src/container/TraceDetail/index.tsx b/frontend/src/container/TraceDetail/index.tsxindex 59c6162fac..b05cde4c4f 100644--- a/frontend/src/container/TraceDetail/index.tsx+++ b/frontend/src/container/TraceDetail/index.tsx@@ -27,7 +27,7 @@ import SelectedSpanDetails from './SelectedSpanDetails';import * as styles from './styles';import { getSortedData, IIntervalUnit, INTERVAL_UNITS } from './utils';-const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {+function TraceDetail({ response }: TraceDetailProps): JSX.Element {const spanServiceColors = useMemo(() => spanServiceNameToColorMapping(response[0].events),[response],@@ -86,7 +86,7 @@ const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {return (<StyledRow styledclass={[StyledStyles.Flex({ flex: 1 })]}>- <StyledCol flex={'auto'} styledclass={styles.leftContainer}>+ <StyledCol flex="auto" styledclass={styles.leftContainer}><StyledRow styledclass={styles.flameAndTimelineContainer}><StyledColstyledclass={styles.traceMetaDataContainer}@@ -99,7 +99,7 @@ const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {{traceMetaData.totalSpans} Span</StyledTypography.Text></StyledCol>- <Col flex={'auto'}>+ <Col flex="auto"><TraceFlameGraphtreeData={tree}traceMetaData={traceMetaData}@@ -148,7 +148,7 @@ const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {style={{ width: 200 }}/> */}</Col>- <Col flex={'auto'}>+ <Col flex="auto"><StyledSpace styledclass={[styles.floatRight]}><Button onClick={onFocusSelectedSpanHandler} icon={<FilterOutlined />}>Focus on selected span@@ -180,7 +180,7 @@ const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {</StyledCol></StyledRow>);-};+}interface TraceDetailProps {response: PayloadProps;diff --git a/frontend/src/container/TraceDetail/styles.ts b/frontend/src/container/TraceDetail/styles.tsindex 38c420042c..2000ac17ae 100644--- a/frontend/src/container/TraceDetail/styles.ts+++ b/frontend/src/container/TraceDetail/styles.ts@@ -57,7 +57,6 @@ export const selectedSpanDetailContainer = css`flex-direction: column;`;-/*** Generic / Common styles*/diff --git a/frontend/src/container/TraceFlameGraph/index.tsx b/frontend/src/container/TraceFlameGraph/index.tsxindex 344098624f..8bdd657ff7 100644--- a/frontend/src/container/TraceFlameGraph/index.tsx+++ b/frontend/src/container/TraceFlameGraph/index.tsx@@ -26,7 +26,7 @@ interface SpanItem {selectedSpanId: string;}-const SpanItem = ({+function SpanItem({topOffset = 0, // top offset in pxleftOffset = 0, // left offset in %width = 10, // width in %@@ -36,7 +36,7 @@ const SpanItem = ({onSpanHover,hoveredSpanId,selectedSpanId,-}: SpanItem): JSX.Element => {+}: SpanItem): JSX.Element {const { serviceColour } = spanData;const [isSelected, setIsSelected] = useState<boolean>(false);// const [isLocalHover, setIsLocalHover] = useState<boolean>(false);@@ -70,28 +70,26 @@ const SpanItem = ({}, [isSelected, serviceColour, isDarkMode]);return (- <>- <SpanItemContainer- title={tooltipText}- onClick={handleClick}- onMouseEnter={(): void => {- handleHover(true);- }}- onMouseLeave={(): void => {- handleHover(false);- }}- topOffset={topOffset}- leftOffset={leftOffset}- width={width}- spanColor={spanColor}- selected={isSelected}- zIdx={isSelected ? 1 : 0}- ></SpanItemContainer>- </>+ <SpanItemContainer+ title={tooltipText}+ onClick={handleClick}+ onMouseEnter={(): void => {+ handleHover(true);+ }}+ onMouseLeave={(): void => {+ handleHover(false);+ }}+ topOffset={topOffset}+ leftOffset={leftOffset}+ width={width}+ spanColor={spanColor}+ selected={isSelected}+ zIdx={isSelected ? 1 : 0}+ />);-};+}-const TraceFlameGraph = (props: {+function TraceFlameGraph(props: {treeData: ITraceTree;traceMetaData: ITraceMetaData;onSpanHover: SpanItem['onSpanHover'];@@ -99,14 +97,14 @@ const TraceFlameGraph = (props: {hoveredSpanId: string;selectedSpanId: string;intervalUnit: IIntervalUnit;-}): JSX.Element => {+}): JSX.Element {if (!props.treeData || props.treeData.id === 'empty' || !props.traceMetaData) {return <></>;}const { intervalUnit } = props;const { globalStart, spread, levels } = props.traceMetaData;- const RenderSpanRecursive = ({+ function RenderSpanRecursive({level = 0,spanData,parentLeftOffset = 0,@@ -122,7 +120,7 @@ const TraceFlameGraph = (props: {onSpanSelect: SpanItem['onSpanSelect'];hoveredSpanId: string;selectedSpanId: string;- }): JSX.Element => {+ }): JSX.Element {if (!spanData) {return <></>;}@@ -161,20 +159,18 @@ const TraceFlameGraph = (props: {))}</>);- };+ }return (- <>- <TraceFlameGraphContainer height={TOTAL_SPAN_HEIGHT * levels}>- <RenderSpanRecursive- spanData={props.treeData}- onSpanHover={props.onSpanHover}- onSpanSelect={props.onSpanSelect}- hoveredSpanId={props.hoveredSpanId}- selectedSpanId={props.selectedSpanId}- />- </TraceFlameGraphContainer>- </>+ <TraceFlameGraphContainer height={TOTAL_SPAN_HEIGHT * levels}>+ <RenderSpanRecursive+ spanData={props.treeData}+ onSpanHover={props.onSpanHover}+ onSpanSelect={props.onSpanSelect}+ hoveredSpanId={props.hoveredSpanId}+ selectedSpanId={props.selectedSpanId}+ />+ </TraceFlameGraphContainer>);-};+}export default TraceFlameGraph;diff --git a/frontend/src/container/TraceFlameGraph/styles.ts b/frontend/src/container/TraceFlameGraph/styles.tsindex 3c3ee3b807..285c67102e 100644--- a/frontend/src/container/TraceFlameGraph/styles.ts+++ b/frontend/src/container/TraceFlameGraph/styles.ts@@ -34,5 +34,5 @@ export const TraceFlameGraphContainer = styled.div<{}>`position: relative;width: 100%;- height: ${({ height }): string | number => (height ? height : 120)}px;+ height: ${({ height }): string | number => height || 120}px;`;diff --git a/frontend/src/container/TriggeredAlerts/Filter.tsx b/frontend/src/container/TriggeredAlerts/Filter.tsxindex 39b1ccfd18..701687f381 100644--- a/frontend/src/container/TriggeredAlerts/Filter.tsx+++ b/frontend/src/container/TriggeredAlerts/Filter.tsx@@ -4,13 +4,13 @@ import { Alerts } from 'types/api/alerts/getAll';import { Container, Select } from './styles';-const Filter = ({+function Filter({setSelectedFilter,setSelectedGroup,allAlerts,selectedGroup,selectedFilter,-}: FilterProps): JSX.Element => {+}: FilterProps): JSX.Element {const onChangeSelectGroupHandler = useCallback((value: string[]) => {setSelectedGroup(@@ -59,7 +59,7 @@ const Filter = ({const { label, closable, onClose } = props;return (<Tag- color={'magenta'}+ color="magenta"closable={closable}onClose={onClose}style={{ marginRight: 3 }}@@ -81,7 +81,7 @@ const Filter = ({const { label, closable, onClose } = props;return (<Tag- color={'magenta'}+ color="magenta"closable={closable}onClose={onClose}style={{ marginRight: 3 }}@@ -94,7 +94,7 @@ const Filter = ({/></Container>);-};+}interface FilterProps {setSelectedFilter: React.Dispatch<React.SetStateAction<Array<Value>>>;diff --git a/frontend/src/container/TriggeredAlerts/FilteredTable/ExapandableRow.tsx b/frontend/src/container/TriggeredAlerts/FilteredTable/ExapandableRow.tsxindex 0cc7b1f96b..fab66e242d 100644--- a/frontend/src/container/TriggeredAlerts/FilteredTable/ExapandableRow.tsx+++ b/frontend/src/container/TriggeredAlerts/FilteredTable/ExapandableRow.tsx@@ -7,64 +7,66 @@ import { Alerts } from 'types/api/alerts/getAll';import Status from '../TableComponents/AlertStatus';import { TableCell, TableRow } from './styles';-const ExapandableRow = ({ allAlerts }: ExapandableRowProps): JSX.Element => (- <>- {allAlerts.map((alert) => {- const labels = alert.labels;- const labelsObject = Object.keys(labels);+function ExapandableRow({ allAlerts }: ExapandableRowProps): JSX.Element {+ return (+ <>+ {allAlerts.map((alert) => {+ const { labels } = alert;+ const labelsObject = Object.keys(labels);- const tags = labelsObject.filter((e) => e !== 'severity');+ const tags = labelsObject.filter((e) => e !== 'severity');- const formatedDate = new Date(alert.startsAt);+ const formatedDate = new Date(alert.startsAt);- return (- <TableRow- bodyStyle={{- minHeight: '5rem',- marginLeft: '2rem',- }}- translate="yes"- hoverable- key={alert.fingerprint}- >- <TableCell>- <Status severity={alert.status.state} />- </TableCell>+ return (+ <TableRow+ bodyStyle={{+ minHeight: '5rem',+ marginLeft: '2rem',+ }}+ translate="yes"+ hoverable+ key={alert.fingerprint}+ >+ <TableCell>+ <Status severity={alert.status.state} />+ </TableCell>- <TableCell>- <Typography>{labels['alertname']}</Typography>- </TableCell>+ <TableCell>+ <Typography>{labels.alertname}</Typography>+ </TableCell>- <TableCell>- <Typography>{labels['severity']}</Typography>- </TableCell>+ <TableCell>+ <Typography>{labels.severity}</Typography>+ </TableCell>- <TableCell>- <Typography>{`${getFormattedDate(formatedDate)} ${convertDateToAmAndPm(- formatedDate,- )}`}</Typography>- </TableCell>+ <TableCell>+ <Typography>{`${getFormattedDate(formatedDate)} ${convertDateToAmAndPm(+ formatedDate,+ )}`}</Typography>+ </TableCell>- <TableCell>- <div>- {tags.map((e) => (- <Tag key={e}>{`${e}:${labels[e]}`}</Tag>- ))}- </div>- </TableCell>+ <TableCell>+ <div>+ {tags.map((e) => (+ <Tag key={e}>{`${e}:${labels[e]}`}</Tag>+ ))}+ </div>+ </TableCell>- {/* <TableCell>+ {/* <TableCell><TableHeaderContainer><Button type="link">Edit</Button><Button type="link">Delete</Button><Button type="link">Pause</Button></TableHeaderContainer></TableCell> */}- </TableRow>- );- })}- </>-);+ </TableRow>+ );+ })}+ </>+ );+}interface ExapandableRowProps {allAlerts: Alerts[];diff --git a/frontend/src/container/TriggeredAlerts/FilteredTable/TableRow.tsx b/frontend/src/container/TriggeredAlerts/FilteredTable/TableRow.tsxindex 93cbaf16b7..2f446adcf5 100644--- a/frontend/src/container/TriggeredAlerts/FilteredTable/TableRow.tsx+++ b/frontend/src/container/TriggeredAlerts/FilteredTable/TableRow.tsx@@ -6,10 +6,10 @@ import { Alerts } from 'types/api/alerts/getAll';import ExapandableRow from './ExapandableRow';import { IconContainer, StatusContainer, TableCell, TableRow } from './styles';-const TableRowComponent = ({+function TableRowComponent({tags,tagsAlert,-}: TableRowComponentProps): JSX.Element => {+}: TableRowComponentProps): JSX.Element {const [isClicked, setIsClicked] = useState<boolean>(false);const onClickHandler = (): void => {@@ -33,10 +33,10 @@ const TableRowComponent = ({</></StatusContainer></TableCell>- <TableCell></TableCell>- <TableCell></TableCell>- <TableCell></TableCell>- <TableCell></TableCell>+ <TableCell />+ <TableCell />+ <TableCell />+ <TableCell />{/* <TableCell minWidth="200px"><Button type="primary">Resume Group</Button></TableCell> */}@@ -44,7 +44,7 @@ const TableRowComponent = ({{isClicked && <ExapandableRow allAlerts={tagsAlert} />}</div>);-};+}interface TableRowComponentProps {tags: string[];diff --git a/frontend/src/container/TriggeredAlerts/FilteredTable/index.tsx b/frontend/src/container/TriggeredAlerts/FilteredTable/index.tsxindex da6bc5a77d..f4ba163bfd 100644--- a/frontend/src/container/TriggeredAlerts/FilteredTable/index.tsx+++ b/frontend/src/container/TriggeredAlerts/FilteredTable/index.tsx@@ -8,11 +8,11 @@ import { FilterAlerts } from '../utils';import { Container, TableHeader, TableHeaderContainer } from './styles';import TableRowComponent from './TableRow';-const FilteredTable = ({+function FilteredTable({selectedGroup,allAlerts,selectedFilter,-}: FilteredTableProps): JSX.Element => {+}: FilteredTableProps): JSX.Element {const allGroupsAlerts: Dictionary<Alerts[]> = useMemo(() =>groupBy(FilterAlerts(allAlerts, selectedFilter), (obj) =>@@ -65,7 +65,7 @@ const FilteredTable = ({})}</Container>);-};+}interface FilteredTableProps {selectedGroup: Value[];diff --git a/frontend/src/container/TriggeredAlerts/NoFilterTable.tsx b/frontend/src/container/TriggeredAlerts/NoFilterTable.tsxindex d219e27cf7..5579ab86a1 100644--- a/frontend/src/container/TriggeredAlerts/NoFilterTable.tsx+++ b/frontend/src/container/TriggeredAlerts/NoFilterTable.tsx@@ -10,10 +10,10 @@ import { Alerts } from 'types/api/alerts/getAll';import { Value } from './Filter';import { FilterAlerts } from './utils';-const NoFilterTable = ({+function NoFilterTable({allAlerts,selectedFilter,-}: NoFilterTableProps): JSX.Element => {+}: NoFilterTableProps): JSX.Element {const filteredAlerts = FilterAlerts(allAlerts, selectedFilter);// need to add the filter@@ -63,8 +63,8 @@ const NoFilterTable = ({dataIndex: 'labels',key: 'severity',sorter: (a, b): number => {- const severityValueA = a.labels['severity'];- const severityValueB = b.labels['severity'];+ const severityValueA = a.labels.severity;+ const severityValueB = b.labels.severity;return severityValueA.length - severityValueB.length;},render: (value): JSX.Element => {@@ -95,7 +95,7 @@ const NoFilterTable = ({return (<Table rowKey="startsAt" dataSource={filteredAlerts} columns={columns} />);-};+}interface NoFilterTableProps {allAlerts: Alerts[];diff --git a/frontend/src/container/TriggeredAlerts/TableComponents/AlertStatus.tsx b/frontend/src/container/TriggeredAlerts/TableComponents/AlertStatus.tsxindex 8213302ff2..fc91115ebe 100644--- a/frontend/src/container/TriggeredAlerts/TableComponents/AlertStatus.tsx+++ b/frontend/src/container/TriggeredAlerts/TableComponents/AlertStatus.tsx@@ -1,7 +1,7 @@import { Tag } from 'antd';import React from 'react';-const Severity = ({ severity }: SeverityProps): JSX.Element => {+function Severity({ severity }: SeverityProps): JSX.Element {switch (severity) {case 'unprocessed': {return <Tag color="green">UnProcessed</Tag>;@@ -19,7 +19,7 @@ const Severity = ({ severity }: SeverityProps): JSX.Element => {return <Tag color="default">Unknown Status</Tag>;}}-};+}interface SeverityProps {severity: string;diff --git a/frontend/src/container/TriggeredAlerts/TriggeredAlert.tsx b/frontend/src/container/TriggeredAlerts/TriggeredAlert.tsxindex d99cd47360..f68a2ece74 100644--- a/frontend/src/container/TriggeredAlerts/TriggeredAlert.tsx+++ b/frontend/src/container/TriggeredAlerts/TriggeredAlert.tsx@@ -3,13 +3,12 @@ import useInterval from 'hooks/useInterval';import React, { useState } from 'react';import { Alerts } from 'types/api/alerts/getAll';-import { Value } from './Filter';-import Filter from './Filter';+import Filter, { Value } from './Filter';import FilteredTable from './FilteredTable';import NoFilterTable from './NoFilterTable';import { NoTableContainer } from './styles';-const TriggeredAlerts = ({ allAlerts }: TriggeredAlertsProps): JSX.Element => {+function TriggeredAlerts({ allAlerts }: TriggeredAlertsProps): JSX.Element {const [allInitialAlerts, setInitialAlerts] = useState(allAlerts || []);useInterval(() => {@@ -76,7 +75,7 @@ const TriggeredAlerts = ({ allAlerts }: TriggeredAlertsProps): JSX.Element => {)}</div>);-};+}interface TriggeredAlertsProps {allAlerts: Alerts[];diff --git a/frontend/src/container/TriggeredAlerts/index.tsx b/frontend/src/container/TriggeredAlerts/index.tsxindex 192e860dbd..a665adf6dd 100644--- a/frontend/src/container/TriggeredAlerts/index.tsx+++ b/frontend/src/container/TriggeredAlerts/index.tsx@@ -7,7 +7,7 @@ import { PayloadProps } from 'types/api/alerts/getGroups';import TriggerComponent from './TriggeredAlert';-const TriggeredAlerts = (): JSX.Element => {+function TriggeredAlerts(): JSX.Element {const [groupState, setGroupState] = useState<State<PayloadProps>>({error: false,errorMessage: '',@@ -72,6 +72,6 @@ const TriggeredAlerts = (): JSX.Element => {}, initialAlerts);return <TriggerComponent allAlerts={allAlerts} />;-};+}export default TriggeredAlerts;diff --git a/frontend/src/lib/getChartData.ts b/frontend/src/lib/getChartData.tsindex d745706a94..4a57b07826 100644--- a/frontend/src/lib/getChartData.ts+++ b/frontend/src/lib/getChartData.ts@@ -11,7 +11,7 @@ const getChartData = ({ queryData }: GetChartDataProps): ChartData => {const { values = [], metric } = e || {};const labelNames = getLabelName(metric,- query, //query+ query, // querylegend || '', // legends);diff --git a/frontend/src/lib/getFormatedDate.ts b/frontend/src/lib/getFormatedDate.tsindex bd5eb9a3a0..db5c54aa86 100644--- a/frontend/src/lib/getFormatedDate.ts+++ b/frontend/src/lib/getFormatedDate.ts@@ -2,12 +2,12 @@ function getFormattedDate(date: Date): string {const year = date.getFullYear();let month = (1 + date.getMonth()).toString();- month = month.length > 1 ? month : '0' + month;+ month = month.length > 1 ? month : `0${month}`;let day = date.getDate().toString();- day = day.length > 1 ? day : '0' + day;+ day = day.length > 1 ? day : `0${day}`;- return month + '/' + day + '/' + year;+ return `${month}/${day}/${year}`;}export default getFormattedDate;diff --git a/frontend/src/lib/getGlobalDropDownFormatedDate.ts b/frontend/src/lib/getGlobalDropDownFormatedDate.tsindex 2b17057bf6..b6148bfcef 100644--- a/frontend/src/lib/getGlobalDropDownFormatedDate.ts+++ b/frontend/src/lib/getGlobalDropDownFormatedDate.ts@@ -1,11 +1,11 @@function getFormattedDate(date: Date): string {- const month = ('0' + (date.getMonth() + 1)).slice(-2);- const day = ('0' + date.getDate()).slice(-2);+ const month = `0${date.getMonth() + 1}`.slice(-2);+ const day = `0${date.getDate()}`.slice(-2);const year = date.getFullYear();- const hour = ('0' + date.getHours()).slice(-2);- const min = ('0' + date.getMinutes()).slice(-2);+ const hour = `0${date.getHours()}`.slice(-2);+ const min = `0${date.getMinutes()}`.slice(-2);- return year + '/' + month + '/' + day + ' ' + hour + ':' + min;+ return `${year}/${month}/${day} ${hour}:${min}`;}export default getFormattedDate;diff --git a/frontend/src/lib/getMaxMinTime.ts b/frontend/src/lib/getMaxMinTime.tsindex 5185046c9a..b403da6e8a 100644--- a/frontend/src/lib/getMaxMinTime.ts+++ b/frontend/src/lib/getMaxMinTime.ts@@ -8,13 +8,13 @@ const GetMaxMinTime = ({}: GetMaxMinProps): GlobalTime => {if (graphType === 'VALUE') {return {- maxTime: maxTime,+ maxTime,minTime: maxTime,};}return {- maxTime: maxTime,- minTime: minTime,+ maxTime,+ minTime,};};diff --git a/frontend/src/modules/Servicemap/SelectService.tsx b/frontend/src/modules/Servicemap/SelectService.tsxindex 81cd97fde2..69b389ddea 100644--- a/frontend/src/modules/Servicemap/SelectService.tsx+++ b/frontend/src/modules/Servicemap/SelectService.tsx@@ -1,10 +1,11 @@import { InfoCircleOutlined } from '@ant-design/icons';import { Select } from 'antd';+import { cloneDeep } from 'lodash-es';import React, { useState } from 'react';import { servicesItem } from 'store/actions';import styled from 'styled-components';+const { Option } = Select;-import { cloneDeep } from 'lodash-es';const Container = styled.div`margin-top: 12px;@@ -33,7 +34,7 @@ const defaultOption = {serviceName: 'Default',};-const SelectService = (props: SelectServiceProps): JSX.Element => {+function SelectService(props: SelectServiceProps): JSX.Element {const [selectedVal, setSelectedVal] = useState<string>(defaultOption.serviceName,);@@ -75,6 +76,6 @@ const SelectService = (props: SelectServiceProps): JSX.Element => {</div></Container>);-};+}export default SelectService;diff --git a/frontend/src/modules/Servicemap/ServiceMap.tsx b/frontend/src/modules/Servicemap/ServiceMap.tsxindex b3b76961d9..cd40b3a9f5 100644--- a/frontend/src/modules/Servicemap/ServiceMap.tsx+++ b/frontend/src/modules/Servicemap/ServiceMap.tsx@@ -51,7 +51,7 @@ export interface graphDataType {links: graphLink[];}-const ServiceMap = (props: ServiceMapProps): JSX.Element => {+function ServiceMap(props: ServiceMapProps): JSX.Element {const fgRef = useRef();const {@@ -106,9 +106,9 @@ const ServiceMap = (props: ServiceMapProps): JSX.Element => {linkDirectionalParticleSpeed={(d) => d.value}nodeCanvasObject={(node, ctx, globalScale) => {const label = transformLabel(node.id);- const fontSize = node.fontSize;+ const { fontSize } = node;ctx.font = `${fontSize}px Roboto`;- const width = node.width;+ const { width } = node;ctx.fillStyle = node.color;ctx.beginPath();@@ -134,7 +134,7 @@ const ServiceMap = (props: ServiceMapProps): JSX.Element => {/></Container>);-};+}const mapStateToProps = (state: AppState,@@ -150,7 +150,7 @@ const mapStateToProps = (export default withRouter(connect(mapStateToProps, {- getServiceMapItems: getServiceMapItems,- getDetailedServiceMapItems: getDetailedServiceMapItems,+ getServiceMapItems,+ getDetailedServiceMapItems,})(ServiceMap),);diff --git a/frontend/src/modules/Servicemap/utils.ts b/frontend/src/modules/Servicemap/utils.tsindex 54195a3059..d26e46c123 100644--- a/frontend/src/modules/Servicemap/utils.ts+++ b/frontend/src/modules/Servicemap/utils.ts@@ -76,12 +76,14 @@ export const getGraphData = (serviceMap: serviceMapStore): graphDataType => {};export const getZoomPx = (): number => {- const width = window.screen.width;+ const { width } = window.screen;if (width < 1400) {return 190;- } else if (width > 1400 && width < 1700) {+ }+ if (width > 1400 && width < 1700) {return 380;- } else if (width > 1700) {+ }+ if (width > 1700) {return 470;}return 190;diff --git a/frontend/src/modules/Usage/UsageExplorer.tsx b/frontend/src/modules/Usage/UsageExplorer.tsxindex a7566b1bd0..f52924bea0 100644--- a/frontend/src/modules/Usage/UsageExplorer.tsx+++ b/frontend/src/modules/Usage/UsageExplorer.tsx@@ -5,14 +5,15 @@ import { connect, useSelector } from 'react-redux';import { GetService, getUsageData, usageDataItem } from 'store/actions';import { servicesListItem } from 'store/actions/MetricsActions';import { AppState } from 'store/reducers';-import { isOnboardingSkipped } from 'utils/app';-const { Option } = Select;import { GlobalTime } from 'types/actions/globalTime';import { GlobalReducer } from 'types/reducer/globalTime';import MetricReducer from 'types/reducer/metrics';+import { isOnboardingSkipped } from 'utils/app';import { Card } from './styles';+const { Option } = Select;+interface UsageExplorerProps {usageData: usageDataItem[];getUsageData: (@@ -57,7 +58,7 @@ const interval = [},];-const _UsageExplorer = (props: UsageExplorerProps): JSX.Element => {+function _UsageExplorer(props: UsageExplorerProps): JSX.Element {const [selectedTime, setSelectedTime] = useState(timeDaysOptions[1]);const [selectedInterval, setSelectedInterval] = useState(interval[2]);const [selectedService, setSelectedService] = useState<string>('');@@ -105,7 +106,7 @@ const _UsageExplorer = (props: UsageExplorerProps): JSX.Element => {};return (- <React.Fragment>+ <><Space style={{ marginTop: 40, marginLeft: 20 }}><Space><Select@@ -149,7 +150,7 @@ const _UsageExplorer = (props: UsageExplorerProps): JSX.Element => {}}value={selectedService || 'All Services'}>- <Option value={''}>All Services</Option>+ <Option value="">All Services</Option>{services?.map((service) => (<Option key={service.serviceName} value={service.serviceName}>{service.serviceName}@@ -169,8 +170,8 @@ const _UsageExplorer = (props: UsageExplorerProps): JSX.Element => {>No spans found. Please add instrumentation (follow this<a- href={'https://signoz.io/docs/instrumentation/overview'}- target={'_blank'}+ href="https://signoz.io/docs/instrumentation/overview"+ target="_blank"style={{ marginLeft: 3 }}rel="noreferrer">@@ -188,9 +189,9 @@ const _UsageExplorer = (props: UsageExplorerProps): JSX.Element => {<Card><Graph name="usage" data={data} type="bar" /></Card>- </React.Fragment>+ </>);-};+}const mapStateToProps = (state: AppState,@@ -201,16 +202,16 @@ const mapStateToProps = (} => {let totalCount = 0;for (const item of state.usageDate) {- totalCount = totalCount + item.count;+ totalCount += item.count;}return {- totalCount: totalCount,+ totalCount,usageData: state.usageDate,globalTime: state.globalTime,};};export const UsageExplorer = connect(mapStateToProps, {- getUsageData: getUsageData,+ getUsageData,getServicesList: GetService,})(_UsageExplorer);diff --git a/frontend/src/pages/AddInstrumentation/index.tsx b/frontend/src/pages/AddInstrumentation/index.tsxindex 3698993f3c..f4adc07b2c 100644--- a/frontend/src/pages/AddInstrumentation/index.tsx+++ b/frontend/src/pages/AddInstrumentation/index.tsx@@ -6,7 +6,7 @@ import AppReducer from 'types/reducer/app';import { Container, Heading } from './styles';-const InstrumentationPage = (): JSX.Element => {+function InstrumentationPage(): JSX.Element {const { isDarkMode } = useSelector<AppState, AppReducer>((state) => state.app);return (@@ -19,7 +19,7 @@ const InstrumentationPage = (): JSX.Element => {docs -</Typography><a- href={'https://signoz.io/docs/instrumentation/overview'}+ href="https://signoz.io/docs/instrumentation/overview"target="_blank"rel="noreferrer">@@ -27,21 +27,19 @@ const InstrumentationPage = (): JSX.Element => {</a> If you face any issues, join our<a- href={- 'https://signoz-community.slack.com/join/shared_invite/zt-lrjknbbp-J_mI13rlw8pGF4EWBnorJA'- }+ href="https://signoz-community.slack.com/join/shared_invite/zt-lrjknbbp-J_mI13rlw8pGF4EWBnorJA"target="_blank"rel="noreferrer"> slack community </a>to ask any questions or mail us at - <a href={'mailto:[email protected]'} target="_blank" rel="noreferrer">+ <a href="mailto:[email protected]" target="_blank" rel="noreferrer"></a></Container></>);-};+}export default InstrumentationPage;diff --git a/frontend/src/pages/AlertChannelCreate/index.tsx b/frontend/src/pages/AlertChannelCreate/index.tsxindex 77a97adcf8..bcdc83a798 100644--- a/frontend/src/pages/AlertChannelCreate/index.tsx+++ b/frontend/src/pages/AlertChannelCreate/index.tsx@@ -5,7 +5,7 @@ import GeneralSettings from 'container/GeneralSettings';import history from 'lib/history';import React from 'react';-const SettingsPage = (): JSX.Element => {+function SettingsPage(): JSX.Element {const pathName = history.location.pathname;return (@@ -30,6 +30,6 @@ const SettingsPage = (): JSX.Element => {}}/>);-};+}export default SettingsPage;diff --git a/frontend/src/pages/AlertList/index.tsx b/frontend/src/pages/AlertList/index.tsxindex 93054ea59f..ac5db017c6 100644--- a/frontend/src/pages/AlertList/index.tsx+++ b/frontend/src/pages/AlertList/index.tsx@@ -3,9 +3,10 @@ import AllAlertRules from 'container/ListAlertRules';// import MapAlertChannels from 'container/MapAlertChannels';import TriggeredAlerts from 'container/TriggeredAlerts';import React from 'react';+const { TabPane } = Tabs;-const AllAlertList = (): JSX.Element => {+function AllAlertList(): JSX.Element {return (<Tabs destroyInactiveTabPane defaultActiveKey="Alert Rules"><TabPane tabKey="Alert Rules" tab="Alert Rules" key="Alert Rules">@@ -29,6 +30,6 @@ const AllAlertList = (): JSX.Element => {</TabPane> */}</Tabs>);-};+}export default AllAlertList;diff --git a/frontend/src/pages/AllAlertChannels/index.tsx b/frontend/src/pages/AllAlertChannels/index.tsxindex a15d070d51..8e64751064 100644--- a/frontend/src/pages/AllAlertChannels/index.tsx+++ b/frontend/src/pages/AllAlertChannels/index.tsx@@ -5,7 +5,7 @@ import GeneralSettings from 'container/GeneralSettings';import history from 'lib/history';import React from 'react';-const AllAlertChannels = (): JSX.Element => {+function AllAlertChannels(): JSX.Element {const pathName = history.location.pathname;return (@@ -28,6 +28,6 @@ const AllAlertChannels = (): JSX.Element => {}}/>);-};+}export default AllAlertChannels;diff --git a/frontend/src/pages/ChannelsEdit/index.tsx b/frontend/src/pages/ChannelsEdit/index.tsxindex e4e4f226c8..4a6630f21a 100644--- a/frontend/src/pages/ChannelsEdit/index.tsx+++ b/frontend/src/pages/ChannelsEdit/index.tsx@@ -8,7 +8,7 @@ import React from 'react';import { useParams } from 'react-router';import { PayloadProps, Props } from 'types/api/channels/get';-const ChannelsEdit = (): JSX.Element => {+function ChannelsEdit(): JSX.Element {const { id } = useParams<Params>();const { errorMessage, payload, error, loading } = useFetch<@@ -30,7 +30,7 @@ const ChannelsEdit = (): JSX.Element => {const value = JSON.parse(data);- const channel: SlackChannel = value['slack_configs'][0];+ const channel: SlackChannel = value.slack_configs[0];return (<EditAlertChannels@@ -43,7 +43,7 @@ const ChannelsEdit = (): JSX.Element => {}}/>);-};+}interface Params {id: string;}diff --git a/frontend/src/pages/CreateAlert/index.tsx b/frontend/src/pages/CreateAlert/index.tsxindex 667a2cdfdf..a78622dbad 100644--- a/frontend/src/pages/CreateAlert/index.tsx+++ b/frontend/src/pages/CreateAlert/index.tsx@@ -10,7 +10,7 @@ import { PayloadProps as CreateAlertPayloadProps } from 'types/api/alerts/createimport { ButtonContainer, Title } from './styles';-const CreateAlert = (): JSX.Element => {+function CreateAlert(): JSX.Element {const value = useRef<string>(`\n alert: High RPS\n expr: sum(rate(signoz_latency_count{span_kind="SPAN_KIND_SERVER"}[2m])) by (service_name) > 100\n for: 0m\n labels:\n severity: warning\n annotations:\n summary: High RPS of Applications\n description: "RPS is > 100\n\t\t\t VALUE = {{ $value }}\n\t\t\t LABELS = {{ $labels }}"\n `,);@@ -104,6 +104,6 @@ const CreateAlert = (): JSX.Element => {</ButtonContainer></>);-};+}export default CreateAlert;diff --git a/frontend/src/pages/Dashboard/index.tsx b/frontend/src/pages/Dashboard/index.tsxindex b3a8e72530..67c55336f2 100644--- a/frontend/src/pages/Dashboard/index.tsx+++ b/frontend/src/pages/Dashboard/index.tsx@@ -9,7 +9,7 @@ import { AppState } from 'store/reducers';import AppActions from 'types/actions';import DashboardReducer from 'types/reducer/dashboards';-const Dashboard = ({ getAllDashboards }: DashboardProps): JSX.Element => {+function Dashboard({ getAllDashboards }: DashboardProps): JSX.Element {const { loading } = useSelector<AppState, DashboardReducer>((state) => state.dashboards,);@@ -23,7 +23,7 @@ const Dashboard = ({ getAllDashboards }: DashboardProps): JSX.Element => {}return <ListOfAllDashboard />;-};+}interface DispatchProps {getAllDashboards: () => void;diff --git a/frontend/src/pages/DashboardWidget/index.tsx b/frontend/src/pages/DashboardWidget/index.tsxindex 7e3151e179..b748d3cf32 100644--- a/frontend/src/pages/DashboardWidget/index.tsx+++ b/frontend/src/pages/DashboardWidget/index.tsx@@ -18,7 +18,7 @@ import { AppState } from 'store/reducers';import AppActions from 'types/actions';import DashboardReducer from 'types/reducer/dashboards';-const DashboardWidget = ({ getDashboard }: NewDashboardProps): JSX.Element => {+function DashboardWidget({ getDashboard }: NewDashboardProps): JSX.Element {const { search } = useLocation();const { dashboardId } = useParams<DashboardWidgetPageParams>();@@ -80,7 +80,7 @@ const DashboardWidget = ({ getDashboard }: NewDashboardProps): JSX.Element => {}return <NewWidget selectedGraph={selectedGraph} />;-};+}export interface DashboardWidgetPageParams {dashboardId: string;diff --git a/frontend/src/pages/EditRules/index.tsx b/frontend/src/pages/EditRules/index.tsxindex dd4e28e231..d6d27c6e33 100644--- a/frontend/src/pages/EditRules/index.tsx+++ b/frontend/src/pages/EditRules/index.tsx@@ -6,7 +6,7 @@ import React from 'react';import { useParams } from 'react-router';import { PayloadProps, Props } from 'types/api/alerts/get';-const EditRules = (): JSX.Element => {+function EditRules(): JSX.Element {const { ruleId } = useParams<EditRulesParam>();const { loading, error, payload, errorMessage } = useFetch<@@ -25,7 +25,7 @@ const EditRules = (): JSX.Element => {}return <EditRulesContainer ruleId={ruleId} initialData={payload.data} />;-};+}interface EditRulesParam {ruleId: string;diff --git a/frontend/src/pages/MetricApplication/index.tsx b/frontend/src/pages/MetricApplication/index.tsxindex aa08c48506..db521f3dd9 100644--- a/frontend/src/pages/MetricApplication/index.tsx+++ b/frontend/src/pages/MetricApplication/index.tsx@@ -16,10 +16,10 @@ import AppActions from 'types/actions';import { GlobalReducer } from 'types/reducer/globalTime';import MetricReducer from 'types/reducer/metrics';-const MetricsApplication = ({+function MetricsApplication({getInitialData,resetInitialData,-}: MetricsProps): JSX.Element => {+}: MetricsProps): JSX.Element {const { minTime, maxTime } = useSelector<AppState, GlobalReducer>((state) => state.globalTime,);@@ -53,7 +53,7 @@ const MetricsApplication = ({}return <MetricsApplicationContainer />;-};+}interface DispatchProps {getInitialData: (props: GetInitialDataProps) => void;diff --git a/frontend/src/pages/Metrics/index.tsx b/frontend/src/pages/Metrics/index.tsxindex 6e393d999d..8380fb7219 100644--- a/frontend/src/pages/Metrics/index.tsx+++ b/frontend/src/pages/Metrics/index.tsx@@ -12,7 +12,7 @@ import AppActions from 'types/actions';import { GlobalReducer } from 'types/reducer/globalTime';import MetricReducer from 'types/reducer/metrics';-const Metrics = ({ getService }: MetricsProps): JSX.Element => {+function Metrics({ getService }: MetricsProps): JSX.Element {const { minTime, maxTime, loading, selectedTime } = useSelector<AppState,GlobalReducer@@ -54,7 +54,7 @@ const Metrics = ({ getService }: MetricsProps): JSX.Element => {}return <MetricTable />;-};+}interface DispatchProps {getService: (diff --git a/frontend/src/pages/NewDashboard/index.tsx b/frontend/src/pages/NewDashboard/index.tsxindex 577a563ec0..fbe9198568 100644--- a/frontend/src/pages/NewDashboard/index.tsx+++ b/frontend/src/pages/NewDashboard/index.tsx@@ -10,7 +10,7 @@ import { AppState } from 'store/reducers';import AppActions from 'types/actions';import DashboardReducer from 'types/reducer/dashboards';-const NewDashboardPage = ({ getDashboard }: NewDashboardProps): JSX.Element => {+function NewDashboardPage({ getDashboard }: NewDashboardProps): JSX.Element {const { loading, dashboards, error, errorMessage } = useSelector<AppState,DashboardReducer@@ -33,7 +33,7 @@ const NewDashboardPage = ({ getDashboard }: NewDashboardProps): JSX.Element => {}return <NewDashboard />;-};+}interface Params {dashboardId: string;diff --git a/frontend/src/pages/Settings/index.tsx b/frontend/src/pages/Settings/index.tsxindex d229f5061b..e661fb6193 100644--- a/frontend/src/pages/Settings/index.tsx+++ b/frontend/src/pages/Settings/index.tsx@@ -5,7 +5,7 @@ import GeneralSettings from 'container/GeneralSettings';import history from 'lib/history';import React from 'react';-const SettingsPage = (): JSX.Element => {+function SettingsPage(): JSX.Element {const pathName = history.location.pathname;return (@@ -28,6 +28,6 @@ const SettingsPage = (): JSX.Element => {}}/>);-};+}export default SettingsPage;diff --git a/frontend/src/pages/SignUp/SignUp.tsx b/frontend/src/pages/SignUp/SignUp.tsxindex f5e874ca0f..d628b5fdeb 100644--- a/frontend/src/pages/SignUp/SignUp.tsx+++ b/frontend/src/pages/SignUp/SignUp.tsx@@ -8,16 +8,15 @@ import {Typography,} from 'antd';import setLocalStorageKey from 'api/browser/localstorage/set';+import setPreference from 'api/user/setPreference';import signup from 'api/user/signup';+import { IS_LOGGED_IN } from 'constants/auth';import ROUTES from 'constants/routes';import history from 'lib/history';import React, { useEffect, useState } from 'react';-import AppActions from 'types/actions';-const { Title } = Typography;-import setPreference from 'api/user/setPreference';-import { IS_LOGGED_IN } from 'constants/auth';import { useDispatch } from 'react-redux';import { Dispatch } from 'redux';+import AppActions from 'types/actions';import { PayloadProps } from 'types/api/user/getUserPreference';import {@@ -30,7 +29,9 @@ import {MarginTop,} from './styles';-const Signup = ({ version, userpref }: SignupProps): JSX.Element => {+const { Title } = Typography;++function Signup({ version, userpref }: SignupProps): JSX.Element {const [loading, setLoading] = useState(false);const [firstName, setFirstName] = useState<string>('');@@ -68,7 +69,7 @@ const Signup = ({ version, userpref }: SignupProps): JSX.Element => {if (userPrefernceResponse.statusCode === 200) {const response = await signup({- email: email,+ email,name: firstName,organizationName,});@@ -116,7 +117,7 @@ const Signup = ({ version, userpref }: SignupProps): JSX.Element => {<Container><LeftContainer direction="vertical"><Space align="center">- <Logo src={'signoz-signup.svg'} alt="logo" />+ <Logo src="signoz-signup.svg" alt="logo" /><Title style={{ fontSize: '46px', margin: 0 }}>SigNoz</Title></Space><Typography>@@ -173,7 +174,7 @@ const Signup = ({ version, userpref }: SignupProps): JSX.Element => {/></div>- <MarginTop marginTop={'2.4375rem'}>+ <MarginTop marginTop="2.4375rem"><Space><SwitchonChange={(value) => onSwitchHandler(value, setHasOptedUpdates)}@@ -183,7 +184,7 @@ const Signup = ({ version, userpref }: SignupProps): JSX.Element => {</Space></MarginTop>- <MarginTop marginTop={'0.5rem'}>+ <MarginTop marginTop="0.5rem"><Space><SwitchonChange={(value) => onSwitchHandler(value, setisAnonymous)}@@ -210,7 +211,7 @@ const Signup = ({ version, userpref }: SignupProps): JSX.Element => {</FormWrapper></Container>);-};+}interface SignupProps {version: string;diff --git a/frontend/src/pages/SignUp/index.tsx b/frontend/src/pages/SignUp/index.tsxindex f2445b92ae..1bf16285a4 100644--- a/frontend/src/pages/SignUp/index.tsx+++ b/frontend/src/pages/SignUp/index.tsx@@ -9,7 +9,7 @@ import { PayloadProps as VersionPayload } from 'types/api/user/getVersion';import SignUpComponent from './SignUp';-const SignUp = (): JSX.Element => {+function SignUp(): JSX.Element {const versionResponse = useFetch<VersionPayload, undefined>(getVersion);const userPrefResponse = useFetch<UserPrefPayload, undefined>(getPreference);@@ -33,11 +33,11 @@ const SignUp = (): JSX.Element => {return <Spinner tip="Loading.." />;}- const version = versionResponse.payload.version;+ const { version } = versionResponse.payload;const userpref = userPrefResponse.payload;return <SignUpComponent userpref={userpref} version={version} />;-};+}export default SignUp;diff --git a/frontend/src/pages/Trace/index.tsx b/frontend/src/pages/Trace/index.tsxindex 08e3d038c3..b34145ab24 100644--- a/frontend/src/pages/Trace/index.tsx+++ b/frontend/src/pages/Trace/index.tsx@@ -29,11 +29,11 @@ import {RightContainer,} from './styles';-const Trace = ({+function Trace({getSpansAggregate,getSpans,getInitialFilter,-}: Props): JSX.Element => {+}: Props): JSX.Element {const { maxTime, minTime } = useSelector<AppState, GlobalReducer>((state) => state.globalTime,);@@ -57,8 +57,8 @@ const Trace = ({useEffect(() => {getSpansAggregate({- maxTime: maxTime,- minTime: minTime,+ maxTime,+ minTime,selectedFilter,current: spansAggregate.currentPage,pageSize: spansAggregate.pageSize,@@ -133,7 +133,7 @@ const Trace = ({</Container></>);-};+}interface DispatchProps {getSpansAggregate: (props: GetSpansAggregateProps) => void;diff --git a/frontend/src/pages/TraceDetail/index.tsx b/frontend/src/pages/TraceDetail/index.tsxindex 8c3f515877..8b57b8668b 100644--- a/frontend/src/pages/TraceDetail/index.tsx+++ b/frontend/src/pages/TraceDetail/index.tsx@@ -7,7 +7,7 @@ import React from 'react';import { useParams } from 'react-router-dom';import { Props as TraceDetailProps } from 'types/api/trace/getTraceItem';-const TraceDetail = (): JSX.Element => {+function TraceDetail(): JSX.Element {const { id } = useParams<TraceDetailProps>();const traceDetailResponse = useFetch(getTraceItem, {@@ -27,6 +27,6 @@ const TraceDetail = (): JSX.Element => {}return <TraceDetailContainer response={traceDetailResponse.payload} />;-};+}export default TraceDetail;diff --git a/frontend/src/store/actions/MetricsActions/metricsActions.ts b/frontend/src/store/actions/MetricsActions/metricsActions.tsindex 4090468b13..f6968f8e15 100644--- a/frontend/src/store/actions/MetricsActions/metricsActions.ts+++ b/frontend/src/store/actions/MetricsActions/metricsActions.ts@@ -8,8 +8,7 @@ import * as MetricsInterfaces from './metricsInterfaces';export const getServicesList = (globalTime: GlobalTime) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/services?start=' + globalTime.minTime + '&end=' + globalTime.maxTime;+ const request_string = `/services?start=${globalTime.minTime}&end=${globalTime.maxTime}`;const response = await api.get<MetricsInterfaces.servicesListItem[]>(request_string,@@ -27,14 +26,7 @@ export const getDbOverViewMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/dbOverview?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const request_string = `/service/dbOverview?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;const response = await api.get<MetricsInterfaces.dbOverviewMetricsItem[]>(request_string,);@@ -50,14 +42,7 @@ export const getExternalMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/external?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const request_string = `/service/external?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;const response = await api.get<MetricsInterfaces.externalMetricsItem[]>(request_string,);@@ -73,14 +58,7 @@ export const getExternalAvgDurationMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/externalAvgDuration?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const request_string = `/service/externalAvgDuration?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;const response = await api.get<MetricsInterfaces.externalMetricsAvgDurationItem[]@@ -96,14 +74,7 @@ export const getExternalErrCodeMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/externalErrors?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const request_string = `/service/externalErrors?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;const response = await api.get<MetricsInterfaces.externalErrCodeMetricsItem[]>(request_string);@@ -120,14 +91,7 @@ export const getServicesMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/overview?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const request_string = `/service/overview?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;const response = await api.get<MetricsInterfaces.metricItem[]>(request_string,);@@ -144,13 +108,7 @@ export const getTopEndpoints = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/service/top_endpoints?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime;+ const request_string = `/service/top_endpoints?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}`;const response = await api.get<MetricsInterfaces.topEndpointListItem[]>(request_string,);@@ -167,13 +125,9 @@ export const getFilteredTraceMetrics = (globalTime: GlobalTime,) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string =- '/spans/aggregates?start=' +- toUTCEpoch(globalTime.minTime) +- '&end=' +- toUTCEpoch(globalTime.maxTime) +- '&' +- filter_params;+ const request_string = `/spans/aggregates?start=${toUTCEpoch(+ globalTime.minTime,+ )}&end=${toUTCEpoch(globalTime.maxTime)}&${filter_params}`;const response = await api.get<MetricsInterfaces.customMetricsItem[]>(request_string,);@@ -191,58 +145,17 @@ export const getInitialMerticData = ({}: getInitialMerticDataProps) => {return async (dispatch: Dispatch): Promise<void> => {try {- const dbOverviewString =- '/service/dbOverview?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const dbOverviewString = `/service/dbOverview?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;- const externalServicesString =- '/service/external?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const externalServicesString = `/service/external?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;- const topEndPointsString =- '/service/top_endpoints?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime;+ const topEndPointsString = `/service/top_endpoints?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}`;- const avgExternalDurationString =- '/service/externalAvgDuration?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const avgExternalDurationString = `/service/externalAvgDuration?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;- const serviceOverviewString =- '/service/overview?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const serviceOverviewString = `/service/overview?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;- const externalErrorCodeMetricsString =- '/service/externalErrors?service=' +- serviceName +- '&start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime +- '&step=60';+ const externalErrorCodeMetricsString = `/service/externalErrors?service=${serviceName}&start=${globalTime.minTime}&end=${globalTime.maxTime}&step=60`;dispatch({type: 'UPDATE_INITIAL_VALUE_START',diff --git a/frontend/src/store/actions/dashboard/deleteDashboard.ts b/frontend/src/store/actions/dashboard/deleteDashboard.tsindex b8fca59f66..100970eeec 100644--- a/frontend/src/store/actions/dashboard/deleteDashboard.ts+++ b/frontend/src/store/actions/dashboard/deleteDashboard.ts@@ -9,14 +9,14 @@ export const DeleteDashboard = ({return async (dispatch: Dispatch<AppActions>): Promise<void> => {try {const response = await deleteDashboardApi({- uuid: uuid,+ uuid,});if (response.statusCode === 200) {dispatch({type: 'DELETE_DASHBOARD_SUCCESS',payload: {- uuid: uuid,+ uuid,},});} else {diff --git a/frontend/src/store/actions/dashboard/getDashboard.ts b/frontend/src/store/actions/dashboard/getDashboard.tsindex 5d64c87fff..b219e3978d 100644--- a/frontend/src/store/actions/dashboard/getDashboard.ts+++ b/frontend/src/store/actions/dashboard/getDashboard.ts@@ -16,7 +16,7 @@ export const GetDashboard = ({});const response = await getDashboard({- uuid: uuid,+ uuid,});if (response.statusCode === 200) {diff --git a/frontend/src/store/actions/dashboard/getQueryResults.ts b/frontend/src/store/actions/dashboard/getQueryResults.tsindex d189223e1c..b87aca985f 100644--- a/frontend/src/store/actions/dashboard/getQueryResults.ts+++ b/frontend/src/store/actions/dashboard/getQueryResults.ts@@ -44,7 +44,7 @@ export const GetQueryResults = (const result = await getQueryResult({end,query: encodeURIComponent(query.query),- start: start,+ start,step: '60',});return {diff --git a/frontend/src/store/actions/dashboard/saveDashboard.ts b/frontend/src/store/actions/dashboard/saveDashboard.tsindex b309408104..9bbba4c1de 100644--- a/frontend/src/store/actions/dashboard/saveDashboard.ts+++ b/frontend/src/store/actions/dashboard/saveDashboard.ts@@ -31,7 +31,7 @@ export const SaveDashboard = ({throw new Error('Dashboard Not Found');}- const data = selectedDashboard.data;+ const { data } = selectedDashboard;const updatedTitle = title;const updatedDescription = description;diff --git a/frontend/src/store/actions/dashboard/updateDashboardTitle.ts b/frontend/src/store/actions/dashboard/updateDashboardTitle.tsindex 071f063fe2..e60e01d345 100644--- a/frontend/src/store/actions/dashboard/updateDashboardTitle.ts+++ b/frontend/src/store/actions/dashboard/updateDashboardTitle.ts@@ -10,7 +10,7 @@ export const UpdateDashboardTitleDescriptionTags = ({) => void) => {return async (dispatch: Dispatch<AppActions>): Promise<void> => {try {- const data = dashboard.data;+ const { data } = dashboard;const response = await update({...dashboard.data,diff --git a/frontend/src/store/actions/dashboard/updateQuery.ts b/frontend/src/store/actions/dashboard/updateQuery.tsindex a129df72e2..49ff7c7439 100644--- a/frontend/src/store/actions/dashboard/updateQuery.ts+++ b/frontend/src/store/actions/dashboard/updateQuery.ts@@ -8,7 +8,7 @@ export const UpdateQuery = (): ((dispatch: Dispatch<AppActions>) => void) => {return (dispatch: Dispatch<AppActions>): void => {const state = store.getState();- const dashboards = state.dashboards.dashboards;+ const { dashboards } = state.dashboards;const [selectedDashboard] = dashboards;const { data } = selectedDashboard;const { widgets = [] } = data;diff --git a/frontend/src/store/actions/global.ts b/frontend/src/store/actions/global.tsindex 8299a94fb1..c3f3180567 100644--- a/frontend/src/store/actions/global.ts+++ b/frontend/src/store/actions/global.ts@@ -13,8 +13,8 @@ export const UpdateTimeInterval = (dispatch({type: 'UPDATE_TIME_INTERVAL',payload: {- maxTime: maxTime,- minTime: minTime,+ maxTime,+ minTime,selectedTime: interval,},});diff --git a/frontend/src/store/actions/serviceMap.ts b/frontend/src/store/actions/serviceMap.tsindex 9a1fa6cc46..5a2185d074 100644--- a/frontend/src/store/actions/serviceMap.ts+++ b/frontend/src/store/actions/serviceMap.ts@@ -44,11 +44,7 @@ export const getServiceMapItems = (globalTime: GlobalTime) => {payload: [],});- const request_string =- '/serviceMapDependencies?start=' +- globalTime.minTime +- '&end=' +- globalTime.maxTime;+ const request_string = `/serviceMapDependencies?start=${globalTime.minTime}&end=${globalTime.maxTime}`;const response = await api.get<servicesMapItem[]>(request_string);@@ -66,8 +62,7 @@ export const getDetailedServiceMapItems = (globalTime: GlobalTime) => {payload: [],});- const request_string =- '/services?start=' + globalTime.minTime + '&end=' + globalTime.maxTime;+ const request_string = `/services?start=${globalTime.minTime}&end=${globalTime.maxTime}`;const response = await api.get<servicesItem[]>(request_string);diff --git a/frontend/src/store/actions/trace/getSpans.ts b/frontend/src/store/actions/trace/getSpans.tsindex 22e4e11755..1f323206bb 100644--- a/frontend/src/store/actions/trace/getSpans.ts+++ b/frontend/src/store/actions/trace/getSpans.ts@@ -52,12 +52,12 @@ export const GetSpans = (}const response = await getSpans({- end: end,+ end,function: props.function,groupBy: props.groupBy,selectedFilter: props.selectedFilter,selectedTags: props.selectedTags,- start: start,+ start,step: props.step,isFilterExclude: props.isFilterExclude,});diff --git a/frontend/src/store/actions/trace/parseFilter/filterToFetchData.ts b/frontend/src/store/actions/trace/parseFilter/filterToFetchData.tsindex baf0f2f99d..64b5eb820e 100644--- a/frontend/src/store/actions/trace/parseFilter/filterToFetchData.ts+++ b/frontend/src/store/actions/trace/parseFilter/filterToFetchData.ts@@ -20,7 +20,7 @@ export const parseFilterToFetchData = (filterToFetchData.push(...parsedValue);}} catch (error) {- //error while parsing json+ // error while parsing json}}diff --git a/frontend/src/store/actions/trace/parseFilter/selectedTags.ts b/frontend/src/store/actions/trace/parseFilter/selectedTags.tsindex 14aef54f73..e335747832 100644--- a/frontend/src/store/actions/trace/parseFilter/selectedTags.ts+++ b/frontend/src/store/actions/trace/parseFilter/selectedTags.ts@@ -20,7 +20,7 @@ export const parseQueryIntoSelectedTags = (selectedTags = parsedQuerySelectedTags;}} catch (error) {- //error while parsing+ // error while parsing}}diff --git a/frontend/src/store/actions/trace/updateTagPanelVisiblity.ts b/frontend/src/store/actions/trace/updateTagPanelVisiblity.tsindex a3815b308b..9fce20d0de 100644--- a/frontend/src/store/actions/trace/updateTagPanelVisiblity.ts+++ b/frontend/src/store/actions/trace/updateTagPanelVisiblity.ts@@ -10,7 +10,7 @@ export const UpdateTagVisiblity = (dispatch({type: UPDATE_TAG_MODAL_VISIBLITY,payload: {- isTagModalOpen: isTagModalOpen,+ isTagModalOpen,},});};diff --git a/frontend/src/store/actions/trace/updateTagsSelected.ts b/frontend/src/store/actions/trace/updateTagsSelected.tsindex ff254ba9cb..e13a57cf80 100644--- a/frontend/src/store/actions/trace/updateTagsSelected.ts+++ b/frontend/src/store/actions/trace/updateTagsSelected.ts@@ -10,7 +10,7 @@ export const UpdateSelectedTags = (dispatch({type: UPDATE_SELECTED_TAGS,payload: {- selectedTags: selectedTags,+ selectedTags,},});};diff --git a/frontend/src/store/actions/trace/util.ts b/frontend/src/store/actions/trace/util.tsindex fea9576348..f89d8e7525 100644--- a/frontend/src/store/actions/trace/util.ts+++ b/frontend/src/store/actions/trace/util.ts@@ -2,6 +2,7 @@ import { AllTraceFilterEnum } from 'container/Trace/Filters';import history from 'lib/history';import { PayloadProps as GetFilterPayload } from 'types/api/trace/getFilters';import { TraceFilterEnum, TraceReducer } from 'types/reducer/trace';+export * from './parseFilter';export interface ParsedUrl<T> {currentValue: T;@@ -11,7 +12,7 @@ export interface ParsedUrl<T> {export function isTraceFilterEnum(value: TraceFilterEnum | string,): value is TraceFilterEnum {- return AllTraceFilterEnum.find((enums) => enums === value) ? true : false;+ return !!AllTraceFilterEnum.find((enums) => enums === value);}export const updateURL = (diff --git a/frontend/src/store/actions/traces.ts b/frontend/src/store/actions/traces.tsindex 8ac074cd2f..0c4f3c24a0 100644--- a/frontend/src/store/actions/traces.ts+++ b/frontend/src/store/actions/traces.ts@@ -56,7 +56,7 @@ export interface spanItem {startTime: number; // index 3duration: number; // index 4references: RefItem[]; // index 5- tags: []; //index 6+ tags: []; // index 6logs: []; // index 7processID: string; // index 8warnings: []; // index 9@@ -64,7 +64,7 @@ export interface spanItem {// Should this field be optional?}-//let mapped_array :{ [id: string] : spanItem; } = {};+// let mapped_array :{ [id: string] : spanItem; } = {};export interface traceItem {traceID: string;@@ -125,19 +125,15 @@ export interface FetchTraceItemAction {export const fetchTraces = (globalTime: GlobalTime, filter_params: string) => {return async (dispatch: Dispatch): Promise<void> => {if (globalTime) {- const request_string =- '/spans?limit=100&lookback=2d&start=' +- toUTCEpoch(globalTime.minTime) +- '&end=' +- toUTCEpoch(globalTime.maxTime) +- '&' +- filter_params;+ const request_string = `/spans?limit=100&lookback=2d&start=${toUTCEpoch(+ globalTime.minTime,+ )}&end=${toUTCEpoch(globalTime.maxTime)}&${filter_params}`;const response = await api.get<traceResponseNew>(request_string);dispatch<FetchTracesAction>({type: ActionTypes.fetchTraces,payload: response.data,- //PNOTE - response.data in the axios response has the actual API response?+ // PNOTE - response.data in the axios response has the actual API response?});}};@@ -145,13 +141,13 @@ export const fetchTraces = (globalTime: GlobalTime, filter_params: string) => {export const fetchTraceItem = (traceID: string) => {return async (dispatch: Dispatch): Promise<void> => {- const request_string = '/traces' + '/' + traceID;+ const request_string = `${'/traces' + '/'}${traceID}`;const response = await api.get<spansWSameTraceIDResponse>(request_string);dispatch<FetchTraceItemAction>({type: ActionTypes.fetchTraceItem,payload: response.data,- //PNOTE - response.data in the axios response has the actual API response?+ // PNOTE - response.data in the axios response has the actual API response?});};};diff --git a/frontend/src/store/actions/usage.ts b/frontend/src/store/actions/usage.tsindex cd427c3eb5..60367fd925 100644--- a/frontend/src/store/actions/usage.ts+++ b/frontend/src/store/actions/usage.ts@@ -23,14 +23,14 @@ export const getUsageData = (return async (dispatch: Dispatch): Promise<void> => {const request_string = `/usage?start=${toUTCEpoch(minTime)}&end=${toUTCEpoch(maxTime,- )}&step=${step}&service=${service ? service : ''}`;- //Step can only be multiple of 3600+ )}&step=${step}&service=${service || ''}`;+ // Step can only be multiple of 3600const response = await api.get<usageDataItem[]>(request_string);dispatch<getUsageDataAction>({type: ActionTypes.getUsageData,payload: response.data,- //PNOTE - response.data in the axios response has the actual API response+ // PNOTE - response.data in the axios response has the actual API response});};};diff --git a/frontend/src/store/reducers/app.ts b/frontend/src/store/reducers/app.tsindex ff72e5bf59..b1753dd1a8 100644--- a/frontend/src/store/reducers/app.ts+++ b/frontend/src/store/reducers/app.ts@@ -5,7 +5,7 @@ import { AppAction, LOGGED_IN, SWITCH_DARK_MODE } from 'types/actions/app';import InitialValueTypes from 'types/reducer/app';const InitialValue: InitialValueTypes = {- isDarkMode: getTheme() === 'darkMode' ? true : false,+ isDarkMode: getTheme() === 'darkMode',isLoggedIn: getLocalStorageKey(IS_LOGGED_IN) === 'yes',};diff --git a/frontend/src/store/reducers/dashboard.ts b/frontend/src/store/reducers/dashboard.tsindex 06977ef77e..44d1cb44d1 100644--- a/frontend/src/store/reducers/dashboard.ts+++ b/frontend/src/store/reducers/dashboard.ts@@ -139,10 +139,10 @@ const dashboard = (case CREATE_DEFAULT_WIDGET: {const [selectedDashboard] = state.dashboards;- const data = selectedDashboard.data;- const widgets = data.widgets;+ const { data } = selectedDashboard;+ const { widgets } = data;const defaultWidget = action.payload;- const query = action.payload.query;+ const { query } = action.payload;const isPresent = widgets?.find((e) => e.id === action.payload.id);@@ -163,7 +163,7 @@ const dashboard = (...(widgets || []),{...defaultWidget,- query: query,+ query,id: action.payload.id,},],@@ -176,8 +176,8 @@ const dashboard = (case CREATE_NEW_QUERY: {const [selectedDashboard] = state.dashboards;- const data = selectedDashboard.data;- const widgets = data.widgets;+ const { data } = selectedDashboard;+ const { widgets } = data;const selectedWidgetId = action.payload.widgetId;const selectedWidgetIndex = data.widgets?.findIndex((e) => e.id === selectedWidgetId,@@ -225,12 +225,12 @@ const dashboard = (const { widgetId, errorMessage } = action.payload;const [selectedDashboard] = state.dashboards;- const data = selectedDashboard.data;+ const { data } = selectedDashboard;const selectedWidgetIndex = data.widgets?.findIndex((e) => e.id === widgetId,);- const widgets = data.widgets;+ const { widgets } = data;const preWidget = data.widgets?.slice(0, selectedWidgetIndex);const afterWidget = data.widgets?.slice(@@ -459,7 +459,7 @@ const dashboard = (const selectedWidget = widgets[selectedWidgetIndex];- const query = selectedWidget.query;+ const { query } = selectedWidget;const preQuery = query.slice(0, currentIndex);const postQuery = query.slice(currentIndex + 1, query.length);diff --git a/frontend/src/store/reducers/metric.ts b/frontend/src/store/reducers/metric.tsindex cc14cba59c..d12ca9c2bf 100644--- a/frontend/src/store/reducers/metric.ts+++ b/frontend/src/store/reducers/metric.ts@@ -35,7 +35,7 @@ const metrics = (return {...state,error: true,- errorMessage: errorMessage,+ errorMessage,loading: false,};}diff --git a/frontend/src/utils/getSpanTreeMetadata.ts b/frontend/src/utils/getSpanTreeMetadata.tsindex 12c01cc894..1719c1ab7c 100644--- a/frontend/src/utils/getSpanTreeMetadata.ts+++ b/frontend/src/utils/getSpanTreeMetadata.ts@@ -18,7 +18,7 @@ export const getSpanTreeMetadata = (}totalSpans++;levels = Math.max(levels, level);- const startTime = treeNode.startTime;+ const { startTime } = treeNode;const endTime = startTime + treeNode.value / 1e6;globalStart = Math.min(globalStart, startTime);globalEnd = Math.max(globalEnd, endTime);diff --git a/frontend/src/utils/spanToTree.ts b/frontend/src/utils/spanToTree.tsindex 3127085d04..3b35e49806 100644--- a/frontend/src/utils/spanToTree.ts+++ b/frontend/src/utils/spanToTree.ts@@ -26,8 +26,8 @@ export const spanToTreeUtil = (originalList: Span[]): ITraceTree => {// Can we now assign different strings as id - Yes// https://stackoverflow.com/questions/15877362/declare-and-initialize-a-dictionary-in-typescript- //May1- //https://stackoverflow.com/questions/13315131/enforcing-the-type-of-the-indexed-members-of-a-typescript-object+ // May1+ // https://stackoverflow.com/questions/13315131/enforcing-the-type-of-the-indexed-members-of-a-typescript-objectconst mapped_array: { [id: string]: Span } = {};const originalListArray: { [id: string]: Span } = {};@@ -36,7 +36,7 @@ export const spanToTreeUtil = (originalList: Span[]): ITraceTree => {originalListArray[spanlist[i][1]] = originalList[i];mapped_array[spanlist[i][1]] = spanlist[i];- mapped_array[spanlist[i][1]][10] = []; //initialising the 10th element in the Span data structure which is array+ mapped_array[spanlist[i][1]][10] = []; // initialising the 10th element in the Span data structure which is array// of type ITraceTree// console.log('IDs while creating mapped array')// console.log(`SpanID is ${spanlist[i][1]}\n`);@@ -47,7 +47,7 @@ export const spanToTreeUtil = (originalList: Span[]): ITraceTree => {for (const id in mapped_array) {const child_span = mapped_array[id];- //mapping tags to new structure+ // mapping tags to new structureconst tags_temp = [];if (child_span[7] !== null && child_span[8] !== null) {if (@@ -97,11 +97,11 @@ export const spanToTreeUtil = (originalList: Span[]): ITraceTree => {arr.forEach((obj) => {const arr2 = obj.split('=');if (arr2[0] === 'TraceId') {- refItem['traceID'] = arr2[1];+ refItem.traceID = arr2[1];} else if (arr2[0] === 'SpanId') {- refItem['spanID'] = arr2[1];+ refItem.spanID = arr2[1];} else if (arr2[0] === 'RefType') {- refItem['refType'] = arr2[1];+ refItem.refType = arr2[1];}});@@ -114,7 +114,7 @@ export const spanToTreeUtil = (originalList: Span[]): ITraceTree => {// console.log(`In SpanTreeUtil: mapped_array[parentID] is ${mapped_array[parentID]}`);if (typeof mapped_array[parentID] !== 'undefined') {- //checking for undefined [10] issue+ // checking for undefined [10] issuemapped_array[parentID][10].push(push_object);} else {// console.log(diff --git a/frontend/yarn.lock b/frontend/yarn.lockindex 0bee89545b..08fa6e745b 100644--- a/frontend/yarn.lock+++ b/frontend/yarn.lock@@ -2141,6 +2141,13 @@resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a"integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==+"@types/mini-css-extract-plugin@^2.5.1":+ version "2.5.1"+ resolved "https://registry.yarnpkg.com/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.1.tgz#c2ab735b353864019a148251e699b7038443bc77"+ integrity sha512-evjjtJttaUexgg3au9ZJFy76tV9mySwX3a4Jl82BuormBYluWLRt0xk2urWrhOdPgDWzulRFyotwYOJTmkSgKw==+ dependencies:+ mini-css-extract-plugin "*"+"@types/node@*":version "17.0.21"resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"@@ -2413,11 +2420,24 @@"@typescript-eslint/types" "4.33.0""@typescript-eslint/visitor-keys" "4.33.0"+"@typescript-eslint/[email protected]":+ version "5.16.0"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz#7e7909d64bd0c4d8aef629cdc764b9d3e1d3a69a"+ integrity sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==+ dependencies:+ "@typescript-eslint/types" "5.16.0"+ "@typescript-eslint/visitor-keys" "5.16.0"+"@typescript-eslint/[email protected]":version "4.33.0"resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72"integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==+"@typescript-eslint/[email protected]":+ version "5.16.0"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.16.0.tgz#5827b011982950ed350f075eaecb7f47d3c643ee"+ integrity sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==+"@typescript-eslint/[email protected]":version "4.33.0"resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609"@@ -2431,6 +2451,31 @@semver "^7.3.5"tsutils "^3.21.0"+"@typescript-eslint/[email protected]":+ version "5.16.0"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz#32259459ec62f5feddca66adc695342f30101f61"+ integrity sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==+ dependencies:+ "@typescript-eslint/types" "5.16.0"+ "@typescript-eslint/visitor-keys" "5.16.0"+ debug "^4.3.2"+ globby "^11.0.4"+ is-glob "^4.0.3"+ semver "^7.3.5"+ tsutils "^3.21.0"++"@typescript-eslint/utils@^5.10.0":+ version "5.16.0"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.16.0.tgz#42218b459d6d66418a4eb199a382bdc261650679"+ integrity sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==+ dependencies:+ "@types/json-schema" "^7.0.9"+ "@typescript-eslint/scope-manager" "5.16.0"+ "@typescript-eslint/types" "5.16.0"+ "@typescript-eslint/typescript-estree" "5.16.0"+ eslint-scope "^5.1.1"+ eslint-utils "^3.0.0"+"@typescript-eslint/[email protected]":version "4.33.0"resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd"@@ -2439,6 +2484,14 @@"@typescript-eslint/types" "4.33.0"eslint-visitor-keys "^2.0.0"+"@typescript-eslint/[email protected]":+ version "5.16.0"+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz#f27dc3b943e6317264c7492e390c6844cd4efbbb"+ integrity sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==+ dependencies:+ "@typescript-eslint/types" "5.16.0"+ eslint-visitor-keys "^3.0.0"+"@webassemblyjs/[email protected]":version "1.11.1"resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"@@ -2994,6 +3047,11 @@ assign-symbols@^1.0.0:resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=+ast-types-flow@^0.0.7:+ version "0.0.7"+ resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"+ integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0=+astral-regex@^2.0.0:version "2.0.0"resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"@@ -3054,6 +3112,11 @@ aws4@^1.8.0:resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==+axe-core@^4.3.5:+ version "4.4.1"+ resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413"+ integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==+axios@^0.21.0:version "0.21.4"resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"@@ -3061,6 +3124,11 @@ axios@^0.21.0:dependencies:follow-redirects "^1.14.0"+axobject-query@^2.2.0:+ version "2.2.0"+ resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"+ integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==+babel-eslint@^10.1.0:version "10.1.0"resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"@@ -4045,6 +4113,11 @@ [email protected]:resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=+confusing-browser-globals@^1.0.10:+ version "1.0.11"+ resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81"+ integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==+connect-history-api-fallback@^1.6.0:version "1.6.0"resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"@@ -5000,6 +5073,11 @@ d3@^6.2.0:d3-transition "2"d3-zoom "2"+damerau-levenshtein@^1.0.7:+ version "1.0.8"+ resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7"+ integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==+dashdash@^1.12.0:version "1.14.1"resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"@@ -5059,7 +5137,7 @@ debug@^3.1.0, 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"@@ -5267,7 +5345,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"@@ -5391,6 +5469,11 @@ emoji-regex@^8.0.0:resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==+emoji-regex@^9.2.2:+ version "9.2.2"+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"+ integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==+emojis-list@^2.0.0:version "2.1.0"resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"@@ -5536,6 +5619,32 @@ escodegen@^2.0.0:optionalDependencies:source-map "~0.6.1"+eslint-config-airbnb-base@^15.0.0:+ version "15.0.0"+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236"+ integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==+ dependencies:+ confusing-browser-globals "^1.0.10"+ object.assign "^4.1.2"+ object.entries "^1.1.5"+ semver "^6.3.0"++eslint-config-airbnb-typescript@^16.1.4:+ version "16.1.4"+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-16.1.4.tgz#ac8553a55080cce34aa1ab5625564b4faf5a5f1c"+ integrity sha512-dfm2cEaYXh4mCYd+RyJO8+PQfd5/zp8WwrCeRznly5qD9W5tal3KTjgdInYWuEAdwWnNJxWcmQ/HFiA4bfkM1g==+ dependencies:+ eslint-config-airbnb-base "^15.0.0"++eslint-config-airbnb@^19.0.4:+ version "19.0.4"+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3"+ integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==+ dependencies:+ eslint-config-airbnb-base "^15.0.0"+ object.assign "^4.1.2"+ object.entries "^1.1.5"+eslint-config-prettier@^8.3.0:version "8.5.0"resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1"@@ -5570,7 +5679,7 @@ eslint-plugin-es@^3.0.0:eslint-utils "^2.0.0"regexpp "^3.0.0"-eslint-plugin-import@^2.23.4:+eslint-plugin-import@^2.25.4:version "2.25.4"resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1"integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==@@ -5589,6 +5698,31 @@ eslint-plugin-import@^2.23.4:resolve "^1.20.0"tsconfig-paths "^3.12.0"+eslint-plugin-jest@^26.1.2:+ version "26.1.2"+ resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.2.tgz#0f1a15c62889fffc3f78a773749d672f1bedb15f"+ integrity sha512-1bXCoRODPkGN06n9KAMls4Jm0eyS+0Q/LWcIxhqWR2ycV0Z7lnx2c10idk4dtFIJY5xStgiIr5snC6/rxcXpbw==+ dependencies:+ "@typescript-eslint/utils" "^5.10.0"++eslint-plugin-jsx-a11y@^6.5.1:+ version "6.5.1"+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz#cdbf2df901040ca140b6ec14715c988889c2a6d8"+ integrity sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==+ dependencies:+ "@babel/runtime" "^7.16.3"+ aria-query "^4.2.2"+ array-includes "^3.1.4"+ ast-types-flow "^0.0.7"+ axe-core "^4.3.5"+ axobject-query "^2.2.0"+ damerau-levenshtein "^1.0.7"+ emoji-regex "^9.2.2"+ has "^1.0.3"+ jsx-ast-utils "^3.2.1"+ language-tags "^1.0.5"+ minimatch "^3.0.4"+eslint-plugin-node@^11.1.0:version "11.1.0"resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"@@ -5680,6 +5814,11 @@ eslint-visitor-keys@^2.0.0:resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==+eslint-visitor-keys@^3.0.0:+ version "3.3.0"+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"+ integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==+eslint@^7.30.0:version "7.32.0"resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"@@ -6428,7 +6567,7 @@ globals@^13.6.0, globals@^13.9.0:dependencies:type-fest "^0.20.2"-globby@^11.0.1, globby@^11.0.3:+globby@^11.0.1, globby@^11.0.3, globby@^11.0.4:version "11.1.0"resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==@@ -7842,7 +7981,7 @@ jsprim@^2.0.2:json-schema "0.4.0"verror "1.10.0"-"jsx-ast-utils@^2.4.1 || ^3.0.0":+"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.2.1:version "3.2.1"resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz#720b97bfe7d901b927d87c3773637ae8ea48781b"integrity sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA==@@ -7891,6 +8030,18 @@ klona@^2.0.4:resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc"integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==+language-subtag-registry@~0.3.2:+ version "0.3.21"+ resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a"+ integrity sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==++language-tags@^1.0.5:+ version "1.0.5"+ resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a"+ integrity sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=+ dependencies:+ language-subtag-registry "~0.3.2"+layout-bmfont-text@^1.2.0:version "1.3.4"resolved "https://registry.yarnpkg.com/layout-bmfont-text/-/layout-bmfont-text-1.3.4.tgz#f20f2c5464774f48da6ce8a997fbce6d46945b81"@@ -8361,6 +8512,13 @@ mini-create-react-context@^0.4.0:"@babel/runtime" "^7.12.1"tiny-warning "^1.0.3"+mini-css-extract-plugin@*:+ version "2.6.0"+ resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.0.tgz#578aebc7fc14d32c0ad304c2c34f08af44673f5e"+ integrity sha512-ndG8nxCEnAemsg4FSgS+yNyHKgkTB4nPKqCOgh65j3/30qqC5RaSQQXMm++Y6sb6E1zRSxPkztj9fqxhS1Eo6w==+ dependencies:+ schema-utils "^4.0.0"+version "2.4.5"resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.4.5.tgz#191d6c170226037212c483af1180b4010b7b9eef"@@ -11614,7 +11772,7 @@ threads@^1.7.0:optionalDependencies:tiny-worker ">= 2"-"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: