Skip to content

Commit f2f881e

Browse files
Merge pull request #74 from digma-ai/fix/icons
Update insight icons
1 parent 7ed79cd commit f2f881e

File tree

5 files changed

+79
-5
lines changed

5 files changed

+79
-5
lines changed

.github/workflows/digma-bump.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ name: Bump Digma Jaeger UI version and push git tag
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
7-
description: 'Version to set (e.g., 1.2.3)'
6+
version_type:
7+
description: 'Type of version bump'
88
required: true
9+
type: choice
10+
options:
11+
- major
12+
- minor
13+
- patch
14+
- premajor
15+
- preminor
16+
- prepatch
17+
- prerelease
918

1019
jobs:
1120
bump:
@@ -24,14 +33,29 @@ jobs:
2433
VERSION=$(jq -r '.version' ./packages/jaeger-ui/package.json)
2534
echo "VERSION=$VERSION" >> $GITHUB_ENV
2635
36+
- name: Get current digma-jaeger-ui version
37+
id: get-version
38+
run: |
39+
CURRENT_DIGMA_JAEGER_UI_VERSION=$(jq -r '.["digma-jaeger-ui-version"]' ./packages/jaeger-ui/package.json)
40+
echo "CURRENT_DIGMA_JAEGER_UI_VERSION=$CURRENT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV
41+
42+
- name: Calculate next digma-jaeger-ui version
43+
run: |
44+
if [[ "${{ inputs.version_type }}" == "prerelease" || "${{ inputs.version_type }}" == "premajor" || "${{ inputs.version_type }}" == "preminor" || "${{ inputs.version_type }}" == "prepatch" ]]; then
45+
NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }} --preid alpha)
46+
else
47+
NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }})
48+
fi
49+
echo "NEXT_DIGMA_JAEGER_UI_VERSION=$NEXT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV
50+
2751
- name: Update digma-jaeger-ui version
2852
run: |
29-
jq '.["digma-jaeger-ui-version"] = "${{ inputs.version }}"' ./packages/jaeger-ui/package.json > tmp.$$.json && mv tmp.$$.json ./packages/jaeger-ui/package.json
53+
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
3054
3155
- run: |
32-
TAG="v${{ env.VERSION }}-digma.${{ inputs.version }}"
56+
TAG="v${{ env.VERSION }}-digma.${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }}"
3357
git add packages/jaeger-ui/package.json
34-
git commit -m "Bump Digma Jaeger UI version to ${{ inputs.version }} [skip ci]"
58+
git commit -m "Bump Digma Jaeger UI version to ${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }} [skip ci]"
3559
git tag $TAG
3660
git push
3761
git push origin $TAG

packages/jaeger-ui/src/components/common/InsightIcon/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ export enum InsightType {
3232
EndpointQueryOptimization = 'EndpointQueryOptimization',
3333
EndpointQueryOptimizationV2 = 'EndpointQueryOptimizationV2',
3434
EndpointSlowdownSource = 'EndpointSlowdownSource',
35+
SpanPerformanceAnomaly = 'SpanPerformanceAnomaly',
3536
}

packages/jaeger-ui/src/components/common/InsightIcon/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { IIconProps } from '../icons/types';
1414
import { InsightType } from './types';
1515
import ClockWithTicksIcon from '../icons/ClockWithTicksIcon';
1616
import PieChartIcon from '../icons/PieChartIcon';
17+
import PulseIcon from '../icons/PulseIcon';
1718
import TwoHorizontalEndpointsIcon from '../icons/TwoHorizontalEndpointsIcon';
1819

1920
export const getInsightTypeInfo = (
@@ -119,6 +120,10 @@ export const getInsightTypeInfo = (
119120
icon: SQLDatabaseIcon,
120121
label: 'Inefficient Query',
121122
},
123+
[InsightType.SpanPerformanceAnomaly]: {
124+
icon: PulseIcon,
125+
label: 'Performance Anomaly',
126+
},
122127
};
123128

124129
return insightInfoMap[type];
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import { useIconProps } from './hooks';
3+
import { IIconProps } from './types';
4+
5+
const PulseIconComponent = (props: IIconProps) => {
6+
const { size, color } = useIconProps(props);
7+
8+
return (
9+
<svg width={size} height={size} viewBox="0 0 16 16" fill="none">
10+
<path
11+
stroke={color}
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
d="M1 8h3.111l2.333 6L9.556 2l2.333 6H15"
15+
/>
16+
</svg>
17+
);
18+
};
19+
20+
const PulseIcon = React.memo(PulseIconComponent);
21+
22+
export default PulseIcon;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react';
2+
import { useIconProps } from './hooks';
3+
import { IIconProps } from './types';
4+
5+
const SoundWaveIconComponent = (props: IIconProps) => {
6+
const { size, color } = useIconProps(props);
7+
8+
return (
9+
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} fill="none" viewBox="0 0 16 16">
10+
<path
11+
stroke={color}
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
d="M1 6.67v2M3.8 4v7.33M6.6 2v12m2.8-8.67V10m2.8-6.67V12M15 6.67v2"
15+
/>
16+
</svg>
17+
);
18+
};
19+
20+
const SoundWaveIcon = React.memo(SoundWaveIconComponent);
21+
22+
export default SoundWaveIcon;

0 commit comments

Comments
 (0)