@@ -20,7 +20,7 @@ import {
20
20
SceneVariableSet ,
21
21
} from '@grafana/scenes' ;
22
22
import { config } from '@grafana/runtime' ;
23
- import { Badge , Button , Drawer , Dropdown , Icon , IconButton , Menu , Stack , Tooltip , useStyles2 } from '@grafana/ui' ;
23
+ import { Button , Drawer , Dropdown , Icon , IconButton , Menu , Stack , useStyles2 } from '@grafana/ui' ;
24
24
25
25
import { TracesByServiceScene } from '../../components/Explore/TracesByService/TracesByServiceScene' ;
26
26
import {
@@ -73,7 +73,7 @@ export interface TraceExplorationState extends SceneObjectState {
73
73
const version = process . env . VERSION ;
74
74
const buildTime = process . env . BUILD_TIME ;
75
75
const commitSha = process . env . COMMIT_SHA ;
76
- const compositeVersion = `v ${ version } - ${ buildTime ?. split ( 'T' ) [ 0 ] } (${ commitSha } )` ;
76
+ const compositeVersion = `${ buildTime ?. split ( 'T' ) [ 0 ] } (${ commitSha } )` ;
77
77
78
78
export class TraceExploration extends SceneObjectBase < TraceExplorationState > {
79
79
protected _urlSync = new SceneObjectUrlSyncConfig ( this , { keys : [ 'primarySignal' , 'traceId' , 'spanId' , 'metric' ] } ) ;
@@ -252,8 +252,19 @@ export class TraceExplorationScene extends SceneObjectBase {
252
252
const filtersVariable = getFiltersVariable ( traceExploration ) ;
253
253
const primarySignalVariable = getPrimarySignalVariable ( traceExploration ) ;
254
254
255
+ function VersionHeader ( ) {
256
+ const styles = useStyles2 ( getStyles ) ;
257
+
258
+ return (
259
+ < div className = { styles . menuHeader } >
260
+ < h5 > Grafana Traces Drilldown v{ version } </ h5 >
261
+ < div className = { styles . menuHeaderSubtitle } > Last update: { compositeVersion } </ div >
262
+ </ div >
263
+ ) ;
264
+ }
265
+
255
266
const menu = (
256
- < Menu >
267
+ < Menu header = { < VersionHeader /> } >
257
268
< div className = { styles . menu } >
258
269
{ config . feedbackLinksEnabled && (
259
270
< Menu . Item
@@ -310,11 +321,6 @@ export class TraceExplorationScene extends SceneObjectBase {
310
321
</ Stack >
311
322
312
323
< div className = { styles . controls } >
313
- < Tooltip content = { < PreviewTooltip text = { compositeVersion } /> } interactive >
314
- < span className = { styles . preview } >
315
- < Badge text = " Preview" color = "blue" icon = "rocket" />
316
- </ span >
317
- </ Tooltip >
318
324
< Dropdown overlay = { menu } onVisibleChange = { ( ) => setMenuVisible ( ! menuVisible ) } >
319
325
< Button variant = "secondary" icon = "info-circle" >
320
326
Need help
@@ -371,16 +377,6 @@ export class TraceExplorationScene extends SceneObjectBase {
371
377
} ;
372
378
}
373
379
374
- const PreviewTooltip = ( { text } : { text : string } ) => {
375
- const styles = useStyles2 ( getStyles ) ;
376
-
377
- return (
378
- < Stack direction = { 'column' } gap = { 2 } >
379
- < div className = { styles . tooltip } > { text } </ div >
380
- </ Stack >
381
- ) ;
382
- } ;
383
-
384
380
function getTopScene ( ) {
385
381
return new TracesByServiceScene ( { } ) ;
386
382
}
@@ -515,14 +511,14 @@ function getStyles(theme: GrafanaTheme2) {
515
511
color : theme . colors . text . link ,
516
512
} ,
517
513
} ) ,
518
- preview : css ( {
519
- label : 'preview' ,
520
- cursor : 'help' ,
521
-
522
- '> div:first-child' : {
523
- padding : '5.5px' ,
524
- } ,
525
- } ) ,
514
+ menuHeader : css `
515
+ padding : ${ theme . spacing ( 0.5 , 1 ) } ;
516
+ white-space : nowrap;
517
+ ` ,
518
+ menuHeaderSubtitle : css `
519
+ color : ${ theme . colors . text . secondary } ;
520
+ font-size : ${ theme . typography . bodySmall . fontSize } ;
521
+ ` ,
526
522
tooltip : css ( {
527
523
label : 'tooltip' ,
528
524
fontSize : '14px' ,
0 commit comments