From f5bacbd1eac2d2c0bd17857fac2e47eedb9d4e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Mert=20Y=C4=B1ld=C4=B1ran?= Date: Sat, 15 Jan 2022 20:46:10 +0300 Subject: [PATCH] Display Redis value as `EntryBodySection` (#644) --- tap/extensions/redis/helpers.go | 12 +++++++----- ui/src/components/EntryDetailed/EntrySections.tsx | 4 +++- ui/src/components/EntryDetailed/EntryViewer.tsx | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tap/extensions/redis/helpers.go b/tap/extensions/redis/helpers.go index 3f8b61791..1661d1e0b 100644 --- a/tap/extensions/redis/helpers.go +++ b/tap/extensions/redis/helpers.go @@ -42,11 +42,6 @@ func representGeneric(generic map[string]interface{}, selectorPrefix string) (re Value: generic["key"].(string), Selector: fmt.Sprintf("%skey", selectorPrefix), }, - { - Name: "Value", - Value: generic["value"].(string), - Selector: fmt.Sprintf("%svalue", selectorPrefix), - }, { Name: "Keyword", Value: generic["keyword"].(string), @@ -59,5 +54,12 @@ func representGeneric(generic map[string]interface{}, selectorPrefix string) (re Data: string(details), }) + representation = append(representation, api.SectionData{ + Type: api.BODY, + Title: "Value", + Data: generic["value"].(string), + Selector: fmt.Sprintf("%svalue", selectorPrefix), + }) + return } diff --git a/ui/src/components/EntryDetailed/EntrySections.tsx b/ui/src/components/EntryDetailed/EntrySections.tsx index ec06de46b..6d871bb75 100644 --- a/ui/src/components/EntryDetailed/EntrySections.tsx +++ b/ui/src/components/EntryDetailed/EntrySections.tsx @@ -107,6 +107,7 @@ export const EntrySectionContainer: React.FC = ({tit } interface EntryBodySectionProps { + title: string, content: any, color: string, updateQuery: any, @@ -116,6 +117,7 @@ interface EntryBodySectionProps { } export const EntryBodySection: React.FC = ({ + title, color, updateQuery, content, @@ -167,7 +169,7 @@ export const EntryBodySection: React.FC = ({ return {content && content?.length > 0 && = ({data, color, updateQuery}) => { break; case SectionTypes.SectionBody: sections.push( - + ) break; default: