Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update insight icons #74

Merged
merged 4 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .github/workflows/digma-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ name: Bump Digma Jaeger UI version and push git tag
on:
workflow_dispatch:
inputs:
version:
description: 'Version to set (e.g., 1.2.3)'
version_type:
description: 'Type of version bump'
required: true
type: choice
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease

jobs:
bump:
Expand All @@ -24,14 +33,29 @@ jobs:
VERSION=$(jq -r '.version' ./packages/jaeger-ui/package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Get current digma-jaeger-ui version
id: get-version
run: |
CURRENT_DIGMA_JAEGER_UI_VERSION=$(jq -r '.["digma-jaeger-ui-version"]' ./packages/jaeger-ui/package.json)
echo "CURRENT_DIGMA_JAEGER_UI_VERSION=$CURRENT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV

- name: Calculate next digma-jaeger-ui version
run: |
if [[ "${{ inputs.version_type }}" == "prerelease" || "${{ inputs.version_type }}" == "premajor" || "${{ inputs.version_type }}" == "preminor" || "${{ inputs.version_type }}" == "prepatch" ]]; then
NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }} --preid alpha)
else
NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }})
fi
echo "NEXT_DIGMA_JAEGER_UI_VERSION=$NEXT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV

- name: Update digma-jaeger-ui version
run: |
jq '.["digma-jaeger-ui-version"] = "${{ inputs.version }}"' ./packages/jaeger-ui/package.json > tmp.$$.json && mv tmp.$$.json ./packages/jaeger-ui/package.json
jq '.["digma-jaeger-ui-version"] = "${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }}"' ./packages/jaeger-ui/package.json > tmp.$$.json && mv tmp.$$.json ./packages/jaeger-ui/package.json

- run: |
TAG="v${{ env.VERSION }}-digma.${{ inputs.version }}"
TAG="v${{ env.VERSION }}-digma.${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }}"
git add packages/jaeger-ui/package.json
git commit -m "Bump Digma Jaeger UI version to ${{ inputs.version }} [skip ci]"
git commit -m "Bump Digma Jaeger UI version to ${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }} [skip ci]"
git tag $TAG
git push
git push origin $TAG
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export enum InsightType {
EndpointQueryOptimization = 'EndpointQueryOptimization',
EndpointQueryOptimizationV2 = 'EndpointQueryOptimizationV2',
EndpointSlowdownSource = 'EndpointSlowdownSource',
SpanPerformanceAnomaly = 'SpanPerformanceAnomaly',
}
5 changes: 5 additions & 0 deletions packages/jaeger-ui/src/components/common/InsightIcon/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { IIconProps } from '../icons/types';
import { InsightType } from './types';
import ClockWithTicksIcon from '../icons/ClockWithTicksIcon';
import PieChartIcon from '../icons/PieChartIcon';
import PulseIcon from '../icons/PulseIcon';
import TwoHorizontalEndpointsIcon from '../icons/TwoHorizontalEndpointsIcon';

export const getInsightTypeInfo = (
Expand Down Expand Up @@ -119,6 +120,10 @@ export const getInsightTypeInfo = (
icon: SQLDatabaseIcon,
label: 'Inefficient Query',
},
[InsightType.SpanPerformanceAnomaly]: {
icon: PulseIcon,
label: 'Performance Anomaly',
},
};

return insightInfoMap[type];
Expand Down
22 changes: 22 additions & 0 deletions packages/jaeger-ui/src/components/common/icons/PulseIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { useIconProps } from './hooks';
import { IIconProps } from './types';

const PulseIconComponent = (props: IIconProps) => {
const { size, color } = useIconProps(props);

return (
<svg width={size} height={size} viewBox="0 0 16 16" fill="none">
<path
stroke={color}
strokeLinecap="round"
strokeLinejoin="round"
d="M1 8h3.111l2.333 6L9.556 2l2.333 6H15"
/>
</svg>
);
};

const PulseIcon = React.memo(PulseIconComponent);

export default PulseIcon;
22 changes: 22 additions & 0 deletions packages/jaeger-ui/src/components/common/icons/SoundWaveIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { useIconProps } from './hooks';
import { IIconProps } from './types';

const SoundWaveIconComponent = (props: IIconProps) => {
const { size, color } = useIconProps(props);

return (
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} fill="none" viewBox="0 0 16 16">
<path
stroke={color}
strokeLinecap="round"
strokeLinejoin="round"
d="M1 6.67v2M3.8 4v7.33M6.6 2v12m2.8-8.67V10m2.8-6.67V12M15 6.67v2"
/>
</svg>
);
};

const SoundWaveIcon = React.memo(SoundWaveIconComponent);

export default SoundWaveIcon;