mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-18 18:32:30 +00:00
Display Redis value as EntryBodySection
(#644)
This commit is contained in:
parent
b94098fea6
commit
f5bacbd1ea
@ -42,11 +42,6 @@ func representGeneric(generic map[string]interface{}, selectorPrefix string) (re
|
|||||||
Value: generic["key"].(string),
|
Value: generic["key"].(string),
|
||||||
Selector: fmt.Sprintf("%skey", selectorPrefix),
|
Selector: fmt.Sprintf("%skey", selectorPrefix),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Name: "Value",
|
|
||||||
Value: generic["value"].(string),
|
|
||||||
Selector: fmt.Sprintf("%svalue", selectorPrefix),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Name: "Keyword",
|
Name: "Keyword",
|
||||||
Value: generic["keyword"].(string),
|
Value: generic["keyword"].(string),
|
||||||
@ -59,5 +54,12 @@ func representGeneric(generic map[string]interface{}, selectorPrefix string) (re
|
|||||||
Data: string(details),
|
Data: string(details),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
representation = append(representation, api.SectionData{
|
||||||
|
Type: api.BODY,
|
||||||
|
Title: "Value",
|
||||||
|
Data: generic["value"].(string),
|
||||||
|
Selector: fmt.Sprintf("%svalue", selectorPrefix),
|
||||||
|
})
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,7 @@ export const EntrySectionContainer: React.FC<EntrySectionContainerProps> = ({tit
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface EntryBodySectionProps {
|
interface EntryBodySectionProps {
|
||||||
|
title: string,
|
||||||
content: any,
|
content: any,
|
||||||
color: string,
|
color: string,
|
||||||
updateQuery: any,
|
updateQuery: any,
|
||||||
@ -116,6 +117,7 @@ interface EntryBodySectionProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const EntryBodySection: React.FC<EntryBodySectionProps> = ({
|
export const EntryBodySection: React.FC<EntryBodySectionProps> = ({
|
||||||
|
title,
|
||||||
color,
|
color,
|
||||||
updateQuery,
|
updateQuery,
|
||||||
content,
|
content,
|
||||||
@ -167,7 +169,7 @@ export const EntryBodySection: React.FC<EntryBodySectionProps> = ({
|
|||||||
|
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
{content && content?.length > 0 && <EntrySectionContainer
|
{content && content?.length > 0 && <EntrySectionContainer
|
||||||
title='Body'
|
title={title}
|
||||||
color={color}
|
color={color}
|
||||||
query={`${selector} == r".*"`}
|
query={`${selector} == r".*"`}
|
||||||
updateQuery={updateQuery}
|
updateQuery={updateQuery}
|
||||||
|
@ -21,7 +21,7 @@ const SectionsRepresentation: React.FC<any> = ({data, color, updateQuery}) => {
|
|||||||
break;
|
break;
|
||||||
case SectionTypes.SectionBody:
|
case SectionTypes.SectionBody:
|
||||||
sections.push(
|
sections.push(
|
||||||
<EntryBodySection key={i} color={color} content={row.data} updateQuery={updateQuery} encoding={row.encoding} contentType={row.mimeType} selector={row.selector}/>
|
<EntryBodySection key={i} title={row.title} color={color} content={row.data} updateQuery={updateQuery} encoding={row.encoding} contentType={row.mimeType} selector={row.selector}/>
|
||||||
)
|
)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user