chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type GlobalStyle,
type RectStyle,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable max-lines */
/* eslint-disable max-lines-per-function */

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type CSSProperties } from 'react';
import {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IconCozCopy, IconCozCopyCheck } from '@coze-arch/coze-design/icons';
import { Typography } from '@coze-arch/coze-design';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type FC } from 'react';
import { isUndefined } from 'lodash-es';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type GlobalStyle, type LineStyle } from './typing';
export const defaultGlobalStyle: GlobalStyle = {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-magic-numbers -- there will be many numbers calculated in this component, no need to deal with them*/
import { type FC, useCallback, useMemo, useState } from 'react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode, type SVGAttributes } from 'react';
import { type SpanNode } from '../../typings/graph';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { omit } from 'lodash-es';
import { type TreeNodeFlatten, type TreeNode, type Line } from './typing';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type Value, TagType } from '../typings/idl';
export enum StatusCode {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable max-lines */
import {
type TraceFlamethreadProps,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const STATUS_CODE_KEY = '_status_code';
export enum ObservationModules {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isString } from 'lodash-es';
import {
JsonViewer,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* From @flow-devops/observation-components copy
* I don't understand the logic yet.

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// import ReactJson from 'react-json-view';
import { type CSSProperties } from 'react';
@@ -62,8 +62,8 @@ export const MessagePanel = (props: MessagePanelProps) => {
encrypted
? ''
: typeof inputValue === 'string'
? inputValue
: JSON.stringify(inputValue)
? inputValue
: JSON.stringify(inputValue)
}
onCopyClick={onCopyClick}
/>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect, useMemo, useState } from 'react';
import { useMemoizedFn } from 'ahooks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContext, useContext } from 'react';
import { type TreeNodeInfo } from '../common/tree/typing';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useMemo } from 'react';
import { clsx } from 'clsx';
@@ -135,8 +135,8 @@ export const CustomTreeNode = ({
Number(duration) > 60000
? 'red'
: Number(duration) > 10000
? 'yellow'
: 'green'
? 'yellow'
: 'green'
}
type="light"
className={styles['node-tag']}
@@ -169,9 +169,10 @@ export const CustomTreeNode = ({
export const renderCustomTreeNode =
({ renderGraphNodeConfig }: SpanNodeRenderOptions) =>
(nodeData: TreeNodeExtra) => (
<CustomTreeNode
nodeData={nodeData}
renderGraphNodeConfig={renderGraphNodeConfig}
/>
);
(nodeData: TreeNodeExtra) =>
(
<CustomTreeNode
nodeData={nodeData}
renderGraphNodeConfig={renderGraphNodeConfig}
/>
);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useEffect, useMemo, useState } from 'react';
import { clsx } from 'clsx';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
import { type TagType, type Value } from '../typings/idl';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
import { type TooltipProps } from '@coze-arch/coze-design';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
export type Int64 = string | number;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { StatusCode } from '../consts/basic';
export const getStandardStatusCode = (status: number) =>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { uniqBy } from 'lodash-es';
import { type TraceFrontendSpan } from '../typings/idl';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import JSONBig from 'json-bigint';
import dayjs from 'dayjs';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const DECIMAL = 60;
const UNIT_MILLISECOND = 1000;
const UNIT_SECOND = DECIMAL * UNIT_MILLISECOND;