@@ -321,13 +321,6 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
321
321
this . unsubscribe ( )
322
322
}
323
323
324
- componentDidUpdate ( prevProps : JoeHistoryProps ) {
325
- if ( JSON . stringify ( prevProps ) !== JSON . stringify ( this . props ) ) {
326
- let filter = this . buildFilter ( )
327
- filter && this . applyFilter ( filter , false )
328
- }
329
- }
330
-
331
324
onCommandClick (
332
325
_ : MouseEvent < HTMLTableRowElement , globalThis . MouseEvent > ,
333
326
project : string ,
@@ -372,7 +365,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
372
365
return queryParams
373
366
}
374
367
375
- applyFilter ( value ?: string , changeUrl ?: boolean ) {
368
+ applyFilter ( value ?: string , changeUrl = true ) {
376
369
const { orgId } = this . props
377
370
let filterValue =
378
371
typeof value !== 'undefined' ? value : this . state . searchFilter
@@ -402,7 +395,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
402
395
}
403
396
}
404
397
} else {
405
- queryParams = this . getQueryParams ( filterValue as string )
398
+ queryParams = this . getQueryParams ( filterValue )
406
399
}
407
400
408
401
let search = filterValue
@@ -424,7 +417,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
424
417
}
425
418
}
426
419
427
- queryParams . search = search ?. trim ( ) as string
420
+ queryParams . search = search ?. trim ( )
428
421
429
422
Object . keys ( queryParams ) . forEach (
430
423
( key ) =>
@@ -498,7 +491,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
498
491
return userName
499
492
}
500
493
501
- return this . state . data ?. userProfile ?. data . info . email as string
494
+ return String ( this . state . data ?. userProfile ?. data . info . email )
502
495
}
503
496
504
497
getSessionId ( command : CommandDataProps ) {
@@ -597,7 +590,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
597
590
const isFilterAvailable =
598
591
( commandStore &&
599
592
commandStore . isHistoryExists &&
600
- commandStore . isHistoryExists [ orgId as number ] ) ||
593
+ commandStore . isHistoryExists [ orgId ] ) ||
601
594
commands . length > 0 ||
602
595
( commands . length === 0 &&
603
596
( this . state . searchFilter ? this . state . searchFilter : '' ) !== '' )
@@ -836,7 +829,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
836
829
title = {
837
830
format . formatTimestampUtc (
838
831
c [ 'created_at' ] ,
839
- ) as string
832
+ ) ?? ''
840
833
}
841
834
classes = { { tooltip : classes . toolTip } }
842
835
>
@@ -986,7 +979,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
986
979
inline
987
980
title = {
988
981
this . state . searchFilter === ''
989
- ? 'There is no Joe Bot history yet'
982
+ ? 'No bot – no history ( yet) '
990
983
: 'No commands matching the filters.'
991
984
}
992
985
actions = {
@@ -1018,9 +1011,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
1018
1011
disabled = { commandStore && commandStore . isProcessing }
1019
1012
onClick = { ( ) => this . addInstance ( ) }
1020
1013
>
1021
- < span className = { classes . whiteSpace } >
1022
- Add instance
1023
- </ span >
1014
+ < span className = { classes . whiteSpace } > Add Joe</ span >
1024
1015
</ Button >
1025
1016
) ,
1026
1017
} ,
@@ -1030,9 +1021,12 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
1030
1021
>
1031
1022
{ this . state . searchFilter === '' ? (
1032
1023
< p >
1033
- Joe Bot is a virtual DBA for SQL Optimization. Joe helps
1034
- engineers quickly troubleshoot and optimize SQL. Joe runs on
1035
- top of the Database Lab Engine. (
1024
+ Joe Bot is a virtual DBA helping engineers analyze and
1025
+ optimize PostgreSQL queries. It provides a convenient,
1026
+ chat-like interface to full-size Postgres clones that are
1027
+ provisioned and seconds, behaves as production (same execution
1028
+ plans, same data volumes), writable and isolated for safe
1029
+ "what if" experiments to check various optimization ideas (
1036
1030
< Link to = "https://postgres.ai/docs/joe" target = "_blank" >
1037
1031
Learn more
1038
1032
</ Link >
0 commit comments