remove reexport in utils

This commit is contained in:
Ashley Harrison
2025-10-22 13:57:29 +01:00
parent 39aef79f0b
commit 83391eef05
7 changed files with 7 additions and 14 deletions
-5
View File
@@ -3017,11 +3017,6 @@
"count": 1
}
},
"public/app/features/explore/TraceView/components/TraceTimelineViewer/utils.tsx": {
"no-barrel-files/no-barrel-files": {
"count": 1
}
},
"public/app/features/explore/TraceView/components/common/SearchBarInput.tsx": {
"react-prefer-function-component/react-prefer-function-component": {
"count": 1
@@ -25,13 +25,14 @@ import { SpanBarOptions } from '../settings/SpanBarSettings';
import TNil from '../types/TNil';
import { SpanLinkFunc } from '../types/links';
import { TraceSpan, CriticalPathSection } from '../types/trace';
import { formatDuration } from '../utils/date';
import SpanBar from './SpanBar';
import { SpanLinksMenu } from './SpanLinks';
import SpanTreeOffset from './SpanTreeOffset';
import Ticks from './Ticks';
import TimelineRow from './TimelineRow';
import { formatDuration, ViewedBoundsFunctionType } from './utils';
import { ViewedBoundsFunctionType } from './utils';
const spanBarClassName = 'spanBar';
const spanBarLabelClassName = 'spanBarLabel';
@@ -21,7 +21,7 @@ import { Trans } from '@grafana/i18n';
import { Counter, Icon, useStyles2 } from '@grafana/ui';
import { autoColor } from '../../Theme';
import { formatDuration } from '../utils';
import { formatDuration } from '../../utils/date';
import AccordianKeyValues from './AccordianKeyValues';
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
jest.mock('../utils');
jest.mock('../../utils/date');
import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
@@ -25,7 +25,7 @@ import { pyroscopeProfileIdTagKey } from '../../../createSpanLink';
import traceGenerator from '../../demo/trace-generators';
import transformTraceData from '../../model/transform-trace-data';
import { TraceSpanReference } from '../../types/trace';
import { formatDuration } from '../utils';
import { formatDuration } from '../../utils/date';
import DetailState from './DetailState';
@@ -41,7 +41,7 @@ import LabeledList from '../../common/LabeledList';
import { KIND, LIBRARY_NAME, LIBRARY_VERSION, STATUS, STATUS_MESSAGE, TRACE_STATE } from '../../constants/span';
import { SpanLinkFunc } from '../../types/links';
import { TraceProcess, TraceSpan, TraceSpanReference } from '../../types/trace';
import { formatDuration } from '../utils';
import { formatDuration } from '../../utils/date';
import AccordianKeyValues from './AccordianKeyValues';
import AccordianLogs from './AccordianLogs';
@@ -21,8 +21,7 @@ import { useStyles2 } from '@grafana/ui';
import { autoColor } from '../Theme';
import TNil from '../types/TNil';
import { formatDuration } from './utils';
import { formatDuration } from '../utils/date';
const getStyles = (theme: GrafanaTheme2) => ({
Ticks: css({
@@ -122,5 +122,3 @@ export const isKindClient = (span: TraceSpan): Boolean => {
}
return span.tags.some(({ key, value }) => key === 'span.kind' && value === 'client');
};
export { formatDuration } from '../utils/date';