@@ -321,13 +321,6 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
321321 this . unsubscribe ( )
322322 }
323323
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-
331324 onCommandClick (
332325 _ : MouseEvent < HTMLTableRowElement , globalThis . MouseEvent > ,
333326 project : string ,
@@ -372,7 +365,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
372365 return queryParams
373366 }
374367
375- applyFilter ( value ?: string , changeUrl ?: boolean ) {
368+ applyFilter ( value ?: string , changeUrl = true ) {
376369 const { orgId } = this . props
377370 let filterValue =
378371 typeof value !== 'undefined' ? value : this . state . searchFilter
@@ -402,7 +395,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
402395 }
403396 }
404397 } else {
405- queryParams = this . getQueryParams ( filterValue as string )
398+ queryParams = this . getQueryParams ( filterValue )
406399 }
407400
408401 let search = filterValue
@@ -424,7 +417,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
424417 }
425418 }
426419
427- queryParams . search = search ?. trim ( ) as string
420+ queryParams . search = search ?. trim ( )
428421
429422 Object . keys ( queryParams ) . forEach (
430423 ( key ) =>
@@ -498,7 +491,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
498491 return userName
499492 }
500493
501- return this . state . data ?. userProfile ?. data . info . email as string
494+ return String ( this . state . data ?. userProfile ?. data . info . email )
502495 }
503496
504497 getSessionId ( command : CommandDataProps ) {
@@ -597,7 +590,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
597590 const isFilterAvailable =
598591 ( commandStore &&
599592 commandStore . isHistoryExists &&
600- commandStore . isHistoryExists [ orgId as number ] ) ||
593+ commandStore . isHistoryExists [ orgId ] ) ||
601594 commands . length > 0 ||
602595 ( commands . length === 0 &&
603596 ( this . state . searchFilter ? this . state . searchFilter : '' ) !== '' )
@@ -836,7 +829,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
836829 title = {
837830 format . formatTimestampUtc (
838831 c [ 'created_at' ] ,
839- ) as string
832+ ) ?? ''
840833 }
841834 classes = { { tooltip : classes . toolTip } }
842835 >
@@ -986,7 +979,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
986979 inline
987980 title = {
988981 this . state . searchFilter === ''
989- ? 'There is no Joe Bot history yet'
982+ ? 'No bot – no history ( yet) '
990983 : 'No commands matching the filters.'
991984 }
992985 actions = {
@@ -1018,9 +1011,7 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
10181011 disabled = { commandStore && commandStore . isProcessing }
10191012 onClick = { ( ) => this . addInstance ( ) }
10201013 >
1021- < span className = { classes . whiteSpace } >
1022- Add instance
1023- </ span >
1014+ < span className = { classes . whiteSpace } > Add Joe</ span >
10241015 </ Button >
10251016 ) ,
10261017 } ,
@@ -1030,9 +1021,12 @@ class JoeHistory extends Component<JoeHistoryWithStylesProps, JoeHistoryState> {
10301021 >
10311022 { this . state . searchFilter === '' ? (
10321023 < 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 (
10361030 < Link to = "https://postgres.ai/docs/joe" target = "_blank" >
10371031 Learn more
10381032 </ Link >
0 commit comments